diff --git a/CHANGELOG.md b/CHANGELOG.md index 2886342..4929613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.0] - 2024-11-14 + +### Added + +- Added support to pass settings in `init` method. + ## [1.8.0] - 2024-09-25 ### Added diff --git a/dist/client/vwo-fme-javascript-sdk.js b/dist/client/vwo-fme-javascript-sdk.js index b360648..70f715d 100644 --- a/dist/client/vwo-fme-javascript-sdk.js +++ b/dist/client/vwo-fme-javascript-sdk.js @@ -1,5 +1,5 @@ /*! - * vwo-fme-javascript-sdk - v1.7.0 + * vwo-fme-javascript-sdk - v1.8.0 * URL - https://github.com/wingify/vwo-node-sdk * * Copyright 2024 Wingify Software Pvt. Ltd. @@ -275,6 +275,9 @@ var VWO = /** @class */ (function () { // .initBatching() // Initializes batching for bulk data processing. .initPolling(); // Starts polling mechanism for regular updates. // .setAnalyticsCallback() // Sets up analytics callback for data analysis. + if (options === null || options === void 0 ? void 0 : options.settings) { + return Promise.resolve(this.vwoBuilder.build(options.settings)); + } return this.vwoBuilder.getSettings().then(function (settings) { return _this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings. }); @@ -1637,7 +1640,7 @@ if (true) { packageFile = { name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build // @ts-expect-error This will be relaved by webpack at the time of build for browser - version: "1.7.0", // will be replaced by webpack for browser build + version: "1.8.0", // will be replaced by webpack for browser build }; platform = PlatformEnum_1.PlatformEnum.CLIENT; } @@ -8957,26 +8960,17 @@ exports.evaluateRule = evaluateRule; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.setSettingsAndAddCampaignsToRules = void 0; -/** - * Copyright 2024 Wingify Software Pvt. Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ var SettingsModel_1 = __webpack_require__(/*! ../models/settings/SettingsModel */ "./lib/models/settings/SettingsModel.ts"); var CampaignUtil_1 = __webpack_require__(/*! ./CampaignUtil */ "./lib/utils/CampaignUtil.ts"); var FunctionUtil_1 = __webpack_require__(/*! ./FunctionUtil */ "./lib/utils/FunctionUtil.ts"); var GatewayServiceUtil_1 = __webpack_require__(/*! ./GatewayServiceUtil */ "./lib/utils/GatewayServiceUtil.ts"); +/** + * Sets settings and adds campaigns to rules + * @param settings settings + * @param vwoClientInstance VWOClient instance + */ function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) { + // create settings model and set it to vwoClientInstance vwoClientInstance.settings = new SettingsModel_1.SettingsModel(settings); vwoClientInstance.originalSettings = settings; // Optimize loop by avoiding multiple calls to `getCampaigns()` @@ -11445,7 +11439,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"API_CALLED":"API - {apiName} called" /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"INIT_OPTIONS_ERROR":"[ERROR]: VWO-SDK {date} Options should be of type object","INIT_OPTIONS_SDK_KEY_ERROR":"[ERROR]: VWO-SDK {date} Please provide the sdkKey in the options and should be a of type string","INIT_OPTIONS_ACCOUNT_ID_ERROR":"[ERROR]: VWO-SDK {date} Please provide VWO account ID in the options and should be a of type string|number","INIT_OPTIONS_INVALID":"Invalid key:{key} passed in options. Should be of type:{correctType} and greater than equal to 1000","SETTINGS_FETCH_ERROR":"Settings could not be fetched. Error:{err}","SETTINGS_SCHEMA_INVALID":"Settings are not valid. Failed schema validation","POLLING_FETCH_SETTINGS_FAILED":"Error while fetching VWO settings with polling","API_THROW_ERROR":"API - {apiName} failed to execute. Trace:{err}","API_INVALID_PARAM":"Key:{key} passed to API:{apiName} is not of valid type. Got type:{type}, should be:{correctType}","API_SETTING_INVALID":"Settings are not valid. Contact VWO Support","API_CONTEXT_INVALID":"Context should be an object and must contain a mandatory key - id, which is User ID","FEATURE_NOT_FOUND":"Feature not found for the key:{featureKey}","EVENT_NOT_FOUND":"Event:{eventName} not found in any of the features\' metrics","STORED_DATA_ERROR":"Error in getting data from storage. Error:{err}","STORING_DATA_ERROR":"Key:{featureKey} is not valid. Not able to store data into storage","GATEWAY_URL_ERROR":"Please provide a valid URL for VWO Gateway Service while initializing the SDK","NETWORK_CALL_FAILED":"Error occurred while sending {method} request. Error:{err}"}'); +module.exports = /*#__PURE__*/JSON.parse('{"INIT_OPTIONS_ERROR":"[ERROR]: VWO-SDK {date} Options should be of type object","INIT_OPTIONS_SDK_KEY_ERROR":"[ERROR]: VWO-SDK {date} Please provide the sdkKey in the options and should be a of type string","INIT_OPTIONS_ACCOUNT_ID_ERROR":"[ERROR]: VWO-SDK {date} Please provide VWO account ID in the options and should be a of type string|number","INIT_OPTIONS_INVALID":"Invalid key:{key} passed in options. Should be of type:{correctType} and greater than equal to 1000","SETTINGS_FETCH_ERROR":"Settings could not be fetched. Error:{err}","SETTINGS_SCHEMA_INVALID":"Settings are not valid. Failed schema validation","POLLING_FETCH_SETTINGS_FAILED":"Error while fetching VWO settings with polling","API_THROW_ERROR":"API - {apiName} failed to execute. Trace:{err}","API_INVALID_PARAM":"Key:{key} passed to API:{apiName} is not of valid type. Got type:{type}, should be:{correctType}","API_SETTING_INVALID":"Settings are not valid. Contact VWO Support","API_CONTEXT_INVALID":"Context should be an object and must contain a mandatory key - id, which is User ID","FEATURE_NOT_FOUND":"Feature not found for the key:{featureKey}","EVENT_NOT_FOUND":"Event:{eventName} not found in any of the features\' metrics","STORED_DATA_ERROR":"Error in getting data from storage. Error:{err}","STORING_DATA_ERROR":"Key:{featureKey} is not valid. Not able to store data into storage","GATEWAY_URL_ERROR":"Please provide a valid URL for VWO Gateway Service while initializing the SDK","NETWORK_CALL_FAILED":"Error occurred while sending {method} request. Error:{err}","SET_USER_ALIAS":"Error in setting user alias for user ID:{userId} and alias ID:{aliasUserId}. Error:{err}","GET_USER_ALIAS":"Error in getting user alias for user ID:{userId}. Error:{err}"}'); /***/ }), diff --git a/dist/client/vwo-fme-javascript-sdk.js.map b/dist/client/vwo-fme-javascript-sdk.js.map index 54aafe6..0917686 100644 --- a/dist/client/vwo-fme-javascript-sdk.js.map +++ b/dist/client/vwo-fme-javascript-sdk.js.map @@ -1 +1 @@ -{"version":3,"file":"vwo-fme-javascript-sdk.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACdA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM,IAA6B;AACnC;AACA,IAAI,KAAK,EAON;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,gEAAS;;AAElD,iCAAiC,mBAAO,CAAC,gEAAS;;AAElD,iCAAiC,mBAAO,CAAC,gEAAS;;AAElD,kCAAkC,mBAAO,CAAC,kEAAU;;AAEpD,sCAAsC,mBAAO,CAAC,0EAAc;;AAE5D,uCAAuC,mBAAO,CAAC,4EAAe;;AAE9D,wCAAwC,mBAAO,CAAC,8EAAgB;;AAEhE,oCAAoC,mBAAO,CAAC,sEAAY;;AAExD,uCAAuC,uCAAuC;;;;;;;;;;;AC9EjE;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AAC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ACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C;AAC9C,IAAI,IAAI;AACR;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,iCAAiC;AACjC,QAAQ;AACR;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA,GAAG;AACH;;AAEA,cAAc;AACd,mBAAmB;AACnB,WAAW;AACX,aAAa;AACb,cAAc;AACd,cAAc;AACd,eAAe;AACf,cAAc;AACd,cAAc;AACd,YAAY;AACZ,iBAAiB;AACjB,cAAc;AACd,kBAAkB;AAClB,eAAe;AACf,aAAa;AACb,aAAa;AACb,YAAY;AACZ,gBAAgB;AAChB,eAAe;AACf,oBAAoB;AACpB,UAAU;AACV,YAAY;AACZ,eAAe;AACf,WAAW;AACX,YAAY;AACZ,WAAW;AACX,WAAW;AACX,aAAa;AACb,gBAAgB;AAChB,cAAc;AACd,cAAc;AACd,YAAY;AACZ,gBAAgB;AAChB,eAAe;AACf,eAAe;AACf,YAAY;AACZ,cAAc;AACd,cAAc;AACd,cAAc;AACd,WAAW;AACX,YAAY;AACZ,cAAc;AACd,cAAc;AACd,eAAe;AACf,aAAa;AACb,YAAY;AACZ,aAAa;AACb,eAAe;AACf,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC5nCA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA;;;;;;;;;;;;;;GAcG;;;AAEH,oIAAoE;AAG3D,8FAHA,2BAAY,QAGA;AAFrB,iHAAyD;AAErB,kGAF3B,qBAAS,QAEkC;AACpD,6DAAqC;AAA5B,gGAAI;AAAE,oGAAM","sources":["webpack://vwoSdk/webpack/universalModuleDefinition","webpack://vwoSdk/./node_modules/murmurhash/murmurhash.js","webpack://vwoSdk/./lib/VWO.ts","webpack://vwoSdk/./lib/VWOBuilder.ts","webpack://vwoSdk/./lib/VWOClient.ts","webpack://vwoSdk/./lib/api/GetFlag.ts","webpack://vwoSdk/./lib/api/SetAttribute.ts","webpack://vwoSdk/./lib/api/TrackEvent.ts","webpack://vwoSdk/./lib/constants/Url.ts","webpack://vwoSdk/./lib/constants/index.ts","webpack://vwoSdk/./lib/decorators/StorageDecorator.ts","webpack://vwoSdk/./lib/enums/ApiEnum.ts","webpack://vwoSdk/./lib/enums/CampaignTypeEnum.ts","webpack://vwoSdk/./lib/enums/EventEnum.ts","webpack://vwoSdk/./lib/enums/HeadersEnum.ts","webpack://vwoSdk/./lib/enums/HttpMethodEnum.ts","webpack://vwoSdk/./lib/enums/PlatformEnum.ts","webpack://vwoSdk/./lib/enums/StatusEnum.ts","webpack://vwoSdk/./lib/enums/StorageEnum.ts","webpack://vwoSdk/./lib/enums/UrlEnum.ts","webpack://vwoSdk/./lib/enums/log-messages/index.ts","webpack://vwoSdk/./lib/models/campaign/CampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/FeatureModel.ts","webpack://vwoSdk/./lib/models/campaign/ImpactCampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/MetricModel.ts","webpack://vwoSdk/./lib/models/campaign/RuleModel.ts","webpack://vwoSdk/./lib/models/campaign/VariableModel.ts","webpack://vwoSdk/./lib/models/campaign/VariationModel.ts","webpack://vwoSdk/./lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwoSdk/./lib/models/settings/SettingsModel.ts","webpack://vwoSdk/./lib/models/user/ContextModel.ts","webpack://vwoSdk/./lib/models/user/ContextVWOModel.ts","webpack://vwoSdk/./lib/packages/decision-maker/index.ts","webpack://vwoSdk/./lib/packages/logger/LogMessageBuilder.ts","webpack://vwoSdk/./lib/packages/logger/Logger.ts","webpack://vwoSdk/./lib/packages/logger/core/LogManager.ts","webpack://vwoSdk/./lib/packages/logger/core/TransportManager.ts","webpack://vwoSdk/./lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwoSdk/./lib/packages/logger/index.ts","webpack://vwoSdk/./lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwoSdk/./lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwoSdk/./lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwoSdk/./lib/packages/network-layer/index.ts","webpack://vwoSdk/./lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwoSdk/./lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/RequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/ResponseModel.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/index.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwoSdk/./lib/packages/storage/Connector.ts","webpack://vwoSdk/./lib/packages/storage/Storage.ts","webpack://vwoSdk/./lib/packages/storage/index.ts","webpack://vwoSdk/./lib/services/CampaignDecisionService.ts","webpack://vwoSdk/./lib/services/HooksService.ts","webpack://vwoSdk/./lib/services/SettingsService.ts","webpack://vwoSdk/./lib/services/StorageService.ts","webpack://vwoSdk/./lib/utils/CampaignUtil.ts","webpack://vwoSdk/./lib/utils/DataTypeUtil.ts","webpack://vwoSdk/./lib/utils/DecisionUtil.ts","webpack://vwoSdk/./lib/utils/FunctionUtil.ts","webpack://vwoSdk/./lib/utils/GatewayServiceUtil.ts","webpack://vwoSdk/./lib/utils/ImpressionUtil.ts","webpack://vwoSdk/./lib/utils/LogMessageUtil.ts","webpack://vwoSdk/./lib/utils/MegUtil.ts","webpack://vwoSdk/./lib/utils/NetworkUtil.ts","webpack://vwoSdk/./lib/utils/PromiseUtil.ts","webpack://vwoSdk/./lib/utils/RuleEvaluationUtil.ts","webpack://vwoSdk/./lib/utils/SettingsUtil.ts","webpack://vwoSdk/./lib/utils/UrlUtil.ts","webpack://vwoSdk/./lib/utils/UuidUtil.ts","webpack://vwoSdk/./lib/utils/XMLUtil.ts","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/index.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/md5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/native.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/nil.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/parse.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/regex.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/rng.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v3.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v35.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v4.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/validate.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/version.js","webpack://vwoSdk/./node_modules/vwo-fme-sdk-log-messages/index.js","webpack://vwoSdk/./node_modules/superstruct/lib/index.cjs","webpack://vwoSdk/webpack/bootstrap","webpack://vwoSdk/./lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t// CommonJS2\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\t// AMD\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\t// CommonJS\n\telse if(typeof exports === 'object')\n\t\texports[\"vwoSdk\"] = factory();\n\t// Root\n\telse\n\t\troot[\"vwoSdk\"] = factory();\n})(this, () => {\nreturn ","(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VWOBuilder } from './VWOBuilder';\nimport { IVWOClient } from './VWOClient';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { dynamic } from './types/Common';\nimport { isObject, isString } from './utils/DataTypeUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { InfoLogMessagesEnum, ErrorLogMessagesEnum } from './enums/log-messages';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { PlatformEnum } from './enums/PlatformEnum';\n\nexport class VWO {\n private static vwoBuilder: VWOBuilder;\n private static instance: dynamic;\n\n /**\n * Constructor for the VWO class.\n * Initializes a new instance of VWO with the provided options.\n * @param {Record} options - Configuration options for the VWO instance.\n * @returns The instance of VWO.\n */\n constructor(options: IVWOOptions) {\n return VWO.setInstance(options);\n }\n\n /**\n * Sets the singleton instance of VWO.\n * Configures and builds the VWO instance using the provided options.\n * @param {Record} options - Configuration options for setting up VWO.\n * @returns A Promise resolving to the configured VWO instance.\n */\n private static setInstance(options: IVWOOptions): Promise {\n const optionsVWOBuilder: any = options?.vwoBuilder;\n this.vwoBuilder = optionsVWOBuilder || new VWOBuilder(options);\n\n this.instance = this.vwoBuilder\n .setLogger() // Sets up logging for debugging and monitoring.\n .setSettingsService() // Sets the settings service for configuration management.\n .setStorage() // Configures storage for data persistence.\n .setNetworkManager() // Configures network management for API communication.\n .setSegmentation() // Sets up segmentation for targeted functionality.\n // .initBatching() // Initializes batching for bulk data processing.\n .initPolling(); // Starts polling mechanism for regular updates.\n // .setAnalyticsCallback() // Sets up analytics callback for data analysis.\n\n return this.vwoBuilder.getSettings().then((settings: SettingsModel) => {\n return this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings.\n });\n }\n\n /**\n * Gets the singleton instance of VWO.\n * @returns The singleton instance of VWO.\n */\n static get Instance(): dynamic {\n return this.instance;\n }\n}\n\nlet _global: Record = {};\n/**\n * Initializes a new instance of VWO with the provided options.\n * @param options Configuration options for the VWO instance.\n * @property {string} sdkKey - The SDK key for the VWO account.\n * @property {string} accountId - The account ID for the VWO account.\n * @property {GatewayServiceModel} gatewayService - The gateway service configuration.\n * @property {StorageService} storage - The storage configuration.\n * @returns\n */\n\nexport async function init(options: IVWOOptions): Promise {\n const apiName = 'init';\n const date = new Date().toISOString();\n\n try {\n if (!isObject(options)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ERROR, {\n date,\n });\n console.error(msg); // Ensures options is an object.\n }\n\n if (!options?.sdkKey || !isString(options?.sdkKey)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_SDK_KEY_ERROR, {\n date,\n });\n console.error(msg); // Validates sdkKey presence and type.\n }\n\n if (!options.accountId) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ACCOUNT_ID_ERROR, {\n date,\n });\n console.error(msg); // Validates accountId presence and type.\n }\n\n if (typeof process.env === 'undefined') {\n options.platform = PlatformEnum.CLIENT;\n } else {\n options.platform = PlatformEnum.SERVER;\n }\n\n const instance: any = new VWO(options); // Creates a new VWO instance with the validated options.\n\n _global = {\n vwoInitDeferred: new Deferred(),\n isSettingsFetched: false,\n instance: null,\n };\n\n return instance.then((_vwoInstance) => {\n _global.isSettingsFetched = true;\n _global.instance = _vwoInstance;\n _global.vwoInitDeferred.resolve(_vwoInstance);\n\n return _vwoInstance;\n });\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n\nexport async function onInit() {\n const apiName = 'onInit';\n\n try {\n _global.vwoInitDeferred = new Deferred();\n const date = new Date().toISOString();\n\n // If settings are already fetched, resolve the promise\n if (_global.isSettingsFetched) {\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_ALREADY_RESOLVED, {\n date,\n apiName,\n });\n\n console.info(msg);\n _global.vwoInitDeferred.resolve(_global.instance);\n } else {\n // wait for five seconds, else reject the promise\n setTimeout(() => {\n if (_global.isSettingsFetched) {\n return;\n }\n\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_SETTINGS_FAILED, {\n date,\n });\n\n console.error(msg);\n _global.vwoInitDeferred.reject(new Error('VWO settings could not be fetched'));\n }, 5000);\n }\n\n return _global.vwoInitDeferred.promise;\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from './types/Common';\n\nimport { ILogManager, LogManager } from './packages/logger';\nimport { NetworkManager } from './packages/network-layer';\nimport { SegmentationManager } from './packages/segmentation-evaluator';\n\nimport { Storage } from './packages/storage';\n\nimport { IVWOClient, VWOClient } from './VWOClient';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { SettingsService } from './services/SettingsService';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { isNumber } from './utils/DataTypeUtil';\nimport { cloneObject } from './utils/FunctionUtil';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { getRandomUUID } from './utils/UuidUtil';\n\nexport interface IVWOBuilder {\n settings: SettingsModel; // Holds the configuration settings for the VWO client\n storage: Storage; // Interface for storage management\n logManager: ILogManager; // Manages logging across the VWO SDK\n isSettingsFetchInProgress: boolean; // Flag to check if settings fetch is in progress\n vwoInstance: IVWOClient;\n\n build(settings: SettingsModel): IVWOClient; // Builds and returns a new VWOClient instance\n\n fetchSettings(): Promise; // Asynchronously fetches settings from the server\n setSettingsService(): this; // Sets up the settings manager with provided options\n getSettings(force: boolean): Promise; // Fetches settings, optionally forcing a refresh\n setStorage(): this; // Sets up the storage connector based on provided options\n setNetworkManager(): this; // Configures the network manager with client and mode\n // initBatching(): this; // Initializes event batching with provided configuration\n // setAnalyticsCallback(): this; // Configures the analytics callback based on provided options\n initPolling(): this; // Sets up polling for settings at a specified interval\n setLogger(): this; // Sets up the logger with specified options\n setSegmentation(): this; // Configures the segmentation evaluator with provided options\n}\n\nexport class VWOBuilder implements IVWOBuilder {\n readonly sdkKey: string;\n readonly options: IVWOOptions;\n\n private settingFileManager: SettingsService;\n\n settings: SettingsModel;\n storage: Storage;\n logManager: ILogManager;\n originalSettings: dynamic;\n isSettingsFetchInProgress: boolean;\n vwoInstance: IVWOClient;\n\n constructor(options: IVWOOptions) {\n this.options = options;\n }\n\n /**\n * Sets the network manager with the provided client and development mode options.\n * @returns {this} The instance of this builder.\n */\n setNetworkManager(): this {\n const networkInstance = NetworkManager.Instance;\n // Attach the network client from options\n networkInstance.attachClient(this.options?.network?.client);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Network Layer`,\n }),\n );\n // Set the development mode based on options\n networkInstance.getConfig().setDevelopmentMode(this.options?.isDevelopmentMode);\n return this;\n }\n\n /**\n * Sets the segmentation evaluator with the provided segmentation options.\n * @returns {this} The instance of this builder.\n */\n setSegmentation(): this {\n SegmentationManager.Instance.attachEvaluator(this.options?.segmentation);\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Segmentation Evaluator`,\n }),\n );\n return this;\n }\n\n /**\n * Fetches settings asynchronously, ensuring no parallel fetches.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the fetched settings.\n */\n fetchSettings(force?: boolean): Promise {\n const deferredObject = new Deferred();\n\n // Check if a fetch operation is already in progress\n if (!this.isSettingsFetchInProgress) {\n this.isSettingsFetchInProgress = true;\n this.settingFileManager.getSettings(force).then((settings: SettingsModel) => {\n // if force is false, update original settings, if true the request is from polling and no need to update original settings\n if (!force) {\n this.originalSettings = settings;\n }\n\n this.isSettingsFetchInProgress = false;\n deferredObject.resolve(settings);\n });\n\n return deferredObject.promise;\n } else {\n // Avoid parallel fetches by recursively calling fetchSettings\n return this.fetchSettings(force);\n }\n }\n\n /**\n * Gets the settings, fetching them if not cached or if forced.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the settings.\n */\n getSettings(force?: boolean): Promise {\n const deferredObject = new Deferred();\n\n try {\n // Use cached settings if available and not forced to fetch\n if (!force && this.settings) {\n LogManager.Instance.info('Using already fetched and cached settings');\n deferredObject.resolve(this.settings);\n } else {\n // Fetch settings if not cached or forced\n this.fetchSettings(force).then((settings: SettingsModel) => {\n deferredObject.resolve(settings);\n });\n }\n } catch (err) {\n LogManager.Instance.error('Failed to fetch settings. Error: ' + err);\n deferredObject.resolve({});\n }\n return deferredObject.promise;\n }\n\n /**\n * Sets the storage connector based on the provided storage options.\n * @returns {this} The instance of this builder.\n */\n setStorage(): this {\n if (this.options.storage) {\n // Attach the storage connector from options\n this.storage = Storage.Instance.attachConnector(this.options.storage);\n } else {\n // Set storage to null if no storage options provided\n this.storage = null;\n }\n\n return this;\n }\n\n /**\n * Sets the settings manager with the provided options.\n * @returns {this} The instance of this builder.\n */\n setSettingsService(): this {\n this.settingFileManager = new SettingsService(this.options);\n\n return this;\n }\n\n /**\n * Sets the logger with the provided logger options.\n * @returns {this} The instance of this builder.\n */\n setLogger(): this {\n this.logManager = new LogManager(this.options.logger || {});\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Logger`,\n }),\n );\n return this;\n }\n\n /**\n * Sets the analytics callback with the provided analytics options.\n * @returns {this} The instance of this builder.\n */\n /* setAnalyticsCallback(): this {\n if (!isObject(this.options.analyticsEvent)) {\n // TODO: add logging here\n return this;\n }\n\n if (!isFunction(this.options.analyticsEvent.eventCallback)) {\n // TODO: add logging here\n return this;\n }\n\n if (\n this.options.analyticsEvent.isBatchingSupported &&\n !isBoolean(this.options.analyticsEvent.isBatchingSupported)\n ) {\n // TODO:- add logging here\n return this;\n }\n\n // AnalyticsEvent.Instance.attachCallback(\n // this.options.analyticsEvent.eventCallback,\n // this.options.analyticsEvent.isBatchingSupported\n // );\n return this;\n } */\n\n /**\n * Generates a random user ID based on the provided API key.\n * @returns {string} The generated random user ID.\n */\n getRandomUserId(): string {\n const apiName = 'getRandomUserId';\n try {\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n return getRandomUUID(this.options.sdkKey);\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n\n /**\n * Initializes the batching with the provided batch events options.\n * @returns {this} The instance of this builder.\n */\n /* initBatching(): this {\n if (!isObject(this.options.batchEvents)) {\n // TODO:- add logging here\n return this;\n }\n\n if (\n isObject(this.options.batchEvents) &&\n (!(\n (isNumber(this.options.batchEvents.eventsPerRequest) &&\n this.options.batchEvents.eventsPerRequest > 0 &&\n this.options.batchEvents.eventsPerRequest <= Constants.MAX_EVENTS_PER_REQUEST) ||\n (isNumber(this.options.batchEvents.requestTimeInterval) && this.options.batchEvents.requestTimeInterval >= 1)\n ) ||\n !isFunction(this.options.batchEvents.flushCallback))\n ) {\n LogManager.Instance.error('Invalid batchEvents config');\n // throw new Error('Invalid batchEvents config');\n return this;\n }\n\n // BatchEventsQueue.Instance.setBatchConfig(this.options.batchEvents, this.options.sdkKey); // TODO\n\n return this;\n } */\n\n /**\n * Initializes the polling with the provided poll interval.\n * @returns {this} The instance of this builder.\n */\n initPolling(): this {\n if (!this.options.pollInterval) {\n return this;\n }\n\n if (this.options.pollInterval && !isNumber(this.options.pollInterval)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n if (this.options.pollInterval && this.options.pollInterval < 1000) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n this.checkAndPoll();\n\n return this;\n }\n\n /**\n * Builds a new VWOClient instance with the provided settings.\n * @param {SettingsModel} settings - The settings for the VWOClient.\n * @returns {VWOClient} The new VWOClient instance.\n */\n build(settings: SettingsModel): IVWOClient {\n this.vwoInstance = new VWOClient(settings, this.options);\n\n return this.vwoInstance;\n }\n\n /**\n * Checks and polls for settings updates at the provided interval.\n */\n checkAndPoll(): void {\n const pollingInterval = this.options.pollInterval;\n\n setInterval(() => {\n this.getSettings(true)\n .then((latestSettings: SettingsModel) => {\n const lastSettings = JSON.stringify(this.originalSettings);\n const stringifiedLatestSettings = JSON.stringify(latestSettings);\n if (stringifiedLatestSettings !== lastSettings) {\n this.originalSettings = latestSettings;\n const clonedSettings = cloneObject(latestSettings);\n\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_SET_SETTINGS);\n setSettingsAndAddCampaignsToRules(clonedSettings, this.vwoInstance);\n } else {\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS);\n }\n })\n .catch(() => {\n LogManager.Instance.error(ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED);\n });\n }, pollingInterval);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from './packages/logger';\nimport { Storage } from './packages/storage';\n\nimport { FlagApi } from './api/GetFlag';\nimport { SetAttributeApi } from './api/SetAttribute';\nimport { TrackApi } from './api/TrackEvent';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { SettingsModel } from './models/settings/SettingsModel';\n\nimport { dynamic } from './types/Common';\n// import { BatchEventsQueue } from './services/batchEventsQueue';\n\nimport { SettingsSchema } from './models/schemas/SettingsSchemaValidation';\nimport { ContextModel } from './models/user/ContextModel';\nimport HooksService from './services/HooksService';\nimport { UrlUtil } from './utils/UrlUtil';\n\nimport { getType, isBoolean, isNumber, isObject, isString } from './utils/DataTypeUtil';\n\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { setShouldWaitForTrackingCalls } from './utils/NetworkUtil';\n\nexport interface IVWOClient {\n readonly options?: IVWOOptions;\n settings: SettingsModel;\n\n getFlag(featureKey: string, context: Record): Record;\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record,\n ): Promise>;\n setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise;\n}\n\nexport class VWOClient implements IVWOClient {\n settings: SettingsModel;\n originalSettings: Record;\n storage: Storage;\n\n constructor(settings: SettingsModel, options: IVWOOptions) {\n this.options = options;\n\n setSettingsAndAddCampaignsToRules(settings, this);\n\n UrlUtil.init({\n collectionPrefix: this.settings.getCollectionPrefix(),\n });\n\n setShouldWaitForTrackingCalls(this.options.shouldWaitForTrackingCalls || false);\n\n LogManager.Instance.info(InfoLogMessagesEnum.CLIENT_INITIALIZED);\n return this;\n }\n options?: IVWOOptions;\n /**\n * Retrieves the value of a feature flag for a given feature key and context.\n * This method validates the feature key and context, ensures the settings are valid, and then uses the FlagApi to get the flag value.\n *\n * @param {string} featureKey - The key of the feature to retrieve.\n * @param {ContextModel} context - The context in which the feature flag is being retrieved, must include a valid user ID.\n * @returns {Promise>} - A promise that resolves to the feature flag value.\n */\n getFlag(featureKey: string, context: Record): Record {\n const apiName = 'getFlag';\n const deferredObject = new Deferred();\n const errorReturnSchema = {\n isEnabled: (): boolean => false,\n getVariables: (): Array> => [],\n getVariable: (_key: string, defaultValue: any): dynamic => defaultValue,\n };\n\n try {\n const hooksService = new HooksService(this.options);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate featureKey is a string\n if (!isString(featureKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'featureKey',\n type: getType(featureKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: featureKey should be a string');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n new FlagApi()\n .get(featureKey, this.settings, contextModel, hooksService)\n .then((data: any) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve(errorReturnSchema);\n });\n } catch (err) {\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve(errorReturnSchema);\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Tracks an event with specified properties and context.\n * This method validates the types of the inputs and ensures the settings and user context are valid before proceeding.\n *\n * @param {string} eventName - The name of the event to track.\n * @param {ContextModel} context - The context in which the event is being tracked, must include a valid user ID.\n * @param {Record} eventProperties - The properties associated with the event.\n * @returns {Promise>} - A promise that resolves to the result of the tracking operation.\n */\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record = {},\n ): Promise> {\n const apiName = 'trackEvent';\n const deferredObject = new Deferred();\n\n try {\n const hooksService = new HooksService(this.options);\n\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate eventName is a string\n if (!isString(eventName)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventName',\n type: getType(eventName),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: Event-name should be a string');\n }\n\n // Validate eventProperties is an object\n if (!isObject(eventProperties)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventProperties',\n type: getType(eventProperties),\n correctType: 'object',\n }),\n );\n\n throw new TypeError('TypeError: eventProperties should be an object');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with tracking the event\n new TrackApi()\n .track(this.settings, eventName, contextModel, eventProperties, hooksService)\n .then((data) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve({ [eventName]: false });\n });\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve({ [eventName]: false });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Sets an attribute for a user in the context provided.\n * This method validates the types of the inputs before proceeding with the API call.\n *\n * @param {string} attributeKey - The key of the attribute to set.\n * @param {string} attributeValue - The value of the attribute to set.\n * @param {ContextModel} context - The context in which the attribute should be set, must include a valid user ID.\n */\n async setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise {\n const apiName = 'setAttribute';\n\n try {\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate attributeKey is a string\n if (!isString(attributeKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeKey',\n type: getType(attributeKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: attributeKey should be a string');\n }\n // Validate attributeValue is a string\n if (!isString(attributeValue) && !isNumber(attributeValue) && !isBoolean(attributeValue)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeValue',\n type: getType(attributeValue),\n correctType: 'boolean | string | number',\n }),\n );\n\n throw new TypeError('TypeError: attributeValue should be a string');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with setting the attribute if validation is successful\n await new SetAttributeApi().setAttribute(this.settings, attributeKey, attributeValue, contextModel);\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { VariableModel } from '../models/campaign/VariableModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport IHooksService from '../services/HooksService';\nimport { StorageService } from '../services/StorageService';\nimport { getVariationFromCampaignKey } from '../utils/CampaignUtil';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from '../utils/DecisionUtil';\nimport { getAllExperimentRules, getFeatureFromKey, getSpecificRulesBasedOnType } from '../utils/FunctionUtil';\nimport { createAndSendImpressionForVariationShown } from '../utils/ImpressionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport { getShouldWaitForTrackingCalls } from '../utils/NetworkUtil';\n\ninterface IGetFlag {\n get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise;\n}\n\nexport class FlagApi implements IGetFlag {\n async get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise {\n let isEnabled = false;\n let rolloutVariationToReturn = null;\n let experimentVariationToReturn = null;\n let shouldCheckForExperimentsRules = false;\n\n const passedRulesInformation = {}; // for storing and integration callback\n const deferredObject = new Deferred();\n const evaluatedFeatureMap: Map = new Map();\n\n // get feature object from feature key\n const feature = getFeatureFromKey(settings, featureKey);\n const decision = {\n featureName: feature?.getName(),\n featureId: feature?.getId(),\n featureKey: feature?.getKey(),\n userId: context?.getId(),\n api: ApiEnum.GET_FLAG,\n };\n\n const storageService = new StorageService();\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'experiment',\n experimentKey: storedData.experimentKey,\n }),\n );\n deferredObject.resolve({\n isEnabled: () => true,\n getVariables: () => variation?.getVariables(),\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) =>\n variation\n ?.getVariables()\n .find((variable) => new VariableModel().modelFromDictionary(variable).getKey() === key)\n ?.getValue() || defaultValue,\n });\n\n return deferredObject.promise;\n }\n }\n } else if (storedData?.rolloutKey && storedData?.rolloutId) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.rolloutKey,\n storedData.rolloutVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'rollout',\n experimentKey: storedData.rolloutKey,\n }),\n );\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED, {\n userId: context.getId(),\n }),\n );\n\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n const featureInfo = {\n rolloutId: storedData.rolloutId,\n rolloutKey: storedData.rolloutKey,\n rolloutVariationId: storedData.rolloutVariationId,\n };\n evaluatedFeatureMap.set(featureKey, featureInfo);\n Object.assign(passedRulesInformation, featureInfo);\n }\n }\n\n if (!isObject(feature) || feature === undefined) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.FEATURE_NOT_FOUND, {\n featureKey,\n }),\n );\n\n deferredObject.reject({});\n\n return deferredObject.promise;\n }\n\n // TODO: remove await from here, need not wait for gateway service at the time of calling getFlag\n await SegmentationManager.Instance.setContextualData(settings, feature, context);\n\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT); // get all rollout rules\n\n if (rollOutRules.length > 0 && !isEnabled) {\n const rolloutRulesToEvaluate = [];\n\n for (const rule of rollOutRules) {\n const { preSegmentationResult, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n // if pre segment passed, then break the loop and check the traffic allocation\n rolloutRulesToEvaluate.push(rule);\n\n evaluatedFeatureMap.set(featureKey, {\n rolloutId: rule.getId(),\n rolloutKey: rule.getKey(),\n rolloutVariationId: rule.getVariations()[0]?.getId(),\n });\n\n break;\n }\n\n continue; // if rule does not satisfy, then check for other ROLLOUT rules\n }\n\n if (rolloutRulesToEvaluate.length > 0) {\n const passedRolloutCampaign = new CampaignModel().modelFromDictionary(rolloutRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, passedRolloutCampaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(passedRolloutCampaign, variation, passedRulesInformation, decision);\n\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n }\n }\n }\n } else if (rollOutRules.length === 0) {\n LogManager.Instance.debug(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT);\n shouldCheckForExperimentsRules = true;\n }\n\n if (shouldCheckForExperimentsRules) {\n const experimentRulesToEvaluate = [];\n\n // if rollout rule is passed, get all ab and Personalize rules\n const experimentRules = getAllExperimentRules(feature);\n const megGroupWinnerCampaigns: Map = new Map();\n\n for (const rule of experimentRules) {\n const { preSegmentationResult, whitelistedObject, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n if (whitelistedObject === null) {\n // whitelistedObject will be null if pre segment passed but whitelisting failed\n experimentRulesToEvaluate.push(rule);\n } else {\n isEnabled = true;\n experimentVariationToReturn = whitelistedObject.variation;\n Object.assign(passedRulesInformation, {\n experimentId: rule.getId(),\n experimentKey: rule.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n }\n\n break;\n }\n continue;\n }\n\n if (experimentRulesToEvaluate.length > 0) {\n const campaign = new CampaignModel().modelFromDictionary(experimentRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n experimentVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(campaign, variation, passedRulesInformation, decision);\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n }\n }\n }\n }\n\n // If flag is enabled, store it in data\n if (isEnabled) {\n // set storage data\n new StorageDecorator().setDataInStorage(\n {\n featureKey,\n context,\n ...passedRulesInformation,\n },\n storageService,\n );\n }\n\n // call integration callback, if defined\n hooksService.set(decision);\n hooksService.execute(hooksService.get());\n\n // Send data for Impact Campaign, if defined\n if (feature.getImpactCampaign()?.getCampaignId()) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.IMPACT_ANALYSIS, {\n userId: context.getId(),\n featureKey,\n status: isEnabled ? 'enabled' : 'disabled',\n }),\n );\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n }\n }\n\n const variablesForEvaluatedFlag =\n experimentVariationToReturn?.variables ?? rolloutVariationToReturn?.variables ?? [];\n\n deferredObject.resolve({\n isEnabled: () => isEnabled,\n getVariables: () => variablesForEvaluatedFlag,\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) => {\n const variable = variablesForEvaluatedFlag.find((variable) => variable.key === key);\n\n return variable?.value ?? defaultValue;\n },\n });\n\n return deferredObject.promise;\n }\n}\n\n// Not PRIVATE methods but helper methods. If need be, move them to some util file to be reused by other API(s)\n\nfunction _updateIntegrationsDecisionObject(\n campaign: CampaignModel,\n variation: VariationModel,\n passedRulesInformation: any,\n decision: any,\n): void {\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT) {\n Object.assign(passedRulesInformation, {\n rolloutId: campaign.getId(),\n rolloutKey: campaign.getKey(),\n rolloutVariationId: variation.getId(),\n });\n } else {\n Object.assign(passedRulesInformation, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: variation.getId(),\n });\n }\n Object.assign(decision, passedRulesInformation);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\nimport {\n getEventsBaseProperties,\n getAttributePayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\ninterface ISetAttribute {\n /**\n * Sets an attribute for a user.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise;\n}\n\nexport class SetAttributeApi implements ISetAttribute {\n /**\n * Implementation of setAttribute to create an impression for a user attribute.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n async setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise {\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n } else {\n createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n }\n }\n}\n\n/**\n * Creates an impression for a user attribute and sends it to the server.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute.\n * @param attributeValue The value of the attribute.\n * @param user User details.\n */\nconst createImpressionForAttribute = async (\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n) => {\n // Retrieve base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_SYNC_VISITOR_PROP,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Construct payload data for the attribute\n const payload = getAttributePayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_SYNC_VISITOR_PROP,\n attributeKey,\n attributeValue,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed payload via POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport IHooksService from '../services/HooksService';\nimport { dynamic } from '../types/Common';\nimport { doesEventBelongToAnyFeature } from '../utils/FunctionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport {\n getEventsBaseProperties,\n getTrackGoalPayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\n\ninterface ITrack {\n /**\n * Tracks an event with given properties and context.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param context Contextual information like user details.\n * @param eventProperties Properties associated with the event.\n * @param hooksService Manager for handling hooks and callbacks.\n * @returns A promise that resolves to a record indicating the success or failure of the event tracking.\n */\n track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: Record,\n hooksService: IHooksService,\n ): Promise>;\n}\n\nexport class TrackApi implements ITrack {\n /**\n * Implementation of the track method to handle event tracking.\n * Checks if the event exists, creates an impression, and executes hooks.\n */\n async track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n hooksService: IHooksService,\n ): Promise> {\n if (doesEventBelongToAnyFeature(eventName, settings)) {\n // Create an impression for the track event\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForTrack(settings, eventName, context, eventProperties);\n } else {\n createImpressionForTrack(settings, eventName, context, eventProperties);\n }\n // Set and execute integration callback for the track event\n hooksService.set({ eventName: eventName, api: ApiEnum.TRACK });\n hooksService.execute(hooksService.get());\n\n return { [eventName]: true };\n }\n // Log an error if the event does not exist\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.EVENT_NOT_FOUND, {\n eventName,\n }),\n );\n\n return { [eventName]: false };\n }\n}\n\n/**\n * Creates an impression for a track event and sends it via a POST API request.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param user User details.\n * @param eventProperties Properties associated with the event.\n */\nconst createImpressionForTrack = async (\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n eventName,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Prepare the payload for the track goal\n const payload = getTrackGoalPayloadData(\n settings,\n context.getId(),\n eventName,\n eventProperties,\n context?.getUserAgent(),\n context?.getIpAddress(),\n );\n // Send the prepared payload via POST API request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const HTTP = 'http';\nexport const HTTPS = 'https';\n\nexport const SEED_URL = 'https://vwo.com';\nexport const HTTP_PROTOCOL = `${HTTP}://`;\nexport const HTTPS_PROTOCOL = `${HTTPS}://`;\nexport const BASE_URL = 'dev.visualwebsiteoptimizer.com';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* global SDK_VERSION */\nimport { PlatformEnum } from '../enums/PlatformEnum';\nimport { SEED_URL, HTTP_PROTOCOL, HTTPS_PROTOCOL } from './Url';\n\nlet packageFile;\nlet platform;\n\n// For client-side SDK, to keep the build size low\n// avoid adding the whole package file in the bundle\nif (typeof process.env === 'undefined') {\n packageFile = {\n name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build\n // @ts-expect-error This will be relaved by webpack at the time of build for browser\n version: SDK_VERSION, // will be replaced by webpack for browser build\n };\n\n platform = PlatformEnum.CLIENT;\n} else {\n packageFile = require('../../package.json');\n platform = PlatformEnum.SERVER;\n}\n\nexport const Constants = {\n SDK_NAME: packageFile.name,\n SDK_VERSION: packageFile.version,\n\n PLATFORM: platform,\n\n MAX_TRAFFIC_PERCENT: 100,\n MAX_TRAFFIC_VALUE: 10000,\n STATUS_RUNNING: 'RUNNING',\n\n SEED_VALUE: 1,\n MAX_EVENTS_PER_REQUEST: 5000,\n DEFAULT_REQUEST_TIME_INTERVAL: 600, // 10 * 60(secs) = 600 secs i.e. 10 minutes\n DEFAULT_EVENTS_PER_REQUEST: 100,\n\n SEED_URL,\n HTTP_PROTOCOL,\n HTTPS_PROTOCOL,\n\n SETTINGS: 'settings',\n SETTINGS_EXPIRY: 10000000,\n SETTINGS_TIMEOUT: 50000,\n\n HOST_NAME: 'dev.visualwebsiteoptimizer.com',\n SETTINTS_ENDPOINT: '/server-side/v2-settings',\n LOCATION_ENDPOINT: '/getLocation',\n\n VWO_FS_ENVIRONMENT: 'vwo_fs_environment',\n\n RANDOM_ALGO: 1,\n\n API_VERSION: '1',\n\n VWO_META_MEG_KEY: '_vwo_meta_meg_',\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from '../packages/logger';\n\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { IStorageService } from '../services/StorageService';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\ninterface IStorageDecorator {\n /**\n * Sets data in storage.\n * @param data The data to be stored.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to a VariationModel.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise;\n\n /**\n * Retrieves a feature from storage.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n getFeatureFromStorage(featureKey: FeatureModel, context: ContextModel, storageService: IStorageService): Promise;\n}\n\nexport class StorageDecorator implements IStorageDecorator {\n /**\n * Asynchronously retrieves a feature from storage based on the feature key and user.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n async getFeatureFromStorage(featureKey: any, context: ContextModel, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n storageService.getDataInStorage(featureKey, context).then((campaignMap: Record | StorageEnum) => {\n switch (campaignMap) {\n case StorageEnum.STORAGE_UNDEFINED:\n deferredObject.resolve(null); // No storage defined\n break;\n case StorageEnum.NO_DATA_FOUND:\n deferredObject.resolve(null); // No data found in storage\n break;\n case StorageEnum.INCORRECT_DATA:\n deferredObject.resolve(StorageEnum.INCORRECT_DATA); // Incorrect data found\n break;\n case StorageEnum.CAMPAIGN_PAUSED:\n deferredObject.resolve(null); // Campaign is paused\n break;\n case StorageEnum.VARIATION_NOT_FOUND:\n deferredObject.resolve(StorageEnum.VARIATION_NOT_FOUND); // No variation found\n break;\n case StorageEnum.WHITELISTED_VARIATION:\n deferredObject.resolve(null); // Whitelisted variation, handle accordingly\n break;\n default:\n deferredObject.resolve(campaignMap); // Valid data found, resolve with it\n }\n });\n\n return deferredObject.promise;\n }\n\n /**\n * Sets data in storage based on the provided data object.\n * @param data The data to be stored, including feature key and user details.\n * @param storageService The storage service instance.\n * @returns A promise that resolves when the data is successfully stored.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n const {\n featureKey,\n context,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n } = data;\n\n if (!featureKey) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'featureKey',\n }),\n );\n\n deferredObject.reject(); // Reject promise if feature key is invalid\n return;\n }\n if (!context.id) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Context or Context.id',\n }),\n );\n\n deferredObject.reject(); // Reject promise if user ID is invalid\n return;\n }\n if (rolloutKey && !experimentKey && !rolloutVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(rolloutKey, experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if rollout variation is invalid\n return;\n }\n if (experimentKey && !experimentVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if experiment variation is invalid\n return;\n }\n\n storageService.setDataInStorage({\n featureKey,\n userId: context.id,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n });\n\n deferredObject.resolve(); // Resolve promise when data is successfully set\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum ApiEnum {\n GET_FLAG = 'getFlag',\n TRACK = 'track',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum CampaignTypeEnum {\n ROLLOUT = 'FLAG_ROLLOUT',\n AB = 'FLAG_TESTING',\n PERSONALIZE = 'FLAG_PERSONALIZE',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum EventEnum {\n VWO_VARIATION_SHOWN = 'vwo_variationShown',\n VWO_SYNC_VISITOR_PROP = 'vwo_syncVisitorProp',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HeadersEnum {\n USER_AGENT = 'X-Device-User-Agent',\n IP = 'VWO-X-Forwarded-For',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HttpMethodEnum {\n GET = 'GET',\n POST = 'POST',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum PlatformEnum {\n CLIENT = 'client',\n SERVER = 'server',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StatusEnum {\n PASSED = 'passed',\n FAILED = 'failed',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StorageEnum {\n STORAGE_UNDEFINED,\n INCORRECT_DATA,\n NO_DATA_FOUND,\n CAMPAIGN_PAUSED,\n VARIATION_NOT_FOUND,\n WHITELISTED_VARIATION,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum UrlEnum {\n BASE_URL = 'dev.visualwebsiteoptimizer.com',\n SETTINGS_URL = '/server-side/settings',\n // WEBHOOK_SETTINGS_URL = '/server-side/pull',\n // BATCH_EVENTS = '/server-side/batch-events',\n EVENTS = '/events/t',\n ATTRIBUTE_CHECK = '/check-attribute',\n GET_USER_DATA = '/get-user-details',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as messages from 'vwo-fme-sdk-log-messages';\n\nconst DebugLogMessagesEnum = messages.debugMessages;\nconst InfoLogMessagesEnum = messages.infoMessages;\nconst ErrorLogMessagesEnum = messages.errorMessages;\n\nexport { DebugLogMessagesEnum, InfoLogMessagesEnum, ErrorLogMessagesEnum };\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { MetricModel } from './MetricModel';\nimport { VariableModel } from './VariableModel';\nimport { VariationModel } from './VariationModel';\n\nexport class CampaignModel {\n private id: number;\n private segments: Record;\n private percentTraffic: number;\n private isUserListEnabled: boolean;\n private key: string;\n private type: string;\n private name: string;\n private isForcedVariationEnabled: boolean;\n private variations: Array = [];\n private metrics: Array = [];\n private variables: Array = [];\n private variationId: number;\n private campaignId: number;\n private ruleKey: string;\n\n copy(campaignModel: CampaignModel): void {\n this.metrics = campaignModel.metrics;\n this.variations = campaignModel.variations;\n this.variables = campaignModel.variables;\n this.processCampaignKeys(campaignModel);\n }\n\n modelFromDictionary(campaign: CampaignModel): this {\n this.processCampaignProperties(campaign);\n this.processCampaignKeys(campaign);\n return this;\n }\n\n processCampaignProperties(campaign: CampaignModel): void {\n if (campaign.variables) {\n // campaign.var ||\n if (\n // (campaign.var && campaign.var.constructor === {}.constructor) ||\n campaign.variables.constructor === {}.constructor\n ) {\n this.variables = [];\n } else {\n const variableList: Array = campaign.variables; // campaign.var ||\n variableList.forEach((variable: any) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (campaign.variations) {\n // campaign.v ||\n if (\n // (campaign.v && campaign.v.constructor === {}.constructor) ||\n campaign.variations.constructor === {}.constructor\n ) {\n this.variations = [];\n } else {\n const variationList: Array = campaign.variations; // campaign.v ||\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n if (campaign.metrics) {\n // campaign.m ||\n if (campaign.metrics && campaign.metrics.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricsList: Array = campaign.metrics || [];\n metricsList.forEach((metric: any) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n }\n }\n\n processCampaignKeys(campaign: CampaignModel): void {\n this.id = campaign.id;\n this.percentTraffic = campaign.percentTraffic; // campaign.pT ||\n this.name = campaign.name; // campaign.n ||\n this.variationId = campaign.variationId; // campaign.vId ||\n this.campaignId = campaign.campaignId; // campaign.cId ||\n this.ruleKey = campaign.ruleKey; // campaign.rK ||\n this.isForcedVariationEnabled = campaign.isForcedVariationEnabled; // campaign.iFVE ||\n this.isUserListEnabled = campaign.isUserListEnabled; // campaign.iULE ||\n this.segments = campaign.segments;\n this.key = campaign.key; // campaign.k ||\n // this.priority = campaign.pr || campaign.priority;\n this.type = campaign.type; // campaign.t ||\n }\n\n getId(): number {\n return this.id;\n }\n\n getName(): string {\n return this.name;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getTraffic(): number {\n return this.percentTraffic;\n }\n\n getType(): string {\n return this.type;\n }\n\n getIsForcedVariationEnabled(): boolean {\n return this.isForcedVariationEnabled;\n }\n\n getIsUserListEnabled(): boolean {\n return this.isUserListEnabled;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from './CampaignModel';\nimport { ImpactCapmaignModel } from './ImpactCampaignModel';\nimport { MetricModel } from './MetricModel';\nimport { RuleModel } from './RuleModel';\n\nexport class FeatureModel {\n private m: Array = [];\n private metrics: Array = [];\n private id: number;\n private key: string;\n private name: string;\n private type: string;\n private rules: Array = [];\n private impactCampaign: ImpactCapmaignModel = null;\n\n private rulesLinkedCampaign: Array = [];\n private isGatewayServiceRequired: boolean = false;\n\n modelFromDictionary(feature: FeatureModel): this {\n this.id = feature.id;\n this.key = feature.key;\n this.name = feature.name;\n this.type = feature.type;\n if (feature?.isGatewayServiceRequired) {\n this.isGatewayServiceRequired = feature.isGatewayServiceRequired;\n }\n if (feature.impactCampaign) {\n this.impactCampaign = new ImpactCapmaignModel().modelFromDictionary(feature.impactCampaign);\n }\n\n if ((feature.m && feature.m.constructor === {}.constructor) || feature.metrics?.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricList: Array = feature.m || feature.metrics;\n metricList?.forEach((metric) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n\n if (feature?.rules?.constructor === {}.constructor) {\n this.rules = [];\n } else {\n const ruleList: Array = feature.rules;\n ruleList?.forEach((rule) => {\n this.rules.push(new RuleModel().modelFromDictionary(rule));\n });\n }\n\n if (feature?.rulesLinkedCampaign && feature.rulesLinkedCampaign?.constructor !== {}.constructor) {\n const linkedCampaignList: Array = feature.rulesLinkedCampaign;\n this.rulesLinkedCampaign = linkedCampaignList;\n }\n\n return this;\n }\n\n getName(): string {\n return this.name;\n }\n\n getType(): string {\n return this.type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRules(): Array {\n return this.rules;\n }\n\n getImpactCampaign(): ImpactCapmaignModel {\n return this.impactCampaign;\n }\n\n getRulesLinkedCampaign(): Array {\n return this.rulesLinkedCampaign;\n }\n\n setRulesLinkedCampaign(rulesLinkedCampaign: Array): void {\n this.rulesLinkedCampaign = rulesLinkedCampaign;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getIsGatewayServiceRequired(): boolean {\n return this.isGatewayServiceRequired;\n }\n\n setIsGatewayServiceRequired(isGatewayServiceRequired: boolean): void {\n this.isGatewayServiceRequired = isGatewayServiceRequired;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ImpactCapmaignModel {\n private campaignId: number;\n private type: string;\n\n modelFromDictionary(impactCampaign: ImpactCapmaignModel): this {\n this.type = impactCampaign.type;\n this.campaignId = impactCampaign.campaignId;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class MetricModel {\n private key: string;\n private identifier: string;\n\n private i: number;\n private id: number;\n\n private t: string;\n private type: string;\n\n modelFromDictionary(metric: MetricModel): this {\n this.identifier = metric.identifier || metric.key;\n this.id = metric.i || metric.id;\n this.type = metric.t || metric.type;\n return this;\n }\n\n getId(): number {\n return this.id;\n }\n\n getIdentifier(): string {\n return this.identifier;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class RuleModel {\n private status: boolean;\n private variationId: number;\n private campaignId: number;\n private type: string;\n private ruleKey: string;\n\n modelFromDictionary(rule: RuleModel): this {\n this.type = rule.type;\n this.status = rule.status;\n this.variationId = rule.variationId;\n this.campaignId = rule.campaignId;\n this.ruleKey = rule.ruleKey;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getVariationId(): number {\n return this.variationId;\n }\n\n getStatus(): boolean {\n return this.status;\n }\n\n getType(): string {\n return this.type;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport class VariableModel {\n private val: dynamic;\n private value: dynamic;\n\n private type: string;\n\n private k: string;\n private key: string;\n\n private i: number;\n private id: number;\n\n modelFromDictionary(variable: VariableModel): this {\n this.value = variable.val || variable.value;\n this.type = variable.type;\n this.key = variable.k || variable.key;\n this.id = variable.i || variable.id;\n\n return this;\n }\n\n setValue(value: dynamic): void {\n this.value = value;\n }\n\n setKey(key: string): void {\n this.key = key;\n }\n\n setType(type: string): void {\n this.type = type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getValue(): dynamic {\n return this.value;\n }\n\n getType(): string {\n return this.type;\n }\n\n getKey(): string {\n return this.key;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { VariableModel } from './VariableModel';\n\nexport class VariationModel {\n private i: number;\n private id: number;\n private type: string;\n\n private n: string;\n private key: string;\n private name: string;\n private ruleKey: string;\n\n private w: number;\n private weight: number;\n\n private startRangeVariation: number;\n private endRangeVariation: number;\n private variables: Array = [];\n private variations: Array = [];\n\n private seg: Record;\n private segments: Record;\n\n modelFromDictionary(variation: VariationModel): this {\n this.id = variation.i || variation.id;\n this.key = variation.n || variation.key || variation.name;\n this.weight = variation.w || variation.weight;\n this.ruleKey = variation.ruleKey;\n this.type = variation.type;\n this.setStartRange(variation.startRangeVariation);\n this.setEndRange(variation.endRangeVariation);\n if (variation.seg || variation.segments) {\n this.segments = variation.seg || variation.segments;\n }\n\n if (variation.variables) {\n if (variation.variables.constructor === {}.constructor) {\n this.variables = [];\n } else {\n const variableList: Array = variation.variables;\n variableList.forEach((variable) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (variation.variations) {\n if (variation.variations.constructor === {}.constructor) {\n this.variations = [];\n } else {\n const variationList: Array = variation.variations;\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n return this;\n }\n\n setStartRange(startRange: number): void {\n this.startRangeVariation = startRange;\n }\n\n setEndRange(endRange: number): void {\n this.endRangeVariation = endRange;\n }\n\n setWeight(weight: number): void {\n this.weight = weight;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n\n getWeight(): number {\n return this.weight;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getStartRangeVariation(): number {\n return this.startRangeVariation;\n }\n\n getEndRangeVariation(): number {\n return this.endRangeVariation;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Struct, array, boolean, number, object, optional, string, union, validate } from 'superstruct';\nimport { dynamic } from '../../types/Common';\nimport { SettingsModel } from '../settings/SettingsModel';\n\nexport class SettingsSchema {\n private campaignMetricSchema: Struct;\n private variableObjectSchema: Struct;\n private campaignVariationSchema: Struct;\n private campaignObjectSchema: Struct;\n private settingsSchema: Struct;\n private featureSchema: Struct;\n private ruleSchema: Struct;\n\n constructor() {\n this.initializeSchemas();\n }\n\n private initializeSchemas(): void {\n this.campaignMetricSchema = object({\n id: union([number(), string()]),\n type: string(),\n identifier: string(),\n mca: optional(union([number(), string()])),\n hasProps: optional(boolean()),\n revenueProp: optional(string()),\n });\n\n this.variableObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n value: union([number(), string(), boolean(), object()]),\n });\n\n this.campaignVariationSchema = object({\n id: union([number(), string()]),\n name: string(),\n weight: union([number(), string()]),\n segments: optional(object()),\n variables: optional(array(this.variableObjectSchema)),\n startRangeVariation: optional(number()),\n endRangeVariation: optional(number()),\n });\n\n this.campaignObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n percentTraffic: optional(number()),\n status: string(),\n variations: array(this.campaignVariationSchema),\n segments: object(),\n isForcedVariationEnabled: optional(boolean()),\n isAlwaysCheckSegment: optional(boolean()),\n name: string(),\n });\n\n this.ruleSchema = object({\n type: string(),\n ruleKey: string(),\n campaignId: number(),\n variationId: optional(number()),\n });\n\n this.featureSchema = object({\n id: union([number(), string()]),\n key: string(),\n status: string(),\n name: string(),\n type: string(),\n metrics: array(this.campaignMetricSchema),\n impactCampaign: optional(object()),\n rules: optional(array(this.ruleSchema)),\n variables: optional(array(this.variableObjectSchema)),\n });\n\n this.settingsSchema = object({\n sdkKey: optional(string()),\n version: union([number(), string()]),\n accountId: union([number(), string()]),\n features: optional(array(this.featureSchema)),\n campaigns: array(this.campaignObjectSchema),\n groups: optional(object()),\n campaignGroups: optional(object()),\n collectionPrefix: optional(string()),\n });\n }\n\n isSettingsValid(settings: any | SettingsModel): boolean {\n if (!settings) {\n return false;\n }\n\n const [error] = validate(settings, this.settingsSchema);\n return !error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../campaign/CampaignModel';\nimport { FeatureModel } from '../campaign/FeatureModel';\n\nexport class SettingsModel {\n private sK?: string;\n private sdkKey: string;\n\n private f?: Array = [];\n private features: Array = [];\n\n private c?: Array = [];\n private campaigns: Array = [];\n\n private campaignGroups?: Record = {};\n private cG?: Record = {};\n\n private groups?: Record = {};\n private g?: Record = {};\n\n private a?: string;\n private accountId: string;\n\n private v?: number;\n private version: number;\n private collectionPrefix?: string;\n\n constructor(settings: SettingsModel) {\n this.sdkKey = settings.sK || settings.sdkKey;\n this.accountId = settings.a || settings.accountId;\n this.version = settings.v || settings.version;\n this.collectionPrefix = settings.collectionPrefix;\n\n if (\n (settings.f && settings.f.constructor !== {}.constructor) ||\n (settings.features && settings.features.constructor !== {}.constructor)\n ) {\n const featureList: Array = settings.f || settings.features;\n featureList.forEach((feature) => {\n this.features.push(new FeatureModel().modelFromDictionary(feature));\n });\n }\n\n if (\n (settings.c && settings.c.constructor !== {}.constructor) ||\n (settings.campaigns && settings.campaigns.constructor !== {}.constructor)\n ) {\n const campaignList: Array = settings.c || settings.campaigns;\n campaignList.forEach((campaign) => {\n this.campaigns.push(new CampaignModel().modelFromDictionary(campaign));\n });\n }\n\n if (settings.cG || settings.campaignGroups) {\n this.campaignGroups = settings.cG || settings.campaignGroups;\n }\n\n if (settings.g || settings.groups) {\n this.groups = settings.g || settings.groups;\n }\n\n return this;\n }\n getFeatures(): Array {\n return this.features;\n }\n\n getCampaigns(): Array {\n return this.campaigns;\n }\n\n getSdkkey(): string {\n return this.sdkKey;\n }\n\n getAccountId(): string {\n return this.accountId;\n }\n\n getVersion(): number {\n return this.version;\n }\n\n getCollectionPrefix(): string {\n return this.collectionPrefix;\n }\n\n getCampaignGroups(): Record {\n return this.campaignGroups;\n }\n\n getGroups(): Record {\n return this.groups;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { ContextVWOModel } from './ContextVWOModel';\n\nexport class ContextModel {\n private id: string | number;\n private userAgent?: string;\n private ipAddress?: string;\n private customVariables?: Record;\n private variationTargetingVariables?: Record;\n private _vwo?: ContextVWOModel;\n\n modelFromDictionary(context: Record): this {\n this.id = context.id;\n this.userAgent = context.userAgent;\n this.ipAddress = context.ipAddress;\n if (context?.customVariables) {\n this.customVariables = context.customVariables;\n }\n if (context?.variationTargetingVariables) {\n this.variationTargetingVariables = context.variationTargetingVariables;\n }\n if (context?._vwo) {\n this._vwo = new ContextVWOModel().modelFromDictionary(context._vwo);\n }\n return this;\n }\n\n getId(): string {\n return this.id?.toString();\n }\n\n getUserAgent(): string {\n return this.userAgent;\n }\n\n getIpAddress(): string {\n return this.ipAddress;\n }\n\n getCustomVariables(): Record {\n return this.customVariables;\n }\n\n setCustomVariables(customVariables: Record): void {\n this.customVariables = customVariables;\n }\n\n getVariationTargetingVariables(): Record {\n return this.variationTargetingVariables;\n }\n\n setVariationTargetingVariables(variationTargetingVariables: Record): void {\n this.variationTargetingVariables = variationTargetingVariables;\n }\n\n getVwo(): ContextVWOModel {\n return this._vwo;\n }\n\n setVwo(_vwo: ContextVWOModel): void {\n this._vwo = _vwo;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ContextVWOModel {\n private location: Record;\n private userAgent: Record;\n\n modelFromDictionary(context: Record): this {\n if (context?.location) {\n this.location = context.location;\n }\n\n if (context?.userAgent) {\n this.userAgent = context.userAgent;\n }\n return this;\n }\n\n getLocation(): Record {\n return this.location;\n }\n\n getUaInfo(): Record {\n return this.userAgent;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Hasher from 'murmurhash';\n\nconst SEED_VALUE = 1; // Seed value for the hash function\nexport class DecisionMaker {\n /**\n * Generates a bucket value based on the hash value, maximum value, and an optional multiplier.\n *\n * @param {number} hashValue - The hash value used for calculation\n * @param {number} maxValue - The maximum value for bucket scaling\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @returns {number} - The calculated bucket value\n */\n generateBucketValue(hashValue: number, maxValue: number, multiplier = 1): number {\n // Calculate the ratio based on the hash value\n const ratio = hashValue / Math.pow(2, 32);\n // Calculate the multiplied value\n const multipliedValue = (maxValue * ratio + 1) * multiplier;\n // Round down to get the final value\n const value = Math.floor(multipliedValue);\n\n return value;\n }\n\n /**\n * Gets the bucket value for a user based on the hash key and maximum value.\n *\n * @param {string} hashKey - The hash key for the user\n * @param {number} [maxValue=100] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value for the user\n */\n getBucketValueForUser(hashKey: string, maxValue = 100): number {\n const hashValue = Hasher.v3(hashKey, SEED_VALUE); // Calculate the hash value\n const bucketValue = this.generateBucketValue(hashValue, maxValue); // Calculate the bucket value\n\n return bucketValue; // Return the calculated bucket value\n }\n\n /**\n * Calculates the bucket value for a given string with optional multiplier and maximum value.\n *\n * @param {string} str - The input string to calculate the bucket value for\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @param {number} [maxValue=10000] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value\n */\n calculateBucketValue(str: string, multiplier = 1, maxValue = 10000): number {\n const hashValue = this.generateHashValue(str); // Generate the hash value for the input string\n\n return this.generateBucketValue(hashValue, maxValue, multiplier); // Generate and return the bucket value\n }\n\n /**\n * Generates the hash value for a given hash key using murmurHash v3.\n *\n * @param {string} hashKey - The hash key for which the hash value is generated\n * @returns {number} - The generated hash value\n */\n generateHashValue(hashKey: string): number {\n return Hasher.v3(hashKey, SEED_VALUE); // Return the hash value generated using murmurHash\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { LogLevelEnum } from './enums/LogLevelEnum';\n\nconst AnsiColorEnum = {\n BOLD: '\\x1b[1m',\n CYAN: '\\x1b[36m',\n GREEN: '\\x1b[32m',\n LIGHTBLUE: '\\x1b[94m',\n RED: '\\x1b[31m',\n RESET: '\\x1b[0m',\n WHITE: '\\x1b[30m',\n YELLOW: '\\x1b[33m',\n};\n/**\n * Interface defining the structure for a log message builder.\n */\ninterface ILogMessageBuilder {\n loggerConfig: Record; // Configuration for the logger\n transportConfig: Record; // Configuration for the transport mechanism\n prefix: string; // Prefix to be added to each log message\n dateTimeFormat: dynamic; // Function or format for date and time in log messages\n\n formatMessage(level: string, message: string): string; // Method to format a log message\n getFormattedLevel(level: string): string; // Method to format the log level\n getFormattedDateTime(): string; // Method to get formatted date and time\n}\n\n/**\n * Implements the ILogMessageBuilder interface to provide a concrete log message builder.\n */\nexport class LogMessageBuilder implements ILogMessageBuilder {\n loggerConfig: Record;\n transportConfig: Record;\n prefix: string;\n dateTimeFormat: any;\n\n /**\n * Constructs a new LogMessageBuilder instance.\n * @param {Record} loggerConfig - Configuration for the logger.\n * @param {Record} transportConfig - Configuration for the transport mechanism.\n */\n constructor(loggerConfig: Record, transportConfig: Record) {\n this.loggerConfig = loggerConfig;\n this.transportConfig = transportConfig;\n\n // Set the prefix, defaulting to an empty string if not provided.\n this.prefix = this.transportConfig.prefix || this.loggerConfig.prefix || '';\n // Set the date and time format, defaulting to the logger's format if the transport's format is not provided.\n this.dateTimeFormat = this.transportConfig.dateTimeFormat || this.loggerConfig.dateTimeFormat;\n }\n\n /**\n * Formats a log message combining level, prefix, date/time, and the actual message.\n * @param {string} level - The log level.\n * @param {string} message - The message to log.\n * @returns {string} The formatted log message.\n */\n formatMessage(level: string, message: string): string {\n return `[${this.getFormattedLevel(level)}]: ${this.getFormattedPrefix(this.prefix)} ${this.getFormattedDateTime()} ${message}`;\n }\n\n getFormattedPrefix(prefix: string): string {\n if (this.loggerConfig.isAnsiColorEnabled) {\n return `${AnsiColorEnum.BOLD}${AnsiColorEnum.GREEN}${prefix}${AnsiColorEnum.RESET}`;\n }\n\n return `${prefix}`;\n }\n\n /**\n * Returns the formatted log level with appropriate coloring based on the log level.\n * @param {string} level - The log level.\n * @returns {string} The formatted log level.\n */\n getFormattedLevel(level: string): string {\n const upperCaseLevel = level.toUpperCase();\n let LogLevelColorInfoEnum;\n\n if (this.loggerConfig.isAnsiColorEnabled) {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.WHITE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.DEBUG]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.LIGHTBLUE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.INFO]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.CYAN}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.WARN]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.YELLOW}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.ERROR]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.RED}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n };\n } else {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: upperCaseLevel,\n [LogLevelEnum.DEBUG]: upperCaseLevel,\n [LogLevelEnum.INFO]: upperCaseLevel,\n [LogLevelEnum.WARN]: upperCaseLevel,\n [LogLevelEnum.ERROR]: upperCaseLevel,\n };\n }\n\n return LogLevelColorInfoEnum[level];\n }\n\n /**\n * Retrieves the current date and time formatted according to the specified format.\n * @returns {string} The formatted date and time.\n */\n getFormattedDateTime(): string {\n return this.dateTimeFormat();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Abstract class representing a logger.\n * This class provides the structure for logging mechanisms and should be extended by specific logger implementations.\n */\nexport abstract class Logger {\n /**\n * Logs a message at the trace level.\n * @param {string} message - The message to log.\n */\n abstract trace(message: string): void;\n\n /**\n * Logs a message at the debug level.\n * @param {string} message - The message to log.\n */\n abstract debug(message: string): void;\n\n /**\n * Logs a message at the info level.\n * @param {string} message - The message to log.\n */\n abstract info(message: string): void;\n\n /**\n * Logs a message at the warn level.\n * @param {string} message - The message to log.\n */\n abstract warn(message: string): void;\n\n /**\n * Logs a message at the error level.\n * @param {string} message - The message to log.\n */\n abstract error(message: string): void;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { dynamic } from '../../../types/Common';\n\nimport { Logger } from '../Logger';\nimport { ConsoleTransport } from '../transports/ConsoleTransport';\nimport { LogTransportManager } from './TransportManager';\n\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\n\n/**\n * Interface defining the structure and methods for LogManager.\n */\nexport interface ILogManager {\n transportManager?: LogTransportManager;\n config?: Record;\n name?: string;\n requestId?: string;\n level: string;\n prefix?: string;\n dateTimeFormat?: () => string;\n\n transport?: Record;\n transports?: Array>;\n\n addTransport?(transportObject: Record): void;\n addTransports?(transportsList: Array>): void;\n}\n\n/**\n * LogManager class provides logging functionality with support for multiple transports.\n * It is designed as a singleton to ensure a single instance throughout the application.\n */\nexport class LogManager extends Logger implements ILogManager {\n private static instance: LogManager; // Singleton instance of LogManager\n transportManager: LogTransportManager;\n config: Record;\n name = 'VWO Logger'; // Default logger name\n requestId = uuidv4(); // Unique request ID generated for each instance\n level = LogLevelEnum.ERROR; // Default logging level\n prefix = 'VWO-SDK'; // Default prefix for log messages\n public dateTimeFormat(): string {\n return new Date().toISOString(); // Default date-time format for log messages\n }\n transport: Record;\n transports: Array>;\n\n /**\n * Constructor for LogManager.\n * @param {Record} config - Configuration object for LogManager.\n */\n constructor(config?: Record) {\n super();\n\n this.config = config;\n\n if (config.isAlwaysNewInstance || !LogManager.instance) {\n LogManager.instance = this;\n\n // Initialize configuration with defaults or provided values\n this.config.name = config.name || this.name;\n this.config.requestId = config.requestId || this.requestId;\n this.config.level = config.level || this.level;\n this.config.prefix = config.prefix || this.prefix;\n this.config.dateTimeFormat = config.dateTimeFormat || this.dateTimeFormat;\n\n this.transportManager = new LogTransportManager(this.config);\n\n this.handleTransports();\n }\n\n return LogManager.instance;\n }\n\n /**\n * Provides access to the singleton instance of LogManager.\n * @returns {LogManager} The singleton instance.\n */\n static get Instance(): LogManager {\n return LogManager.instance;\n }\n\n /**\n * Handles the initialization and setup of transports based on configuration.\n */\n handleTransports(): void {\n const transports = this.config.transports;\n\n if (transports?.length) {\n this.addTransports(this.config.transports);\n } else if (this.config.transport && isObject(this.config.transport)) {\n this.addTransport(this.config.transport);\n } else {\n // if (this.config.defaultTransport)\n // Add default ConsoleTransport if no other transport is specified\n this.addTransport(\n new ConsoleTransport({\n level: this.config.level,\n }),\n );\n }\n }\n\n /**\n * Adds a single transport to the LogManager.\n * @param {Record} transport - The transport object to add.\n */\n addTransport(transport: Record): void {\n this.transportManager.addTransport(transport);\n }\n\n /**\n * Adds multiple transports to the LogManager.\n * @param {Array>} transports - The list of transport objects to add.\n */\n addTransports(transports: Record): void {\n for (let i = 0; i < transports.length; i++) {\n this.addTransport(transports[i]);\n }\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log at trace level.\n */\n trace(message: string): void {\n this.transportManager.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log at debug level.\n */\n debug(message: string): void {\n this.transportManager.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log at info level.\n */\n info(message: string): void {\n this.transportManager.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log at warn level.\n */\n warn(message: string): void {\n this.transportManager.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log at error level.\n */\n error(message: string): void {\n this.transportManager.log(LogLevelEnum.ERROR, message);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dynamic } from '../../../types/Common';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { LogMessageBuilder } from '../LogMessageBuilder';\nimport { Logger } from '../Logger';\nimport { isFunction } from '../../../utils/DataTypeUtil';\n\nenum LogLevelNumberEnum {\n TRACE = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n}\n\ninterface IlogTransport extends Logger {\n transports: Array>;\n config: Record;\n\n // Determines if a message should be logged based on the transport and configuration levels\n shouldLog(transportLevel: string, configLevel: string): boolean;\n // Logs a message at a specified level\n log(level: string, message: string): void;\n}\n\n/**\n * Manages logging transports and delegates logging messages to them based on configuration.\n * Implements the IlogTransport interface.\n */\nexport class LogTransportManager implements IlogTransport {\n transports: Array>;\n config: Record;\n\n /**\n * Initializes the manager with a configuration object.\n * @param {Record} config - Configuration settings for the log manager.\n */\n constructor(config: Record) {\n this.transports = [];\n this.config = config;\n }\n\n /**\n * Adds a new transport to the manager.\n * @param {Record} transport - The transport object to be added.\n */\n addTransport(transport: Record): void {\n this.transports.push(transport);\n }\n\n /**\n * Determines if the log should be processed based on the transport and configuration levels.\n * @param {string} transportLevel - The log level set for the transport.\n * @param {string} configLevel - The log level set in the configuration.\n * @returns {boolean} - Returns true if the log level is appropriate for logging, false otherwise.\n */\n shouldLog(transportLevel: string, configLevel: string): boolean {\n // Default to the most specific level available\n // transportLevel = transportLevel || configLevel || this.config.level;\n\n const targetLevel = LogLevelNumberEnum[transportLevel.toUpperCase()];\n const desiredLevel = LogLevelNumberEnum[(configLevel || this.config.level).toUpperCase()];\n\n return targetLevel >= desiredLevel;\n }\n\n /**\n * Logs a message at TRACE level.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a message at DEBUG level.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs a message at INFO level.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a message at WARN level.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs a message at ERROR level.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.log(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Delegates the logging of messages to the appropriate transports.\n * @param {string} level - The level at which to log the message.\n * @param {string} message - The message to log.\n */\n log(level: string, message: string): void {\n for (let i = 0; i < this.transports.length; i++) {\n const logMessageBuilder = new LogMessageBuilder(this.config, this.transports[i]);\n const formattedMessage = logMessageBuilder.formatMessage(level, message);\n if (this.shouldLog(level, this.transports[i].level)) {\n if (this.transports[i].log && isFunction(this.transports[i].log)) {\n // Use custom log handler if available\n this.transports[i].log(level, message);\n } else {\n // Otherwise, use the default log method\n this.transports[i][level](formattedMessage);\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum LogLevelEnum {\n TRACE = 'trace',\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { LogManager, ILogManager } from './core/LogManager';\nexport { LogLevelEnum } from './enums/LogLevelEnum';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { Logger } from '../Logger';\n\n/**\n * ConsoleTransport class implements the Logger interface to provide logging functionality.\n * It outputs logs to the console based on the log level set in the configuration.\n */\nexport class ConsoleTransport implements Logger {\n config: Record; // Configuration object for the logger\n level: string; // Current log level\n\n /**\n * Constructor initializes the ConsoleTransport with a configuration object.\n * @param {Record} config - Configuration settings for the logger, including 'level'.\n */\n constructor(config: Record = {}) {\n this.config = config; // Store the configuration\n this.level = this.config.level; // Set the logging level from the configuration\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.consoleLog(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.consoleLog(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.consoleLog(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.consoleLog(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.consoleLog(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Generic log function that logs messages to the console based on the log level.\n * @param {string} level - The log level under which the message should be logged.\n * @param {string} message - The message to log.\n */\n consoleLog(level: string, message: string): void {\n console[level](message); // Use console's logging function dynamically based on the level\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { sendGetCall, sendPostCall } from '../../../utils/XMLUtil';\nimport { dynamic } from '../../../types/Common';\nimport { Deferred } from '../../../utils/PromiseUtil';\n\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\nimport { NetworkClientInterface } from './NetworkClientInterface';\n\n/**\n * Implements the NetworkClientInterface to handle network requests.\n */\nexport class NetworkBrowserClient implements NetworkClientInterface {\n /**\n * Performs a GET request using the provided RequestModel.\n * @param {RequestModel} requestModel - The model containing request options.\n * @returns {Promise} A promise that resolves to a ResponseModel.\n */\n GET(requestModel: RequestModel): Promise {\n const deferred = new Deferred();\n\n // Extract network options from the request model.\n const networkOptions: Record = requestModel.getOptions();\n const responseModel = new ResponseModel();\n\n sendGetCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /*try {\n fetch(url)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n return deferred.promise;\n }\n\n /**\n * Performs a POST request using the provided RequestModel.\n * @param {RequestModel} request - The model containing request options.\n * @returns {Promise} A promise that resolves or rejects with a ResponseModel.\n */\n POST(request: RequestModel): Promise {\n const deferred = new Deferred();\n const networkOptions: Record = request.getOptions();\n const responseModel = new ResponseModel();\n\n sendPostCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /* try {\n const options: any = Object.assign(\n {},\n { method: HttpMethodEnum.POST },\n { body: networkOptions.body },\n { headers: networkOptions.headers }\n );\n\n fetch(url, options)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n\n return deferred.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\n\n/**\n * A class responsible for creating and modifying request models based on a global configuration.\n */\nexport class RequestHandler {\n /**\n * Creates a new request by merging properties from a base request and a configuration model.\n * If both the request URL and the base URL from the configuration are missing, it returns null.\n * Otherwise, it merges the properties from the configuration into the request if they are not already set.\n *\n * @param {RequestModel} request - The initial request model.\n * @param {GlobalRequestModel} config - The global request configuration model.\n * @returns {RequestModel} The merged request model or null if both URLs are missing.\n */\n createRequest(request: RequestModel, config: GlobalRequestModel): RequestModel {\n // Check if both the request URL and the configuration base URL are missing\n if (\n (config.getBaseUrl() === null || config.getBaseUrl() === undefined) &&\n (request.getUrl() === null || request.getUrl() === undefined)\n ) {\n return null; // Return null if no URL is specified\n }\n // Set the request URL, defaulting to the configuration base URL if not set\n request.setUrl(request.getUrl() || config.getBaseUrl());\n // Set the request timeout, defaulting to the configuration timeout if not set\n request.setTimeout(request.getTimeout() || config.getTimeout());\n // Set the request body, defaulting to the configuration body if not set\n request.setBody(request.getBody() || config.getBody());\n // Set the request headers, defaulting to the configuration headers if not set\n request.setHeaders(request.getHeaders() || config.getHeaders());\n // Initialize request query parameters, defaulting to an empty object if not set\n const requestQueryParams: Record = request.getQuery() || {};\n // Initialize configuration query parameters, defaulting to an empty object if not set\n const configQueryParams: Record = config.getQuery() || {};\n\n // Merge configuration query parameters into the request query parameters if they don't exist\n for (const queryKey in configQueryParams) {\n if (!Object.prototype.hasOwnProperty.call(requestQueryParams, queryKey)) {\n requestQueryParams[queryKey] = configQueryParams[queryKey];\n }\n }\n // Set the merged query parameters back to the request\n request.setQuery(requestQueryParams);\n return request; // Return the modified request\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet NetworkClient;\n\nif ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkBrowserClient').NetworkBrowserClient;\n} else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkClient').NetworkClient;\n}\n\nexport { NetworkClient };\nexport { NetworkClientInterface } from './client/NetworkClientInterface';\nexport { NetworkManager } from './manager/NetworkManager';\nexport { GlobalRequestModel } from './models/GlobalRequestModel';\nexport { RequestModel } from './models/RequestModel';\nexport { ResponseModel } from './models/ResponseModel';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Deferred } from '../../../utils/PromiseUtil';\nimport { NetworkClientInterface } from '../client/NetworkClientInterface';\nimport { RequestHandler } from '../handlers/RequestHandler';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\n\nexport class NetworkManager {\n private config: GlobalRequestModel; // Holds the global configuration for network requests\n private client: NetworkClientInterface; // Interface for the network client handling the actual HTTP requests\n private static instance: NetworkManager; // Singleton instance of NetworkManager\n\n /**\n * Attaches a network client to the manager, or uses a default if none provided.\n * @param {NetworkClientInterface} client - The client to attach, optional.\n */\n attachClient(client?: NetworkClientInterface): void {\n if ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkBrowserClient } = require('../client/NetworkBrowserClient');\n\n this.client = client || new NetworkBrowserClient(); // Use provided client or default to NetworkClient\n } else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkClient } = require('../client/NetworkClient');\n\n this.client = client || new NetworkClient(); // Use provided client or default to NetworkClient\n }\n\n this.config = new GlobalRequestModel(null, null, null, null); // Initialize with default config\n }\n\n /**\n * Singleton accessor for the NetworkManager instance.\n * @returns {NetworkManager} The singleton instance.\n */\n static get Instance(): NetworkManager {\n this.instance = this.instance || new NetworkManager(); // Create instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Sets the global configuration for network requests.\n * @param {GlobalRequestModel} config - The configuration to set.\n */\n setConfig(config: GlobalRequestModel): void {\n this.config = config; // Set the global request configuration\n }\n\n /**\n * Retrieves the current global configuration.\n * @returns {GlobalRequestModel} The current configuration.\n */\n getConfig(): GlobalRequestModel {\n return this.config; // Return the global request configuration\n }\n\n /**\n * Creates a network request model by merging specific request data with global config.\n * @param {RequestModel} request - The specific request data.\n * @returns {RequestModel} The merged request model.\n */\n createRequest(request: RequestModel): RequestModel {\n const options: RequestModel = new RequestHandler().createRequest(request, this.config); // Merge and create request\n return options;\n }\n\n /**\n * Performs a GET request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n get(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .GET(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((errorResponse: ResponseModel) => {\n deferred.reject(errorResponse); // Reject with the error response\n });\n }\n\n return deferred.promise; // Return the promise\n }\n\n /**\n * Performs a POST request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n post(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .POST(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((error: ResponseModel) => {\n deferred.reject(error); // Reject with the error\n });\n }\n\n return deferred.promise; // Return the promise\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents a model for global HTTP requests configuration.\n * This class encapsulates all necessary details such as URL, query parameters, body, headers,\n * timeout settings, and development mode flag.\n */\nexport class GlobalRequestModel {\n private url: string; // Base URL of the HTTP request\n private timeout = 3000; // Default timeout for the HTTP request in milliseconds\n private query: Record; // Query parameters for the HTTP request\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n private isDevelopmentMode: boolean; // Flag to indicate if the request is in development mode\n\n /**\n * Constructs an instance of the GlobalRequestModel.\n * @param url The base URL of the HTTP request.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n */\n constructor(\n url: string,\n query: Record,\n body: Record,\n headers: Record,\n ) {\n this.url = url;\n this.query = query;\n this.body = body;\n this.headers = headers;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setBaseUrl(url: string): void {\n this.url = url;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getBaseUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the development mode status for the request.\n * @param isDevelopmentMode Boolean flag indicating if the request is in development mode.\n */\n setDevelopmentMode(isDevelopmentMode: boolean): void {\n this.isDevelopmentMode = isDevelopmentMode;\n }\n\n /**\n * Retrieves the development mode status of the request.\n * @returns Boolean indicating if the request is in development mode.\n */\n getDevelopmentMode(): boolean {\n return this.isDevelopmentMode;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../../../enums/HttpMethodEnum';\nimport { dynamic } from '../../../types/Common';\nimport { HTTPS } from '../../../constants/Url';\n\n/**\n * Represents a model for HTTP requests.\n * This class encapsulates all necessary details such as URL, method, path, query parameters, body, headers,\n * scheme, port, and timeout settings.\n */\nexport class RequestModel {\n private url: string; // Base URL of the HTTP request\n private method: string; // HTTP method (GET, POST, etc.)\n private scheme: string; // Protocol scheme (http, https)\n private port: number; // Port number\n private path: string; // Path of the URL\n private query: Record; // Query parameters\n private timeout: number; // Timeout for the HTTP request in milliseconds\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n\n /**\n * Constructs an instance of the RequestModel.\n * @param url The base URL of the HTTP request.\n * @param method HTTP method, default is 'GET'.\n * @param path URL path.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n * @param scheme Protocol scheme, default is 'http'.\n * @param port Port number, default is 80.\n */\n constructor(\n url: string,\n method: string = HttpMethodEnum.GET,\n path: string,\n query: Record,\n body: Record,\n headers: Record,\n scheme: string = HTTPS,\n port: number,\n ) {\n this.url = url;\n this.method = method;\n this.path = path;\n this.query = query;\n this.body = body;\n this.headers = headers;\n this.scheme = scheme;\n this.port = port;\n }\n\n /**\n * Retrieves the HTTP method.\n * @returns The HTTP method as a string.\n */\n getMethod(): string {\n return this.method;\n }\n\n /**\n * Sets the HTTP method.\n * @param method The HTTP method to set.\n */\n setMethod(method: string): void {\n this.method = method;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): this {\n this.headers = headers;\n return this;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): this {\n this.timeout = timeout;\n return this;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setUrl(url: string): this {\n this.url = url;\n return this;\n }\n\n /**\n * Retrieves the scheme of the HTTP request.\n * @returns The scheme as a string.\n */\n getScheme(): string {\n return this.scheme;\n }\n\n /**\n * Sets the scheme of the HTTP request.\n * @param scheme The scheme to set (http or https).\n */\n setScheme(scheme: string): this {\n this.scheme = scheme;\n return this;\n }\n\n /**\n * Retrieves the port number of the HTTP request.\n * @returns The port number as an integer.\n */\n getPort(): number {\n return this.port;\n }\n\n /**\n * Sets the port number for the HTTP request.\n * @param port The port number to set.\n */\n setPort(port: number): this {\n this.port = port;\n return this;\n }\n\n /**\n * Retrieves the path of the HTTP request.\n * @returns The path as a string.\n */\n getPath(): string {\n return this.path;\n }\n\n /**\n * Sets the path of the HTTP request.\n * @param path The path to set.\n */\n setPath(path: string): this {\n this.path = path;\n return this;\n }\n\n /**\n * Constructs the options for the HTTP request based on the current state of the model.\n * This method is used to prepare the request options for execution.\n * @returns A record containing all relevant options for the HTTP request.\n */\n getOptions(): Record {\n let queryParams = '';\n for (const key in this.query) {\n const queryString = `${key}=${this.query[key]}&`;\n queryParams += queryString;\n }\n\n const [hostname, collectionPrefix] = this.url.split('/');\n const options: Record = {\n hostname, // if url is example.com/as01, hostname will be example.com\n agent: false,\n };\n\n if (this.scheme) {\n options.scheme = this.scheme;\n }\n if (this.port) {\n options.port = this.port;\n }\n if (this.headers) {\n options.headers = this.headers;\n }\n\n if (this.method) {\n options.method = this.method;\n }\n\n if (this.body) {\n const postBody = JSON.stringify(this.body);\n options.headers = options.headers || {};\n options.headers['Content-Type'] = 'application/json';\n\n if (typeof Buffer === 'undefined') {\n options.headers['Content-Length'] = new TextEncoder().encode(postBody).length;\n } else {\n options.headers['Content-Length'] = Buffer.byteLength(postBody);\n }\n options.body = this.body;\n }\n\n if (this.path) {\n if (queryParams !== '') {\n options.path = this.path + '?' + queryParams || '';\n } else {\n options.path = this.path;\n }\n }\n\n if (collectionPrefix) {\n options.path = `/${collectionPrefix}` + options.path;\n }\n if (this.timeout) {\n options.timeout = this.timeout;\n }\n if (options.path.charAt(options.path.length - 1) === '&') {\n options.path = options.path.substring(0, options.path.length - 1);\n }\n\n return options;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents the response model for network operations.\n * This class encapsulates details about the HTTP response including status code, headers, data, and errors.\n */\nexport class ResponseModel {\n private statusCode: number; // HTTP status code of the response\n private error: dynamic; // Error object if the request failed\n private headers: Record; // Headers received in the response\n private data: dynamic; // Data payload of the response\n\n /**\n * Sets the status code of the response.\n * @param {number} statusCode - The HTTP status code\n */\n setStatusCode(statusCode: number): void {\n this.statusCode = statusCode;\n }\n\n /**\n * Sets the headers of the response.\n * @param {Record} headers - The headers of the response\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Sets the data of the response.\n * @param {dynamic} data - The data payload of the response\n */\n setData(data: dynamic): void {\n this.data = data;\n }\n\n /**\n * Sets the error object of the response.\n * @param {dynamic} error - The error object if the request failed\n */\n setError(error: dynamic): void {\n this.error = error;\n }\n\n /**\n * Retrieves the headers of the response.\n * @returns {Record} The headers of the response\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Retrieves the data payload of the response.\n * @returns {dynamic} The data payload of the response\n */\n getData(): dynamic {\n return this.data;\n }\n\n /**\n * Retrieves the status code of the response.\n * @returns {number} The HTTP status code\n */\n getStatusCode(): number {\n return this.statusCode;\n }\n\n /**\n * Retrieves the error object of the response.\n * @returns {dynamic} The error object if the request failed\n */\n getError(): dynamic {\n return this.error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SegmentEvaluator } from '../evaluators/SegmentEvaluator';\nimport { dynamic } from '../../../types/Common';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { getFromGatewayService, getQueryParams } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\nimport { ContextVWOModel } from '../../../models/user/ContextVWOModel';\nimport { SettingsService } from '../../../services/SettingsService';\nimport { isUndefined } from '../../../utils/DataTypeUtil';\n\nexport class SegmentationManager {\n private static instance: SegmentationManager; // Singleton instance of SegmentationManager\n evaluator: SegmentEvaluator; // Holds the instance of SegmentEvaluator\n\n /**\n * Singleton pattern implementation for getting the instance of SegmentationManager.\n * @returns {SegmentationManager} The singleton instance.\n */\n static get Instance(): SegmentationManager {\n this.instance = this.instance || new SegmentationManager(); // Create new instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Attaches an evaluator to the manager, or creates a new one if none is provided.\n * @param {SegmentEvaluator} evaluator - Optional evaluator to attach.\n */\n attachEvaluator(evaluator?: SegmentEvaluator): void {\n this.evaluator = evaluator || new SegmentEvaluator(); // Use provided evaluator or create new one\n }\n\n /**\n * Sets the contextual data for the segmentation process.\n * @param {any} settings - The settings data.\n * @param {any} feature - The feature data including segmentation needs.\n * @param {any} context - The context data for the evaluation.\n */\n async setContextualData(settings: SettingsModel, feature: FeatureModel, context: ContextModel) {\n this.attachEvaluator(); // Ensure a fresh evaluator instance\n this.evaluator.settings = settings; // Set settings in evaluator\n this.evaluator.context = context; // Set context in evaluator\n this.evaluator.feature = feature; // Set feature in evaluator\n\n // if both user agent and ip is null then we should not get data from gateway service\n if (context?.getUserAgent() === null && context?.getIpAddress() === null) {\n return;\n }\n\n if (feature.getIsGatewayServiceRequired() === true) {\n if (\n SettingsService.Instance.isGatewayServiceProvided &&\n (isUndefined(context.getVwo()) || context.getVwo() === null)\n ) {\n const queryParams = {};\n if (context?.getUserAgent()) {\n queryParams['userAgent'] = context.getUserAgent();\n }\n\n if (context?.getIpAddress()) {\n queryParams['ipAddress'] = context.getIpAddress();\n }\n try {\n const params = getQueryParams(queryParams);\n const _vwo = await getFromGatewayService(params, UrlEnum.GET_USER_DATA);\n context.setVwo(new ContextVWOModel().modelFromDictionary(_vwo));\n } catch (err) {\n LogManager.Instance.error(`Error in setting contextual data for segmentation. Got error: ${err.error}`);\n }\n }\n }\n }\n\n /**\n * Validates the segmentation against provided DSL and properties.\n * @param {Record} dsl - The segmentation DSL.\n * @param {Record} properties - The properties to validate against.\n * @param {SettingsModel} settings - The settings model.\n * @param {any} context - Optional context.\n * @returns {Promise} True if segmentation is valid, otherwise false.\n */\n async validateSegmentation(dsl: Record, properties: Record): Promise {\n return await this.evaluator.isSegmentationValid(dsl, properties); // Delegate to evaluator's method\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandRegexEnum {\n LOWER = '^lower',\n LOWER_MATCH = '^lower\\\\((.*)\\\\)',\n WILDCARD = '^wildcard',\n WILDCARD_MATCH = '^wildcard\\\\((.*)\\\\)',\n REGEX = '^regex',\n REGEX_MATCH = '^regex\\\\((.*)\\\\)',\n STARTING_STAR = '^\\\\*',\n ENDING_STAR = '\\\\*$',\n GREATER_THAN_MATCH = '^gt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n GREATER_THAN_EQUAL_TO_MATCH = '^gte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_MATCH = '^lt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_EQUAL_TO_MATCH = '^lte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandValueEnum {\n LOWER_VALUE = 1,\n STARTING_ENDING_STAR_VALUE = 2,\n STARTING_STAR_VALUE = 3,\n ENDING_STAR_VALUE = 4,\n REGEX_VALUE = 5,\n EQUAL_VALUE = 6,\n GREATER_THAN_VALUE = 7,\n GREATER_THAN_EQUAL_TO_VALUE = 8,\n LESS_THAN_VALUE = 9,\n LESS_THAN_EQUAL_TO_VALUE = 10,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperatorValueEnum {\n AND = 'and',\n NOT = 'not',\n OR = 'or',\n CUSTOM_VARIABLE = 'custom_variable',\n USER = 'user',\n COUNTRY = 'country',\n REGION = 'region',\n CITY = 'city',\n OPERATING_SYSTEM = 'os',\n DEVICE_TYPE = 'device_type',\n DEVICE = 'device',\n BROWSER_AGENT = 'browser_string',\n UA = 'ua',\n FEATURE_ID = 'featureId',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageDecorator } from '../../../decorators/StorageDecorator';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { LogManager } from '../../logger';\nimport { StorageService } from '../../../services/StorageService';\nimport { dynamic } from '../../../types/Common';\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { SegmentOperatorValueEnum } from '../enums/SegmentOperatorValueEnum';\nimport { Segmentation } from '../Segmentation';\nimport { getKeyValue } from '../utils/SegmentUtil';\nimport { SegmentOperandEvaluator } from './SegmentOperandEvaluator';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\n\nexport class SegmentEvaluator implements Segmentation {\n context: ContextModel;\n settings: SettingsModel;\n feature: FeatureModel;\n\n /**\n * Validates if the segmentation defined in the DSL is applicable based on the provided properties.\n * @param dsl The domain-specific language defining the segmentation rules.\n * @param properties The properties against which the DSL rules are evaluated.\n * @returns A Promise resolving to a boolean indicating if the segmentation is valid.\n */\n async isSegmentationValid(dsl: Record, properties: Record): Promise {\n const { key, value } = getKeyValue(dsl);\n const operator = key;\n const subDsl = value;\n\n // Evaluate based on the type of segmentation operator\n switch (operator) {\n case SegmentOperatorValueEnum.NOT:\n return !(await this.isSegmentationValid(subDsl, properties));\n case SegmentOperatorValueEnum.AND:\n return await this.every(subDsl, properties);\n case SegmentOperatorValueEnum.OR:\n return await this.some(subDsl, properties);\n case SegmentOperatorValueEnum.CUSTOM_VARIABLE:\n return await new SegmentOperandEvaluator().evaluateCustomVariableDSL(subDsl, properties);\n case SegmentOperatorValueEnum.USER:\n return new SegmentOperandEvaluator().evaluateUserDSL(subDsl, properties);\n case SegmentOperatorValueEnum.UA:\n return new SegmentOperandEvaluator().evaluateUserAgentDSL(subDsl, this.context);\n default:\n return false;\n }\n }\n\n /**\n * Evaluates if any of the DSL nodes are valid using the OR logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if any of the nodes are valid.\n */\n async some(dslNodes: Array>, customVariables: Record): Promise {\n const uaParserMap: Record = {};\n let keyCount: number = 0; // Initialize count of keys encountered\n let isUaParser = false;\n\n for (const dsl of dslNodes) {\n for (const key in dsl) {\n // Check for user agent related keys\n if (\n key === SegmentOperatorValueEnum.OPERATING_SYSTEM ||\n key === SegmentOperatorValueEnum.BROWSER_AGENT ||\n key === SegmentOperatorValueEnum.DEVICE_TYPE ||\n key === SegmentOperatorValueEnum.DEVICE\n ) {\n isUaParser = true;\n const value = dsl[key];\n\n if (!uaParserMap[key]) {\n uaParserMap[key] = [];\n }\n\n // Ensure value is treated as an array of strings\n const valuesArray = Array.isArray(value) ? value : [value];\n valuesArray.forEach((val: dynamic) => {\n if (typeof val === 'string') {\n uaParserMap[key].push(val);\n }\n });\n\n keyCount++; // Increment count of keys encountered\n }\n\n // Check for feature toggle based on feature ID\n if (key === SegmentOperatorValueEnum.FEATURE_ID) {\n const featureIdObject = dsl[key] as Record;\n const featureIdKey: string = Object.keys(featureIdObject)[0];\n const featureIdValue: string = featureIdObject[featureIdKey];\n\n if (featureIdValue === 'on' || featureIdValue === 'off') {\n const features = this.settings.getFeatures();\n const feature = features.find((feature) => feature.getId() === parseInt(featureIdKey));\n\n if (feature) {\n const featureKey = feature.getKey();\n const result = await this.checkInUserStorage(this.settings, featureKey, this.context);\n // if the result is false, then we need to return true as feature is not present in the user storage\n if (featureIdValue === 'off') {\n return !result;\n }\n return result;\n } else {\n LogManager.Instance.error('Feature not found with featureIdKey: ' + featureIdKey);\n return null; // Handle the case when feature is not found\n }\n }\n }\n }\n\n // Check if the count of keys encountered is equal to dslNodes.length\n if (isUaParser && keyCount === dslNodes.length) {\n try {\n const uaParserResult = await this.checkUserAgentParser(uaParserMap);\n return uaParserResult;\n } catch (err) {\n LogManager.Instance.error('Failed to validate User Agent. Erro: ' + err);\n }\n }\n\n // Recursively check each DSL node\n if (await this.isSegmentationValid(dsl, customVariables)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates all DSL nodes using the AND logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if all nodes are valid.\n */\n async every(dslNodes: Array>, customVariables: Record): Promise {\n const locationMap: Record = {};\n for (const dsl of dslNodes) {\n // Check if the DSL node contains location-related keys\n if (\n SegmentOperatorValueEnum.COUNTRY in dsl ||\n SegmentOperatorValueEnum.REGION in dsl ||\n SegmentOperatorValueEnum.CITY in dsl\n ) {\n this.addLocationValuesToMap(dsl, locationMap);\n // Check if the number of location keys matches the number of DSL nodes\n if (Object.keys(locationMap).length === dslNodes.length) {\n const segmentResult = await this.checkLocationPreSegmentation(locationMap);\n return segmentResult;\n }\n continue;\n }\n const res = await this.isSegmentationValid(dsl, customVariables);\n if (!res) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Adds location values from a DSL node to a map.\n * @param dsl DSL node containing location data.\n * @param locationMap Map to store location data.\n */\n addLocationValuesToMap(dsl: Record, locationMap: Record): void {\n // Add country, region, and city information to the location map if present\n if (SegmentOperatorValueEnum.COUNTRY in dsl) {\n locationMap[SegmentOperatorValueEnum.COUNTRY] = dsl[SegmentOperatorValueEnum.COUNTRY];\n }\n if (SegmentOperatorValueEnum.REGION in dsl) {\n locationMap[SegmentOperatorValueEnum.REGION] = dsl[SegmentOperatorValueEnum.REGION];\n }\n if (SegmentOperatorValueEnum.CITY in dsl) {\n locationMap[SegmentOperatorValueEnum.CITY] = dsl[SegmentOperatorValueEnum.CITY];\n }\n }\n\n /**\n * Checks if the user's location matches the expected location criteria.\n * @param locationMap Map of expected location values.\n * @returns A Promise resolving to a boolean indicating if the location matches.\n */\n async checkLocationPreSegmentation(locationMap: Record): Promise {\n // Ensure user's IP address is available\n if (this.context?.getIpAddress() === undefined) {\n LogManager.Instance.error('To evaluate location pre Segment, please pass ipAddress in context object');\n return false;\n }\n // Check if location data is available and matches the expected values\n if (\n !this.context?.getVwo()?.getLocation() ||\n this.context?.getVwo()?.getLocation() === undefined ||\n this.context?.getVwo()?.getLocation() === null\n ) {\n return false;\n }\n return this.valuesMatch(locationMap, this.context?.getVwo()?.getLocation());\n }\n\n /**\n * Checks if the user's device information matches the expected criteria.\n * @param uaParserMap Map of expected user agent values.\n * @returns A Promise resolving to a boolean indicating if the user agent matches.\n */\n async checkUserAgentParser(uaParserMap: Record): Promise {\n // Ensure user's user agent is available\n if (!this.context?.getUserAgent() || this.context?.getUserAgent() === undefined) {\n LogManager.Instance.error('To evaluate user agent related segments, please pass userAgent in context object');\n return false;\n }\n // Check if user agent data is available and matches the expected values\n if (!this.context?.getVwo()?.getUaInfo() || this.context?.getVwo()?.getUaInfo() === undefined) {\n return false;\n }\n\n return this.checkValuePresent(uaParserMap, this.context?.getVwo()?.getUaInfo());\n }\n\n /**\n * Checks if the feature is enabled for the user by querying the storage.\n * @param settings The settings model containing configuration.\n * @param featureKey The key of the feature to check.\n * @param user The user object to check against.\n * @returns A Promise resolving to a boolean indicating if the feature is enabled for the user.\n */\n async checkInUserStorage(settings: SettingsModel, featureKey: string, context: ContextModel): Promise {\n const storageService = new StorageService();\n // Retrieve feature data from storage\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if the stored data is an object and not empty\n if (isObject(storedData) && Object.keys(storedData).length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Checks if the actual values match the expected values specified in the map.\n * @param expectedMap A map of expected values for different keys.\n * @param actualMap A map of actual values to compare against.\n * @returns A Promise resolving to a boolean indicating if all actual values match the expected values.\n */\n async checkValuePresent(expectedMap: Record, actualMap: Record): Promise {\n for (const key in actualMap) {\n if (Object.prototype.hasOwnProperty.call(expectedMap, key)) {\n const expectedValues = expectedMap[key];\n // convert expected values to lowercase\n expectedValues.forEach((value, index) => {\n expectedValues[index] = value.toLowerCase();\n });\n const actualValue = actualMap[key];\n\n // Handle wildcard patterns for all keys\n for (const val of expectedValues) {\n // Check if the value is a wildcard pattern and matches the actual value using regex\n if (val.startsWith('wildcard(') && val.endsWith(')')) {\n // Extract pattern from wildcard string\n const wildcardPattern = val.slice(9, -1);\n // Convert wildcard pattern to regex and check if it matches the actual value\n const regex = new RegExp(wildcardPattern.replace(/\\*/g, '.*'), 'i'); // Convert wildcard pattern to regex, 'i' for case-insensitive\n // Check if the actual value matches the regex pattern for the key\n if (regex.test(actualValue)) {\n // match found, return true as we only need to check if any of the expected values match the actual value\n return true;\n }\n }\n }\n\n // this will be checked for all cases where wildcard is not present\n if (expectedValues.includes(actualValue?.toLowerCase())) {\n return true; // Direct value match found, return true\n }\n }\n }\n return false; // No matches found\n }\n\n /**\n * Compares expected location values with user's location to determine a match.\n * @param expectedLocationMap A map of expected location values.\n * @param userLocation The user's actual location.\n * @returns A boolean indicating if the user's location matches the expected values.\n */\n async valuesMatch(expectedLocationMap, userLocation) {\n for (const [key, value] of Object.entries(expectedLocationMap)) {\n if (key in userLocation) {\n const normalizedValue1 = this.normalizeValue(value);\n const normalizedValue2 = this.normalizeValue(userLocation[key]);\n if (normalizedValue1 !== normalizedValue2) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true; // If all values match, return true\n }\n\n /**\n * Normalizes a value to a consistent format for comparison.\n * @param value The value to normalize.\n * @returns The normalized value.\n */\n normalizeValue(value) {\n if (value === null || value === undefined) {\n return null;\n }\n // Remove quotes and trim whitespace\n return value.toString().replace(/^\"|\"$/g, '').trim();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getKeyValue, matchWithRegex } from '../utils/SegmentUtil';\nimport { SegmentOperandValueEnum } from '../enums/SegmentOperandValueEnum';\nimport { SegmentOperandRegexEnum } from '../enums/SegmentOperandRegexEnum';\nimport { isBoolean } from '../../../utils/DataTypeUtil';\nimport { dynamic } from '../../../types/Common';\nimport { getFromGatewayService } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\n\n/**\n * SegmentOperandEvaluator class provides methods to evaluate different types of DSL (Domain Specific Language)\n * expressions based on the segment conditions defined for custom variables, user IDs, and user agents.\n */\nexport class SegmentOperandEvaluator {\n /**\n * Evaluates a custom variable DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the custom variable.\n * @param {Record} properties - The properties object containing the actual values to be matched against.\n * @returns {Promise} - A promise that resolves to a boolean indicating if the DSL condition is met.\n */\n async evaluateCustomVariableDSL(\n dslOperandValue: Record,\n properties: Record,\n ): Promise {\n // Extract key and value from the DSL operand\n const { key, value } = getKeyValue(dslOperandValue);\n const operandKey = key;\n const operand = value;\n\n // Check if the property exists\n if (!Object.prototype.hasOwnProperty.call(properties, operandKey)) {\n return false;\n }\n\n // Handle 'inlist' operand\n if (operand.includes('inlist')) {\n const listIdRegex = /inlist\\(([^)]+)\\)/;\n const match = operand.match(listIdRegex);\n if (!match || match.length < 2) {\n LogManager.Instance.error(\"Invalid 'inList' operand format\");\n return false;\n }\n\n // Process the tag value and prepare query parameters\n const tagValue = properties[operandKey];\n const attributeValue = this.preProcessTagValue(tagValue);\n const listId = match[1];\n const queryParamsObj = {\n attribute: attributeValue,\n listId: listId,\n };\n\n // Make a web service call to check the attribute against the list\n try {\n const res = await getFromGatewayService(queryParamsObj, UrlEnum.ATTRIBUTE_CHECK);\n if (!res || res === undefined || res === 'false' || res.status === 0) {\n return false;\n }\n return res;\n } catch (error) {\n LogManager.Instance.error('Error while fetching data: ' + error);\n return false;\n }\n } else {\n // Process other types of operands\n let tagValue = properties[operandKey];\n tagValue = this.preProcessTagValue(tagValue);\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue;\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n }\n\n /**\n * Evaluates a user DSL expression to check if a user ID is in a specified list.\n * @param {Record} dslOperandValue - The DSL expression containing user IDs.\n * @param {Record} properties - The properties object containing the actual user ID to check.\n * @returns {boolean} - True if the user ID is in the list, otherwise false.\n */\n evaluateUserDSL(dslOperandValue: Record, properties: Record): boolean {\n const users = dslOperandValue.split(',');\n for (let i = 0; i < users.length; i++) {\n if (users[i].trim() == properties._vwoUserId) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates a user agent DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the user agent.\n * @param {any} context - The context object containing the user agent string.\n * @returns {boolean} - True if the user agent matches the DSL condition, otherwise false.\n */\n evaluateUserAgentDSL(dslOperandValue: Record, context: ContextModel): boolean {\n const operand = dslOperandValue;\n if (!context.getUserAgent() || context.getUserAgent() === undefined) {\n LogManager.Instance.info('To Evaluate UserAgent segmentation, please provide userAgent in context');\n return false;\n }\n let tagValue = decodeURIComponent(context.getUserAgent());\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue as string; // Fix: Type assertion to ensure tagValue is of type string\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n\n /**\n * Pre-processes the tag value to ensure it is in the correct format for evaluation.\n * @param {any} tagValue - The value to be processed.\n * @returns {string | boolean} - The processed tag value, either as a string or a boolean.\n */\n preProcessTagValue(tagValue: any): string | boolean {\n // Default to empty string if undefined\n if (tagValue === undefined) {\n tagValue = '';\n }\n // Convert boolean values to boolean type\n if (isBoolean(tagValue)) {\n tagValue = tagValue ? true : false;\n }\n // Convert all non-null values to string\n if (tagValue !== null) {\n tagValue = tagValue.toString();\n }\n return tagValue;\n }\n\n /**\n * Pre-processes the operand value to determine its type and extract the value based on regex matches.\n * @param {any} operand - The operand to be processed.\n * @returns {Record} - An object containing the operand type and value.\n */\n preProcessOperandValue(operand: any): Record {\n let operandType: SegmentOperandValueEnum;\n let operandValue: dynamic;\n // Determine the type of operand and extract value based on regex patterns\n if (matchWithRegex(operand, SegmentOperandRegexEnum.LOWER_MATCH)) {\n operandType = SegmentOperandValueEnum.LOWER_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LOWER_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.WILDCARD_MATCH)) {\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.WILDCARD_MATCH);\n const startingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.STARTING_STAR);\n const endingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.ENDING_STAR);\n // Determine specific wildcard type\n if (startingStar && endingStar) {\n operandType = SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE;\n } else if (startingStar) {\n operandType = SegmentOperandValueEnum.STARTING_STAR_VALUE;\n } else if (endingStar) {\n operandType = SegmentOperandValueEnum.ENDING_STAR_VALUE;\n }\n // Remove wildcard characters from the operand value\n operandValue = operandValue\n .replace(new RegExp(SegmentOperandRegexEnum.STARTING_STAR), '')\n .replace(new RegExp(SegmentOperandRegexEnum.ENDING_STAR), '');\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.REGEX_MATCH)) {\n operandType = SegmentOperandValueEnum.REGEX_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.REGEX_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH);\n } else {\n operandType = SegmentOperandValueEnum.EQUAL_VALUE;\n operandValue = operand;\n }\n return {\n operandType,\n operandValue,\n };\n }\n\n /**\n * Extracts the operand value from a string based on a specified regex pattern.\n * @param {any} operand - The operand string to extract from.\n * @param {string} regex - The regex pattern to use for extraction.\n * @returns {string} - The extracted value.\n */\n extractOperandValue(operand: any, regex: string): string {\n // Match operand with regex and return the first capturing group\n return matchWithRegex(operand, regex) && matchWithRegex(operand, regex)[1];\n }\n\n /**\n * Processes numeric values from operand and tag values, converting them to strings.\n * @param {any} operandValue - The operand value to process.\n * @param {any} tagValue - The tag value to process.\n * @returns {Record} - An object containing the processed operand and tag values as strings.\n */\n processValues(operandValue: any, tagValue: any): Record {\n // Convert operand and tag values to floats\n const processedOperandValue = parseFloat(operandValue);\n const processedTagValue = parseFloat(tagValue);\n // Return original values if conversion fails\n if (!processedOperandValue || !processedTagValue) {\n return {\n operandValue: operandValue,\n tagValue: tagValue,\n };\n }\n // now we have surity that both are numbers\n // now we can convert them independently to int type if they\n // are int rather than floats\n // if (processedOperandValue === Math.floor(processedOperandValue)) {\n // processedOperandValue = parseInt(processedOperandValue, 10);\n // }\n // if (processedTagValue === Math.floor(processedTagValue)) {\n // processedTagValue = parseInt(processedTagValue, 10);\n // }\n // Convert numeric values back to strings\n return {\n operandValue: processedOperandValue.toString(),\n tagValue: processedTagValue.toString(),\n };\n }\n\n /**\n * Extracts the result of the evaluation based on the operand type and values.\n * @param {SegmentOperandValueEnum} operandType - The type of the operand.\n * @param {any} operandValue - The value of the operand.\n * @param {any} tagValue - The value of the tag to compare against.\n * @returns {boolean} - The result of the evaluation.\n */\n extractResult(operandType: SegmentOperandValueEnum, operandValue: any, tagValue: any): boolean {\n let result: boolean;\n\n switch (operandType) {\n case SegmentOperandValueEnum.LOWER_VALUE:\n // Check if both values are equal, ignoring case\n if (tagValue !== null) {\n result = operandValue.toLowerCase() === tagValue.toLowerCase();\n }\n break;\n case SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE:\n // Check if the tagValue contains the operandValue\n if (tagValue !== null) {\n result = tagValue.indexOf(operandValue) > -1;\n }\n break;\n case SegmentOperandValueEnum.STARTING_STAR_VALUE:\n // Check if the tagValue ends with the operandValue\n if (tagValue !== null) {\n result = tagValue.endsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.ENDING_STAR_VALUE:\n // Check if the tagValue starts with the operandValue\n if (tagValue !== null) {\n result = tagValue.startsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.REGEX_VALUE:\n // Evaluate the tagValue against the regex pattern of operandValue\n try {\n const pattern = new RegExp(operandValue, 'g');\n result = !!pattern.test(tagValue);\n } catch (err) {\n result = false;\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) < parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) <= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) > parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) >= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n default:\n // Check if the tagValue is exactly equal to the operandValue\n result = tagValue === operandValue;\n }\n\n return result;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { SegmentationManager } from './core/SegmentationManger';\nexport { SegmentEvaluator } from './evaluators/SegmentEvaluator';\nexport { Segmentation } from './Segmentation';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isObject } from '../../../utils/DataTypeUtil';\n\n/**\n * Extracts the first key-value pair from the provided object.\n * @param {Record} obj - The object from which to extract the key-value pair.\n * @returns {Record | undefined} An object containing the first key and value, or undefined if input is not an object.\n */\nexport function getKeyValue(obj: Record): Record | undefined {\n // Check if the input is a valid object using isObject utility function\n if (!isObject(obj)) {\n return;\n }\n\n // Extract the first key from the object\n const key = Object.keys(obj)[0];\n // Retrieve the value associated with the first key\n const value = obj[key];\n // Return an object containing the key and value\n return {\n key,\n value,\n };\n}\n\n/**\n * Matches a string against a regular expression and returns the match result.\n * @param {string} string - The string to match against the regex.\n * @param {string} regex - The regex pattern as a string.\n * @returns {RegExpMatchArray | null} The results of the regex match, or null if an error occurs.\n */\nexport function matchWithRegex(string: string, regex: string): RegExpMatchArray | null {\n try {\n // Attempt to match the string with the regex\n return string.match(new RegExp(regex));\n } catch (err) {\n // Return null if an error occurs during regex matching\n return null;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport abstract class Connector {\n // abstract connect(_config: Record): this;\n\n abstract set(_key: string, _data: dynamic): void | Promise;\n\n abstract get(_key: string): this | Promise;\n\n // abstract getAll(): Record | Promise>>;\n\n // abstract getKeys(): string[] | Promise;\n\n // abstract has(_key: string): boolean | Promise;\n\n // abstract hasData(): boolean | Promise;\n\n // abstract update(_key: string, _data: dynamic, ttl: number): Promise;\n\n // abstract remove(_key: string): this | Promise;\n\n // abstract clear(): this | Promise;\n\n // abstract close(): this; // TODO: stop\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Connector } from './Connector';\n\n// TODO: move to file\n// enum ConnectorEnum {\n// MEMORY = 'memory',\n// REDIS = 'redis'\n// }\n\nexport class Storage {\n public static instance: Storage;\n public connector: Connector | Record; // RedisConnector |\n // public storageType: dynamic;\n\n public attachConnector(connector: any): any {\n if (connector?.prototype?.constructor?.toString()?.trim()?.substring(0, 5) === 'class') {\n this.connector = new connector();\n } else {\n this.connector = connector;\n }\n\n return this.connector;\n }\n\n public static get Instance(): Storage {\n this.instance = this.instance || new Storage();\n\n return this.instance;\n }\n\n public getConnector(): any {\n return this.connector;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { Storage } from './Storage';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\n\nimport { Constants } from '../constants';\nimport { VariationModel } from '../models/campaign/VariationModel';\n\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\n\ninterface ICampaignDecisionService {\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean;\n getVariation(variations: Array, bucketValue: number): VariationModel;\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel;\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise;\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n}\n\nexport class CampaignDecisionService implements ICampaignDecisionService {\n /**\n * Calculate if this user should become part of the campaign or not\n *\n * @param {String} userId the unique ID assigned to a user\n * @param {Object} campaign fot getting the value of traffic allotted to the campaign\n *\n * @return {Boolean} if User is a part of Campaign or not\n */\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean {\n // if (!ValidateUtil.isValidValue(userId) || !campaign) {\n // return false;\n // }\n\n if (!campaign || !userId) {\n return false;\n }\n let trafficAllocation;\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n trafficAllocation = campaign.getVariations()[0].getWeight();\n } else {\n trafficAllocation = campaign.getTraffic();\n }\n const valueAssignedToUser = new DecisionMaker().getBucketValueForUser(`${campaign.getId()}_${userId}`);\n const isUserPart = valueAssignedToUser !== 0 && valueAssignedToUser <= trafficAllocation;\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_PART_OF_CAMPAIGN, {\n userId,\n notPart: isUserPart ? '' : 'not',\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return isUserPart;\n }\n\n /**\n * Returns the Variation by checking the Start and End Bucket Allocations of each Variation\n *\n * @param {Object} campaign which contains the variations\n * @param {Number} bucketValue the bucket Value of the user\n *\n * @return {Object|null} variation data allotted to the user or null if not\n */\n getVariation(variations: Array, bucketValue: number): VariationModel {\n for (let i = 0; i < variations.length; i++) {\n const variation = variations[i];\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n return null;\n }\n\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel {\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n /**\n * Validates the User ID and generates Variation into which the User is bucketed in.\n *\n * @param {String} userId the unique ID assigned to User\n * @param {Object} campaign the Campaign of which User is a part of\n *\n * @return {Object|null} variation data into which user is bucketed in or null if not\n */\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n let multiplier;\n\n if (!campaign || !userId) {\n return null;\n }\n\n if (campaign.getTraffic()) {\n multiplier = 1;\n }\n\n const percentTraffic = campaign.getTraffic();\n const hashValue = new DecisionMaker().generateHashValue(`${campaign.getId()}_${accountId}_${userId}`);\n const bucketValue = new DecisionMaker().generateBucketValue(hashValue, Constants.MAX_TRAFFIC_VALUE, multiplier);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION, {\n userId,\n campaignKey: campaign.getKey(),\n percentTraffic,\n bucketValue,\n hashValue,\n }),\n );\n\n return this.getVariation(campaign.getVariations(), bucketValue);\n }\n\n async getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise {\n // validate segmentation\n const campaignType = campaign.getType();\n let segments = {};\n\n if (campaignType === CampaignTypeEnum.ROLLOUT || campaignType === CampaignTypeEnum.PERSONALIZE) {\n segments = campaign.getVariations()[0].getSegments();\n } else if (campaignType === CampaignTypeEnum.AB) {\n segments = campaign.getSegments();\n }\n if (isObject(segments) && !Object.keys(segments).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_SKIP, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return true;\n } else {\n const preSegmentationResult = await SegmentationManager.Instance.validateSegmentation(\n segments,\n context.getCustomVariables(),\n );\n\n if (!preSegmentationResult) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'failed',\n }),\n );\n\n return false;\n }\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'passed',\n }),\n );\n\n return true;\n }\n }\n\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n const isUserPart = this.isUserPartOfCampaign(userId, campaign);\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (isUserPart) {\n return campaign.getVariations()[0];\n } else {\n return null;\n }\n } else {\n if (isUserPart) {\n return this.bucketUserToVariation(userId, accountId, campaign);\n } else {\n return null;\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOOptions } from '../models/VWOOptionsModel';\nimport { isFunction } from '../utils/DataTypeUtil';\n\nexport interface IHooksService {\n execute(properties: Record): void;\n set(properties: Record): void;\n get(): Record;\n}\nclass HooksService implements IHooksService {\n private callback: ((properties: Record) => void) | undefined;\n private isCallBackFunction: boolean;\n private decision: Record;\n\n constructor(options: IVWOOptions) {\n this.callback = options.integrations?.callback;\n this.isCallBackFunction = isFunction(this.callback);\n this.decision = {};\n }\n\n /**\n * Executes the callback\n * @param {Record} properties Properties from the callback\n */\n execute(properties: Record): void {\n if (this.isCallBackFunction) {\n this.callback(properties);\n }\n }\n\n /**\n * Sets properties to the decision object\n * @param {Record} properties Properties to set\n */\n set(properties: Record): void {\n if (this.isCallBackFunction) {\n this.decision = properties;\n }\n }\n\n /**\n * Retrieves the decision object\n * @returns {Record} The decision object\n */\n get(): Record {\n return this.decision;\n }\n}\n\nexport default HooksService;\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\n\nimport { Deferred } from '../utils/PromiseUtil';\n\nimport { Constants } from '../constants';\nimport { HTTPS_PROTOCOL, HTTP_PROTOCOL } from '../constants/Url';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsSchema } from '../models/schemas/SettingsSchemaValidation';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { getSettingsPath } from '../utils/NetworkUtil';\n\ninterface ISettingsService {\n sdkKey: string;\n\n getSettings(forceFetch: boolean): Promise;\n\n fetchSettings(): Promise;\n}\n\nexport class SettingsService implements ISettingsService {\n sdkKey: string;\n accountId: number;\n expiry: number;\n networkTimeout: number;\n hostname: string;\n port: number;\n protocol: string;\n isGatewayServiceProvided: boolean = false;\n private static instance: SettingsService;\n\n constructor(options: Record) {\n this.sdkKey = options.sdkKey;\n this.accountId = options.accountId;\n this.expiry = options?.settings?.expiry || Constants.SETTINGS_EXPIRY;\n this.networkTimeout = options?.settings?.timeout || Constants.SETTINGS_TIMEOUT;\n\n if (options?.gatewayService?.url) {\n let parsedUrl;\n this.isGatewayServiceProvided = true;\n if (\n options.gatewayService.url.startsWith(HTTP_PROTOCOL) ||\n options.gatewayService.url.startsWith(HTTPS_PROTOCOL)\n ) {\n parsedUrl = new URL(`${options.gatewayService.url}`);\n } else if (options.gatewayService?.protocol) {\n parsedUrl = new URL(`${options.gatewayService.protocol}://${options.gatewayService.url}`);\n } else {\n parsedUrl = new URL(`${HTTPS_PROTOCOL}${options.gatewayService.url}`);\n }\n this.hostname = parsedUrl.hostname;\n this.protocol = parsedUrl.protocol.replace(':', '');\n if (parsedUrl.port) {\n this.port = parseInt(parsedUrl.port);\n } else if (options.gatewayService?.port) {\n this.port = options.gatewayService.port;\n }\n } else {\n this.hostname = Constants.HOST_NAME;\n }\n\n // if (this.expiry > 0) {\n // this.setSettingsExpiry();\n // }\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: 'Settings Manager',\n }),\n );\n SettingsService.instance = this;\n }\n\n static get Instance(): SettingsService {\n return SettingsService.instance;\n }\n\n private setSettingsExpiry() {\n const settingsTimeout = setTimeout(() => {\n this.fetchSettingsAndCacheInStorage().then(() => {\n clearTimeout(settingsTimeout);\n // again set the timer\n // NOTE: setInterval could be used but it will not consider the time required to fetch settings\n // This breaks the timer rythm and also sends more call than required\n this.setSettingsExpiry();\n });\n }, this.expiry);\n }\n\n private fetchSettingsAndCacheInStorage() {\n const deferredObject = new Deferred();\n // const storageConnector = Storage.Instance.getConnector();\n\n this.fetchSettings()\n .then(async (res) => {\n // LogManager.Instance.info('Settings fetched successfully');\n\n // const method = update ? 'update' : 'set';\n\n // storageConnector[method](Constants.SETTINGS, res).then(() => {\n // LogManager.Instance.info('Settings persisted in cache: memory');\n // deferredObject.resolve(res);\n // });\n deferredObject.resolve(res);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.resolve(null);\n });\n\n return deferredObject.promise;\n }\n\n fetchSettings(): Promise {\n const deferredObject = new Deferred();\n\n if (!this.sdkKey || !this.accountId) {\n deferredObject.reject(new Error('sdkKey is required for fetching account settings. Aborting!'));\n }\n\n const networkInstance = NetworkManager.Instance;\n const options: Record = getSettingsPath(this.sdkKey, this.accountId);\n\n options.platform = Constants.PLATFORM;\n options['api-version'] = Constants.API_VERSION;\n\n if (!networkInstance.getConfig().getDevelopmentMode()) {\n options.s = 'prod';\n }\n\n try {\n const request: RequestModel = new RequestModel(\n this.hostname,\n HttpMethodEnum.GET,\n Constants.SETTINTS_ENDPOINT,\n options,\n null,\n null,\n this.protocol,\n this.port,\n );\n request.setTimeout(this.networkTimeout);\n\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.reject(err);\n return deferredObject.promise;\n }\n }\n\n getSettings(forceFetch = false): Promise {\n const deferredObject = new Deferred();\n\n if (forceFetch) {\n this.fetchSettingsAndCacheInStorage().then((settings) => {\n deferredObject.resolve(settings);\n });\n } else {\n // const storageConnector = Storage.Instance.getConnector();\n\n // if (storageConnector) {\n // storageConnector\n // .get(Constants.SETTINGS)\n // .then((storedSettings: dynamic) => {\n // if (!isObject(storedSettings)) {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n // if (isSettingsValid) {\n // deferredObject.resolve(fetchedSettings);\n // } else {\n // deferredObject.reject(new Error('Settings are not valid. Failed schema validation.'));\n // }\n // });\n // } else {\n // deferredObject.resolve(storedSettings);\n // }\n // })\n // .catch(() => {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // deferredObject.resolve(fetchedSettings);\n // });\n // });\n // } else {\n this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n if (isSettingsValid) {\n LogManager.Instance.info(InfoLogMessagesEnum.SETTINGS_FETCH_SUCCESS);\n\n deferredObject.resolve(fetchedSettings);\n } else {\n LogManager.Instance.error(ErrorLogMessagesEnum.SETTINGS_SCHEMA_INVALID);\n\n deferredObject.resolve({});\n }\n });\n // }\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { Storage } from '../packages/storage';\nimport { dynamic } from '../types/Common';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { LogManager } from '../packages/logger';\nimport { isNull, isUndefined } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\nexport interface IStorageService {\n getDataInStorage(featureKey: any, context: ContextModel): Promise>;\n setDataInStorage(data: Record): Promise;\n}\nexport class StorageService implements IStorageService {\n private storageData: Record = {};\n\n /**\n * Retrieves data from storage based on the feature key and user ID.\n * @param featureKey The key to identify the feature data.\n * @param user The user object containing at least an ID.\n * @returns A promise that resolves to the data retrieved or an error/storage status enum.\n */\n async getDataInStorage(featureKey: any, context: ContextModel): Promise> {\n const deferredObject = new Deferred();\n const storageInstance = Storage.Instance.getConnector();\n\n // Check if the storage instance is available\n if (isNull(storageInstance) || isUndefined(storageInstance)) {\n deferredObject.resolve(StorageEnum.STORAGE_UNDEFINED);\n } else {\n storageInstance\n .get(featureKey, context.getId())\n .then((data: Record) => {\n deferredObject.resolve(data);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORED_DATA_ERROR, {\n err,\n }),\n );\n\n deferredObject.resolve(StorageEnum.NO_DATA_FOUND);\n });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Stores data in the storage.\n * @param data The data to be stored as a record.\n * @returns A promise that resolves to true if data is successfully stored, otherwise false.\n */\n async setDataInStorage(data: Record): Promise {\n const deferredObject = new Deferred();\n\n const storageInstance = Storage.Instance.getConnector();\n // Check if the storage instance is available\n if (storageInstance === null || storageInstance === undefined) {\n deferredObject.resolve(false);\n } else {\n storageInstance\n .set(data)\n .then(() => {\n deferredObject.resolve(true);\n })\n .catch(() => {\n deferredObject.resolve(false);\n });\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { RuleModel } from '../models/campaign/RuleModel';\n/**\n * Sets the variation allocation for a given campaign based on its type.\n * If the campaign type is ROLLOUT or PERSONALIZE, it handles the campaign using `_handleRolloutCampaign`.\n * Otherwise, it assigns range values to each variation in the campaign.\n * @param {CampaignModel} campaign - The campaign for which to set the variation allocation.\n */\nexport function setVariationAllocation(campaign: CampaignModel): void {\n // Check if the campaign type is ROLLOUT or PERSONALIZE\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n _handleRolloutCampaign(campaign);\n } else {\n let currentAllocation = 0;\n // Iterate over each variation in the campaign\n campaign.getVariations().forEach((variation) => {\n // Assign range values to the variation and update the current allocation\n const stepFactor = assignRangeValues(variation, currentAllocation);\n currentAllocation += stepFactor;\n // Log the range allocation for debugging\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: variation.getStartRangeVariation(),\n endRange: variation.getEndRangeVariation(),\n }),\n );\n });\n }\n}\n\n/**\n * Assigns start and end range values to a variation based on its weight.\n * @param {VariationModel} data - The variation model to assign range values.\n * @param {number} currentAllocation - The current allocation value before this variation.\n * @returns {number} The step factor calculated from the variation's weight.\n */\nexport function assignRangeValues(data: VariationModel, currentAllocation: number) {\n // Calculate the bucket range based on the variation's weight\n const stepFactor: number = _getVariationBucketRange(data.getWeight());\n\n // Set the start and end range of the variation\n if (stepFactor) {\n data.setStartRange(currentAllocation + 1);\n data.setEndRange(currentAllocation + stepFactor);\n } else {\n data.setStartRange(-1);\n data.setEndRange(-1);\n }\n return stepFactor;\n}\n\n/**\n * Scales the weights of variations to sum up to 100%.\n * @param {any[]} variations - The list of variations to scale.\n */\nexport function scaleVariationWeights(variations: any) {\n // Calculate the total weight of all variations\n const totalWeight = variations.reduce((acc, variation) => {\n return acc + variation.weight;\n }, 0);\n // If total weight is zero, assign equal weight to each variation\n if (!totalWeight) {\n const equalWeight = 100 / variations.length;\n variations.forEach((variation) => (variation.weight = equalWeight));\n } else {\n // Scale each variation's weight to make the total 100%\n variations.forEach((variation) => (variation.weight = (variation.weight / totalWeight) * 100));\n }\n}\n\n/**\n * Generates a bucketing seed based on user ID, campaign, and optional group ID.\n * @param {string} userId - The user ID.\n * @param {any} campaign - The campaign object.\n * @param {string} [groupId] - The optional group ID.\n * @returns {string} The bucketing seed.\n */\nexport function getBucketingSeed(userId: string, campaign: CampaignModel, groupId: number) {\n // Return a seed combining group ID and user ID if group ID is provided\n if (groupId) {\n return `${groupId}_${userId}`;\n }\n // Return a seed combining campaign ID and user ID otherwise\n return `${campaign.getId()}_${userId}`;\n}\n\n/**\n * Retrieves a variation by its ID within a specific campaign identified by its key.\n * @param {SettingsModel} settings - The settings model containing all campaigns.\n * @param {string} campaignKey - The key of the campaign.\n * @param {string} variationId - The ID of the variation to retrieve.\n * @returns {VariationModel | null} The found variation model or null if not found.\n */\nexport function getVariationFromCampaignKey(settings: SettingsModel, campaignKey: string, variationId: number) {\n // Find the campaign by its key\n const campaign: CampaignModel = settings.getCampaigns().find((campaign: CampaignModel) => {\n return campaign.getKey() === campaignKey;\n });\n\n if (campaign) {\n // Find the variation by its ID within the found campaign\n const variation: VariationModel = campaign.getVariations().find((variation: VariationModel) => {\n return variation.getId() === variationId;\n });\n\n if (variation) {\n // Return a new instance of VariationModel based on the found variation\n return new VariationModel().modelFromDictionary(variation);\n }\n }\n return null;\n}\n\n/**\n * Sets the allocation ranges for a list of campaigns.\n * @param {CampaignModel[]} campaigns - The list of campaigns to set allocations for.\n */\nexport function setCampaignAllocation(campaigns: any[]) {\n let stepFactor = 0;\n for (let i = 0, currentAllocation = 0; i < campaigns.length; i++) {\n const campaign = campaigns[i];\n\n // Assign range values to each campaign and update the current allocation\n stepFactor = assignRangeValuesMEG(campaign, currentAllocation);\n currentAllocation += stepFactor;\n }\n}\n\n/**\n * Determines if a campaign is part of a group.\n * @param {SettingsModel} settings - The settings model containing group associations.\n * @param {string} campaignId - The ID of the campaign to check.\n * @param {any} [variationId=null] - The optional variation ID.\n * @returns {Object} An object containing the group ID and name if the campaign is part of a group, otherwise an empty object.\n */\nexport function getGroupDetailsIfCampaignPartOfIt(settings: SettingsModel, campaignId: any, variationId: any = null) {\n /**\n * If variationId is null, that means that campaign is testing campaign\n * If variationId is not null, that means that campaign is personalization campaign and we need to append variationId to campaignId using _\n * then check if the current campaign is part of any group\n */\n let campaignToCheck = campaignId.toString();\n // check if variationId is not null\n if (variationId !== null) {\n // if variationId is not null, then append it to the campaignId like campaignId_variationId\n campaignToCheck = `${campaignId}_${variationId}`.toString();\n }\n if (\n settings.getCampaignGroups() &&\n Object.prototype.hasOwnProperty.call(settings.getCampaignGroups(), campaignToCheck)\n ) {\n return {\n groupId: settings.getCampaignGroups()[campaignToCheck],\n groupName: settings.getGroups()[settings.getCampaignGroups()[campaignToCheck]].name,\n };\n }\n return {};\n}\n\n/**\n * Finds all groups associated with a feature specified by its key.\n * @param {SettingsModel} settings - The settings model containing all features and groups.\n * @param {string} featureKey - The key of the feature to find groups for.\n * @returns {Array} An array of groups associated with the feature.\n */\nexport function findGroupsFeaturePartOf(settings: SettingsModel, featureKey: string) {\n // Initialize an array to store all rules for the given feature to fetch campaignId and variationId later\n const ruleArray: Array = [];\n // Loop over all rules inside the feature where the feature key matches and collect all rules\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n if (ruleArray.indexOf(rule) === -1) {\n ruleArray.push(rule);\n }\n });\n }\n });\n\n // Loop over all campaigns and find the group for each campaign\n const groups: Array = [];\n ruleArray.forEach((rule) => {\n const group = getGroupDetailsIfCampaignPartOfIt(\n settings,\n rule.getCampaignId(),\n rule.getType() === CampaignTypeEnum.PERSONALIZE ? rule.getVariationId() : null,\n );\n if (group.groupId) {\n // Check if the group is already added to the groups array to avoid duplicates\n const groupIndex = groups.findIndex((grp) => grp.groupId === group.groupId);\n if (groupIndex === -1) {\n groups.push(group);\n }\n }\n });\n return groups;\n}\n\n/**\n * Retrieves campaigns by a specific group ID.\n * @param {SettingsModel} settings - The settings model containing all groups.\n * @param {any} groupId - The ID of the group.\n * @returns {Array} An array of campaigns associated with the specified group ID.\n */\nexport function getCampaignsByGroupId(settings: SettingsModel, groupId: number) {\n const group = settings.getGroups()[groupId];\n if (group) {\n return group.campaigns; // Return the campaigns associated with the group\n } else {\n return []; // Return an empty array if the group ID is not found\n }\n}\n\n/**\n * Retrieves feature keys from a list of campaign IDs.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {any} campaignIdWithVariation - An array of campaign IDs and variation IDs in format campaignId_variationId.\n * @returns {Array} An array of feature keys associated with the provided campaign IDs.\n */\nexport function getFeatureKeysFromCampaignIds(settings: SettingsModel, campaignIdWithVariation: any) {\n const featureKeys = [];\n for (const campaign of campaignIdWithVariation) {\n // split key with _ to separate campaignId and variationId\n const [campaignId, variationId] = campaign.split('_').map(Number);\n settings.getFeatures().forEach((feature) => {\n // check if feature already exists in the featureKeys array\n if (featureKeys.indexOf(feature.getKey()) !== -1) {\n return;\n }\n feature.getRules().forEach((rule) => {\n if (rule.getCampaignId() === campaignId) {\n // Check if variationId is provided and matches the rule's variationId\n if (variationId !== undefined && variationId !== null) {\n // Add feature key if variationId matches\n if (rule.getVariationId() === variationId) {\n featureKeys.push(feature.getKey());\n }\n } else {\n // Add feature key if no variationId is provided\n featureKeys.push(feature.getKey());\n }\n }\n });\n });\n }\n return featureKeys;\n}\n\n/**\n * Retrieves campaign IDs from a specific feature key.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of campaign IDs associated with the specified feature key.\n */\nexport function getCampaignIdsFromFeatureKey(settings: SettingsModel, featureKey: string) {\n const campaignIds = [];\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n campaignIds.push(rule.getCampaignId()); // Add campaign ID if feature key matches\n });\n }\n });\n return campaignIds;\n}\n\n/**\n * Assigns range values to a campaign based on its weight.\n * @param {any} data - The campaign data containing weight.\n * @param {number} currentAllocation - The current allocation value before this campaign.\n * @returns {number} The step factor calculated from the campaign's weight.\n */\nexport function assignRangeValuesMEG(data: any, currentAllocation: number) {\n const stepFactor: number = _getVariationBucketRange(data.weight);\n\n if (stepFactor) {\n data.startRangeVariation = currentAllocation + 1; // Set the start range\n data.endRangeVariation = currentAllocation + stepFactor; // Set the end range\n } else {\n data.startRangeVariation = -1; // Set invalid range if step factor is zero\n data.endRangeVariation = -1;\n }\n return stepFactor;\n}\n\n/**\n * Retrieves the rule type using a campaign ID from a specific feature.\n * @param {any} feature - The feature containing rules.\n * @param {number} campaignId - The campaign ID to find the rule type for.\n * @returns {string} The rule type if found, otherwise an empty string.\n */\nexport function getRuleTypeUsingCampaignIdFromFeature(feature: FeatureModel, campaignId: number) {\n const rule = feature.getRules().find((rule) => rule.getCampaignId() === campaignId);\n return rule ? rule.getType() : ''; // Return the rule type if found\n}\n\n/**\n * Calculates the bucket range for a variation based on its weight.\n * @param {number} variationWeight - The weight of the variation.\n * @returns {number} The calculated bucket range.\n */\nfunction _getVariationBucketRange(variationWeight: number) {\n if (!variationWeight || variationWeight === 0) {\n return 0; // Return zero if weight is invalid or zero\n }\n\n const startRange = Math.ceil(variationWeight * 100);\n\n return Math.min(startRange, Constants.MAX_TRAFFIC_VALUE); // Ensure the range does not exceed the max traffic value\n}\n\n/**\n * Handles the rollout campaign by setting start and end ranges for all variations.\n * @param {CampaignModel} campaign - The campaign to handle.\n */\nfunction _handleRolloutCampaign(campaign: CampaignModel): void {\n // Set start and end ranges for all variations in the campaign\n for (let i = 0; i < campaign.getVariations().length; i++) {\n const variation = campaign.getVariations()[i];\n const endRange = campaign.getVariations()[i].getWeight() * 100;\n\n variation.setStartRange(1);\n variation.setEndRange(endRange);\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: 1,\n endRange,\n }),\n );\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\ntype FunctionType = (val: dynamic) => void;\n\n/**\n * Checks if a value is an object excluding arrays, functions, regexes, promises, and dates.\n * @param val The value to check.\n * @returns True if the value is an object, false otherwise.\n */\nexport function isObject(\n val: T,\n): val is Record & Exclude | FunctionType | RegExp | Promise | Date> {\n // Using Object.prototype.toString to get a precise string representation of the value type\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Checks if a value is an array.\n * @param val The value to check.\n * @returns True if the value is an array, false otherwise.\n */\nexport function isArray(val: dynamic): val is Array {\n return Object.prototype.toString.call(val) === '[object Array]';\n}\n\n/**\n * Checks if a value is null.\n * @param val The value to check.\n * @returns True if the value is null, false otherwise.\n */\nexport function isNull(val: dynamic): val is null {\n return Object.prototype.toString.call(val) === '[object Null]';\n}\n\n/**\n * Checks if a value is undefined.\n * @param val The value to check.\n * @returns True if the value is undefined, false otherwise.\n */\nexport function isUndefined(val: dynamic): val is undefined {\n return Object.prototype.toString.call(val) === '[object Undefined]';\n}\n\n/**\n * Checks if a value is defined, i.e., not undefined and not null.\n * @param val The value to check.\n * @returns True if the value is defined, false otherwise.\n */\nexport function isDefined(val: T): val is NonNullable {\n return !isUndefined(val) && !isNull(val);\n}\n\n/**\n * Checks if a value is a number, including NaN.\n * @param val The value to check.\n * @returns True if the value is a number, false otherwise.\n */\nexport function isNumber(val: dynamic): val is number {\n // Note: NaN is also a number\n return Object.prototype.toString.call(val) === '[object Number]';\n}\n\n/**\n * Checks if a value is a string.\n * @param val The value to check.\n * @returns True if the value is a string, false otherwise.\n */\nexport function isString(val: dynamic): val is string {\n return Object.prototype.toString.call(val) === '[object String]';\n}\n\n/**\n * Checks if a value is a boolean.\n * @param val The value to check.\n * @returns True if the value is a boolean, false otherwise.\n */\nexport function isBoolean(val: dynamic): val is boolean {\n return Object.prototype.toString.call(val) === '[object Boolean]';\n}\n\n/**\n * Checks if a value is NaN.\n * @param val The value to check.\n * @returns True if the value is NaN, false otherwise.\n */\nexport function isNaN(val: dynamic): val is number {\n // NaN is the only JavaScript value that is treated as unequal to itself\n return val !== val;\n}\n\n/**\n * Checks if a value is a Date object.\n * @param val The value to check.\n * @returns True if the value is a Date object, false otherwise.\n */\nexport function isDate(val: dynamic): val is Date {\n return Object.prototype.toString.call(val) === '[object Date]';\n}\n\n/**\n * Checks if a value is a function.\n * @param val The value to check.\n * @returns True if the value is a function, false otherwise.\n */\nexport function isFunction(val: dynamic): val is FunctionType {\n return Object.prototype.toString.call(val) === '[object Function]';\n}\n\n/**\n * Checks if a value is a regular expression.\n * @param val The value to check.\n * @returns True if the value is a regular expression, false otherwise.\n */\nexport function isRegex(val: dynamic): val is RegExp {\n return Object.prototype.toString.call(val) === '[object RegExp]';\n}\n\n/**\n * Checks if a value is a Promise.\n * @param val The value to check.\n * @returns True if the value is a Promise, false otherwise.\n */\nexport function isPromise(val: dynamic): val is Promise {\n return Object.prototype.toString.call(val) === '[object Promise]';\n}\n\n/**\n * Determines the type of the given value using various type-checking utility functions.\n * @param val The value to determine the type of.\n * @returns A string representing the type of the value.\n */\nexport function getType(val: dynamic): string {\n // Check if the value is an Object (excluding arrays, functions, etc.)\n return isObject(val)\n ? 'Object'\n : // Check if the value is an Array\n isArray(val)\n ? 'Array'\n : // Check if the value is null\n isNull(val)\n ? 'Null'\n : // Check if the value is undefined\n isUndefined(val)\n ? 'Undefined'\n : // Check if the value is NaN (Not a Number)\n isNaN(val)\n ? 'NaN'\n : // Check if the value is a Number (including NaN)\n isNumber(val)\n ? 'Number'\n : // Check if the value is a String\n isString(val)\n ? 'String'\n : // Check if the value is a Boolean\n isBoolean(val)\n ? 'Boolean'\n : // Check if the value is a Date object\n isDate(val)\n ? 'Date'\n : // Check if the value is a Regular Expression\n isRegex(val)\n ? 'Regex'\n : // Check if the value is a Function\n isFunction(val)\n ? 'Function'\n : // Check if the value is a Promise\n isPromise(val)\n ? 'Promise'\n : // If none of the above, return 'Unknown Type'\n 'Unknown Type';\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isPromise } from '../utils/DataTypeUtil';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { StatusEnum } from '../enums/StatusEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { Constants } from '../constants';\nimport {\n assignRangeValues,\n getBucketingSeed,\n getGroupDetailsIfCampaignPartOfIt,\n scaleVariationWeights,\n} from './CampaignUtil';\nimport { cloneObject } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { evaluateGroups } from './MegUtil';\nimport { getUUID } from './UuidUtil';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\n\nexport const checkWhitelistingAndPreSeg = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise<[boolean, any]> => {\n const vwoUserId = getUUID(context.getId(), settings.getAccountId());\n const campaignId = campaign.getId();\n\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // set _vwoUserId for variation targeting variables\n context.setVariationTargetingVariables(\n Object.assign({}, context.getVariationTargetingVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { variationTargetingVariables: context.getVariationTargetingVariables() }); // for integration\n\n // check if the campaign satisfies the whitelisting\n if (campaign.getIsForcedVariationEnabled()) {\n const whitelistedVariation = await _checkCampaignWhitelisting(campaign, context);\n if (whitelistedVariation && Object.keys(whitelistedVariation).length > 0) {\n return [true, whitelistedVariation];\n }\n } else {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey: campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n }\n }\n // userlist segment is also available for campaign pre segmentation\n context.setCustomVariables(\n Object.assign({}, context.getCustomVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { customVariables: context.getCustomVariables() }); // for integeration\n\n // Check if RUle being evaluated is part of Mutually Exclusive Group\n const { groupId } = getGroupDetailsIfCampaignPartOfIt(\n settings,\n campaign.getId(),\n campaign.getType() === CampaignTypeEnum.PERSONALIZE ? campaign.getVariations()[0].getId() : null,\n );\n // Check if group is already evaluated and we have eligible winner campaigns\n const groupWinnerCampaignId = megGroupWinnerCampaigns?.get(groupId);\n if (groupWinnerCampaignId) {\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId) {\n return [true, null];\n }\n } else if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId + '_' + campaign.getVariations()[0].getId()) {\n return [true, null];\n }\n }\n // as group is already evaluated, no need to check again, return false directly\n return [false, null];\n } else {\n // check in storage if the group is already evaluated for the user\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n storageService,\n );\n if (storedData && storedData.experimentKey && storedData.experimentId) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n if (storedData.experimentId === campaignId) {\n // return the campaign if the called campaignId matches\n if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (storedData.experimentVariationId === campaign.getVariations()[0].getId()) {\n // if personalise then check if the reqeusted variation is the winner\n return [true, null];\n } else {\n // if requested variation is not the winner then set the winner campaign in the map and return\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n return [false, null];\n }\n } else {\n return [true, null];\n }\n }\n if (storedData.experimentVariationId != -1) {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n } else {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId);\n }\n return [false, null];\n }\n }\n\n // If Whitelisting is skipped/failed and campaign not part of any MEG Groups\n // Check campaign's pre-segmentation\n const isPreSegmentationPassed = await new CampaignDecisionService().getPreSegmentationDecision(campaign, context);\n\n if (isPreSegmentationPassed && groupId) {\n const winnerCampaign = await evaluateGroups(\n settings,\n feature,\n groupId,\n evaluatedFeatureMap,\n context,\n storageService,\n );\n\n if (winnerCampaign && winnerCampaign.id === campaignId) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n return [true, null];\n } else {\n // if personalise then check if the reqeusted variation is the winner\n if (winnerCampaign.variations[0].id === campaign.getVariations()[0].getId()) {\n return [true, null];\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n return [false, null];\n }\n }\n } else if (winnerCampaign) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id);\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n }\n return [false, null];\n }\n megGroupWinnerCampaigns.set(groupId, -1);\n return [false, null];\n }\n\n return [isPreSegmentationPassed, null];\n};\n\nexport const evaluateTrafficAndGetVariation = (\n settings: SettingsModel,\n campaign: CampaignModel,\n userId: string | number,\n): VariationModel => {\n const variation = new CampaignDecisionService().getVariationAlloted(userId, settings.getAccountId(), campaign);\n if (!variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: 'did not get any variation',\n }),\n );\n\n return null;\n }\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: `got variation:${variation.getKey()}`,\n }),\n );\n\n return variation;\n};\n\n/******************\n * PRIVATE METHODS\n ******************/\n\n/**\n * Check for whitelisting\n * @param campaign Campaign object\n * @param userId User ID\n * @param variationTargetingVariables Variation targeting variables\n * @returns\n */\nconst _checkCampaignWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n // check if the campaign satisfies the whitelisting\n const whitelistingResult = await _evaluateWhitelisting(campaign, context);\n const status = whitelistingResult ? StatusEnum.PASSED : StatusEnum.FAILED;\n const variationString = whitelistingResult ? whitelistingResult.variation.key : '';\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status,\n variationString,\n }),\n );\n\n return whitelistingResult;\n};\n\nconst _evaluateWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n const targetedVariations = [];\n const promises: Promise[] = [];\n\n let whitelistedVariation;\n\n campaign.getVariations().forEach((variation) => {\n if (isObject(variation.getSegments()) && !Object.keys(variation.getSegments()).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n variation: variation.getKey() ? `for variation: ${variation.getKey()}` : '',\n }),\n );\n\n return;\n }\n // check for segmentation and evaluate\n if (isObject(variation.getSegments())) {\n let SegmentEvaluatorResult = SegmentationManager.Instance.validateSegmentation(\n variation.getSegments(),\n context.getVariationTargetingVariables(),\n );\n SegmentEvaluatorResult = isPromise(SegmentEvaluatorResult)\n ? SegmentEvaluatorResult\n : Promise.resolve(SegmentEvaluatorResult);\n SegmentEvaluatorResult.then((evaluationResult) => {\n if (evaluationResult) {\n targetedVariations.push(cloneObject(variation));\n }\n });\n\n promises.push(SegmentEvaluatorResult);\n }\n });\n\n // Wait for all promises to resolve\n await Promise.all(promises);\n\n if (targetedVariations.length > 1) {\n scaleVariationWeights(targetedVariations);\n for (let i = 0, currentAllocation = 0, stepFactor = 0; i < targetedVariations.length; i++) {\n stepFactor = assignRangeValues(targetedVariations[i], currentAllocation);\n currentAllocation += stepFactor;\n }\n whitelistedVariation = new CampaignDecisionService().getVariation(\n targetedVariations,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), campaign, null)),\n );\n } else {\n whitelistedVariation = targetedVariations[0];\n }\n\n if (whitelistedVariation) {\n return {\n variation: whitelistedVariation,\n variationName: whitelistedVariation.name,\n variationId: whitelistedVariation.id,\n };\n }\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { dynamic } from '../types/Common';\nimport { isString } from './DataTypeUtil';\n\n/**\n * Clones an object deeply.\n * @param {dynamic} obj - The object to clone.\n * @returns {any} The cloned object.\n */\nexport function cloneObject(obj: dynamic): any {\n if (!obj) {\n // Return the original object if it is null or undefined\n return obj;\n }\n // Use JSON stringify and parse method to perform a deep clone\n const clonedObj = JSON.parse(JSON.stringify(obj));\n return clonedObj;\n}\n\n/**\n * Gets the current Unix timestamp in seconds.\n * @returns {number} The current Unix timestamp.\n */\nexport function getCurrentUnixTimestamp(): number {\n // Convert the current date to Unix timestamp in seconds\n return Math.ceil(+new Date() / 1000);\n}\n\n/**\n * Gets the current Unix timestamp in milliseconds.\n * @returns {number} The current Unix timestamp in milliseconds.\n */\nexport function getCurrentUnixTimestampInMillis(): number {\n // Convert the current date to Unix timestamp in milliseconds\n return +new Date();\n}\n\n/**\n * Generates a random number between 0 and 1.\n * @returns {number} A random number.\n */\nexport function getRandomNumber(): number {\n // Use Math.random to generate a random number\n return Math.random();\n}\n\n/**\n * Retrieves specific rules based on the type from a feature.\n * @param {FeatureModel} feature - The key of the feature.\n * @param {CampaignTypeEnum | null} type - The type of the rules to retrieve.\n * @returns {Array} An array of rules that match the type.\n */\nexport function getSpecificRulesBasedOnType(feature: FeatureModel, type: CampaignTypeEnum = null) {\n // Return an empty array if no linked campaigns are found\n if (feature && !feature?.getRulesLinkedCampaign()) {\n return [];\n }\n // Filter the rules by type if a type is specified and is a string\n if (feature && feature.getRulesLinkedCampaign() && type && isString(type)) {\n return feature.getRulesLinkedCampaign().filter((rule) => {\n const ruleModel = new CampaignModel().modelFromDictionary(rule);\n return ruleModel.getType() === type;\n });\n }\n // Return all linked campaigns if no type is specified\n return feature.getRulesLinkedCampaign();\n}\n\n/**\n * Retrieves all AB and Personalize rules from a feature.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of AB and Personalize rules.\n */\nexport function getAllExperimentRules(feature: FeatureModel) {\n // Retrieve the feature by its key\n // Filter the rules to include only AB and Personalize types\n return (\n feature\n ?.getRulesLinkedCampaign()\n .filter((rule) => rule.getType() === CampaignTypeEnum.AB || rule.getType() === CampaignTypeEnum.PERSONALIZE) || []\n );\n}\n\n/**\n * Retrieves a feature by its key from the settings.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature to find.\n * @returns {any} The feature if found, otherwise undefined.\n */\nexport function getFeatureFromKey(settings: SettingsModel, featureKey: string) {\n // Find the feature by its key\n return settings?.getFeatures()?.find((feature) => feature.getKey() === featureKey);\n}\n\n/**\n * Checks if an event exists within any feature's metrics.\n * @param {string} eventName - The name of the event to check.\n * @param {any} settings - The settings containing features.\n * @returns {boolean} True if the event exists, otherwise false.\n */\nexport function doesEventBelongToAnyFeature(eventName: string, settings: SettingsModel): boolean {\n // Use the `some` method to check if any feature contains the event in its metrics\n return settings\n .getFeatures()\n .some((feature) => feature.getMetrics().some((metric) => metric.getIdentifier() === eventName));\n}\n\n/**\n * Adds linked campaigns to each feature in the settings based on rules.\n * @param {any} settings - The settings file to modify.\n */\nexport function addLinkedCampaignsToSettings(settings: SettingsModel): void {\n // Create maps for quick access to campaigns and variations\n const campaignMap = new Map(\n settings.getCampaigns().map((campaign) => [campaign.getId(), campaign]),\n );\n\n // Loop over all features\n for (const feature of settings.getFeatures()) {\n const rulesLinkedCampaign = feature\n .getRules()\n .map((rule) => {\n const campaign: CampaignModel = campaignMap.get(rule.getCampaignId());\n if (!campaign) return null;\n\n // Create a linked campaign object with the rule and campaign\n const linkedCampaign: any = { key: campaign.getKey(), ...campaign, ruleKey: rule.getRuleKey() };\n // If a variationId is specified, find and add the variation\n if (rule.getVariationId()) {\n const variation = campaign.getVariations().find((v) => v.getId() === rule.getVariationId());\n if (variation) {\n linkedCampaign.variations = [variation];\n }\n }\n\n return linkedCampaign;\n })\n .filter((campaign) => campaign !== null); // Filter out any null entries\n\n const rulesLinkedCampaignModel = rulesLinkedCampaign.map((campaign) => {\n const campaignModel = new CampaignModel();\n campaignModel.modelFromDictionary(campaign);\n return campaignModel;\n });\n // Assign the linked campaigns to the feature\n feature.setRulesLinkedCampaign(rulesLinkedCampaignModel);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { Deferred } from './PromiseUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Asynchronously retrieves data from a web service using the specified query parameters and endpoint.\n * @param queryParams - The parameters to be used in the query string of the request.\n * @param endpoint - The endpoint URL to which the request is sent.\n * @returns A promise that resolves to the response data or false if an error occurs.\n */\nexport async function getFromGatewayService(queryParams: any, endpoint: any): Promise {\n // Create a new deferred object to manage promise resolution\n const deferredObject = new Deferred();\n // Singleton instance of the network manager\n const networkInstance = NetworkManager.Instance;\n\n // Check if the base URL is not set correctly\n if (!SettingsService.Instance.isGatewayServiceProvided) {\n // Log an informational message about the invalid URL\n LogManager.Instance.error(ErrorLogMessagesEnum.GATEWAY_URL_ERROR);\n // Resolve the promise with false indicating an error or invalid state\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n\n try {\n // Create a new request model instance with the provided parameters\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n queryParams,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n // Perform the network GET request\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n // Resolve the deferred object with the data from the response\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n // Reject the deferred object with the error response\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n // Resolve the promise with false as fallback\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n}\n\n/**\n * Encodes the query parameters to ensure they are URL-safe.\n * @param queryParams The query parameters to be encoded.\n * @returns An object containing the encoded query parameters.\n */\nexport function getQueryParams(queryParams: Record): Record {\n const encodedParams: Record = {};\n\n for (const [key, value] of Object.entries(queryParams)) {\n // Encode the parameter value to ensure it is URL-safe\n const encodedValue = encodeURIComponent(String(value));\n // Add the encoded parameter to the result object\n encodedParams[key] = encodedValue;\n }\n\n return encodedParams;\n}\n\n/**\n * Adds isGatewayServiceRequired flag to each feature in the settings based on pre segmentation.\n * @param {any} settings - The settings file to modify.\n */\nexport function addIsGatewayServiceRequiredFlag(settings: SettingsModel): void {\n // \\b(? 0) {\n feature.setIsGatewayServiceRequired(true);\n break;\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { getEventsBaseProperties, getTrackUserPayloadData, sendPostApiRequest } from './NetworkUtil';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\n\n/**\n * Creates and sends an impression for a variation shown event.\n * This function constructs the necessary properties and payload for the event\n * and uses the NetworkUtil to send a POST API request.\n *\n * @param {SettingsModel} settings - The settings model containing configuration.\n * @param {number} campaignId - The ID of the campaign.\n * @param {number} variationId - The ID of the variation shown to the user.\n * @param {ContextModel} context - The user context model containing user-specific data.\n */\nexport const createAndSendImpressionForVariationShown = async (\n settings: SettingsModel,\n campaignId: number,\n variationId: number,\n context: ContextModel,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_VARIATION_SHOWN,\n encodeURIComponent(context.getUserAgent()), // Encode user agent to ensure URL safety\n context.getIpAddress(),\n );\n\n // Construct payload data for tracking the user\n const payload = getTrackUserPayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_VARIATION_SHOWN,\n campaignId,\n variationId,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed properties and payload as a POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from '../utils/DataTypeUtil';\n\nconst nargs = /\\{([0-9a-zA-Z_]+)\\}/g;\n\n/**\n * Constructs a message by replacing placeholders in a template with corresponding values from a data object.\n *\n * @param {string} template - The message template containing placeholders in the format `{key}`.\n * @param {Record} data - An object containing keys and values used to replace the placeholders in the template.\n * @returns {string} The constructed message with all placeholders replaced by their corresponding values from the data object.\n */\nexport function buildMessage(template: string, data: Record = {}): string {\n try {\n return template.replace(nargs, (match, key, index) => {\n // Check for escaped placeholders\n if (template[index - 1] === '{' && template[index + match.length] === '}') {\n return key;\n }\n\n // Retrieve the value from the data object\n const value = data[key];\n\n // If the key does not exist or the value is null/undefined, return an empty string\n if (value === undefined || value === null) {\n return '';\n }\n\n // If the value is a function, evaluate it\n return isFunction(value) ? value() : value;\n });\n } catch (err) {\n return template; // Return the original template in case of an error\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport {\n getBucketingSeed,\n getCampaignIdsFromFeatureKey,\n getCampaignsByGroupId,\n getFeatureKeysFromCampaignIds,\n getVariationFromCampaignKey,\n setCampaignAllocation,\n} from './CampaignUtil';\nimport { isObject, isUndefined } from './DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from './DecisionUtil';\nimport { cloneObject, getFeatureFromKey, getSpecificRulesBasedOnType } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\n\n/**\n * Evaluates groups for a given feature and group ID.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param groupId - The ID of the group.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to the evaluation result.\n */\nexport const evaluateGroups = async (\n settings: SettingsModel,\n feature: FeatureModel,\n groupId: number,\n evaluatedFeatureMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const featureToSkip = [];\n const campaignMap: Map = new Map();\n // get all feature keys and all campaignIds from the groupId\n const { featureKeys, groupCampaignIds } = getFeatureKeysFromGroup(settings, groupId);\n for (const featureKey of featureKeys) {\n const feature = getFeatureFromKey(settings, featureKey);\n // check if the feature is already evaluated\n if (featureToSkip.includes(featureKey)) {\n continue;\n }\n // evaluate the feature rollout rules\n const isRolloutRulePassed = await _isRolloutRuleForFeaturePassed(\n settings,\n feature,\n evaluatedFeatureMap,\n featureToSkip,\n storageService,\n context,\n );\n if (isRolloutRulePassed) {\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRulesLinkedCampaign().forEach((rule) => {\n if (\n groupCampaignIds.includes(rule.getId().toString()) ||\n groupCampaignIds.includes(`${rule.getId()}_${rule.getVariations()[0].getId()}`.toString())\n ) {\n if (!campaignMap.has(featureKey)) {\n campaignMap.set(featureKey, []);\n }\n // check if the campaign is already present in the campaignMap for the feature\n if (campaignMap.get(featureKey).findIndex((item) => item.ruleKey === rule.getRuleKey()) === -1) {\n campaignMap.get(featureKey).push(rule);\n }\n }\n });\n }\n });\n }\n }\n const { eligibleCampaigns, eligibleCampaignsWithStorage } = await _getEligbleCampaigns(\n settings,\n campaignMap,\n context,\n storageService,\n );\n\n return await _findWinnerCampaignAmongEligibleCampaigns(\n settings,\n feature.getKey(),\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n groupId,\n context,\n storageService,\n );\n};\n\n/**\n * Retrieves feature keys associated with a group based on the group ID.\n *\n * @param settings - The settings model.\n * @param groupId - The ID of the group.\n * @returns An object containing feature keys and group campaign IDs.\n */\nexport function getFeatureKeysFromGroup(settings: SettingsModel, groupId: number) {\n const groupCampaignIds = getCampaignsByGroupId(settings, groupId);\n const featureKeys = getFeatureKeysFromCampaignIds(settings, groupCampaignIds);\n\n return { featureKeys, groupCampaignIds };\n}\n\n/*******************************\n * PRIVATE methods - MegUtil\n ******************************/\n\n/**\n * Evaluates the feature rollout rules for a given feature.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param featureToSkip - An array of features to skip during evaluation.\n * @param storageService - The storage service.\n * @param context - The context model.\n * @returns A promise that resolves to true if the feature passes the rollout rules, false otherwise.\n */\nconst _isRolloutRuleForFeaturePassed = async (\n settings: SettingsModel,\n feature: FeatureModel,\n evaluatedFeatureMap: Map,\n featureToSkip: any[],\n storageService: IStorageService,\n context: ContextModel,\n): Promise => {\n if (evaluatedFeatureMap.has(feature.getKey()) && 'rolloutId' in evaluatedFeatureMap.get(feature.getKey())) {\n return true;\n }\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT);\n if (rollOutRules.length > 0) {\n let ruleToTestForTraffic = null;\n for (const rule of rollOutRules) {\n const { preSegmentationResult } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n {},\n );\n if (preSegmentationResult) {\n ruleToTestForTraffic = rule;\n break;\n }\n continue;\n }\n if (ruleToTestForTraffic !== null) {\n const campaign = new CampaignModel().modelFromDictionary(ruleToTestForTraffic);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n if (isObject(variation) && Object.keys(variation).length > 0) {\n evaluatedFeatureMap.set(feature.getKey(), {\n rolloutId: ruleToTestForTraffic.id,\n rolloutKey: ruleToTestForTraffic.key,\n rolloutVariationId: ruleToTestForTraffic.variations[0].id,\n });\n return true;\n }\n }\n // no rollout rule passed\n featureToSkip.push(feature.getKey());\n return false;\n }\n // no rollout rule, evaluate experiments\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS, {\n featureKey: feature.getKey(),\n }),\n );\n return true;\n};\n\n/**\n * Retrieves eligible campaigns based on the provided campaign map and context.\n *\n * @param settings - The settings model.\n * @param campaignMap - A map containing feature keys and corresponding campaigns.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to an object containing eligible campaigns, campaigns with storage, and ineligible campaigns.\n */\nconst _getEligbleCampaigns = async (\n settings: SettingsModel,\n campaignMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const eligibleCampaigns = [];\n const eligibleCampaignsWithStorage = [];\n const inEligibleCampaigns = [];\n const campaignMapArray = Array.from<[string, CampaignModel[]]>(campaignMap);\n\n // Iterate over the campaign map to determine eligible campaigns\n for (const [featureKey, campaigns] of campaignMapArray) {\n for (const campaign of campaigns) {\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if campaign is stored in storage\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey && storedData.experimentKey === campaign.getKey()) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n\n if (eligibleCampaignsWithStorage.findIndex((item) => item.key === campaign.getKey()) === -1) {\n eligibleCampaignsWithStorage.push(campaign);\n }\n continue;\n }\n }\n }\n\n // Check if user is eligible for the campaign\n if (\n (await new CampaignDecisionService().getPreSegmentationDecision(\n new CampaignModel().modelFromDictionary(campaign),\n context,\n )) &&\n new CampaignDecisionService().isUserPartOfCampaign(context.getId(), campaign)\n ) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_ELIGIBLE, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n\n eligibleCampaigns.push(campaign);\n continue;\n }\n\n inEligibleCampaigns.push(campaign);\n }\n }\n\n return Promise.resolve({\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n inEligibleCampaigns,\n });\n};\n\n/**\n * Evaluates the eligible campaigns and determines the winner campaign based on the provided settings, feature key, eligible campaigns, eligible campaigns with storage, group ID, and context.\n *\n * @param settings - The settings model.\n * @param featureKey - The key of the feature.\n * @param eligibleCampaigns - An array of eligible campaigns.\n * @param eligibleCampaignsWithStorage - An array of eligible campaigns with storage.\n * @param groupId - The ID of the group.\n * @param context - The context model.\n * @returns A promise that resolves to the winner campaign.\n */\nconst _findWinnerCampaignAmongEligibleCampaigns = async (\n settings: SettingsModel,\n featureKey: string,\n eligibleCampaigns: any[],\n eligibleCampaignsWithStorage: any[],\n groupId: number,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n // getCampaignIds from featureKey\n let winnerCampaign = null;\n const campaignIds = getCampaignIdsFromFeatureKey(settings, featureKey);\n // get the winner from each group and store it in winnerFromEachGroup\n const megAlgoNumber = !isUndefined(settings?.getGroups()[groupId]?.et)\n ? settings.getGroups()[groupId].et\n : Constants.RANDOM_ALGO;\n\n // if eligibleCampaignsWithStorage has only one campaign, then that campaign is the winner\n if (eligibleCampaignsWithStorage.length === 1) {\n winnerCampaign = eligibleCampaignsWithStorage[0];\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaignsWithStorage[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaignsWithStorage[0].getKey()\n : eligibleCampaignsWithStorage[0].getName() + '_' + eligibleCampaignsWithStorage[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaignsWithStorage.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is random, then find the winner using random algo\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaignsWithStorage.length > 1) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is not random, then find the winner using advanced algo\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n\n if (eligibleCampaignsWithStorage.length === 0) {\n if (eligibleCampaigns.length === 1) {\n winnerCampaign = eligibleCampaigns[0];\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaigns[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaigns[0].getKey()\n : eligibleCampaigns[0].getName() + '_' + eligibleCampaigns[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaigns.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaigns.length > 1) {\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n }\n return winnerCampaign;\n};\n\n/**\n * Normalizes the weights of shortlisted campaigns and determines the winning campaign using random allocation.\n *\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _normalizeWeightsAndFindWinningCampaign = (\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n): any => {\n // Normalize the weights of all the shortlisted campaigns\n shortlistedCampaigns.forEach((campaign) => {\n campaign.weight = Math.round((100 / shortlistedCampaigns.length) * 10000) / 10000;\n });\n\n // make shortlistedCampaigns as array of VariationModel\n shortlistedCampaigns = shortlistedCampaigns.map((campaign) => new VariationModel().modelFromDictionary(campaign));\n // re-distribute the traffic for each camapign\n setCampaignAllocation(shortlistedCampaigns);\n const winnerCampaign = new CampaignDecisionService().getVariation(\n shortlistedCampaigns,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.getType() === CampaignTypeEnum.AB\n ? winnerCampaign.getKey()\n : winnerCampaign.getKey() + '_' + winnerCampaign.getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: 'using random algorithm',\n }),\n );\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.getId(),\n experimentKey: winnerCampaign.getKey(),\n experimentVariationId:\n winnerCampaign.getType() === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.getVariations()[0].getId() : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.getId())) {\n return winnerCampaign;\n }\n }\n return null;\n};\n\n/**\n * Advanced algorithm to find the winning campaign based on priority order and weighted random distribution.\n *\n * @param settings - The settings model.\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _getCampaignUsingAdvancedAlgo = (\n settings: SettingsModel,\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n) => {\n let winnerCampaign = null;\n let found = false; // flag to check whether winnerCampaign has been found or not and helps to break from the outer loop\n const priorityOrder = !isUndefined(settings.getGroups()[groupId].p) ? settings.getGroups()[groupId].p : {};\n const wt = !isUndefined(settings.getGroups()[groupId].wt) ? settings.getGroups()[groupId].wt : {};\n\n for (let i = 0; i < priorityOrder.length; i++) {\n for (let j = 0; j < shortlistedCampaigns.length; j++) {\n if (shortlistedCampaigns[j].id == priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n } else if (shortlistedCampaigns[j].id + '_' + shortlistedCampaigns[j].variations[0].id === priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n }\n }\n if (found === true) break;\n }\n\n // If winnerCampaign not found through Priority, then go for weighted Random distribution and for that,\n // Store the list of campaigns (participatingCampaigns) out of shortlistedCampaigns and their corresponding weights present in weightage distribution array (wt)\n if (winnerCampaign === null) {\n let participatingCampaignList = [];\n // iterate over shortlisted campaigns and add weights from the weight array\n for (let i = 0; i < shortlistedCampaigns.length; i++) {\n const campaignId = shortlistedCampaigns[i].id;\n if (!isUndefined(wt[campaignId])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId];\n participatingCampaignList.push(clonedCampaign);\n } else if (!isUndefined(wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id];\n participatingCampaignList.push(clonedCampaign);\n }\n }\n /* Finding winner campaign using weighted Distibution :\n 1. Re-distribute the traffic by assigning range values for each camapign in particaptingCampaignList\n 2. Calculate bucket value for the given userId and groupId\n 3. Get the winnerCampaign by checking the Start and End Bucket Allocations of each campaign\n */\n\n // make participatingCampaignList as array of VariationModel\n participatingCampaignList = participatingCampaignList.map((campaign) =>\n new VariationModel().modelFromDictionary(campaign),\n );\n setCampaignAllocation(participatingCampaignList);\n winnerCampaign = new CampaignDecisionService().getVariation(\n participatingCampaignList,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n }\n // WinnerCampaign should not be null, in case when winnerCampaign hasn't been found through PriorityOrder and\n // also shortlistedCampaigns and wt array does not have a single campaign id in common\n if (winnerCampaign) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.type === CampaignTypeEnum.AB\n ? winnerCampaign.key\n : winnerCampaign.key + '_' + winnerCampaign.ruleKey,\n groupId,\n userId: context.getId(),\n algo: 'using advanced algorithm',\n }),\n );\n } else {\n // TODO -- Log the error message\n // LogManager.Instance.info(\n // buildMessage(InfoLogMessagesEnum.MEG_NO_WINNER_CAMPAIGN, {\n // groupId,\n // userId: context.getId(),\n // }),\n // );\n LogManager.Instance.info(`No winner campaign found for MEG group: ${groupId}`);\n }\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.id,\n experimentKey: winnerCampaign.key,\n experimentVariationId:\n winnerCampaign.type === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.variations[0].id : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.id)) {\n return winnerCampaign;\n }\n }\n return null;\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getCurrentUnixTimestamp, getCurrentUnixTimestampInMillis, getRandomNumber } from './FunctionUtil';\nimport { getUUID } from './UuidUtil';\n\nimport { Constants } from '../constants';\nimport { HeadersEnum } from '../enums/HeadersEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { UrlEnum } from '../enums/UrlEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { dynamic } from '../types/Common';\nimport { isObject } from './DataTypeUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Constructs base properties for bulk operations.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The base properties including session ID and UUID.\n */\nexport function getBasePropertiesForBulk(accountId: string, userId: string): Record {\n const path: Record = {\n sId: getCurrentUnixTimestamp(), // Session ID based on current Unix timestamp\n u: getUUID(userId, accountId), // UUID generated based on user and account ID\n };\n return path;\n}\n\n/**\n * Constructs the settings path with API key and account ID.\n * @param {string} sdkKey - The API key.\n * @param {any} accountId - The account identifier.\n * @returns {Record} - The settings path including API key, random number, and account ID.\n */\nexport function getSettingsPath(sdkKey: string, accountId: string | number): Record {\n const path: Record = {\n i: `${sdkKey}`, // Inject API key\n r: Math.random(), // Random number for cache busting\n a: accountId, // Account ID\n };\n return path;\n}\n\n/**\n * Constructs the tracking path for an event.\n * @param {string} event - The event type.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The tracking path for the event.\n */\nexport function getTrackEventPath(event: string, accountId: string, userId: string): Record {\n const path: Record = {\n event_type: event, // Type of the event\n account_id: accountId, // Account ID\n uId: userId, // User ID\n u: getUUID(userId, accountId), // UUID generated for the user\n sdk: Constants.SDK_NAME, // SDK name constant\n 'sdk-v': Constants.SDK_VERSION, // SDK version\n random: getRandomNumber(), // Random number for uniqueness\n ap: Constants.PLATFORM, // Application platform\n sId: getCurrentUnixTimestamp(), // Session ID\n ed: JSON.stringify({ p: 'server' }), // Additional encoded data\n };\n\n return path;\n}\n\n/**\n * Constructs query parameters for event batching.\n * @param {string} accountId - The account identifier.\n * @returns {Record} - The query parameters for event batching.\n */\nexport function getEventBatchingQueryParams(accountId: string): Record {\n const path: Record = {\n a: accountId, // Account ID\n sd: Constants.SDK_NAME, // SDK name\n sv: Constants.SDK_VERSION, // SDK version\n };\n\n return path;\n}\n\n/**\n * Builds generic properties for different tracking calls required by VWO servers.\n * @param {Object} configObj\n * @param {String} eventName\n * @returns properties\n */\nexport function getEventsBaseProperties(\n setting: SettingsModel,\n eventName: string,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const sdkKey = setting.getSdkkey();\n\n const properties = Object.assign({\n en: eventName,\n a: setting.getAccountId(),\n env: sdkKey,\n eTime: getCurrentUnixTimestampInMillis(),\n random: getRandomNumber(),\n p: 'FS',\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n });\n\n properties.url = Constants.HTTPS_PROTOCOL + UrlUtil.getBaseUrl() + UrlEnum.EVENTS;\n return properties;\n}\n\n/**\n * Builds generic payload required by all the different tracking calls.\n * @param {Object} settings settings file\n * @param {String} userId user id\n * @param {String} eventName event name\n * @returns properties\n */\nexport function _getEventBasePayload(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n visitorUserAgent = '',\n ipAddress = '',\n): Record {\n const uuid = getUUID(userId.toString(), settings.getAccountId());\n const sdkKey = settings.getSdkkey();\n\n const props: {\n vwo_sdkName: string;\n vwo_sdkVersion: string;\n vwo_envKey: string;\n id?: string | number;\n variation?: string | number;\n isFirst?: number;\n isCustomEvent?: boolean;\n } = {\n vwo_sdkName: Constants.SDK_NAME,\n vwo_sdkVersion: Constants.SDK_VERSION,\n vwo_envKey: sdkKey,\n };\n\n const properties = {\n d: {\n msgId: `${uuid}-${getCurrentUnixTimestampInMillis()}`,\n visId: uuid,\n sessionId: getCurrentUnixTimestamp(),\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n event: {\n props: props,\n name: eventName,\n time: getCurrentUnixTimestampInMillis(),\n },\n visitor: {\n props: {\n vwo_fs_environment: sdkKey,\n },\n },\n },\n };\n\n return properties;\n}\n\n/**\n * Builds payload to track the visitor.\n * @param {Object} configObj\n * @param {String} userId\n * @param {String} eventName\n * @param {String} campaignId\n * @param {Number} variationId\n * @returns track-user payload\n */\nexport function getTrackUserPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n campaignId: number,\n variationId: number,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.id = campaignId;\n properties.d.event.props.variation = variationId;\n properties.d.event.props.isFirst = 1;\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n accountId: settings.getAccountId(),\n userId,\n campaignId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for tracking goals with custom event properties.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} eventProperties - Custom properties for the event.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getTrackGoalPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n eventProperties: Record,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props.variation = 1; // Temporary value for variation\n properties.d.event.props.id = 1; // Temporary value for ID\n\n // Add custom event properties if provided\n if (eventProperties && isObject(eventProperties) && Object.keys(eventProperties).length > 0) {\n for (const prop in eventProperties) {\n properties.d.event.props[prop] = eventProperties[prop];\n }\n }\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for syncing visitor attributes.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} attributeKey - Key of the attribute to sync.\n * @param {any} attributeValue - Value of the attribute.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getAttributePayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n attributeKey: string,\n attributeValue: dynamic,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props[Constants.VWO_FS_ENVIRONMENT] = settings.getSdkkey(); // Set environment key\n properties.d.visitor.props[attributeKey] = attributeValue; // Set attribute value\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Sends a POST API request with the specified properties and payload.\n * @param {any} properties - Properties for the request.\n * @param {any} payload - Payload for the request.\n */\nexport async function sendPostApiRequest(properties: any, payload: any): Promise {\n NetworkManager.Instance.attachClient();\n\n const headers: Record = {};\n\n const userAgent = payload.d.visitor_ua; // Extract user agent from payload\n const ipAddress = payload.d.visitor_ip; // Extract IP address from payload\n\n // Set headers if available\n if (userAgent) headers[HeadersEnum.USER_AGENT] = userAgent;\n if (ipAddress) headers[HeadersEnum.IP] = ipAddress;\n\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.POST,\n UrlEnum.EVENTS,\n properties,\n payload,\n headers,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n await NetworkManager.Instance.post(request).catch((err: ResponseModel) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n });\n}\n\n/**\n * Sends a GET API request to the specified endpoint with the given properties.\n * @param {any} properties - Properties for the request.\n * @param {any} endpoint - Endpoint for the GET request.\n * @returns {Promise} - The response from the GET request.\n */\nexport async function sendGetApiRequest(properties: any, endpoint: any): Promise {\n NetworkManager.Instance.attachClient();\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n properties,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n try {\n const response: ResponseModel = await NetworkManager.Instance.get(request);\n return response; // Return the response model\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.GET,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n return null;\n }\n}\n\n// Flag to determine if the SDK should wait for a network response.\nlet shouldWaitForTrackingCalls = false;\n\n/**\n * Checks if the SDK should wait for a network response.\n * @returns {boolean} - True if the SDK should wait for a network response, false otherwise.\n */\nexport function getShouldWaitForTrackingCalls(): boolean {\n return shouldWaitForTrackingCalls;\n}\n\n/**\n * Sets the value to determine if the SDK should wait for a network response.\n * @param value - The value to set.\n */\nexport function setShouldWaitForTrackingCalls(value: boolean): void {\n shouldWaitForTrackingCalls = value;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\n/**\n * Creates a Deferred object with properties for promise, resolve, and reject.\n * This allows manual control over the resolution and rejection of a promise.\n * @returns {Deferred} The Deferred object with promise, resolve, and reject methods.\n */\nexport function Deferred(): void {\n // Create a new Promise and attach resolve and reject methods to the Deferred object\n this.promise = new Promise((resolve: dynamic, reject: dynamic) => {\n this.resolve = resolve; // Method to resolve the promise\n this.reject = reject; // Method to reject the promise\n });\n\n return this; // Return the Deferred object with attached methods\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from './DataTypeUtil';\nimport { checkWhitelistingAndPreSeg } from './DecisionUtil';\nimport { getShouldWaitForTrackingCalls } from './NetworkUtil';\nimport { createAndSendImpressionForVariationShown } from './ImpressionUtil';\n\n/**\n * Evaluates the rules for a given campaign and feature based on the provided context.\n * This function checks for whitelisting and pre-segmentation conditions, and if applicable,\n * sends an impression for the variation shown.\n *\n * @param {SettingsModel} settings - The settings configuration for the evaluation.\n * @param {FeatureModel} feature - The feature being evaluated.\n * @param {CampaignModel} campaign - The campaign associated with the feature.\n * @param {ContextModel} context - The user context for evaluation.\n * @param {Map} evaluatedFeatureMap - A map of evaluated features.\n * @param {Map} megGroupWinnerCampaigns - A map of MEG group winner campaigns.\n * @param {StorageService} storageService - The storage service for persistence.\n * @param {any} decision - The decision object that will be updated based on the evaluation.\n * @returns {Promise<[boolean, any]>} A promise that resolves to a tuple containing the result of the pre-segmentation\n * and the whitelisted object, if any.\n */\nexport const evaluateRule = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise> => {\n // Perform whitelisting and pre-segmentation checks\n const [preSegmentationResult, whitelistedObject] = await checkWhitelistingAndPreSeg(\n settings,\n feature,\n campaign,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n // If pre-segmentation is successful and a whitelisted object exists, proceed to send an impression\n if (preSegmentationResult && isObject(whitelistedObject) && Object.keys(whitelistedObject).length > 0) {\n // Update the decision object with campaign and variation details\n Object.assign(decision, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n\n // Send an impression for the variation shown\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n campaign.getId(),\n whitelistedObject.variation.id,\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), whitelistedObject.variation.id, context);\n }\n }\n\n // Return the results of the evaluation\n return { preSegmentationResult, whitelistedObject, updatedDecision: decision };\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { setVariationAllocation } from './CampaignUtil';\nimport { addLinkedCampaignsToSettings } from './FunctionUtil';\nimport { addIsGatewayServiceRequiredFlag } from './GatewayServiceUtil';\n\nexport function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) {\n vwoClientInstance.settings = new SettingsModel(settings);\n vwoClientInstance.originalSettings = settings;\n // Optimize loop by avoiding multiple calls to `getCampaigns()`\n const campaigns = vwoClientInstance.settings.getCampaigns();\n campaigns.forEach((campaign, index) => {\n setVariationAllocation(campaign);\n campaigns[index] = campaign;\n });\n addLinkedCampaignsToSettings(vwoClientInstance.settings);\n addIsGatewayServiceRequiredFlag(vwoClientInstance.settings);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsService } from '../services/SettingsService';\nimport { isString } from './DataTypeUtil';\n\ninterface IUrlUtil {\n collectionPrefix?: string;\n init({ collectionPrefix }?: { collectionPrefix?: string }): IUrlUtil;\n getBaseUrl(): string;\n}\n\nexport const UrlUtil: IUrlUtil = {\n /**\n * Initializes the UrlUtil with optional collectionPrefix and gatewayServiceUrl.\n * If provided, these values are set after validation.\n * @param {string} [collectionPrefix] - Optional prefix for URL collections.\n * @returns {IUrlUtil} The instance of UrlUtil with updated properties.\n */\n init: ({ collectionPrefix }: { collectionPrefix?: string } = {}) => {\n // Set collectionPrefix if it is a valid string\n if (collectionPrefix && isString(collectionPrefix)) {\n UrlUtil.collectionPrefix = collectionPrefix;\n }\n\n return UrlUtil;\n },\n\n /**\n * Retrieves the base URL.\n * If gatewayServiceUrl is set, it returns that; otherwise, it constructs the URL using baseUrl and collectionPrefix.\n * @returns {string} The base URL.\n */\n getBaseUrl: () => {\n const baseUrl: string = SettingsService.Instance.hostname;\n\n if (SettingsService.Instance.isGatewayServiceProvided) {\n return baseUrl;\n }\n\n // Construct URL with collectionPrefix if it exists\n if (UrlUtil.collectionPrefix) {\n return `${baseUrl}/${UrlUtil.collectionPrefix}`;\n }\n\n // Return the default baseUrl if no specific URL components are set\n return baseUrl;\n },\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SEED_URL } from '../constants/Url';\nimport { v4 as uuidv4 } from 'uuid';\nimport { v5 as uuidv5 } from 'uuid';\n\n/**\n * Generates a random UUID based on an API key.\n * @param sdkKey The API key used to generate a namespace for the UUID.\n * @returns A random UUID string.\n */\nexport function getRandomUUID(sdkKey: string): string {\n // Generate a namespace based on the API key using DNS namespace\n const namespace = uuidv5(sdkKey, uuidv5.DNS);\n // Generate a random UUID using the namespace derived from the API key\n const randomUUID = uuidv5(uuidv4(), namespace);\n\n return randomUUID;\n}\n\n/**\n * Generates a UUID for a user based on their userId and accountId.\n * @param userId The user's ID.\n * @param accountId The account ID associated with the user.\n * @returns A UUID string formatted without dashes and in uppercase.\n */\nexport function getUUID(userId: string, accountId: string): string {\n const VWO_NAMESPACE = uuidv5(SEED_URL, uuidv5.URL);\n // Convert userId and accountId to string to ensure proper type\n userId = String(userId);\n accountId = String(accountId);\n // Generate a namespace UUID based on the accountId\n const userIdNamespace = generateUUID(accountId, VWO_NAMESPACE);\n // Generate a UUID based on the userId and the previously generated namespace\n const uuidForUserIdAccountId = generateUUID(userId, userIdNamespace);\n\n // Remove all dashes from the UUID and convert it to uppercase\n const desiredUuid = uuidForUserIdAccountId?.replace(/-/gi, '').toUpperCase();\n\n return desiredUuid;\n}\n\n/**\n * Helper function to generate a UUID v5 based on a name and a namespace.\n * @param name The name from which to generate the UUID.\n * @param namespace The namespace used to generate the UUID.\n * @returns A UUID string or undefined if inputs are invalid.\n */\nexport function generateUUID(name: string, namespace: string) {\n // Check for valid input to prevent errors\n if (!name || !namespace) {\n return;\n }\n\n // Generate and return the UUID v5\n return uuidv5(name, namespace);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\n\nconst noop = () => {};\n\nexport function sendGetCall(options) {\n sendRequest(HttpMethodEnum.GET, options);\n}\n\nexport function sendPostCall(options) {\n sendRequest(HttpMethodEnum.POST, options);\n}\n\nfunction sendRequest(method, options) {\n const { networkOptions, successCallback = noop, errorCallback = noop } = options;\n\n let url = `${networkOptions.scheme}://${networkOptions.hostname}${networkOptions.path}`;\n if (networkOptions.port) {\n url = `${networkOptions.scheme}://${networkOptions.hostname}:${networkOptions.port}${networkOptions.path}`;\n }\n const body = networkOptions.body;\n const customHeaders = networkOptions.headers || {};\n const timeout = networkOptions.timeout;\n\n const xhr = new XMLHttpRequest();\n\n if (timeout) {\n xhr.timeout = timeout;\n }\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n const response = xhr.responseText;\n\n if (method === HttpMethodEnum.GET) {\n const parsedResponse = JSON.parse(response);\n successCallback(parsedResponse);\n } else {\n successCallback(response);\n }\n } else {\n errorCallback(xhr.statusText);\n }\n };\n\n // Set up a callback function that is called if the request fails\n xhr.onerror = function () {\n // An error occurred during the transaction\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `${xhr.statusText}, status: ${xhr.status}`,\n }),\n );\n errorCallback(xhr.statusText);\n };\n\n // Set up a callback function that is called if the request times out\n if (timeout) {\n xhr.ontimeout = function () {\n // The request timed out\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `Request timed out`,\n }),\n );\n };\n }\n\n xhr.open(method, url, true);\n\n for (const headerName in customHeaders) {\n if (headerName in customHeaders) {\n // Skip the Content-Type header\n // Request header field content-type is not allowed by Access-Control-Allow-Headers\n if (headerName !== 'Content-Type' && headerName !== 'Content-Length') {\n xhr.setRequestHeader(headerName, customHeaders[headerName]);\n }\n }\n }\n\n if (method === HttpMethodEnum.POST) {\n xhr.send(JSON.stringify(body));\n } else if (method === HttpMethodEnum.GET) {\n xhr.send();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function get() {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function get() {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function get() {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function get() {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function get() {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function get() {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function get() {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function get() {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function get() {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar _default = {\n randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\n\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = {\n debugMessages: require('./src/debug-messages.json'),\n infoMessages: require('./src/info-messages.json'),\n warnMessages: require('./src/warn-messages.json'),\n errorMessages: require('./src/error-messages.json'),\n traceMessages: require('./src/trace-messages.json')\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexports.Struct = Struct;\nexports.StructError = StructError;\nexports.any = any;\nexports.array = array;\nexports.assert = assert;\nexports.assign = assign;\nexports.boolean = boolean;\nexports.coerce = coerce;\nexports.create = create;\nexports.date = date;\nexports.defaulted = defaulted;\nexports.define = define;\nexports.deprecated = deprecated;\nexports.dynamic = dynamic;\nexports.empty = empty;\nexports.enums = enums;\nexports.func = func;\nexports.instance = instance;\nexports.integer = integer;\nexports.intersection = intersection;\nexports.is = is;\nexports.lazy = lazy;\nexports.literal = literal;\nexports.map = map;\nexports.mask = mask;\nexports.max = max;\nexports.min = min;\nexports.never = never;\nexports.nullable = nullable;\nexports.number = number;\nexports.object = object;\nexports.omit = omit;\nexports.optional = optional;\nexports.partial = partial;\nexports.pattern = pattern;\nexports.pick = pick;\nexports.record = record;\nexports.refine = refine;\nexports.regexp = regexp;\nexports.set = set;\nexports.size = size;\nexports.string = string;\nexports.struct = struct;\nexports.trimmed = trimmed;\nexports.tuple = tuple;\nexports.type = type;\nexports.union = union;\nexports.unknown = unknown;\nexports.validate = validate;\n//# sourceMappingURL=index.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LogLevelEnum } from './packages/logger/enums/LogLevelEnum';\nimport { Connector } from './packages/storage/Connector';\n\nexport { LogLevelEnum, Connector as StorageConnector };\nexport { init, onInit } from './VWO';\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"vwo-fme-javascript-sdk.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACdA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;;AAEA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAM,IAA6B;AACnC;AACA,IAAI,KAAK,EAON;AACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C;AACF,sCAAqC;AACrC;AACA;AACA;AACA;AACA,CAAC,EAAC;AACF,4CAA2C;AAC3C;AACA;AACA;AACA;AACA,CAAC,EAAC;AACF,2CAA0C;AAC1C;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,gCAAgC,mBAAO,CAAC,gEAAS;;AAEjD,iCAAiC,mBAAO,CAAC,gEAAS;;AAElD,iCAAiC,mBAAO,CAAC,gEAAS;;AAElD,iCAAiC,mBAAO,CAAC,gEAAS;;AAElD,kCAAkC,mBAAO,CAAC,kEAAU;;AAEpD,sCAAsC,mBAAO,CAAC,0EAAc;;AAE5D,uCAAuC,mBAAO,CAAC,4EAAe;;AAE9D,wCAAwC,mBAAO,CAAC,8EAAgB;;AAEhE,oCAAoC,mBAAO,CAAC,sEAAY;;AAExD,uCAAuC,uCAAuC;;;;;;;;;;;AC9EjE;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,aAAa;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAe;;;;;;;;;;;AC9NF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;ACVF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA,kBAAe;;;;;;;;;;;ACPF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;;AAEf,uCAAuC,mBAAO,CAAC,4EAAe;;AAE9D,uCAAuC,uCAAuC;;AAE9E;AACA;AACA;AACA;;AAEA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;;AAErB;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAe;;;;;;;;;;;AC5CF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,6BAA6B,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG;AAC3F,kBAAe;;;;;;;;;;;ACPF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;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A;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C;AAC9C,IAAI,IAAI;AACR;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,iCAAiC;AACjC,QAAQ;AACR;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA,GAAG;AACH;;AAEA,cAAc;AACd,mBAAmB;AACnB,WAAW;AACX,aAAa;AACb,cAAc;AACd,cAAc;AACd,eAAe;AACf,cAAc;AACd,cAAc;AACd,YAAY;AACZ,iBAAiB;AACjB,cAAc;AACd,kBAAkB;AAClB,eAAe;AACf,aAAa;AACb,aAAa;AACb,YAAY;AACZ,gBAAgB;AAChB,eAAe;AACf,oBAAoB;AACpB,UAAU;AACV,YAAY;AACZ,eAAe;AACf,WAAW;AACX,YAAY;AACZ,WAAW;AACX,WAAW;AACX,aAAa;AACb,gBAAgB;AAChB,cAAc;AACd,cAAc;AACd,YAAY;AACZ,gBAAgB;AAChB,eAAe;AACf,eAAe;AACf,YAAY;AACZ,cAAc;AACd,cAAc;AACd,cAAc;AACd,WAAW;AACX,YAAY;AACZ,cAAc;AACd,cAAc;AACd,eAAe;AACf,aAAa;AACb,YAAY;AACZ,aAAa;AACb,eAAe;AACf,gBAAgB;AAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC5nCA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA;;;;;;;;;;;;;;GAcG;;;AAEH,oIAAoE;AAG3D,8FAHA,2BAAY,QAGA;AAFrB,iHAAyD;AAErB,kGAF3B,qBAAS,QAEkC;AACpD,6DAAqC;AAA5B,gGAAI;AAAE,oGAAM","sources":["webpack://vwoSdk/webpack/universalModuleDefinition","webpack://vwoSdk/./node_modules/murmurhash/murmurhash.js","webpack://vwoSdk/./lib/VWO.ts","webpack://vwoSdk/./lib/VWOBuilder.ts","webpack://vwoSdk/./lib/VWOClient.ts","webpack://vwoSdk/./lib/api/GetFlag.ts","webpack://vwoSdk/./lib/api/SetAttribute.ts","webpack://vwoSdk/./lib/api/TrackEvent.ts","webpack://vwoSdk/./lib/constants/Url.ts","webpack://vwoSdk/./lib/constants/index.ts","webpack://vwoSdk/./lib/decorators/StorageDecorator.ts","webpack://vwoSdk/./lib/enums/ApiEnum.ts","webpack://vwoSdk/./lib/enums/CampaignTypeEnum.ts","webpack://vwoSdk/./lib/enums/EventEnum.ts","webpack://vwoSdk/./lib/enums/HeadersEnum.ts","webpack://vwoSdk/./lib/enums/HttpMethodEnum.ts","webpack://vwoSdk/./lib/enums/PlatformEnum.ts","webpack://vwoSdk/./lib/enums/StatusEnum.ts","webpack://vwoSdk/./lib/enums/StorageEnum.ts","webpack://vwoSdk/./lib/enums/UrlEnum.ts","webpack://vwoSdk/./lib/enums/log-messages/index.ts","webpack://vwoSdk/./lib/models/campaign/CampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/FeatureModel.ts","webpack://vwoSdk/./lib/models/campaign/ImpactCampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/MetricModel.ts","webpack://vwoSdk/./lib/models/campaign/RuleModel.ts","webpack://vwoSdk/./lib/models/campaign/VariableModel.ts","webpack://vwoSdk/./lib/models/campaign/VariationModel.ts","webpack://vwoSdk/./lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwoSdk/./lib/models/settings/SettingsModel.ts","webpack://vwoSdk/./lib/models/user/ContextModel.ts","webpack://vwoSdk/./lib/models/user/ContextVWOModel.ts","webpack://vwoSdk/./lib/packages/decision-maker/index.ts","webpack://vwoSdk/./lib/packages/logger/LogMessageBuilder.ts","webpack://vwoSdk/./lib/packages/logger/Logger.ts","webpack://vwoSdk/./lib/packages/logger/core/LogManager.ts","webpack://vwoSdk/./lib/packages/logger/core/TransportManager.ts","webpack://vwoSdk/./lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwoSdk/./lib/packages/logger/index.ts","webpack://vwoSdk/./lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwoSdk/./lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwoSdk/./lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwoSdk/./lib/packages/network-layer/index.ts","webpack://vwoSdk/./lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwoSdk/./lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/RequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/ResponseModel.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/index.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwoSdk/./lib/packages/storage/Connector.ts","webpack://vwoSdk/./lib/packages/storage/Storage.ts","webpack://vwoSdk/./lib/packages/storage/index.ts","webpack://vwoSdk/./lib/services/CampaignDecisionService.ts","webpack://vwoSdk/./lib/services/HooksService.ts","webpack://vwoSdk/./lib/services/SettingsService.ts","webpack://vwoSdk/./lib/services/StorageService.ts","webpack://vwoSdk/./lib/utils/CampaignUtil.ts","webpack://vwoSdk/./lib/utils/DataTypeUtil.ts","webpack://vwoSdk/./lib/utils/DecisionUtil.ts","webpack://vwoSdk/./lib/utils/FunctionUtil.ts","webpack://vwoSdk/./lib/utils/GatewayServiceUtil.ts","webpack://vwoSdk/./lib/utils/ImpressionUtil.ts","webpack://vwoSdk/./lib/utils/LogMessageUtil.ts","webpack://vwoSdk/./lib/utils/MegUtil.ts","webpack://vwoSdk/./lib/utils/NetworkUtil.ts","webpack://vwoSdk/./lib/utils/PromiseUtil.ts","webpack://vwoSdk/./lib/utils/RuleEvaluationUtil.ts","webpack://vwoSdk/./lib/utils/SettingsUtil.ts","webpack://vwoSdk/./lib/utils/UrlUtil.ts","webpack://vwoSdk/./lib/utils/UuidUtil.ts","webpack://vwoSdk/./lib/utils/XMLUtil.ts","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/index.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/md5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/native.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/nil.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/parse.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/regex.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/rng.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v3.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v35.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v4.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/validate.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/version.js","webpack://vwoSdk/./node_modules/vwo-fme-sdk-log-messages/index.js","webpack://vwoSdk/./node_modules/superstruct/lib/index.cjs","webpack://vwoSdk/webpack/bootstrap","webpack://vwoSdk/./lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t// CommonJS2\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\t// AMD\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\t// CommonJS\n\telse if(typeof exports === 'object')\n\t\texports[\"vwoSdk\"] = factory();\n\t// Root\n\telse\n\t\troot[\"vwoSdk\"] = factory();\n})(this, () => {\nreturn ","(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VWOBuilder } from './VWOBuilder';\nimport { IVWOClient } from './VWOClient';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { dynamic } from './types/Common';\nimport { isObject, isString } from './utils/DataTypeUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { InfoLogMessagesEnum, ErrorLogMessagesEnum } from './enums/log-messages';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { PlatformEnum } from './enums/PlatformEnum';\n\nexport class VWO {\n private static vwoBuilder: VWOBuilder;\n private static instance: dynamic;\n\n /**\n * Constructor for the VWO class.\n * Initializes a new instance of VWO with the provided options.\n * @param {Record} options - Configuration options for the VWO instance.\n * @returns The instance of VWO.\n */\n constructor(options: IVWOOptions) {\n return VWO.setInstance(options);\n }\n\n /**\n * Sets the singleton instance of VWO.\n * Configures and builds the VWO instance using the provided options.\n * @param {Record} options - Configuration options for setting up VWO.\n * @returns A Promise resolving to the configured VWO instance.\n */\n private static setInstance(options: IVWOOptions): Promise {\n const optionsVWOBuilder: any = options?.vwoBuilder;\n this.vwoBuilder = optionsVWOBuilder || new VWOBuilder(options);\n\n this.instance = this.vwoBuilder\n .setLogger() // Sets up logging for debugging and monitoring.\n .setSettingsService() // Sets the settings service for configuration management.\n .setStorage() // Configures storage for data persistence.\n .setNetworkManager() // Configures network management for API communication.\n .setSegmentation() // Sets up segmentation for targeted functionality.\n // .initBatching() // Initializes batching for bulk data processing.\n .initPolling(); // Starts polling mechanism for regular updates.\n // .setAnalyticsCallback() // Sets up analytics callback for data analysis.\n\n if (options?.settings) {\n return Promise.resolve(this.vwoBuilder.build(options.settings));\n }\n\n return this.vwoBuilder.getSettings().then((settings: Record) => {\n return this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings.\n });\n }\n\n /**\n * Gets the singleton instance of VWO.\n * @returns The singleton instance of VWO.\n */\n static get Instance(): dynamic {\n return this.instance;\n }\n}\n\nlet _global: Record = {};\n/**\n * Initializes a new instance of VWO with the provided options.\n * @param options Configuration options for the VWO instance.\n * @property {string} sdkKey - The SDK key for the VWO account.\n * @property {string} accountId - The account ID for the VWO account.\n * @property {GatewayServiceModel} gatewayService - The gateway service configuration.\n * @property {StorageService} storage - The storage configuration.\n * @returns\n */\n\nexport async function init(options: IVWOOptions): Promise {\n const apiName = 'init';\n const date = new Date().toISOString();\n\n try {\n if (!isObject(options)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ERROR, {\n date,\n });\n console.error(msg); // Ensures options is an object.\n }\n\n if (!options?.sdkKey || !isString(options?.sdkKey)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_SDK_KEY_ERROR, {\n date,\n });\n console.error(msg); // Validates sdkKey presence and type.\n }\n\n if (!options.accountId) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ACCOUNT_ID_ERROR, {\n date,\n });\n console.error(msg); // Validates accountId presence and type.\n }\n\n if (typeof process.env === 'undefined') {\n options.platform = PlatformEnum.CLIENT;\n } else {\n options.platform = PlatformEnum.SERVER;\n }\n\n const instance: any = new VWO(options); // Creates a new VWO instance with the validated options.\n\n _global = {\n vwoInitDeferred: new Deferred(),\n isSettingsFetched: false,\n instance: null,\n };\n\n return instance.then((_vwoInstance) => {\n _global.isSettingsFetched = true;\n _global.instance = _vwoInstance;\n _global.vwoInitDeferred.resolve(_vwoInstance);\n\n return _vwoInstance;\n });\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n\nexport async function onInit() {\n const apiName = 'onInit';\n\n try {\n _global.vwoInitDeferred = new Deferred();\n const date = new Date().toISOString();\n\n // If settings are already fetched, resolve the promise\n if (_global.isSettingsFetched) {\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_ALREADY_RESOLVED, {\n date,\n apiName,\n });\n\n console.info(msg);\n _global.vwoInitDeferred.resolve(_global.instance);\n } else {\n // wait for five seconds, else reject the promise\n setTimeout(() => {\n if (_global.isSettingsFetched) {\n return;\n }\n\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_SETTINGS_FAILED, {\n date,\n });\n\n console.error(msg);\n _global.vwoInitDeferred.reject(new Error('VWO settings could not be fetched'));\n }, 5000);\n }\n\n return _global.vwoInitDeferred.promise;\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from './types/Common';\n\nimport { ILogManager, LogManager } from './packages/logger';\nimport { NetworkManager } from './packages/network-layer';\nimport { SegmentationManager } from './packages/segmentation-evaluator';\n\nimport { Storage } from './packages/storage';\n\nimport { IVWOClient, VWOClient } from './VWOClient';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { SettingsService } from './services/SettingsService';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { isNumber } from './utils/DataTypeUtil';\nimport { cloneObject } from './utils/FunctionUtil';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { getRandomUUID } from './utils/UuidUtil';\n\nexport interface IVWOBuilder {\n settings: Record; // Holds the configuration settings for the VWO client\n storage: Storage; // Interface for storage management\n logManager: ILogManager; // Manages logging across the VWO SDK\n isSettingsFetchInProgress: boolean; // Flag to check if settings fetch is in progress\n vwoInstance: IVWOClient;\n\n build(settings: Record): IVWOClient; // Builds and returns a new VWOClient instance\n\n fetchSettings(): Promise>; // Asynchronously fetches settings from the server\n setSettingsService(): this; // Sets up the settings manager with provided options\n getSettings(force: boolean): Promise>; // Fetches settings, optionally forcing a refresh\n setStorage(): this; // Sets up the storage connector based on provided options\n setNetworkManager(): this; // Configures the network manager with client and mode\n // initBatching(): this; // Initializes event batching with provided configuration\n // setAnalyticsCallback(): this; // Configures the analytics callback based on provided options\n initPolling(): this; // Sets up polling for settings at a specified interval\n setLogger(): this; // Sets up the logger with specified options\n setSegmentation(): this; // Configures the segmentation evaluator with provided options\n}\n\nexport class VWOBuilder implements IVWOBuilder {\n readonly sdkKey: string;\n readonly options: IVWOOptions;\n\n private settingFileManager: SettingsService;\n\n settings: Record;\n storage: Storage;\n logManager: ILogManager;\n originalSettings: dynamic;\n isSettingsFetchInProgress: boolean;\n vwoInstance: IVWOClient;\n\n constructor(options: IVWOOptions) {\n this.options = options;\n }\n\n /**\n * Sets the network manager with the provided client and development mode options.\n * @returns {this} The instance of this builder.\n */\n setNetworkManager(): this {\n const networkInstance = NetworkManager.Instance;\n // Attach the network client from options\n networkInstance.attachClient(this.options?.network?.client);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Network Layer`,\n }),\n );\n // Set the development mode based on options\n networkInstance.getConfig().setDevelopmentMode(this.options?.isDevelopmentMode);\n return this;\n }\n\n /**\n * Sets the segmentation evaluator with the provided segmentation options.\n * @returns {this} The instance of this builder.\n */\n setSegmentation(): this {\n SegmentationManager.Instance.attachEvaluator(this.options?.segmentation);\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Segmentation Evaluator`,\n }),\n );\n return this;\n }\n\n /**\n * Fetches settings asynchronously, ensuring no parallel fetches.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the fetched settings.\n */\n fetchSettings(force?: boolean): Promise> {\n const deferredObject = new Deferred();\n\n // Check if a fetch operation is already in progress\n if (!this.isSettingsFetchInProgress) {\n this.isSettingsFetchInProgress = true;\n this.settingFileManager.getSettings(force).then((settings: Record) => {\n // if force is false, update original settings, if true the request is from polling and no need to update original settings\n if (!force) {\n this.originalSettings = settings;\n }\n\n this.isSettingsFetchInProgress = false;\n deferredObject.resolve(settings);\n });\n\n return deferredObject.promise;\n } else {\n // Avoid parallel fetches by recursively calling fetchSettings\n return this.fetchSettings(force);\n }\n }\n\n /**\n * Gets the settings, fetching them if not cached or if forced.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the settings.\n */\n getSettings(force?: boolean): Promise> {\n const deferredObject = new Deferred();\n\n try {\n // Use cached settings if available and not forced to fetch\n if (!force && this.settings) {\n LogManager.Instance.info('Using already fetched and cached settings');\n deferredObject.resolve(this.settings);\n } else {\n // Fetch settings if not cached or forced\n this.fetchSettings(force).then((settings: Record) => {\n deferredObject.resolve(settings);\n });\n }\n } catch (err) {\n LogManager.Instance.error('Failed to fetch settings. Error: ' + err);\n deferredObject.resolve({});\n }\n return deferredObject.promise;\n }\n\n /**\n * Sets the storage connector based on the provided storage options.\n * @returns {this} The instance of this builder.\n */\n setStorage(): this {\n if (this.options.storage) {\n // Attach the storage connector from options\n this.storage = Storage.Instance.attachConnector(this.options.storage);\n } else {\n // Set storage to null if no storage options provided\n this.storage = null;\n }\n\n return this;\n }\n\n /**\n * Sets the settings manager with the provided options.\n * @returns {this} The instance of this builder.\n */\n setSettingsService(): this {\n this.settingFileManager = new SettingsService(this.options);\n\n return this;\n }\n\n /**\n * Sets the logger with the provided logger options.\n * @returns {this} The instance of this builder.\n */\n setLogger(): this {\n this.logManager = new LogManager(this.options.logger || {});\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Logger`,\n }),\n );\n return this;\n }\n\n /**\n * Sets the analytics callback with the provided analytics options.\n * @returns {this} The instance of this builder.\n */\n /* setAnalyticsCallback(): this {\n if (!isObject(this.options.analyticsEvent)) {\n // TODO: add logging here\n return this;\n }\n\n if (!isFunction(this.options.analyticsEvent.eventCallback)) {\n // TODO: add logging here\n return this;\n }\n\n if (\n this.options.analyticsEvent.isBatchingSupported &&\n !isBoolean(this.options.analyticsEvent.isBatchingSupported)\n ) {\n // TODO:- add logging here\n return this;\n }\n\n // AnalyticsEvent.Instance.attachCallback(\n // this.options.analyticsEvent.eventCallback,\n // this.options.analyticsEvent.isBatchingSupported\n // );\n return this;\n } */\n\n /**\n * Generates a random user ID based on the provided API key.\n * @returns {string} The generated random user ID.\n */\n getRandomUserId(): string {\n const apiName = 'getRandomUserId';\n try {\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n return getRandomUUID(this.options.sdkKey);\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n\n /**\n * Initializes the batching with the provided batch events options.\n * @returns {this} The instance of this builder.\n */\n /* initBatching(): this {\n if (!isObject(this.options.batchEvents)) {\n // TODO:- add logging here\n return this;\n }\n\n if (\n isObject(this.options.batchEvents) &&\n (!(\n (isNumber(this.options.batchEvents.eventsPerRequest) &&\n this.options.batchEvents.eventsPerRequest > 0 &&\n this.options.batchEvents.eventsPerRequest <= Constants.MAX_EVENTS_PER_REQUEST) ||\n (isNumber(this.options.batchEvents.requestTimeInterval) && this.options.batchEvents.requestTimeInterval >= 1)\n ) ||\n !isFunction(this.options.batchEvents.flushCallback))\n ) {\n LogManager.Instance.error('Invalid batchEvents config');\n // throw new Error('Invalid batchEvents config');\n return this;\n }\n\n // BatchEventsQueue.Instance.setBatchConfig(this.options.batchEvents, this.options.sdkKey); // TODO\n\n return this;\n } */\n\n /**\n * Initializes the polling with the provided poll interval.\n * @returns {this} The instance of this builder.\n */\n initPolling(): this {\n if (!this.options.pollInterval) {\n return this;\n }\n\n if (this.options.pollInterval && !isNumber(this.options.pollInterval)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n if (this.options.pollInterval && this.options.pollInterval < 1000) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n this.checkAndPoll();\n\n return this;\n }\n\n /**\n * Builds a new VWOClient instance with the provided settings.\n * @param {SettingsModel} settings - The settings for the VWOClient.\n * @returns {VWOClient} The new VWOClient instance.\n */\n build(settings: Record): IVWOClient {\n this.vwoInstance = new VWOClient(settings, this.options);\n\n return this.vwoInstance;\n }\n\n /**\n * Checks and polls for settings updates at the provided interval.\n */\n checkAndPoll(): void {\n const pollingInterval = this.options.pollInterval;\n\n setInterval(() => {\n this.getSettings(true)\n .then((latestSettings: SettingsModel) => {\n const lastSettings = JSON.stringify(this.originalSettings);\n const stringifiedLatestSettings = JSON.stringify(latestSettings);\n if (stringifiedLatestSettings !== lastSettings) {\n this.originalSettings = latestSettings;\n const clonedSettings = cloneObject(latestSettings);\n\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_SET_SETTINGS);\n setSettingsAndAddCampaignsToRules(clonedSettings, this.vwoInstance);\n } else {\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS);\n }\n })\n .catch(() => {\n LogManager.Instance.error(ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED);\n });\n }, pollingInterval);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from './packages/logger';\nimport { Storage } from './packages/storage';\n\nimport { FlagApi } from './api/GetFlag';\nimport { SetAttributeApi } from './api/SetAttribute';\nimport { TrackApi } from './api/TrackEvent';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { SettingsModel } from './models/settings/SettingsModel';\n\nimport { dynamic } from './types/Common';\n// import { BatchEventsQueue } from './services/batchEventsQueue';\n\nimport { SettingsSchema } from './models/schemas/SettingsSchemaValidation';\nimport { ContextModel } from './models/user/ContextModel';\nimport HooksService from './services/HooksService';\nimport { UrlUtil } from './utils/UrlUtil';\n\nimport { getType, isBoolean, isNumber, isObject, isString } from './utils/DataTypeUtil';\n\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { setShouldWaitForTrackingCalls } from './utils/NetworkUtil';\n\nexport interface IVWOClient {\n readonly options?: IVWOOptions;\n settings: SettingsModel;\n originalSettings: Record;\n\n getFlag(featureKey: string, context: Record): Record;\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record,\n ): Promise>;\n setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise;\n}\n\nexport class VWOClient implements IVWOClient {\n settings: SettingsModel;\n originalSettings: Record;\n storage: Storage;\n\n constructor(settings: Record, options: IVWOOptions) {\n this.options = options;\n\n setSettingsAndAddCampaignsToRules(settings, this);\n\n UrlUtil.init({\n collectionPrefix: this.settings.getCollectionPrefix(),\n });\n\n setShouldWaitForTrackingCalls(this.options.shouldWaitForTrackingCalls || false);\n\n LogManager.Instance.info(InfoLogMessagesEnum.CLIENT_INITIALIZED);\n return this;\n }\n options?: IVWOOptions;\n /**\n * Retrieves the value of a feature flag for a given feature key and context.\n * This method validates the feature key and context, ensures the settings are valid, and then uses the FlagApi to get the flag value.\n *\n * @param {string} featureKey - The key of the feature to retrieve.\n * @param {ContextModel} context - The context in which the feature flag is being retrieved, must include a valid user ID.\n * @returns {Promise>} - A promise that resolves to the feature flag value.\n */\n getFlag(featureKey: string, context: Record): Record {\n const apiName = 'getFlag';\n const deferredObject = new Deferred();\n const errorReturnSchema = {\n isEnabled: (): boolean => false,\n getVariables: (): Array> => [],\n getVariable: (_key: string, defaultValue: any): dynamic => defaultValue,\n };\n\n try {\n const hooksService = new HooksService(this.options);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate featureKey is a string\n if (!isString(featureKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'featureKey',\n type: getType(featureKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: featureKey should be a string');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n new FlagApi()\n .get(featureKey, this.settings, contextModel, hooksService)\n .then((data: any) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve(errorReturnSchema);\n });\n } catch (err) {\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve(errorReturnSchema);\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Tracks an event with specified properties and context.\n * This method validates the types of the inputs and ensures the settings and user context are valid before proceeding.\n *\n * @param {string} eventName - The name of the event to track.\n * @param {ContextModel} context - The context in which the event is being tracked, must include a valid user ID.\n * @param {Record} eventProperties - The properties associated with the event.\n * @returns {Promise>} - A promise that resolves to the result of the tracking operation.\n */\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record = {},\n ): Promise> {\n const apiName = 'trackEvent';\n const deferredObject = new Deferred();\n\n try {\n const hooksService = new HooksService(this.options);\n\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate eventName is a string\n if (!isString(eventName)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventName',\n type: getType(eventName),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: Event-name should be a string');\n }\n\n // Validate eventProperties is an object\n if (!isObject(eventProperties)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventProperties',\n type: getType(eventProperties),\n correctType: 'object',\n }),\n );\n\n throw new TypeError('TypeError: eventProperties should be an object');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with tracking the event\n new TrackApi()\n .track(this.settings, eventName, contextModel, eventProperties, hooksService)\n .then((data) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve({ [eventName]: false });\n });\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve({ [eventName]: false });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Sets an attribute for a user in the context provided.\n * This method validates the types of the inputs before proceeding with the API call.\n *\n * @param {string} attributeKey - The key of the attribute to set.\n * @param {string} attributeValue - The value of the attribute to set.\n * @param {ContextModel} context - The context in which the attribute should be set, must include a valid user ID.\n */\n async setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise {\n const apiName = 'setAttribute';\n\n try {\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate attributeKey is a string\n if (!isString(attributeKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeKey',\n type: getType(attributeKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: attributeKey should be a string');\n }\n // Validate attributeValue is a string\n if (!isString(attributeValue) && !isNumber(attributeValue) && !isBoolean(attributeValue)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeValue',\n type: getType(attributeValue),\n correctType: 'boolean | string | number',\n }),\n );\n\n throw new TypeError('TypeError: attributeValue should be a string');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with setting the attribute if validation is successful\n await new SetAttributeApi().setAttribute(this.settings, attributeKey, attributeValue, contextModel);\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { VariableModel } from '../models/campaign/VariableModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport IHooksService from '../services/HooksService';\nimport { StorageService } from '../services/StorageService';\nimport { getVariationFromCampaignKey } from '../utils/CampaignUtil';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from '../utils/DecisionUtil';\nimport { getAllExperimentRules, getFeatureFromKey, getSpecificRulesBasedOnType } from '../utils/FunctionUtil';\nimport { createAndSendImpressionForVariationShown } from '../utils/ImpressionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport { getShouldWaitForTrackingCalls } from '../utils/NetworkUtil';\n\ninterface IGetFlag {\n get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise;\n}\n\nexport class FlagApi implements IGetFlag {\n async get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise {\n let isEnabled = false;\n let rolloutVariationToReturn = null;\n let experimentVariationToReturn = null;\n let shouldCheckForExperimentsRules = false;\n\n const passedRulesInformation = {}; // for storing and integration callback\n const deferredObject = new Deferred();\n const evaluatedFeatureMap: Map = new Map();\n\n // get feature object from feature key\n const feature = getFeatureFromKey(settings, featureKey);\n const decision = {\n featureName: feature?.getName(),\n featureId: feature?.getId(),\n featureKey: feature?.getKey(),\n userId: context?.getId(),\n api: ApiEnum.GET_FLAG,\n };\n\n const storageService = new StorageService();\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'experiment',\n experimentKey: storedData.experimentKey,\n }),\n );\n deferredObject.resolve({\n isEnabled: () => true,\n getVariables: () => variation?.getVariables(),\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) =>\n variation\n ?.getVariables()\n .find((variable) => new VariableModel().modelFromDictionary(variable).getKey() === key)\n ?.getValue() || defaultValue,\n });\n\n return deferredObject.promise;\n }\n }\n } else if (storedData?.rolloutKey && storedData?.rolloutId) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.rolloutKey,\n storedData.rolloutVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'rollout',\n experimentKey: storedData.rolloutKey,\n }),\n );\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED, {\n userId: context.getId(),\n }),\n );\n\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n const featureInfo = {\n rolloutId: storedData.rolloutId,\n rolloutKey: storedData.rolloutKey,\n rolloutVariationId: storedData.rolloutVariationId,\n };\n evaluatedFeatureMap.set(featureKey, featureInfo);\n Object.assign(passedRulesInformation, featureInfo);\n }\n }\n\n if (!isObject(feature) || feature === undefined) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.FEATURE_NOT_FOUND, {\n featureKey,\n }),\n );\n\n deferredObject.reject({});\n\n return deferredObject.promise;\n }\n\n // TODO: remove await from here, need not wait for gateway service at the time of calling getFlag\n await SegmentationManager.Instance.setContextualData(settings, feature, context);\n\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT); // get all rollout rules\n\n if (rollOutRules.length > 0 && !isEnabled) {\n const rolloutRulesToEvaluate = [];\n\n for (const rule of rollOutRules) {\n const { preSegmentationResult, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n // if pre segment passed, then break the loop and check the traffic allocation\n rolloutRulesToEvaluate.push(rule);\n\n evaluatedFeatureMap.set(featureKey, {\n rolloutId: rule.getId(),\n rolloutKey: rule.getKey(),\n rolloutVariationId: rule.getVariations()[0]?.getId(),\n });\n\n break;\n }\n\n continue; // if rule does not satisfy, then check for other ROLLOUT rules\n }\n\n if (rolloutRulesToEvaluate.length > 0) {\n const passedRolloutCampaign = new CampaignModel().modelFromDictionary(rolloutRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, passedRolloutCampaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(passedRolloutCampaign, variation, passedRulesInformation, decision);\n\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n }\n }\n }\n } else if (rollOutRules.length === 0) {\n LogManager.Instance.debug(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT);\n shouldCheckForExperimentsRules = true;\n }\n\n if (shouldCheckForExperimentsRules) {\n const experimentRulesToEvaluate = [];\n\n // if rollout rule is passed, get all ab and Personalize rules\n const experimentRules = getAllExperimentRules(feature);\n const megGroupWinnerCampaigns: Map = new Map();\n\n for (const rule of experimentRules) {\n const { preSegmentationResult, whitelistedObject, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n if (whitelistedObject === null) {\n // whitelistedObject will be null if pre segment passed but whitelisting failed\n experimentRulesToEvaluate.push(rule);\n } else {\n isEnabled = true;\n experimentVariationToReturn = whitelistedObject.variation;\n Object.assign(passedRulesInformation, {\n experimentId: rule.getId(),\n experimentKey: rule.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n }\n\n break;\n }\n continue;\n }\n\n if (experimentRulesToEvaluate.length > 0) {\n const campaign = new CampaignModel().modelFromDictionary(experimentRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n experimentVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(campaign, variation, passedRulesInformation, decision);\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n }\n }\n }\n }\n\n // If flag is enabled, store it in data\n if (isEnabled) {\n // set storage data\n new StorageDecorator().setDataInStorage(\n {\n featureKey,\n context,\n ...passedRulesInformation,\n },\n storageService,\n );\n }\n\n // call integration callback, if defined\n hooksService.set(decision);\n hooksService.execute(hooksService.get());\n\n // Send data for Impact Campaign, if defined\n if (feature.getImpactCampaign()?.getCampaignId()) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.IMPACT_ANALYSIS, {\n userId: context.getId(),\n featureKey,\n status: isEnabled ? 'enabled' : 'disabled',\n }),\n );\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n }\n }\n\n const variablesForEvaluatedFlag =\n experimentVariationToReturn?.variables ?? rolloutVariationToReturn?.variables ?? [];\n\n deferredObject.resolve({\n isEnabled: () => isEnabled,\n getVariables: () => variablesForEvaluatedFlag,\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) => {\n const variable = variablesForEvaluatedFlag.find((variable) => variable.key === key);\n\n return variable?.value ?? defaultValue;\n },\n });\n\n return deferredObject.promise;\n }\n}\n\n// Not PRIVATE methods but helper methods. If need be, move them to some util file to be reused by other API(s)\n\nfunction _updateIntegrationsDecisionObject(\n campaign: CampaignModel,\n variation: VariationModel,\n passedRulesInformation: any,\n decision: any,\n): void {\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT) {\n Object.assign(passedRulesInformation, {\n rolloutId: campaign.getId(),\n rolloutKey: campaign.getKey(),\n rolloutVariationId: variation.getId(),\n });\n } else {\n Object.assign(passedRulesInformation, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: variation.getId(),\n });\n }\n Object.assign(decision, passedRulesInformation);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\nimport {\n getEventsBaseProperties,\n getAttributePayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\ninterface ISetAttribute {\n /**\n * Sets an attribute for a user.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise;\n}\n\nexport class SetAttributeApi implements ISetAttribute {\n /**\n * Implementation of setAttribute to create an impression for a user attribute.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n async setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise {\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n } else {\n createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n }\n }\n}\n\n/**\n * Creates an impression for a user attribute and sends it to the server.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute.\n * @param attributeValue The value of the attribute.\n * @param user User details.\n */\nconst createImpressionForAttribute = async (\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n) => {\n // Retrieve base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_SYNC_VISITOR_PROP,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Construct payload data for the attribute\n const payload = getAttributePayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_SYNC_VISITOR_PROP,\n attributeKey,\n attributeValue,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed payload via POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport IHooksService from '../services/HooksService';\nimport { dynamic } from '../types/Common';\nimport { doesEventBelongToAnyFeature } from '../utils/FunctionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport {\n getEventsBaseProperties,\n getTrackGoalPayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\n\ninterface ITrack {\n /**\n * Tracks an event with given properties and context.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param context Contextual information like user details.\n * @param eventProperties Properties associated with the event.\n * @param hooksService Manager for handling hooks and callbacks.\n * @returns A promise that resolves to a record indicating the success or failure of the event tracking.\n */\n track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: Record,\n hooksService: IHooksService,\n ): Promise>;\n}\n\nexport class TrackApi implements ITrack {\n /**\n * Implementation of the track method to handle event tracking.\n * Checks if the event exists, creates an impression, and executes hooks.\n */\n async track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n hooksService: IHooksService,\n ): Promise> {\n if (doesEventBelongToAnyFeature(eventName, settings)) {\n // Create an impression for the track event\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForTrack(settings, eventName, context, eventProperties);\n } else {\n createImpressionForTrack(settings, eventName, context, eventProperties);\n }\n // Set and execute integration callback for the track event\n hooksService.set({ eventName: eventName, api: ApiEnum.TRACK });\n hooksService.execute(hooksService.get());\n\n return { [eventName]: true };\n }\n // Log an error if the event does not exist\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.EVENT_NOT_FOUND, {\n eventName,\n }),\n );\n\n return { [eventName]: false };\n }\n}\n\n/**\n * Creates an impression for a track event and sends it via a POST API request.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param user User details.\n * @param eventProperties Properties associated with the event.\n */\nconst createImpressionForTrack = async (\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n eventName,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Prepare the payload for the track goal\n const payload = getTrackGoalPayloadData(\n settings,\n context.getId(),\n eventName,\n eventProperties,\n context?.getUserAgent(),\n context?.getIpAddress(),\n );\n // Send the prepared payload via POST API request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const HTTP = 'http';\nexport const HTTPS = 'https';\n\nexport const SEED_URL = 'https://vwo.com';\nexport const HTTP_PROTOCOL = `${HTTP}://`;\nexport const HTTPS_PROTOCOL = `${HTTPS}://`;\nexport const BASE_URL = 'dev.visualwebsiteoptimizer.com';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* global SDK_VERSION */\nimport { PlatformEnum } from '../enums/PlatformEnum';\nimport { SEED_URL, HTTP_PROTOCOL, HTTPS_PROTOCOL } from './Url';\n\nlet packageFile;\nlet platform;\n\n// For client-side SDK, to keep the build size low\n// avoid adding the whole package file in the bundle\nif (typeof process.env === 'undefined') {\n packageFile = {\n name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build\n // @ts-expect-error This will be relaved by webpack at the time of build for browser\n version: SDK_VERSION, // will be replaced by webpack for browser build\n };\n\n platform = PlatformEnum.CLIENT;\n} else {\n packageFile = require('../../package.json');\n platform = PlatformEnum.SERVER;\n}\n\nexport const Constants = {\n SDK_NAME: packageFile.name,\n SDK_VERSION: packageFile.version,\n\n PLATFORM: platform,\n\n MAX_TRAFFIC_PERCENT: 100,\n MAX_TRAFFIC_VALUE: 10000,\n STATUS_RUNNING: 'RUNNING',\n\n SEED_VALUE: 1,\n MAX_EVENTS_PER_REQUEST: 5000,\n DEFAULT_REQUEST_TIME_INTERVAL: 600, // 10 * 60(secs) = 600 secs i.e. 10 minutes\n DEFAULT_EVENTS_PER_REQUEST: 100,\n\n SEED_URL,\n HTTP_PROTOCOL,\n HTTPS_PROTOCOL,\n\n SETTINGS: 'settings',\n SETTINGS_EXPIRY: 10000000,\n SETTINGS_TIMEOUT: 50000,\n\n HOST_NAME: 'dev.visualwebsiteoptimizer.com',\n SETTINTS_ENDPOINT: '/server-side/v2-settings',\n LOCATION_ENDPOINT: '/getLocation',\n\n VWO_FS_ENVIRONMENT: 'vwo_fs_environment',\n\n RANDOM_ALGO: 1,\n\n API_VERSION: '1',\n\n VWO_META_MEG_KEY: '_vwo_meta_meg_',\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from '../packages/logger';\n\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { IStorageService } from '../services/StorageService';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\ninterface IStorageDecorator {\n /**\n * Sets data in storage.\n * @param data The data to be stored.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to a VariationModel.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise;\n\n /**\n * Retrieves a feature from storage.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n getFeatureFromStorage(featureKey: FeatureModel, context: ContextModel, storageService: IStorageService): Promise;\n}\n\nexport class StorageDecorator implements IStorageDecorator {\n /**\n * Asynchronously retrieves a feature from storage based on the feature key and user.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n async getFeatureFromStorage(featureKey: any, context: ContextModel, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n storageService.getDataInStorage(featureKey, context).then((campaignMap: Record | StorageEnum) => {\n switch (campaignMap) {\n case StorageEnum.STORAGE_UNDEFINED:\n deferredObject.resolve(null); // No storage defined\n break;\n case StorageEnum.NO_DATA_FOUND:\n deferredObject.resolve(null); // No data found in storage\n break;\n case StorageEnum.INCORRECT_DATA:\n deferredObject.resolve(StorageEnum.INCORRECT_DATA); // Incorrect data found\n break;\n case StorageEnum.CAMPAIGN_PAUSED:\n deferredObject.resolve(null); // Campaign is paused\n break;\n case StorageEnum.VARIATION_NOT_FOUND:\n deferredObject.resolve(StorageEnum.VARIATION_NOT_FOUND); // No variation found\n break;\n case StorageEnum.WHITELISTED_VARIATION:\n deferredObject.resolve(null); // Whitelisted variation, handle accordingly\n break;\n default:\n deferredObject.resolve(campaignMap); // Valid data found, resolve with it\n }\n });\n\n return deferredObject.promise;\n }\n\n /**\n * Sets data in storage based on the provided data object.\n * @param data The data to be stored, including feature key and user details.\n * @param storageService The storage service instance.\n * @returns A promise that resolves when the data is successfully stored.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n const {\n featureKey,\n context,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n } = data;\n\n if (!featureKey) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'featureKey',\n }),\n );\n\n deferredObject.reject(); // Reject promise if feature key is invalid\n return;\n }\n if (!context.id) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Context or Context.id',\n }),\n );\n\n deferredObject.reject(); // Reject promise if user ID is invalid\n return;\n }\n if (rolloutKey && !experimentKey && !rolloutVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(rolloutKey, experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if rollout variation is invalid\n return;\n }\n if (experimentKey && !experimentVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if experiment variation is invalid\n return;\n }\n\n storageService.setDataInStorage({\n featureKey,\n userId: context.id,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n });\n\n deferredObject.resolve(); // Resolve promise when data is successfully set\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum ApiEnum {\n GET_FLAG = 'getFlag',\n TRACK = 'track',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum CampaignTypeEnum {\n ROLLOUT = 'FLAG_ROLLOUT',\n AB = 'FLAG_TESTING',\n PERSONALIZE = 'FLAG_PERSONALIZE',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum EventEnum {\n VWO_VARIATION_SHOWN = 'vwo_variationShown',\n VWO_SYNC_VISITOR_PROP = 'vwo_syncVisitorProp',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HeadersEnum {\n USER_AGENT = 'X-Device-User-Agent',\n IP = 'VWO-X-Forwarded-For',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HttpMethodEnum {\n GET = 'GET',\n POST = 'POST',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum PlatformEnum {\n CLIENT = 'client',\n SERVER = 'server',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StatusEnum {\n PASSED = 'passed',\n FAILED = 'failed',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StorageEnum {\n STORAGE_UNDEFINED,\n INCORRECT_DATA,\n NO_DATA_FOUND,\n CAMPAIGN_PAUSED,\n VARIATION_NOT_FOUND,\n WHITELISTED_VARIATION,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum UrlEnum {\n BASE_URL = 'dev.visualwebsiteoptimizer.com',\n SETTINGS_URL = '/server-side/settings',\n // WEBHOOK_SETTINGS_URL = '/server-side/pull',\n // BATCH_EVENTS = '/server-side/batch-events',\n EVENTS = '/events/t',\n ATTRIBUTE_CHECK = '/check-attribute',\n GET_USER_DATA = '/get-user-details',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as messages from 'vwo-fme-sdk-log-messages';\n\nconst DebugLogMessagesEnum = messages.debugMessages;\nconst InfoLogMessagesEnum = messages.infoMessages;\nconst ErrorLogMessagesEnum = messages.errorMessages;\n\nexport { DebugLogMessagesEnum, InfoLogMessagesEnum, ErrorLogMessagesEnum };\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { MetricModel } from './MetricModel';\nimport { VariableModel } from './VariableModel';\nimport { VariationModel } from './VariationModel';\n\nexport class CampaignModel {\n private id: number;\n private segments: Record;\n private percentTraffic: number;\n private isUserListEnabled: boolean;\n private key: string;\n private type: string;\n private name: string;\n private isForcedVariationEnabled: boolean;\n private variations: Array = [];\n private metrics: Array = [];\n private variables: Array = [];\n private variationId: number;\n private campaignId: number;\n private ruleKey: string;\n\n copy(campaignModel: CampaignModel): void {\n this.metrics = campaignModel.metrics;\n this.variations = campaignModel.variations;\n this.variables = campaignModel.variables;\n this.processCampaignKeys(campaignModel);\n }\n\n modelFromDictionary(campaign: CampaignModel): this {\n this.processCampaignProperties(campaign);\n this.processCampaignKeys(campaign);\n return this;\n }\n\n processCampaignProperties(campaign: CampaignModel): void {\n if (campaign.variables) {\n // campaign.var ||\n if (\n // (campaign.var && campaign.var.constructor === {}.constructor) ||\n campaign.variables.constructor === {}.constructor\n ) {\n this.variables = [];\n } else {\n const variableList: Array = campaign.variables; // campaign.var ||\n variableList.forEach((variable: any) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (campaign.variations) {\n // campaign.v ||\n if (\n // (campaign.v && campaign.v.constructor === {}.constructor) ||\n campaign.variations.constructor === {}.constructor\n ) {\n this.variations = [];\n } else {\n const variationList: Array = campaign.variations; // campaign.v ||\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n if (campaign.metrics) {\n // campaign.m ||\n if (campaign.metrics && campaign.metrics.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricsList: Array = campaign.metrics || [];\n metricsList.forEach((metric: any) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n }\n }\n\n processCampaignKeys(campaign: CampaignModel): void {\n this.id = campaign.id;\n this.percentTraffic = campaign.percentTraffic; // campaign.pT ||\n this.name = campaign.name; // campaign.n ||\n this.variationId = campaign.variationId; // campaign.vId ||\n this.campaignId = campaign.campaignId; // campaign.cId ||\n this.ruleKey = campaign.ruleKey; // campaign.rK ||\n this.isForcedVariationEnabled = campaign.isForcedVariationEnabled; // campaign.iFVE ||\n this.isUserListEnabled = campaign.isUserListEnabled; // campaign.iULE ||\n this.segments = campaign.segments;\n this.key = campaign.key; // campaign.k ||\n // this.priority = campaign.pr || campaign.priority;\n this.type = campaign.type; // campaign.t ||\n }\n\n getId(): number {\n return this.id;\n }\n\n getName(): string {\n return this.name;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getTraffic(): number {\n return this.percentTraffic;\n }\n\n getType(): string {\n return this.type;\n }\n\n getIsForcedVariationEnabled(): boolean {\n return this.isForcedVariationEnabled;\n }\n\n getIsUserListEnabled(): boolean {\n return this.isUserListEnabled;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from './CampaignModel';\nimport { ImpactCapmaignModel } from './ImpactCampaignModel';\nimport { MetricModel } from './MetricModel';\nimport { RuleModel } from './RuleModel';\n\nexport class FeatureModel {\n private m: Array = [];\n private metrics: Array = [];\n private id: number;\n private key: string;\n private name: string;\n private type: string;\n private rules: Array = [];\n private impactCampaign: ImpactCapmaignModel = null;\n\n private rulesLinkedCampaign: Array = [];\n private isGatewayServiceRequired: boolean = false;\n\n modelFromDictionary(feature: FeatureModel): this {\n this.id = feature.id;\n this.key = feature.key;\n this.name = feature.name;\n this.type = feature.type;\n if (feature?.isGatewayServiceRequired) {\n this.isGatewayServiceRequired = feature.isGatewayServiceRequired;\n }\n if (feature.impactCampaign) {\n this.impactCampaign = new ImpactCapmaignModel().modelFromDictionary(feature.impactCampaign);\n }\n\n if ((feature.m && feature.m.constructor === {}.constructor) || feature.metrics?.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricList: Array = feature.m || feature.metrics;\n metricList?.forEach((metric) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n\n if (feature?.rules?.constructor === {}.constructor) {\n this.rules = [];\n } else {\n const ruleList: Array = feature.rules;\n ruleList?.forEach((rule) => {\n this.rules.push(new RuleModel().modelFromDictionary(rule));\n });\n }\n\n if (feature?.rulesLinkedCampaign && feature.rulesLinkedCampaign?.constructor !== {}.constructor) {\n const linkedCampaignList: Array = feature.rulesLinkedCampaign;\n this.rulesLinkedCampaign = linkedCampaignList;\n }\n\n return this;\n }\n\n getName(): string {\n return this.name;\n }\n\n getType(): string {\n return this.type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRules(): Array {\n return this.rules;\n }\n\n getImpactCampaign(): ImpactCapmaignModel {\n return this.impactCampaign;\n }\n\n getRulesLinkedCampaign(): Array {\n return this.rulesLinkedCampaign;\n }\n\n setRulesLinkedCampaign(rulesLinkedCampaign: Array): void {\n this.rulesLinkedCampaign = rulesLinkedCampaign;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getIsGatewayServiceRequired(): boolean {\n return this.isGatewayServiceRequired;\n }\n\n setIsGatewayServiceRequired(isGatewayServiceRequired: boolean): void {\n this.isGatewayServiceRequired = isGatewayServiceRequired;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ImpactCapmaignModel {\n private campaignId: number;\n private type: string;\n\n modelFromDictionary(impactCampaign: ImpactCapmaignModel): this {\n this.type = impactCampaign.type;\n this.campaignId = impactCampaign.campaignId;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class MetricModel {\n private key: string;\n private identifier: string;\n\n private i: number;\n private id: number;\n\n private t: string;\n private type: string;\n\n modelFromDictionary(metric: MetricModel): this {\n this.identifier = metric.identifier || metric.key;\n this.id = metric.i || metric.id;\n this.type = metric.t || metric.type;\n return this;\n }\n\n getId(): number {\n return this.id;\n }\n\n getIdentifier(): string {\n return this.identifier;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class RuleModel {\n private status: boolean;\n private variationId: number;\n private campaignId: number;\n private type: string;\n private ruleKey: string;\n\n modelFromDictionary(rule: RuleModel): this {\n this.type = rule.type;\n this.status = rule.status;\n this.variationId = rule.variationId;\n this.campaignId = rule.campaignId;\n this.ruleKey = rule.ruleKey;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getVariationId(): number {\n return this.variationId;\n }\n\n getStatus(): boolean {\n return this.status;\n }\n\n getType(): string {\n return this.type;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport class VariableModel {\n private val: dynamic;\n private value: dynamic;\n\n private type: string;\n\n private k: string;\n private key: string;\n\n private i: number;\n private id: number;\n\n modelFromDictionary(variable: VariableModel): this {\n this.value = variable.val || variable.value;\n this.type = variable.type;\n this.key = variable.k || variable.key;\n this.id = variable.i || variable.id;\n\n return this;\n }\n\n setValue(value: dynamic): void {\n this.value = value;\n }\n\n setKey(key: string): void {\n this.key = key;\n }\n\n setType(type: string): void {\n this.type = type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getValue(): dynamic {\n return this.value;\n }\n\n getType(): string {\n return this.type;\n }\n\n getKey(): string {\n return this.key;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { VariableModel } from './VariableModel';\n\nexport class VariationModel {\n private i: number;\n private id: number;\n private type: string;\n\n private n: string;\n private key: string;\n private name: string;\n private ruleKey: string;\n\n private w: number;\n private weight: number;\n\n private startRangeVariation: number;\n private endRangeVariation: number;\n private variables: Array = [];\n private variations: Array = [];\n\n private seg: Record;\n private segments: Record;\n\n modelFromDictionary(variation: VariationModel): this {\n this.id = variation.i || variation.id;\n this.key = variation.n || variation.key || variation.name;\n this.weight = variation.w || variation.weight;\n this.ruleKey = variation.ruleKey;\n this.type = variation.type;\n this.setStartRange(variation.startRangeVariation);\n this.setEndRange(variation.endRangeVariation);\n if (variation.seg || variation.segments) {\n this.segments = variation.seg || variation.segments;\n }\n\n if (variation.variables) {\n if (variation.variables.constructor === {}.constructor) {\n this.variables = [];\n } else {\n const variableList: Array = variation.variables;\n variableList.forEach((variable) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (variation.variations) {\n if (variation.variations.constructor === {}.constructor) {\n this.variations = [];\n } else {\n const variationList: Array = variation.variations;\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n return this;\n }\n\n setStartRange(startRange: number): void {\n this.startRangeVariation = startRange;\n }\n\n setEndRange(endRange: number): void {\n this.endRangeVariation = endRange;\n }\n\n setWeight(weight: number): void {\n this.weight = weight;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n\n getWeight(): number {\n return this.weight;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getStartRangeVariation(): number {\n return this.startRangeVariation;\n }\n\n getEndRangeVariation(): number {\n return this.endRangeVariation;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Struct, array, boolean, number, object, optional, string, union, validate } from 'superstruct';\nimport { dynamic } from '../../types/Common';\nimport { SettingsModel } from '../settings/SettingsModel';\n\nexport class SettingsSchema {\n private campaignMetricSchema: Struct;\n private variableObjectSchema: Struct;\n private campaignVariationSchema: Struct;\n private campaignObjectSchema: Struct;\n private settingsSchema: Struct;\n private featureSchema: Struct;\n private ruleSchema: Struct;\n\n constructor() {\n this.initializeSchemas();\n }\n\n private initializeSchemas(): void {\n this.campaignMetricSchema = object({\n id: union([number(), string()]),\n type: string(),\n identifier: string(),\n mca: optional(union([number(), string()])),\n hasProps: optional(boolean()),\n revenueProp: optional(string()),\n });\n\n this.variableObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n value: union([number(), string(), boolean(), object()]),\n });\n\n this.campaignVariationSchema = object({\n id: union([number(), string()]),\n name: string(),\n weight: union([number(), string()]),\n segments: optional(object()),\n variables: optional(array(this.variableObjectSchema)),\n startRangeVariation: optional(number()),\n endRangeVariation: optional(number()),\n });\n\n this.campaignObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n percentTraffic: optional(number()),\n status: string(),\n variations: array(this.campaignVariationSchema),\n segments: object(),\n isForcedVariationEnabled: optional(boolean()),\n isAlwaysCheckSegment: optional(boolean()),\n name: string(),\n });\n\n this.ruleSchema = object({\n type: string(),\n ruleKey: string(),\n campaignId: number(),\n variationId: optional(number()),\n });\n\n this.featureSchema = object({\n id: union([number(), string()]),\n key: string(),\n status: string(),\n name: string(),\n type: string(),\n metrics: array(this.campaignMetricSchema),\n impactCampaign: optional(object()),\n rules: optional(array(this.ruleSchema)),\n variables: optional(array(this.variableObjectSchema)),\n });\n\n this.settingsSchema = object({\n sdkKey: optional(string()),\n version: union([number(), string()]),\n accountId: union([number(), string()]),\n features: optional(array(this.featureSchema)),\n campaigns: array(this.campaignObjectSchema),\n groups: optional(object()),\n campaignGroups: optional(object()),\n collectionPrefix: optional(string()),\n });\n }\n\n isSettingsValid(settings: any | SettingsModel): boolean {\n if (!settings) {\n return false;\n }\n\n const [error] = validate(settings, this.settingsSchema);\n return !error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../campaign/CampaignModel';\nimport { FeatureModel } from '../campaign/FeatureModel';\n\nexport class SettingsModel {\n private sK?: string;\n private sdkKey: string;\n\n private f?: Array = [];\n private features: Array = [];\n\n private c?: Array = [];\n private campaigns: Array = [];\n\n private campaignGroups?: Record = {};\n private cG?: Record = {};\n\n private groups?: Record = {};\n private g?: Record = {};\n\n private a?: string;\n private accountId: string;\n\n private v?: number;\n private version: number;\n private collectionPrefix?: string;\n\n constructor(settings: SettingsModel) {\n this.sdkKey = settings.sK || settings.sdkKey;\n this.accountId = settings.a || settings.accountId;\n this.version = settings.v || settings.version;\n this.collectionPrefix = settings.collectionPrefix;\n\n if (\n (settings.f && settings.f.constructor !== {}.constructor) ||\n (settings.features && settings.features.constructor !== {}.constructor)\n ) {\n const featureList: Array = settings.f || settings.features;\n featureList.forEach((feature) => {\n this.features.push(new FeatureModel().modelFromDictionary(feature));\n });\n }\n\n if (\n (settings.c && settings.c.constructor !== {}.constructor) ||\n (settings.campaigns && settings.campaigns.constructor !== {}.constructor)\n ) {\n const campaignList: Array = settings.c || settings.campaigns;\n campaignList.forEach((campaign) => {\n this.campaigns.push(new CampaignModel().modelFromDictionary(campaign));\n });\n }\n\n if (settings.cG || settings.campaignGroups) {\n this.campaignGroups = settings.cG || settings.campaignGroups;\n }\n\n if (settings.g || settings.groups) {\n this.groups = settings.g || settings.groups;\n }\n\n return this;\n }\n getFeatures(): Array {\n return this.features;\n }\n\n getCampaigns(): Array {\n return this.campaigns;\n }\n\n getSdkkey(): string {\n return this.sdkKey;\n }\n\n getAccountId(): string {\n return this.accountId;\n }\n\n getVersion(): number {\n return this.version;\n }\n\n getCollectionPrefix(): string {\n return this.collectionPrefix;\n }\n\n getCampaignGroups(): Record {\n return this.campaignGroups;\n }\n\n getGroups(): Record {\n return this.groups;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { ContextVWOModel } from './ContextVWOModel';\n\nexport class ContextModel {\n private id: string | number;\n private userAgent?: string;\n private ipAddress?: string;\n private customVariables?: Record;\n private variationTargetingVariables?: Record;\n private _vwo?: ContextVWOModel;\n\n modelFromDictionary(context: Record): this {\n this.id = context.id;\n this.userAgent = context.userAgent;\n this.ipAddress = context.ipAddress;\n if (context?.customVariables) {\n this.customVariables = context.customVariables;\n }\n if (context?.variationTargetingVariables) {\n this.variationTargetingVariables = context.variationTargetingVariables;\n }\n if (context?._vwo) {\n this._vwo = new ContextVWOModel().modelFromDictionary(context._vwo);\n }\n return this;\n }\n\n getId(): string {\n return this.id?.toString();\n }\n\n getUserAgent(): string {\n return this.userAgent;\n }\n\n getIpAddress(): string {\n return this.ipAddress;\n }\n\n getCustomVariables(): Record {\n return this.customVariables;\n }\n\n setCustomVariables(customVariables: Record): void {\n this.customVariables = customVariables;\n }\n\n getVariationTargetingVariables(): Record {\n return this.variationTargetingVariables;\n }\n\n setVariationTargetingVariables(variationTargetingVariables: Record): void {\n this.variationTargetingVariables = variationTargetingVariables;\n }\n\n getVwo(): ContextVWOModel {\n return this._vwo;\n }\n\n setVwo(_vwo: ContextVWOModel): void {\n this._vwo = _vwo;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ContextVWOModel {\n private location: Record;\n private userAgent: Record;\n\n modelFromDictionary(context: Record): this {\n if (context?.location) {\n this.location = context.location;\n }\n\n if (context?.userAgent) {\n this.userAgent = context.userAgent;\n }\n return this;\n }\n\n getLocation(): Record {\n return this.location;\n }\n\n getUaInfo(): Record {\n return this.userAgent;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Hasher from 'murmurhash';\n\nconst SEED_VALUE = 1; // Seed value for the hash function\nexport class DecisionMaker {\n /**\n * Generates a bucket value based on the hash value, maximum value, and an optional multiplier.\n *\n * @param {number} hashValue - The hash value used for calculation\n * @param {number} maxValue - The maximum value for bucket scaling\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @returns {number} - The calculated bucket value\n */\n generateBucketValue(hashValue: number, maxValue: number, multiplier = 1): number {\n // Calculate the ratio based on the hash value\n const ratio = hashValue / Math.pow(2, 32);\n // Calculate the multiplied value\n const multipliedValue = (maxValue * ratio + 1) * multiplier;\n // Round down to get the final value\n const value = Math.floor(multipliedValue);\n\n return value;\n }\n\n /**\n * Gets the bucket value for a user based on the hash key and maximum value.\n *\n * @param {string} hashKey - The hash key for the user\n * @param {number} [maxValue=100] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value for the user\n */\n getBucketValueForUser(hashKey: string, maxValue = 100): number {\n const hashValue = Hasher.v3(hashKey, SEED_VALUE); // Calculate the hash value\n const bucketValue = this.generateBucketValue(hashValue, maxValue); // Calculate the bucket value\n\n return bucketValue; // Return the calculated bucket value\n }\n\n /**\n * Calculates the bucket value for a given string with optional multiplier and maximum value.\n *\n * @param {string} str - The input string to calculate the bucket value for\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @param {number} [maxValue=10000] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value\n */\n calculateBucketValue(str: string, multiplier = 1, maxValue = 10000): number {\n const hashValue = this.generateHashValue(str); // Generate the hash value for the input string\n\n return this.generateBucketValue(hashValue, maxValue, multiplier); // Generate and return the bucket value\n }\n\n /**\n * Generates the hash value for a given hash key using murmurHash v3.\n *\n * @param {string} hashKey - The hash key for which the hash value is generated\n * @returns {number} - The generated hash value\n */\n generateHashValue(hashKey: string): number {\n return Hasher.v3(hashKey, SEED_VALUE); // Return the hash value generated using murmurHash\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { LogLevelEnum } from './enums/LogLevelEnum';\n\nconst AnsiColorEnum = {\n BOLD: '\\x1b[1m',\n CYAN: '\\x1b[36m',\n GREEN: '\\x1b[32m',\n LIGHTBLUE: '\\x1b[94m',\n RED: '\\x1b[31m',\n RESET: '\\x1b[0m',\n WHITE: '\\x1b[30m',\n YELLOW: '\\x1b[33m',\n};\n/**\n * Interface defining the structure for a log message builder.\n */\ninterface ILogMessageBuilder {\n loggerConfig: Record; // Configuration for the logger\n transportConfig: Record; // Configuration for the transport mechanism\n prefix: string; // Prefix to be added to each log message\n dateTimeFormat: dynamic; // Function or format for date and time in log messages\n\n formatMessage(level: string, message: string): string; // Method to format a log message\n getFormattedLevel(level: string): string; // Method to format the log level\n getFormattedDateTime(): string; // Method to get formatted date and time\n}\n\n/**\n * Implements the ILogMessageBuilder interface to provide a concrete log message builder.\n */\nexport class LogMessageBuilder implements ILogMessageBuilder {\n loggerConfig: Record;\n transportConfig: Record;\n prefix: string;\n dateTimeFormat: any;\n\n /**\n * Constructs a new LogMessageBuilder instance.\n * @param {Record} loggerConfig - Configuration for the logger.\n * @param {Record} transportConfig - Configuration for the transport mechanism.\n */\n constructor(loggerConfig: Record, transportConfig: Record) {\n this.loggerConfig = loggerConfig;\n this.transportConfig = transportConfig;\n\n // Set the prefix, defaulting to an empty string if not provided.\n this.prefix = this.transportConfig.prefix || this.loggerConfig.prefix || '';\n // Set the date and time format, defaulting to the logger's format if the transport's format is not provided.\n this.dateTimeFormat = this.transportConfig.dateTimeFormat || this.loggerConfig.dateTimeFormat;\n }\n\n /**\n * Formats a log message combining level, prefix, date/time, and the actual message.\n * @param {string} level - The log level.\n * @param {string} message - The message to log.\n * @returns {string} The formatted log message.\n */\n formatMessage(level: string, message: string): string {\n return `[${this.getFormattedLevel(level)}]: ${this.getFormattedPrefix(this.prefix)} ${this.getFormattedDateTime()} ${message}`;\n }\n\n getFormattedPrefix(prefix: string): string {\n if (this.loggerConfig.isAnsiColorEnabled) {\n return `${AnsiColorEnum.BOLD}${AnsiColorEnum.GREEN}${prefix}${AnsiColorEnum.RESET}`;\n }\n\n return `${prefix}`;\n }\n\n /**\n * Returns the formatted log level with appropriate coloring based on the log level.\n * @param {string} level - The log level.\n * @returns {string} The formatted log level.\n */\n getFormattedLevel(level: string): string {\n const upperCaseLevel = level.toUpperCase();\n let LogLevelColorInfoEnum;\n\n if (this.loggerConfig.isAnsiColorEnabled) {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.WHITE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.DEBUG]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.LIGHTBLUE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.INFO]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.CYAN}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.WARN]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.YELLOW}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.ERROR]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.RED}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n };\n } else {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: upperCaseLevel,\n [LogLevelEnum.DEBUG]: upperCaseLevel,\n [LogLevelEnum.INFO]: upperCaseLevel,\n [LogLevelEnum.WARN]: upperCaseLevel,\n [LogLevelEnum.ERROR]: upperCaseLevel,\n };\n }\n\n return LogLevelColorInfoEnum[level];\n }\n\n /**\n * Retrieves the current date and time formatted according to the specified format.\n * @returns {string} The formatted date and time.\n */\n getFormattedDateTime(): string {\n return this.dateTimeFormat();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Abstract class representing a logger.\n * This class provides the structure for logging mechanisms and should be extended by specific logger implementations.\n */\nexport abstract class Logger {\n /**\n * Logs a message at the trace level.\n * @param {string} message - The message to log.\n */\n abstract trace(message: string): void;\n\n /**\n * Logs a message at the debug level.\n * @param {string} message - The message to log.\n */\n abstract debug(message: string): void;\n\n /**\n * Logs a message at the info level.\n * @param {string} message - The message to log.\n */\n abstract info(message: string): void;\n\n /**\n * Logs a message at the warn level.\n * @param {string} message - The message to log.\n */\n abstract warn(message: string): void;\n\n /**\n * Logs a message at the error level.\n * @param {string} message - The message to log.\n */\n abstract error(message: string): void;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { dynamic } from '../../../types/Common';\n\nimport { Logger } from '../Logger';\nimport { ConsoleTransport } from '../transports/ConsoleTransport';\nimport { LogTransportManager } from './TransportManager';\n\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\n\n/**\n * Interface defining the structure and methods for LogManager.\n */\nexport interface ILogManager {\n transportManager?: LogTransportManager;\n config?: Record;\n name?: string;\n requestId?: string;\n level: string;\n prefix?: string;\n dateTimeFormat?: () => string;\n\n transport?: Record;\n transports?: Array>;\n\n addTransport?(transportObject: Record): void;\n addTransports?(transportsList: Array>): void;\n}\n\n/**\n * LogManager class provides logging functionality with support for multiple transports.\n * It is designed as a singleton to ensure a single instance throughout the application.\n */\nexport class LogManager extends Logger implements ILogManager {\n private static instance: LogManager; // Singleton instance of LogManager\n transportManager: LogTransportManager;\n config: Record;\n name = 'VWO Logger'; // Default logger name\n requestId = uuidv4(); // Unique request ID generated for each instance\n level = LogLevelEnum.ERROR; // Default logging level\n prefix = 'VWO-SDK'; // Default prefix for log messages\n public dateTimeFormat(): string {\n return new Date().toISOString(); // Default date-time format for log messages\n }\n transport: Record;\n transports: Array>;\n\n /**\n * Constructor for LogManager.\n * @param {Record} config - Configuration object for LogManager.\n */\n constructor(config?: Record) {\n super();\n\n this.config = config;\n\n if (config.isAlwaysNewInstance || !LogManager.instance) {\n LogManager.instance = this;\n\n // Initialize configuration with defaults or provided values\n this.config.name = config.name || this.name;\n this.config.requestId = config.requestId || this.requestId;\n this.config.level = config.level || this.level;\n this.config.prefix = config.prefix || this.prefix;\n this.config.dateTimeFormat = config.dateTimeFormat || this.dateTimeFormat;\n\n this.transportManager = new LogTransportManager(this.config);\n\n this.handleTransports();\n }\n\n return LogManager.instance;\n }\n\n /**\n * Provides access to the singleton instance of LogManager.\n * @returns {LogManager} The singleton instance.\n */\n static get Instance(): LogManager {\n return LogManager.instance;\n }\n\n /**\n * Handles the initialization and setup of transports based on configuration.\n */\n handleTransports(): void {\n const transports = this.config.transports;\n\n if (transports?.length) {\n this.addTransports(this.config.transports);\n } else if (this.config.transport && isObject(this.config.transport)) {\n this.addTransport(this.config.transport);\n } else {\n // if (this.config.defaultTransport)\n // Add default ConsoleTransport if no other transport is specified\n this.addTransport(\n new ConsoleTransport({\n level: this.config.level,\n }),\n );\n }\n }\n\n /**\n * Adds a single transport to the LogManager.\n * @param {Record} transport - The transport object to add.\n */\n addTransport(transport: Record): void {\n this.transportManager.addTransport(transport);\n }\n\n /**\n * Adds multiple transports to the LogManager.\n * @param {Array>} transports - The list of transport objects to add.\n */\n addTransports(transports: Record): void {\n for (let i = 0; i < transports.length; i++) {\n this.addTransport(transports[i]);\n }\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log at trace level.\n */\n trace(message: string): void {\n this.transportManager.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log at debug level.\n */\n debug(message: string): void {\n this.transportManager.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log at info level.\n */\n info(message: string): void {\n this.transportManager.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log at warn level.\n */\n warn(message: string): void {\n this.transportManager.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log at error level.\n */\n error(message: string): void {\n this.transportManager.log(LogLevelEnum.ERROR, message);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dynamic } from '../../../types/Common';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { LogMessageBuilder } from '../LogMessageBuilder';\nimport { Logger } from '../Logger';\nimport { isFunction } from '../../../utils/DataTypeUtil';\n\nenum LogLevelNumberEnum {\n TRACE = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n}\n\ninterface IlogTransport extends Logger {\n transports: Array>;\n config: Record;\n\n // Determines if a message should be logged based on the transport and configuration levels\n shouldLog(transportLevel: string, configLevel: string): boolean;\n // Logs a message at a specified level\n log(level: string, message: string): void;\n}\n\n/**\n * Manages logging transports and delegates logging messages to them based on configuration.\n * Implements the IlogTransport interface.\n */\nexport class LogTransportManager implements IlogTransport {\n transports: Array>;\n config: Record;\n\n /**\n * Initializes the manager with a configuration object.\n * @param {Record} config - Configuration settings for the log manager.\n */\n constructor(config: Record) {\n this.transports = [];\n this.config = config;\n }\n\n /**\n * Adds a new transport to the manager.\n * @param {Record} transport - The transport object to be added.\n */\n addTransport(transport: Record): void {\n this.transports.push(transport);\n }\n\n /**\n * Determines if the log should be processed based on the transport and configuration levels.\n * @param {string} transportLevel - The log level set for the transport.\n * @param {string} configLevel - The log level set in the configuration.\n * @returns {boolean} - Returns true if the log level is appropriate for logging, false otherwise.\n */\n shouldLog(transportLevel: string, configLevel: string): boolean {\n // Default to the most specific level available\n // transportLevel = transportLevel || configLevel || this.config.level;\n\n const targetLevel = LogLevelNumberEnum[transportLevel.toUpperCase()];\n const desiredLevel = LogLevelNumberEnum[(configLevel || this.config.level).toUpperCase()];\n\n return targetLevel >= desiredLevel;\n }\n\n /**\n * Logs a message at TRACE level.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a message at DEBUG level.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs a message at INFO level.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a message at WARN level.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs a message at ERROR level.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.log(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Delegates the logging of messages to the appropriate transports.\n * @param {string} level - The level at which to log the message.\n * @param {string} message - The message to log.\n */\n log(level: string, message: string): void {\n for (let i = 0; i < this.transports.length; i++) {\n const logMessageBuilder = new LogMessageBuilder(this.config, this.transports[i]);\n const formattedMessage = logMessageBuilder.formatMessage(level, message);\n if (this.shouldLog(level, this.transports[i].level)) {\n if (this.transports[i].log && isFunction(this.transports[i].log)) {\n // Use custom log handler if available\n this.transports[i].log(level, message);\n } else {\n // Otherwise, use the default log method\n this.transports[i][level](formattedMessage);\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum LogLevelEnum {\n TRACE = 'trace',\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { LogManager, ILogManager } from './core/LogManager';\nexport { LogLevelEnum } from './enums/LogLevelEnum';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { Logger } from '../Logger';\n\n/**\n * ConsoleTransport class implements the Logger interface to provide logging functionality.\n * It outputs logs to the console based on the log level set in the configuration.\n */\nexport class ConsoleTransport implements Logger {\n config: Record; // Configuration object for the logger\n level: string; // Current log level\n\n /**\n * Constructor initializes the ConsoleTransport with a configuration object.\n * @param {Record} config - Configuration settings for the logger, including 'level'.\n */\n constructor(config: Record = {}) {\n this.config = config; // Store the configuration\n this.level = this.config.level; // Set the logging level from the configuration\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.consoleLog(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.consoleLog(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.consoleLog(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.consoleLog(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.consoleLog(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Generic log function that logs messages to the console based on the log level.\n * @param {string} level - The log level under which the message should be logged.\n * @param {string} message - The message to log.\n */\n consoleLog(level: string, message: string): void {\n console[level](message); // Use console's logging function dynamically based on the level\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { sendGetCall, sendPostCall } from '../../../utils/XMLUtil';\nimport { dynamic } from '../../../types/Common';\nimport { Deferred } from '../../../utils/PromiseUtil';\n\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\nimport { NetworkClientInterface } from './NetworkClientInterface';\n\n/**\n * Implements the NetworkClientInterface to handle network requests.\n */\nexport class NetworkBrowserClient implements NetworkClientInterface {\n /**\n * Performs a GET request using the provided RequestModel.\n * @param {RequestModel} requestModel - The model containing request options.\n * @returns {Promise} A promise that resolves to a ResponseModel.\n */\n GET(requestModel: RequestModel): Promise {\n const deferred = new Deferred();\n\n // Extract network options from the request model.\n const networkOptions: Record = requestModel.getOptions();\n const responseModel = new ResponseModel();\n\n sendGetCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /*try {\n fetch(url)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n return deferred.promise;\n }\n\n /**\n * Performs a POST request using the provided RequestModel.\n * @param {RequestModel} request - The model containing request options.\n * @returns {Promise} A promise that resolves or rejects with a ResponseModel.\n */\n POST(request: RequestModel): Promise {\n const deferred = new Deferred();\n const networkOptions: Record = request.getOptions();\n const responseModel = new ResponseModel();\n\n sendPostCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /* try {\n const options: any = Object.assign(\n {},\n { method: HttpMethodEnum.POST },\n { body: networkOptions.body },\n { headers: networkOptions.headers }\n );\n\n fetch(url, options)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n\n return deferred.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\n\n/**\n * A class responsible for creating and modifying request models based on a global configuration.\n */\nexport class RequestHandler {\n /**\n * Creates a new request by merging properties from a base request and a configuration model.\n * If both the request URL and the base URL from the configuration are missing, it returns null.\n * Otherwise, it merges the properties from the configuration into the request if they are not already set.\n *\n * @param {RequestModel} request - The initial request model.\n * @param {GlobalRequestModel} config - The global request configuration model.\n * @returns {RequestModel} The merged request model or null if both URLs are missing.\n */\n createRequest(request: RequestModel, config: GlobalRequestModel): RequestModel {\n // Check if both the request URL and the configuration base URL are missing\n if (\n (config.getBaseUrl() === null || config.getBaseUrl() === undefined) &&\n (request.getUrl() === null || request.getUrl() === undefined)\n ) {\n return null; // Return null if no URL is specified\n }\n // Set the request URL, defaulting to the configuration base URL if not set\n request.setUrl(request.getUrl() || config.getBaseUrl());\n // Set the request timeout, defaulting to the configuration timeout if not set\n request.setTimeout(request.getTimeout() || config.getTimeout());\n // Set the request body, defaulting to the configuration body if not set\n request.setBody(request.getBody() || config.getBody());\n // Set the request headers, defaulting to the configuration headers if not set\n request.setHeaders(request.getHeaders() || config.getHeaders());\n // Initialize request query parameters, defaulting to an empty object if not set\n const requestQueryParams: Record = request.getQuery() || {};\n // Initialize configuration query parameters, defaulting to an empty object if not set\n const configQueryParams: Record = config.getQuery() || {};\n\n // Merge configuration query parameters into the request query parameters if they don't exist\n for (const queryKey in configQueryParams) {\n if (!Object.prototype.hasOwnProperty.call(requestQueryParams, queryKey)) {\n requestQueryParams[queryKey] = configQueryParams[queryKey];\n }\n }\n // Set the merged query parameters back to the request\n request.setQuery(requestQueryParams);\n return request; // Return the modified request\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet NetworkClient;\n\nif ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkBrowserClient').NetworkBrowserClient;\n} else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkClient').NetworkClient;\n}\n\nexport { NetworkClient };\nexport { NetworkClientInterface } from './client/NetworkClientInterface';\nexport { NetworkManager } from './manager/NetworkManager';\nexport { GlobalRequestModel } from './models/GlobalRequestModel';\nexport { RequestModel } from './models/RequestModel';\nexport { ResponseModel } from './models/ResponseModel';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Deferred } from '../../../utils/PromiseUtil';\nimport { NetworkClientInterface } from '../client/NetworkClientInterface';\nimport { RequestHandler } from '../handlers/RequestHandler';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\n\nexport class NetworkManager {\n private config: GlobalRequestModel; // Holds the global configuration for network requests\n private client: NetworkClientInterface; // Interface for the network client handling the actual HTTP requests\n private static instance: NetworkManager; // Singleton instance of NetworkManager\n\n /**\n * Attaches a network client to the manager, or uses a default if none provided.\n * @param {NetworkClientInterface} client - The client to attach, optional.\n */\n attachClient(client?: NetworkClientInterface): void {\n if ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkBrowserClient } = require('../client/NetworkBrowserClient');\n\n this.client = client || new NetworkBrowserClient(); // Use provided client or default to NetworkClient\n } else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkClient } = require('../client/NetworkClient');\n\n this.client = client || new NetworkClient(); // Use provided client or default to NetworkClient\n }\n\n this.config = new GlobalRequestModel(null, null, null, null); // Initialize with default config\n }\n\n /**\n * Singleton accessor for the NetworkManager instance.\n * @returns {NetworkManager} The singleton instance.\n */\n static get Instance(): NetworkManager {\n this.instance = this.instance || new NetworkManager(); // Create instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Sets the global configuration for network requests.\n * @param {GlobalRequestModel} config - The configuration to set.\n */\n setConfig(config: GlobalRequestModel): void {\n this.config = config; // Set the global request configuration\n }\n\n /**\n * Retrieves the current global configuration.\n * @returns {GlobalRequestModel} The current configuration.\n */\n getConfig(): GlobalRequestModel {\n return this.config; // Return the global request configuration\n }\n\n /**\n * Creates a network request model by merging specific request data with global config.\n * @param {RequestModel} request - The specific request data.\n * @returns {RequestModel} The merged request model.\n */\n createRequest(request: RequestModel): RequestModel {\n const options: RequestModel = new RequestHandler().createRequest(request, this.config); // Merge and create request\n return options;\n }\n\n /**\n * Performs a GET request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n get(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .GET(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((errorResponse: ResponseModel) => {\n deferred.reject(errorResponse); // Reject with the error response\n });\n }\n\n return deferred.promise; // Return the promise\n }\n\n /**\n * Performs a POST request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n post(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .POST(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((error: ResponseModel) => {\n deferred.reject(error); // Reject with the error\n });\n }\n\n return deferred.promise; // Return the promise\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents a model for global HTTP requests configuration.\n * This class encapsulates all necessary details such as URL, query parameters, body, headers,\n * timeout settings, and development mode flag.\n */\nexport class GlobalRequestModel {\n private url: string; // Base URL of the HTTP request\n private timeout = 3000; // Default timeout for the HTTP request in milliseconds\n private query: Record; // Query parameters for the HTTP request\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n private isDevelopmentMode: boolean; // Flag to indicate if the request is in development mode\n\n /**\n * Constructs an instance of the GlobalRequestModel.\n * @param url The base URL of the HTTP request.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n */\n constructor(\n url: string,\n query: Record,\n body: Record,\n headers: Record,\n ) {\n this.url = url;\n this.query = query;\n this.body = body;\n this.headers = headers;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setBaseUrl(url: string): void {\n this.url = url;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getBaseUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the development mode status for the request.\n * @param isDevelopmentMode Boolean flag indicating if the request is in development mode.\n */\n setDevelopmentMode(isDevelopmentMode: boolean): void {\n this.isDevelopmentMode = isDevelopmentMode;\n }\n\n /**\n * Retrieves the development mode status of the request.\n * @returns Boolean indicating if the request is in development mode.\n */\n getDevelopmentMode(): boolean {\n return this.isDevelopmentMode;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../../../enums/HttpMethodEnum';\nimport { dynamic } from '../../../types/Common';\nimport { HTTPS } from '../../../constants/Url';\n\n/**\n * Represents a model for HTTP requests.\n * This class encapsulates all necessary details such as URL, method, path, query parameters, body, headers,\n * scheme, port, and timeout settings.\n */\nexport class RequestModel {\n private url: string; // Base URL of the HTTP request\n private method: string; // HTTP method (GET, POST, etc.)\n private scheme: string; // Protocol scheme (http, https)\n private port: number; // Port number\n private path: string; // Path of the URL\n private query: Record; // Query parameters\n private timeout: number; // Timeout for the HTTP request in milliseconds\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n\n /**\n * Constructs an instance of the RequestModel.\n * @param url The base URL of the HTTP request.\n * @param method HTTP method, default is 'GET'.\n * @param path URL path.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n * @param scheme Protocol scheme, default is 'http'.\n * @param port Port number, default is 80.\n */\n constructor(\n url: string,\n method: string = HttpMethodEnum.GET,\n path: string,\n query: Record,\n body: Record,\n headers: Record,\n scheme: string = HTTPS,\n port: number,\n ) {\n this.url = url;\n this.method = method;\n this.path = path;\n this.query = query;\n this.body = body;\n this.headers = headers;\n this.scheme = scheme;\n this.port = port;\n }\n\n /**\n * Retrieves the HTTP method.\n * @returns The HTTP method as a string.\n */\n getMethod(): string {\n return this.method;\n }\n\n /**\n * Sets the HTTP method.\n * @param method The HTTP method to set.\n */\n setMethod(method: string): void {\n this.method = method;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): this {\n this.headers = headers;\n return this;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): this {\n this.timeout = timeout;\n return this;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setUrl(url: string): this {\n this.url = url;\n return this;\n }\n\n /**\n * Retrieves the scheme of the HTTP request.\n * @returns The scheme as a string.\n */\n getScheme(): string {\n return this.scheme;\n }\n\n /**\n * Sets the scheme of the HTTP request.\n * @param scheme The scheme to set (http or https).\n */\n setScheme(scheme: string): this {\n this.scheme = scheme;\n return this;\n }\n\n /**\n * Retrieves the port number of the HTTP request.\n * @returns The port number as an integer.\n */\n getPort(): number {\n return this.port;\n }\n\n /**\n * Sets the port number for the HTTP request.\n * @param port The port number to set.\n */\n setPort(port: number): this {\n this.port = port;\n return this;\n }\n\n /**\n * Retrieves the path of the HTTP request.\n * @returns The path as a string.\n */\n getPath(): string {\n return this.path;\n }\n\n /**\n * Sets the path of the HTTP request.\n * @param path The path to set.\n */\n setPath(path: string): this {\n this.path = path;\n return this;\n }\n\n /**\n * Constructs the options for the HTTP request based on the current state of the model.\n * This method is used to prepare the request options for execution.\n * @returns A record containing all relevant options for the HTTP request.\n */\n getOptions(): Record {\n let queryParams = '';\n for (const key in this.query) {\n const queryString = `${key}=${this.query[key]}&`;\n queryParams += queryString;\n }\n\n const [hostname, collectionPrefix] = this.url.split('/');\n const options: Record = {\n hostname, // if url is example.com/as01, hostname will be example.com\n agent: false,\n };\n\n if (this.scheme) {\n options.scheme = this.scheme;\n }\n if (this.port) {\n options.port = this.port;\n }\n if (this.headers) {\n options.headers = this.headers;\n }\n\n if (this.method) {\n options.method = this.method;\n }\n\n if (this.body) {\n const postBody = JSON.stringify(this.body);\n options.headers = options.headers || {};\n options.headers['Content-Type'] = 'application/json';\n\n if (typeof Buffer === 'undefined') {\n options.headers['Content-Length'] = new TextEncoder().encode(postBody).length;\n } else {\n options.headers['Content-Length'] = Buffer.byteLength(postBody);\n }\n options.body = this.body;\n }\n\n if (this.path) {\n if (queryParams !== '') {\n options.path = this.path + '?' + queryParams || '';\n } else {\n options.path = this.path;\n }\n }\n\n if (collectionPrefix) {\n options.path = `/${collectionPrefix}` + options.path;\n }\n if (this.timeout) {\n options.timeout = this.timeout;\n }\n if (options.path.charAt(options.path.length - 1) === '&') {\n options.path = options.path.substring(0, options.path.length - 1);\n }\n\n return options;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents the response model for network operations.\n * This class encapsulates details about the HTTP response including status code, headers, data, and errors.\n */\nexport class ResponseModel {\n private statusCode: number; // HTTP status code of the response\n private error: dynamic; // Error object if the request failed\n private headers: Record; // Headers received in the response\n private data: dynamic; // Data payload of the response\n\n /**\n * Sets the status code of the response.\n * @param {number} statusCode - The HTTP status code\n */\n setStatusCode(statusCode: number): void {\n this.statusCode = statusCode;\n }\n\n /**\n * Sets the headers of the response.\n * @param {Record} headers - The headers of the response\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Sets the data of the response.\n * @param {dynamic} data - The data payload of the response\n */\n setData(data: dynamic): void {\n this.data = data;\n }\n\n /**\n * Sets the error object of the response.\n * @param {dynamic} error - The error object if the request failed\n */\n setError(error: dynamic): void {\n this.error = error;\n }\n\n /**\n * Retrieves the headers of the response.\n * @returns {Record} The headers of the response\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Retrieves the data payload of the response.\n * @returns {dynamic} The data payload of the response\n */\n getData(): dynamic {\n return this.data;\n }\n\n /**\n * Retrieves the status code of the response.\n * @returns {number} The HTTP status code\n */\n getStatusCode(): number {\n return this.statusCode;\n }\n\n /**\n * Retrieves the error object of the response.\n * @returns {dynamic} The error object if the request failed\n */\n getError(): dynamic {\n return this.error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SegmentEvaluator } from '../evaluators/SegmentEvaluator';\nimport { dynamic } from '../../../types/Common';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { getFromGatewayService, getQueryParams } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\nimport { ContextVWOModel } from '../../../models/user/ContextVWOModel';\nimport { SettingsService } from '../../../services/SettingsService';\nimport { isUndefined } from '../../../utils/DataTypeUtil';\n\nexport class SegmentationManager {\n private static instance: SegmentationManager; // Singleton instance of SegmentationManager\n evaluator: SegmentEvaluator; // Holds the instance of SegmentEvaluator\n\n /**\n * Singleton pattern implementation for getting the instance of SegmentationManager.\n * @returns {SegmentationManager} The singleton instance.\n */\n static get Instance(): SegmentationManager {\n this.instance = this.instance || new SegmentationManager(); // Create new instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Attaches an evaluator to the manager, or creates a new one if none is provided.\n * @param {SegmentEvaluator} evaluator - Optional evaluator to attach.\n */\n attachEvaluator(evaluator?: SegmentEvaluator): void {\n this.evaluator = evaluator || new SegmentEvaluator(); // Use provided evaluator or create new one\n }\n\n /**\n * Sets the contextual data for the segmentation process.\n * @param {any} settings - The settings data.\n * @param {any} feature - The feature data including segmentation needs.\n * @param {any} context - The context data for the evaluation.\n */\n async setContextualData(settings: SettingsModel, feature: FeatureModel, context: ContextModel) {\n this.attachEvaluator(); // Ensure a fresh evaluator instance\n this.evaluator.settings = settings; // Set settings in evaluator\n this.evaluator.context = context; // Set context in evaluator\n this.evaluator.feature = feature; // Set feature in evaluator\n\n // if both user agent and ip is null then we should not get data from gateway service\n if (context?.getUserAgent() === null && context?.getIpAddress() === null) {\n return;\n }\n\n if (feature.getIsGatewayServiceRequired() === true) {\n if (\n SettingsService.Instance.isGatewayServiceProvided &&\n (isUndefined(context.getVwo()) || context.getVwo() === null)\n ) {\n const queryParams = {};\n if (context?.getUserAgent()) {\n queryParams['userAgent'] = context.getUserAgent();\n }\n\n if (context?.getIpAddress()) {\n queryParams['ipAddress'] = context.getIpAddress();\n }\n try {\n const params = getQueryParams(queryParams);\n const _vwo = await getFromGatewayService(params, UrlEnum.GET_USER_DATA);\n context.setVwo(new ContextVWOModel().modelFromDictionary(_vwo));\n } catch (err) {\n LogManager.Instance.error(`Error in setting contextual data for segmentation. Got error: ${err.error}`);\n }\n }\n }\n }\n\n /**\n * Validates the segmentation against provided DSL and properties.\n * @param {Record} dsl - The segmentation DSL.\n * @param {Record} properties - The properties to validate against.\n * @param {SettingsModel} settings - The settings model.\n * @param {any} context - Optional context.\n * @returns {Promise} True if segmentation is valid, otherwise false.\n */\n async validateSegmentation(dsl: Record, properties: Record): Promise {\n return await this.evaluator.isSegmentationValid(dsl, properties); // Delegate to evaluator's method\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandRegexEnum {\n LOWER = '^lower',\n LOWER_MATCH = '^lower\\\\((.*)\\\\)',\n WILDCARD = '^wildcard',\n WILDCARD_MATCH = '^wildcard\\\\((.*)\\\\)',\n REGEX = '^regex',\n REGEX_MATCH = '^regex\\\\((.*)\\\\)',\n STARTING_STAR = '^\\\\*',\n ENDING_STAR = '\\\\*$',\n GREATER_THAN_MATCH = '^gt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n GREATER_THAN_EQUAL_TO_MATCH = '^gte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_MATCH = '^lt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_EQUAL_TO_MATCH = '^lte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandValueEnum {\n LOWER_VALUE = 1,\n STARTING_ENDING_STAR_VALUE = 2,\n STARTING_STAR_VALUE = 3,\n ENDING_STAR_VALUE = 4,\n REGEX_VALUE = 5,\n EQUAL_VALUE = 6,\n GREATER_THAN_VALUE = 7,\n GREATER_THAN_EQUAL_TO_VALUE = 8,\n LESS_THAN_VALUE = 9,\n LESS_THAN_EQUAL_TO_VALUE = 10,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperatorValueEnum {\n AND = 'and',\n NOT = 'not',\n OR = 'or',\n CUSTOM_VARIABLE = 'custom_variable',\n USER = 'user',\n COUNTRY = 'country',\n REGION = 'region',\n CITY = 'city',\n OPERATING_SYSTEM = 'os',\n DEVICE_TYPE = 'device_type',\n DEVICE = 'device',\n BROWSER_AGENT = 'browser_string',\n UA = 'ua',\n FEATURE_ID = 'featureId',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageDecorator } from '../../../decorators/StorageDecorator';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { LogManager } from '../../logger';\nimport { StorageService } from '../../../services/StorageService';\nimport { dynamic } from '../../../types/Common';\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { SegmentOperatorValueEnum } from '../enums/SegmentOperatorValueEnum';\nimport { Segmentation } from '../Segmentation';\nimport { getKeyValue } from '../utils/SegmentUtil';\nimport { SegmentOperandEvaluator } from './SegmentOperandEvaluator';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\n\nexport class SegmentEvaluator implements Segmentation {\n context: ContextModel;\n settings: SettingsModel;\n feature: FeatureModel;\n\n /**\n * Validates if the segmentation defined in the DSL is applicable based on the provided properties.\n * @param dsl The domain-specific language defining the segmentation rules.\n * @param properties The properties against which the DSL rules are evaluated.\n * @returns A Promise resolving to a boolean indicating if the segmentation is valid.\n */\n async isSegmentationValid(dsl: Record, properties: Record): Promise {\n const { key, value } = getKeyValue(dsl);\n const operator = key;\n const subDsl = value;\n\n // Evaluate based on the type of segmentation operator\n switch (operator) {\n case SegmentOperatorValueEnum.NOT:\n return !(await this.isSegmentationValid(subDsl, properties));\n case SegmentOperatorValueEnum.AND:\n return await this.every(subDsl, properties);\n case SegmentOperatorValueEnum.OR:\n return await this.some(subDsl, properties);\n case SegmentOperatorValueEnum.CUSTOM_VARIABLE:\n return await new SegmentOperandEvaluator().evaluateCustomVariableDSL(subDsl, properties);\n case SegmentOperatorValueEnum.USER:\n return new SegmentOperandEvaluator().evaluateUserDSL(subDsl, properties);\n case SegmentOperatorValueEnum.UA:\n return new SegmentOperandEvaluator().evaluateUserAgentDSL(subDsl, this.context);\n default:\n return false;\n }\n }\n\n /**\n * Evaluates if any of the DSL nodes are valid using the OR logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if any of the nodes are valid.\n */\n async some(dslNodes: Array>, customVariables: Record): Promise {\n const uaParserMap: Record = {};\n let keyCount: number = 0; // Initialize count of keys encountered\n let isUaParser = false;\n\n for (const dsl of dslNodes) {\n for (const key in dsl) {\n // Check for user agent related keys\n if (\n key === SegmentOperatorValueEnum.OPERATING_SYSTEM ||\n key === SegmentOperatorValueEnum.BROWSER_AGENT ||\n key === SegmentOperatorValueEnum.DEVICE_TYPE ||\n key === SegmentOperatorValueEnum.DEVICE\n ) {\n isUaParser = true;\n const value = dsl[key];\n\n if (!uaParserMap[key]) {\n uaParserMap[key] = [];\n }\n\n // Ensure value is treated as an array of strings\n const valuesArray = Array.isArray(value) ? value : [value];\n valuesArray.forEach((val: dynamic) => {\n if (typeof val === 'string') {\n uaParserMap[key].push(val);\n }\n });\n\n keyCount++; // Increment count of keys encountered\n }\n\n // Check for feature toggle based on feature ID\n if (key === SegmentOperatorValueEnum.FEATURE_ID) {\n const featureIdObject = dsl[key] as Record;\n const featureIdKey: string = Object.keys(featureIdObject)[0];\n const featureIdValue: string = featureIdObject[featureIdKey];\n\n if (featureIdValue === 'on' || featureIdValue === 'off') {\n const features = this.settings.getFeatures();\n const feature = features.find((feature) => feature.getId() === parseInt(featureIdKey));\n\n if (feature) {\n const featureKey = feature.getKey();\n const result = await this.checkInUserStorage(this.settings, featureKey, this.context);\n // if the result is false, then we need to return true as feature is not present in the user storage\n if (featureIdValue === 'off') {\n return !result;\n }\n return result;\n } else {\n LogManager.Instance.error('Feature not found with featureIdKey: ' + featureIdKey);\n return null; // Handle the case when feature is not found\n }\n }\n }\n }\n\n // Check if the count of keys encountered is equal to dslNodes.length\n if (isUaParser && keyCount === dslNodes.length) {\n try {\n const uaParserResult = await this.checkUserAgentParser(uaParserMap);\n return uaParserResult;\n } catch (err) {\n LogManager.Instance.error('Failed to validate User Agent. Erro: ' + err);\n }\n }\n\n // Recursively check each DSL node\n if (await this.isSegmentationValid(dsl, customVariables)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates all DSL nodes using the AND logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if all nodes are valid.\n */\n async every(dslNodes: Array>, customVariables: Record): Promise {\n const locationMap: Record = {};\n for (const dsl of dslNodes) {\n // Check if the DSL node contains location-related keys\n if (\n SegmentOperatorValueEnum.COUNTRY in dsl ||\n SegmentOperatorValueEnum.REGION in dsl ||\n SegmentOperatorValueEnum.CITY in dsl\n ) {\n this.addLocationValuesToMap(dsl, locationMap);\n // Check if the number of location keys matches the number of DSL nodes\n if (Object.keys(locationMap).length === dslNodes.length) {\n const segmentResult = await this.checkLocationPreSegmentation(locationMap);\n return segmentResult;\n }\n continue;\n }\n const res = await this.isSegmentationValid(dsl, customVariables);\n if (!res) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Adds location values from a DSL node to a map.\n * @param dsl DSL node containing location data.\n * @param locationMap Map to store location data.\n */\n addLocationValuesToMap(dsl: Record, locationMap: Record): void {\n // Add country, region, and city information to the location map if present\n if (SegmentOperatorValueEnum.COUNTRY in dsl) {\n locationMap[SegmentOperatorValueEnum.COUNTRY] = dsl[SegmentOperatorValueEnum.COUNTRY];\n }\n if (SegmentOperatorValueEnum.REGION in dsl) {\n locationMap[SegmentOperatorValueEnum.REGION] = dsl[SegmentOperatorValueEnum.REGION];\n }\n if (SegmentOperatorValueEnum.CITY in dsl) {\n locationMap[SegmentOperatorValueEnum.CITY] = dsl[SegmentOperatorValueEnum.CITY];\n }\n }\n\n /**\n * Checks if the user's location matches the expected location criteria.\n * @param locationMap Map of expected location values.\n * @returns A Promise resolving to a boolean indicating if the location matches.\n */\n async checkLocationPreSegmentation(locationMap: Record): Promise {\n // Ensure user's IP address is available\n if (this.context?.getIpAddress() === undefined) {\n LogManager.Instance.error('To evaluate location pre Segment, please pass ipAddress in context object');\n return false;\n }\n // Check if location data is available and matches the expected values\n if (\n !this.context?.getVwo()?.getLocation() ||\n this.context?.getVwo()?.getLocation() === undefined ||\n this.context?.getVwo()?.getLocation() === null\n ) {\n return false;\n }\n return this.valuesMatch(locationMap, this.context?.getVwo()?.getLocation());\n }\n\n /**\n * Checks if the user's device information matches the expected criteria.\n * @param uaParserMap Map of expected user agent values.\n * @returns A Promise resolving to a boolean indicating if the user agent matches.\n */\n async checkUserAgentParser(uaParserMap: Record): Promise {\n // Ensure user's user agent is available\n if (!this.context?.getUserAgent() || this.context?.getUserAgent() === undefined) {\n LogManager.Instance.error('To evaluate user agent related segments, please pass userAgent in context object');\n return false;\n }\n // Check if user agent data is available and matches the expected values\n if (!this.context?.getVwo()?.getUaInfo() || this.context?.getVwo()?.getUaInfo() === undefined) {\n return false;\n }\n\n return this.checkValuePresent(uaParserMap, this.context?.getVwo()?.getUaInfo());\n }\n\n /**\n * Checks if the feature is enabled for the user by querying the storage.\n * @param settings The settings model containing configuration.\n * @param featureKey The key of the feature to check.\n * @param user The user object to check against.\n * @returns A Promise resolving to a boolean indicating if the feature is enabled for the user.\n */\n async checkInUserStorage(settings: SettingsModel, featureKey: string, context: ContextModel): Promise {\n const storageService = new StorageService();\n // Retrieve feature data from storage\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if the stored data is an object and not empty\n if (isObject(storedData) && Object.keys(storedData).length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Checks if the actual values match the expected values specified in the map.\n * @param expectedMap A map of expected values for different keys.\n * @param actualMap A map of actual values to compare against.\n * @returns A Promise resolving to a boolean indicating if all actual values match the expected values.\n */\n async checkValuePresent(expectedMap: Record, actualMap: Record): Promise {\n for (const key in actualMap) {\n if (Object.prototype.hasOwnProperty.call(expectedMap, key)) {\n const expectedValues = expectedMap[key];\n // convert expected values to lowercase\n expectedValues.forEach((value, index) => {\n expectedValues[index] = value.toLowerCase();\n });\n const actualValue = actualMap[key];\n\n // Handle wildcard patterns for all keys\n for (const val of expectedValues) {\n // Check if the value is a wildcard pattern and matches the actual value using regex\n if (val.startsWith('wildcard(') && val.endsWith(')')) {\n // Extract pattern from wildcard string\n const wildcardPattern = val.slice(9, -1);\n // Convert wildcard pattern to regex and check if it matches the actual value\n const regex = new RegExp(wildcardPattern.replace(/\\*/g, '.*'), 'i'); // Convert wildcard pattern to regex, 'i' for case-insensitive\n // Check if the actual value matches the regex pattern for the key\n if (regex.test(actualValue)) {\n // match found, return true as we only need to check if any of the expected values match the actual value\n return true;\n }\n }\n }\n\n // this will be checked for all cases where wildcard is not present\n if (expectedValues.includes(actualValue?.toLowerCase())) {\n return true; // Direct value match found, return true\n }\n }\n }\n return false; // No matches found\n }\n\n /**\n * Compares expected location values with user's location to determine a match.\n * @param expectedLocationMap A map of expected location values.\n * @param userLocation The user's actual location.\n * @returns A boolean indicating if the user's location matches the expected values.\n */\n async valuesMatch(expectedLocationMap, userLocation) {\n for (const [key, value] of Object.entries(expectedLocationMap)) {\n if (key in userLocation) {\n const normalizedValue1 = this.normalizeValue(value);\n const normalizedValue2 = this.normalizeValue(userLocation[key]);\n if (normalizedValue1 !== normalizedValue2) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true; // If all values match, return true\n }\n\n /**\n * Normalizes a value to a consistent format for comparison.\n * @param value The value to normalize.\n * @returns The normalized value.\n */\n normalizeValue(value) {\n if (value === null || value === undefined) {\n return null;\n }\n // Remove quotes and trim whitespace\n return value.toString().replace(/^\"|\"$/g, '').trim();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getKeyValue, matchWithRegex } from '../utils/SegmentUtil';\nimport { SegmentOperandValueEnum } from '../enums/SegmentOperandValueEnum';\nimport { SegmentOperandRegexEnum } from '../enums/SegmentOperandRegexEnum';\nimport { isBoolean } from '../../../utils/DataTypeUtil';\nimport { dynamic } from '../../../types/Common';\nimport { getFromGatewayService } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\n\n/**\n * SegmentOperandEvaluator class provides methods to evaluate different types of DSL (Domain Specific Language)\n * expressions based on the segment conditions defined for custom variables, user IDs, and user agents.\n */\nexport class SegmentOperandEvaluator {\n /**\n * Evaluates a custom variable DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the custom variable.\n * @param {Record} properties - The properties object containing the actual values to be matched against.\n * @returns {Promise} - A promise that resolves to a boolean indicating if the DSL condition is met.\n */\n async evaluateCustomVariableDSL(\n dslOperandValue: Record,\n properties: Record,\n ): Promise {\n // Extract key and value from the DSL operand\n const { key, value } = getKeyValue(dslOperandValue);\n const operandKey = key;\n const operand = value;\n\n // Check if the property exists\n if (!Object.prototype.hasOwnProperty.call(properties, operandKey)) {\n return false;\n }\n\n // Handle 'inlist' operand\n if (operand.includes('inlist')) {\n const listIdRegex = /inlist\\(([^)]+)\\)/;\n const match = operand.match(listIdRegex);\n if (!match || match.length < 2) {\n LogManager.Instance.error(\"Invalid 'inList' operand format\");\n return false;\n }\n\n // Process the tag value and prepare query parameters\n const tagValue = properties[operandKey];\n const attributeValue = this.preProcessTagValue(tagValue);\n const listId = match[1];\n const queryParamsObj = {\n attribute: attributeValue,\n listId: listId,\n };\n\n // Make a web service call to check the attribute against the list\n try {\n const res = await getFromGatewayService(queryParamsObj, UrlEnum.ATTRIBUTE_CHECK);\n if (!res || res === undefined || res === 'false' || res.status === 0) {\n return false;\n }\n return res;\n } catch (error) {\n LogManager.Instance.error('Error while fetching data: ' + error);\n return false;\n }\n } else {\n // Process other types of operands\n let tagValue = properties[operandKey];\n tagValue = this.preProcessTagValue(tagValue);\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue;\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n }\n\n /**\n * Evaluates a user DSL expression to check if a user ID is in a specified list.\n * @param {Record} dslOperandValue - The DSL expression containing user IDs.\n * @param {Record} properties - The properties object containing the actual user ID to check.\n * @returns {boolean} - True if the user ID is in the list, otherwise false.\n */\n evaluateUserDSL(dslOperandValue: Record, properties: Record): boolean {\n const users = dslOperandValue.split(',');\n for (let i = 0; i < users.length; i++) {\n if (users[i].trim() == properties._vwoUserId) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates a user agent DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the user agent.\n * @param {any} context - The context object containing the user agent string.\n * @returns {boolean} - True if the user agent matches the DSL condition, otherwise false.\n */\n evaluateUserAgentDSL(dslOperandValue: Record, context: ContextModel): boolean {\n const operand = dslOperandValue;\n if (!context.getUserAgent() || context.getUserAgent() === undefined) {\n LogManager.Instance.info('To Evaluate UserAgent segmentation, please provide userAgent in context');\n return false;\n }\n let tagValue = decodeURIComponent(context.getUserAgent());\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue as string; // Fix: Type assertion to ensure tagValue is of type string\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n\n /**\n * Pre-processes the tag value to ensure it is in the correct format for evaluation.\n * @param {any} tagValue - The value to be processed.\n * @returns {string | boolean} - The processed tag value, either as a string or a boolean.\n */\n preProcessTagValue(tagValue: any): string | boolean {\n // Default to empty string if undefined\n if (tagValue === undefined) {\n tagValue = '';\n }\n // Convert boolean values to boolean type\n if (isBoolean(tagValue)) {\n tagValue = tagValue ? true : false;\n }\n // Convert all non-null values to string\n if (tagValue !== null) {\n tagValue = tagValue.toString();\n }\n return tagValue;\n }\n\n /**\n * Pre-processes the operand value to determine its type and extract the value based on regex matches.\n * @param {any} operand - The operand to be processed.\n * @returns {Record} - An object containing the operand type and value.\n */\n preProcessOperandValue(operand: any): Record {\n let operandType: SegmentOperandValueEnum;\n let operandValue: dynamic;\n // Determine the type of operand and extract value based on regex patterns\n if (matchWithRegex(operand, SegmentOperandRegexEnum.LOWER_MATCH)) {\n operandType = SegmentOperandValueEnum.LOWER_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LOWER_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.WILDCARD_MATCH)) {\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.WILDCARD_MATCH);\n const startingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.STARTING_STAR);\n const endingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.ENDING_STAR);\n // Determine specific wildcard type\n if (startingStar && endingStar) {\n operandType = SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE;\n } else if (startingStar) {\n operandType = SegmentOperandValueEnum.STARTING_STAR_VALUE;\n } else if (endingStar) {\n operandType = SegmentOperandValueEnum.ENDING_STAR_VALUE;\n }\n // Remove wildcard characters from the operand value\n operandValue = operandValue\n .replace(new RegExp(SegmentOperandRegexEnum.STARTING_STAR), '')\n .replace(new RegExp(SegmentOperandRegexEnum.ENDING_STAR), '');\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.REGEX_MATCH)) {\n operandType = SegmentOperandValueEnum.REGEX_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.REGEX_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH);\n } else {\n operandType = SegmentOperandValueEnum.EQUAL_VALUE;\n operandValue = operand;\n }\n return {\n operandType,\n operandValue,\n };\n }\n\n /**\n * Extracts the operand value from a string based on a specified regex pattern.\n * @param {any} operand - The operand string to extract from.\n * @param {string} regex - The regex pattern to use for extraction.\n * @returns {string} - The extracted value.\n */\n extractOperandValue(operand: any, regex: string): string {\n // Match operand with regex and return the first capturing group\n return matchWithRegex(operand, regex) && matchWithRegex(operand, regex)[1];\n }\n\n /**\n * Processes numeric values from operand and tag values, converting them to strings.\n * @param {any} operandValue - The operand value to process.\n * @param {any} tagValue - The tag value to process.\n * @returns {Record} - An object containing the processed operand and tag values as strings.\n */\n processValues(operandValue: any, tagValue: any): Record {\n // Convert operand and tag values to floats\n const processedOperandValue = parseFloat(operandValue);\n const processedTagValue = parseFloat(tagValue);\n // Return original values if conversion fails\n if (!processedOperandValue || !processedTagValue) {\n return {\n operandValue: operandValue,\n tagValue: tagValue,\n };\n }\n // now we have surity that both are numbers\n // now we can convert them independently to int type if they\n // are int rather than floats\n // if (processedOperandValue === Math.floor(processedOperandValue)) {\n // processedOperandValue = parseInt(processedOperandValue, 10);\n // }\n // if (processedTagValue === Math.floor(processedTagValue)) {\n // processedTagValue = parseInt(processedTagValue, 10);\n // }\n // Convert numeric values back to strings\n return {\n operandValue: processedOperandValue.toString(),\n tagValue: processedTagValue.toString(),\n };\n }\n\n /**\n * Extracts the result of the evaluation based on the operand type and values.\n * @param {SegmentOperandValueEnum} operandType - The type of the operand.\n * @param {any} operandValue - The value of the operand.\n * @param {any} tagValue - The value of the tag to compare against.\n * @returns {boolean} - The result of the evaluation.\n */\n extractResult(operandType: SegmentOperandValueEnum, operandValue: any, tagValue: any): boolean {\n let result: boolean;\n\n switch (operandType) {\n case SegmentOperandValueEnum.LOWER_VALUE:\n // Check if both values are equal, ignoring case\n if (tagValue !== null) {\n result = operandValue.toLowerCase() === tagValue.toLowerCase();\n }\n break;\n case SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE:\n // Check if the tagValue contains the operandValue\n if (tagValue !== null) {\n result = tagValue.indexOf(operandValue) > -1;\n }\n break;\n case SegmentOperandValueEnum.STARTING_STAR_VALUE:\n // Check if the tagValue ends with the operandValue\n if (tagValue !== null) {\n result = tagValue.endsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.ENDING_STAR_VALUE:\n // Check if the tagValue starts with the operandValue\n if (tagValue !== null) {\n result = tagValue.startsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.REGEX_VALUE:\n // Evaluate the tagValue against the regex pattern of operandValue\n try {\n const pattern = new RegExp(operandValue, 'g');\n result = !!pattern.test(tagValue);\n } catch (err) {\n result = false;\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) < parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) <= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) > parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) >= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n default:\n // Check if the tagValue is exactly equal to the operandValue\n result = tagValue === operandValue;\n }\n\n return result;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { SegmentationManager } from './core/SegmentationManger';\nexport { SegmentEvaluator } from './evaluators/SegmentEvaluator';\nexport { Segmentation } from './Segmentation';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isObject } from '../../../utils/DataTypeUtil';\n\n/**\n * Extracts the first key-value pair from the provided object.\n * @param {Record} obj - The object from which to extract the key-value pair.\n * @returns {Record | undefined} An object containing the first key and value, or undefined if input is not an object.\n */\nexport function getKeyValue(obj: Record): Record | undefined {\n // Check if the input is a valid object using isObject utility function\n if (!isObject(obj)) {\n return;\n }\n\n // Extract the first key from the object\n const key = Object.keys(obj)[0];\n // Retrieve the value associated with the first key\n const value = obj[key];\n // Return an object containing the key and value\n return {\n key,\n value,\n };\n}\n\n/**\n * Matches a string against a regular expression and returns the match result.\n * @param {string} string - The string to match against the regex.\n * @param {string} regex - The regex pattern as a string.\n * @returns {RegExpMatchArray | null} The results of the regex match, or null if an error occurs.\n */\nexport function matchWithRegex(string: string, regex: string): RegExpMatchArray | null {\n try {\n // Attempt to match the string with the regex\n return string.match(new RegExp(regex));\n } catch (err) {\n // Return null if an error occurs during regex matching\n return null;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport abstract class Connector {\n // abstract connect(_config: Record): this;\n\n abstract set(_key: string, _data: dynamic): void | Promise;\n\n abstract get(_key: string): this | Promise;\n\n // abstract getAll(): Record | Promise>>;\n\n // abstract getKeys(): string[] | Promise;\n\n // abstract has(_key: string): boolean | Promise;\n\n // abstract hasData(): boolean | Promise;\n\n // abstract update(_key: string, _data: dynamic, ttl: number): Promise;\n\n // abstract remove(_key: string): this | Promise;\n\n // abstract clear(): this | Promise;\n\n // abstract close(): this; // TODO: stop\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Connector } from './Connector';\n\n// TODO: move to file\n// enum ConnectorEnum {\n// MEMORY = 'memory',\n// REDIS = 'redis'\n// }\n\nexport class Storage {\n public static instance: Storage;\n public connector: Connector | Record; // RedisConnector |\n // public storageType: dynamic;\n\n public attachConnector(connector: any): any {\n if (connector?.prototype?.constructor?.toString()?.trim()?.substring(0, 5) === 'class') {\n this.connector = new connector();\n } else {\n this.connector = connector;\n }\n\n return this.connector;\n }\n\n public static get Instance(): Storage {\n this.instance = this.instance || new Storage();\n\n return this.instance;\n }\n\n public getConnector(): any {\n return this.connector;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { Storage } from './Storage';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\n\nimport { Constants } from '../constants';\nimport { VariationModel } from '../models/campaign/VariationModel';\n\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\n\ninterface ICampaignDecisionService {\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean;\n getVariation(variations: Array, bucketValue: number): VariationModel;\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel;\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise;\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n}\n\nexport class CampaignDecisionService implements ICampaignDecisionService {\n /**\n * Calculate if this user should become part of the campaign or not\n *\n * @param {String} userId the unique ID assigned to a user\n * @param {Object} campaign fot getting the value of traffic allotted to the campaign\n *\n * @return {Boolean} if User is a part of Campaign or not\n */\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean {\n // if (!ValidateUtil.isValidValue(userId) || !campaign) {\n // return false;\n // }\n\n if (!campaign || !userId) {\n return false;\n }\n let trafficAllocation;\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n trafficAllocation = campaign.getVariations()[0].getWeight();\n } else {\n trafficAllocation = campaign.getTraffic();\n }\n const valueAssignedToUser = new DecisionMaker().getBucketValueForUser(`${campaign.getId()}_${userId}`);\n const isUserPart = valueAssignedToUser !== 0 && valueAssignedToUser <= trafficAllocation;\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_PART_OF_CAMPAIGN, {\n userId,\n notPart: isUserPart ? '' : 'not',\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return isUserPart;\n }\n\n /**\n * Returns the Variation by checking the Start and End Bucket Allocations of each Variation\n *\n * @param {Object} campaign which contains the variations\n * @param {Number} bucketValue the bucket Value of the user\n *\n * @return {Object|null} variation data allotted to the user or null if not\n */\n getVariation(variations: Array, bucketValue: number): VariationModel {\n for (let i = 0; i < variations.length; i++) {\n const variation = variations[i];\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n return null;\n }\n\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel {\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n /**\n * Validates the User ID and generates Variation into which the User is bucketed in.\n *\n * @param {String} userId the unique ID assigned to User\n * @param {Object} campaign the Campaign of which User is a part of\n *\n * @return {Object|null} variation data into which user is bucketed in or null if not\n */\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n let multiplier;\n\n if (!campaign || !userId) {\n return null;\n }\n\n if (campaign.getTraffic()) {\n multiplier = 1;\n }\n\n const percentTraffic = campaign.getTraffic();\n const hashValue = new DecisionMaker().generateHashValue(`${campaign.getId()}_${accountId}_${userId}`);\n const bucketValue = new DecisionMaker().generateBucketValue(hashValue, Constants.MAX_TRAFFIC_VALUE, multiplier);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION, {\n userId,\n campaignKey: campaign.getKey(),\n percentTraffic,\n bucketValue,\n hashValue,\n }),\n );\n\n return this.getVariation(campaign.getVariations(), bucketValue);\n }\n\n async getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise {\n // validate segmentation\n const campaignType = campaign.getType();\n let segments = {};\n\n if (campaignType === CampaignTypeEnum.ROLLOUT || campaignType === CampaignTypeEnum.PERSONALIZE) {\n segments = campaign.getVariations()[0].getSegments();\n } else if (campaignType === CampaignTypeEnum.AB) {\n segments = campaign.getSegments();\n }\n if (isObject(segments) && !Object.keys(segments).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_SKIP, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return true;\n } else {\n const preSegmentationResult = await SegmentationManager.Instance.validateSegmentation(\n segments,\n context.getCustomVariables(),\n );\n\n if (!preSegmentationResult) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'failed',\n }),\n );\n\n return false;\n }\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'passed',\n }),\n );\n\n return true;\n }\n }\n\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n const isUserPart = this.isUserPartOfCampaign(userId, campaign);\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (isUserPart) {\n return campaign.getVariations()[0];\n } else {\n return null;\n }\n } else {\n if (isUserPart) {\n return this.bucketUserToVariation(userId, accountId, campaign);\n } else {\n return null;\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOOptions } from '../models/VWOOptionsModel';\nimport { isFunction } from '../utils/DataTypeUtil';\n\nexport interface IHooksService {\n execute(properties: Record): void;\n set(properties: Record): void;\n get(): Record;\n}\nclass HooksService implements IHooksService {\n private callback: ((properties: Record) => void) | undefined;\n private isCallBackFunction: boolean;\n private decision: Record;\n\n constructor(options: IVWOOptions) {\n this.callback = options.integrations?.callback;\n this.isCallBackFunction = isFunction(this.callback);\n this.decision = {};\n }\n\n /**\n * Executes the callback\n * @param {Record} properties Properties from the callback\n */\n execute(properties: Record): void {\n if (this.isCallBackFunction) {\n this.callback(properties);\n }\n }\n\n /**\n * Sets properties to the decision object\n * @param {Record} properties Properties to set\n */\n set(properties: Record): void {\n if (this.isCallBackFunction) {\n this.decision = properties;\n }\n }\n\n /**\n * Retrieves the decision object\n * @returns {Record} The decision object\n */\n get(): Record {\n return this.decision;\n }\n}\n\nexport default HooksService;\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\n\nimport { Deferred } from '../utils/PromiseUtil';\n\nimport { Constants } from '../constants';\nimport { HTTPS_PROTOCOL, HTTP_PROTOCOL } from '../constants/Url';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsSchema } from '../models/schemas/SettingsSchemaValidation';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { getSettingsPath } from '../utils/NetworkUtil';\n\ninterface ISettingsService {\n sdkKey: string;\n\n getSettings(forceFetch: boolean): Promise>;\n\n fetchSettings(): Promise>;\n}\n\nexport class SettingsService implements ISettingsService {\n sdkKey: string;\n accountId: number;\n expiry: number;\n networkTimeout: number;\n hostname: string;\n port: number;\n protocol: string;\n isGatewayServiceProvided: boolean = false;\n private static instance: SettingsService;\n\n constructor(options: Record) {\n this.sdkKey = options.sdkKey;\n this.accountId = options.accountId;\n this.expiry = options?.settings?.expiry || Constants.SETTINGS_EXPIRY;\n this.networkTimeout = options?.settings?.timeout || Constants.SETTINGS_TIMEOUT;\n\n if (options?.gatewayService?.url) {\n let parsedUrl;\n this.isGatewayServiceProvided = true;\n if (\n options.gatewayService.url.startsWith(HTTP_PROTOCOL) ||\n options.gatewayService.url.startsWith(HTTPS_PROTOCOL)\n ) {\n parsedUrl = new URL(`${options.gatewayService.url}`);\n } else if (options.gatewayService?.protocol) {\n parsedUrl = new URL(`${options.gatewayService.protocol}://${options.gatewayService.url}`);\n } else {\n parsedUrl = new URL(`${HTTPS_PROTOCOL}${options.gatewayService.url}`);\n }\n this.hostname = parsedUrl.hostname;\n this.protocol = parsedUrl.protocol.replace(':', '');\n if (parsedUrl.port) {\n this.port = parseInt(parsedUrl.port);\n } else if (options.gatewayService?.port) {\n this.port = options.gatewayService.port;\n }\n } else {\n this.hostname = Constants.HOST_NAME;\n }\n\n // if (this.expiry > 0) {\n // this.setSettingsExpiry();\n // }\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: 'Settings Manager',\n }),\n );\n SettingsService.instance = this;\n }\n\n static get Instance(): SettingsService {\n return SettingsService.instance;\n }\n\n private setSettingsExpiry() {\n const settingsTimeout = setTimeout(() => {\n this.fetchSettingsAndCacheInStorage().then(() => {\n clearTimeout(settingsTimeout);\n // again set the timer\n // NOTE: setInterval could be used but it will not consider the time required to fetch settings\n // This breaks the timer rythm and also sends more call than required\n this.setSettingsExpiry();\n });\n }, this.expiry);\n }\n\n private fetchSettingsAndCacheInStorage() {\n const deferredObject = new Deferred();\n // const storageConnector = Storage.Instance.getConnector();\n\n this.fetchSettings()\n .then(async (res) => {\n // LogManager.Instance.info('Settings fetched successfully');\n\n // const method = update ? 'update' : 'set';\n\n // storageConnector[method](Constants.SETTINGS, res).then(() => {\n // LogManager.Instance.info('Settings persisted in cache: memory');\n // deferredObject.resolve(res);\n // });\n deferredObject.resolve(res);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.resolve(null);\n });\n\n return deferredObject.promise;\n }\n\n fetchSettings(): Promise> {\n const deferredObject = new Deferred();\n\n if (!this.sdkKey || !this.accountId) {\n deferredObject.reject(new Error('sdkKey is required for fetching account settings. Aborting!'));\n }\n\n const networkInstance = NetworkManager.Instance;\n const options: Record = getSettingsPath(this.sdkKey, this.accountId);\n\n options.platform = Constants.PLATFORM;\n options['api-version'] = Constants.API_VERSION;\n\n if (!networkInstance.getConfig().getDevelopmentMode()) {\n options.s = 'prod';\n }\n\n try {\n const request: RequestModel = new RequestModel(\n this.hostname,\n HttpMethodEnum.GET,\n Constants.SETTINTS_ENDPOINT,\n options,\n null,\n null,\n this.protocol,\n this.port,\n );\n request.setTimeout(this.networkTimeout);\n\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.reject(err);\n return deferredObject.promise;\n }\n }\n\n getSettings(forceFetch = false): Promise> {\n const deferredObject = new Deferred();\n\n if (forceFetch) {\n this.fetchSettingsAndCacheInStorage().then((settings: Record) => {\n deferredObject.resolve(settings);\n });\n } else {\n // const storageConnector = Storage.Instance.getConnector();\n\n // if (storageConnector) {\n // storageConnector\n // .get(Constants.SETTINGS)\n // .then((storedSettings: dynamic) => {\n // if (!isObject(storedSettings)) {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n // if (isSettingsValid) {\n // deferredObject.resolve(fetchedSettings);\n // } else {\n // deferredObject.reject(new Error('Settings are not valid. Failed schema validation.'));\n // }\n // });\n // } else {\n // deferredObject.resolve(storedSettings);\n // }\n // })\n // .catch(() => {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // deferredObject.resolve(fetchedSettings);\n // });\n // });\n // } else {\n this.fetchSettingsAndCacheInStorage().then((fetchedSettings: Record) => {\n const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n if (isSettingsValid) {\n LogManager.Instance.info(InfoLogMessagesEnum.SETTINGS_FETCH_SUCCESS);\n\n deferredObject.resolve(fetchedSettings);\n } else {\n LogManager.Instance.error(ErrorLogMessagesEnum.SETTINGS_SCHEMA_INVALID);\n\n deferredObject.resolve({});\n }\n });\n // }\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { Storage } from '../packages/storage';\nimport { dynamic } from '../types/Common';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { LogManager } from '../packages/logger';\nimport { isNull, isUndefined } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\nexport interface IStorageService {\n getDataInStorage(featureKey: any, context: ContextModel): Promise>;\n setDataInStorage(data: Record): Promise;\n}\nexport class StorageService implements IStorageService {\n private storageData: Record = {};\n\n /**\n * Retrieves data from storage based on the feature key and user ID.\n * @param featureKey The key to identify the feature data.\n * @param user The user object containing at least an ID.\n * @returns A promise that resolves to the data retrieved or an error/storage status enum.\n */\n async getDataInStorage(featureKey: any, context: ContextModel): Promise> {\n const deferredObject = new Deferred();\n const storageInstance = Storage.Instance.getConnector();\n\n // Check if the storage instance is available\n if (isNull(storageInstance) || isUndefined(storageInstance)) {\n deferredObject.resolve(StorageEnum.STORAGE_UNDEFINED);\n } else {\n storageInstance\n .get(featureKey, context.getId())\n .then((data: Record) => {\n deferredObject.resolve(data);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORED_DATA_ERROR, {\n err,\n }),\n );\n\n deferredObject.resolve(StorageEnum.NO_DATA_FOUND);\n });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Stores data in the storage.\n * @param data The data to be stored as a record.\n * @returns A promise that resolves to true if data is successfully stored, otherwise false.\n */\n async setDataInStorage(data: Record): Promise {\n const deferredObject = new Deferred();\n\n const storageInstance = Storage.Instance.getConnector();\n // Check if the storage instance is available\n if (storageInstance === null || storageInstance === undefined) {\n deferredObject.resolve(false);\n } else {\n storageInstance\n .set(data)\n .then(() => {\n deferredObject.resolve(true);\n })\n .catch(() => {\n deferredObject.resolve(false);\n });\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { RuleModel } from '../models/campaign/RuleModel';\n/**\n * Sets the variation allocation for a given campaign based on its type.\n * If the campaign type is ROLLOUT or PERSONALIZE, it handles the campaign using `_handleRolloutCampaign`.\n * Otherwise, it assigns range values to each variation in the campaign.\n * @param {CampaignModel} campaign - The campaign for which to set the variation allocation.\n */\nexport function setVariationAllocation(campaign: CampaignModel): void {\n // Check if the campaign type is ROLLOUT or PERSONALIZE\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n _handleRolloutCampaign(campaign);\n } else {\n let currentAllocation = 0;\n // Iterate over each variation in the campaign\n campaign.getVariations().forEach((variation) => {\n // Assign range values to the variation and update the current allocation\n const stepFactor = assignRangeValues(variation, currentAllocation);\n currentAllocation += stepFactor;\n // Log the range allocation for debugging\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: variation.getStartRangeVariation(),\n endRange: variation.getEndRangeVariation(),\n }),\n );\n });\n }\n}\n\n/**\n * Assigns start and end range values to a variation based on its weight.\n * @param {VariationModel} data - The variation model to assign range values.\n * @param {number} currentAllocation - The current allocation value before this variation.\n * @returns {number} The step factor calculated from the variation's weight.\n */\nexport function assignRangeValues(data: VariationModel, currentAllocation: number) {\n // Calculate the bucket range based on the variation's weight\n const stepFactor: number = _getVariationBucketRange(data.getWeight());\n\n // Set the start and end range of the variation\n if (stepFactor) {\n data.setStartRange(currentAllocation + 1);\n data.setEndRange(currentAllocation + stepFactor);\n } else {\n data.setStartRange(-1);\n data.setEndRange(-1);\n }\n return stepFactor;\n}\n\n/**\n * Scales the weights of variations to sum up to 100%.\n * @param {any[]} variations - The list of variations to scale.\n */\nexport function scaleVariationWeights(variations: any) {\n // Calculate the total weight of all variations\n const totalWeight = variations.reduce((acc, variation) => {\n return acc + variation.weight;\n }, 0);\n // If total weight is zero, assign equal weight to each variation\n if (!totalWeight) {\n const equalWeight = 100 / variations.length;\n variations.forEach((variation) => (variation.weight = equalWeight));\n } else {\n // Scale each variation's weight to make the total 100%\n variations.forEach((variation) => (variation.weight = (variation.weight / totalWeight) * 100));\n }\n}\n\n/**\n * Generates a bucketing seed based on user ID, campaign, and optional group ID.\n * @param {string} userId - The user ID.\n * @param {any} campaign - The campaign object.\n * @param {string} [groupId] - The optional group ID.\n * @returns {string} The bucketing seed.\n */\nexport function getBucketingSeed(userId: string, campaign: CampaignModel, groupId: number) {\n // Return a seed combining group ID and user ID if group ID is provided\n if (groupId) {\n return `${groupId}_${userId}`;\n }\n // Return a seed combining campaign ID and user ID otherwise\n return `${campaign.getId()}_${userId}`;\n}\n\n/**\n * Retrieves a variation by its ID within a specific campaign identified by its key.\n * @param {SettingsModel} settings - The settings model containing all campaigns.\n * @param {string} campaignKey - The key of the campaign.\n * @param {string} variationId - The ID of the variation to retrieve.\n * @returns {VariationModel | null} The found variation model or null if not found.\n */\nexport function getVariationFromCampaignKey(settings: SettingsModel, campaignKey: string, variationId: number) {\n // Find the campaign by its key\n const campaign: CampaignModel = settings.getCampaigns().find((campaign: CampaignModel) => {\n return campaign.getKey() === campaignKey;\n });\n\n if (campaign) {\n // Find the variation by its ID within the found campaign\n const variation: VariationModel = campaign.getVariations().find((variation: VariationModel) => {\n return variation.getId() === variationId;\n });\n\n if (variation) {\n // Return a new instance of VariationModel based on the found variation\n return new VariationModel().modelFromDictionary(variation);\n }\n }\n return null;\n}\n\n/**\n * Sets the allocation ranges for a list of campaigns.\n * @param {CampaignModel[]} campaigns - The list of campaigns to set allocations for.\n */\nexport function setCampaignAllocation(campaigns: any[]) {\n let stepFactor = 0;\n for (let i = 0, currentAllocation = 0; i < campaigns.length; i++) {\n const campaign = campaigns[i];\n\n // Assign range values to each campaign and update the current allocation\n stepFactor = assignRangeValuesMEG(campaign, currentAllocation);\n currentAllocation += stepFactor;\n }\n}\n\n/**\n * Determines if a campaign is part of a group.\n * @param {SettingsModel} settings - The settings model containing group associations.\n * @param {string} campaignId - The ID of the campaign to check.\n * @param {any} [variationId=null] - The optional variation ID.\n * @returns {Object} An object containing the group ID and name if the campaign is part of a group, otherwise an empty object.\n */\nexport function getGroupDetailsIfCampaignPartOfIt(settings: SettingsModel, campaignId: any, variationId: any = null) {\n /**\n * If variationId is null, that means that campaign is testing campaign\n * If variationId is not null, that means that campaign is personalization campaign and we need to append variationId to campaignId using _\n * then check if the current campaign is part of any group\n */\n let campaignToCheck = campaignId.toString();\n // check if variationId is not null\n if (variationId !== null) {\n // if variationId is not null, then append it to the campaignId like campaignId_variationId\n campaignToCheck = `${campaignId}_${variationId}`.toString();\n }\n if (\n settings.getCampaignGroups() &&\n Object.prototype.hasOwnProperty.call(settings.getCampaignGroups(), campaignToCheck)\n ) {\n return {\n groupId: settings.getCampaignGroups()[campaignToCheck],\n groupName: settings.getGroups()[settings.getCampaignGroups()[campaignToCheck]].name,\n };\n }\n return {};\n}\n\n/**\n * Finds all groups associated with a feature specified by its key.\n * @param {SettingsModel} settings - The settings model containing all features and groups.\n * @param {string} featureKey - The key of the feature to find groups for.\n * @returns {Array} An array of groups associated with the feature.\n */\nexport function findGroupsFeaturePartOf(settings: SettingsModel, featureKey: string) {\n // Initialize an array to store all rules for the given feature to fetch campaignId and variationId later\n const ruleArray: Array = [];\n // Loop over all rules inside the feature where the feature key matches and collect all rules\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n if (ruleArray.indexOf(rule) === -1) {\n ruleArray.push(rule);\n }\n });\n }\n });\n\n // Loop over all campaigns and find the group for each campaign\n const groups: Array = [];\n ruleArray.forEach((rule) => {\n const group = getGroupDetailsIfCampaignPartOfIt(\n settings,\n rule.getCampaignId(),\n rule.getType() === CampaignTypeEnum.PERSONALIZE ? rule.getVariationId() : null,\n );\n if (group.groupId) {\n // Check if the group is already added to the groups array to avoid duplicates\n const groupIndex = groups.findIndex((grp) => grp.groupId === group.groupId);\n if (groupIndex === -1) {\n groups.push(group);\n }\n }\n });\n return groups;\n}\n\n/**\n * Retrieves campaigns by a specific group ID.\n * @param {SettingsModel} settings - The settings model containing all groups.\n * @param {any} groupId - The ID of the group.\n * @returns {Array} An array of campaigns associated with the specified group ID.\n */\nexport function getCampaignsByGroupId(settings: SettingsModel, groupId: number) {\n const group = settings.getGroups()[groupId];\n if (group) {\n return group.campaigns; // Return the campaigns associated with the group\n } else {\n return []; // Return an empty array if the group ID is not found\n }\n}\n\n/**\n * Retrieves feature keys from a list of campaign IDs.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {any} campaignIdWithVariation - An array of campaign IDs and variation IDs in format campaignId_variationId.\n * @returns {Array} An array of feature keys associated with the provided campaign IDs.\n */\nexport function getFeatureKeysFromCampaignIds(settings: SettingsModel, campaignIdWithVariation: any) {\n const featureKeys = [];\n for (const campaign of campaignIdWithVariation) {\n // split key with _ to separate campaignId and variationId\n const [campaignId, variationId] = campaign.split('_').map(Number);\n settings.getFeatures().forEach((feature) => {\n // check if feature already exists in the featureKeys array\n if (featureKeys.indexOf(feature.getKey()) !== -1) {\n return;\n }\n feature.getRules().forEach((rule) => {\n if (rule.getCampaignId() === campaignId) {\n // Check if variationId is provided and matches the rule's variationId\n if (variationId !== undefined && variationId !== null) {\n // Add feature key if variationId matches\n if (rule.getVariationId() === variationId) {\n featureKeys.push(feature.getKey());\n }\n } else {\n // Add feature key if no variationId is provided\n featureKeys.push(feature.getKey());\n }\n }\n });\n });\n }\n return featureKeys;\n}\n\n/**\n * Retrieves campaign IDs from a specific feature key.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of campaign IDs associated with the specified feature key.\n */\nexport function getCampaignIdsFromFeatureKey(settings: SettingsModel, featureKey: string) {\n const campaignIds = [];\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n campaignIds.push(rule.getCampaignId()); // Add campaign ID if feature key matches\n });\n }\n });\n return campaignIds;\n}\n\n/**\n * Assigns range values to a campaign based on its weight.\n * @param {any} data - The campaign data containing weight.\n * @param {number} currentAllocation - The current allocation value before this campaign.\n * @returns {number} The step factor calculated from the campaign's weight.\n */\nexport function assignRangeValuesMEG(data: any, currentAllocation: number) {\n const stepFactor: number = _getVariationBucketRange(data.weight);\n\n if (stepFactor) {\n data.startRangeVariation = currentAllocation + 1; // Set the start range\n data.endRangeVariation = currentAllocation + stepFactor; // Set the end range\n } else {\n data.startRangeVariation = -1; // Set invalid range if step factor is zero\n data.endRangeVariation = -1;\n }\n return stepFactor;\n}\n\n/**\n * Retrieves the rule type using a campaign ID from a specific feature.\n * @param {any} feature - The feature containing rules.\n * @param {number} campaignId - The campaign ID to find the rule type for.\n * @returns {string} The rule type if found, otherwise an empty string.\n */\nexport function getRuleTypeUsingCampaignIdFromFeature(feature: FeatureModel, campaignId: number) {\n const rule = feature.getRules().find((rule) => rule.getCampaignId() === campaignId);\n return rule ? rule.getType() : ''; // Return the rule type if found\n}\n\n/**\n * Calculates the bucket range for a variation based on its weight.\n * @param {number} variationWeight - The weight of the variation.\n * @returns {number} The calculated bucket range.\n */\nfunction _getVariationBucketRange(variationWeight: number) {\n if (!variationWeight || variationWeight === 0) {\n return 0; // Return zero if weight is invalid or zero\n }\n\n const startRange = Math.ceil(variationWeight * 100);\n\n return Math.min(startRange, Constants.MAX_TRAFFIC_VALUE); // Ensure the range does not exceed the max traffic value\n}\n\n/**\n * Handles the rollout campaign by setting start and end ranges for all variations.\n * @param {CampaignModel} campaign - The campaign to handle.\n */\nfunction _handleRolloutCampaign(campaign: CampaignModel): void {\n // Set start and end ranges for all variations in the campaign\n for (let i = 0; i < campaign.getVariations().length; i++) {\n const variation = campaign.getVariations()[i];\n const endRange = campaign.getVariations()[i].getWeight() * 100;\n\n variation.setStartRange(1);\n variation.setEndRange(endRange);\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: 1,\n endRange,\n }),\n );\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\ntype FunctionType = (val: dynamic) => void;\n\n/**\n * Checks if a value is an object excluding arrays, functions, regexes, promises, and dates.\n * @param val The value to check.\n * @returns True if the value is an object, false otherwise.\n */\nexport function isObject(\n val: T,\n): val is Record & Exclude | FunctionType | RegExp | Promise | Date> {\n // Using Object.prototype.toString to get a precise string representation of the value type\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Checks if a value is an array.\n * @param val The value to check.\n * @returns True if the value is an array, false otherwise.\n */\nexport function isArray(val: dynamic): val is Array {\n return Object.prototype.toString.call(val) === '[object Array]';\n}\n\n/**\n * Checks if a value is null.\n * @param val The value to check.\n * @returns True if the value is null, false otherwise.\n */\nexport function isNull(val: dynamic): val is null {\n return Object.prototype.toString.call(val) === '[object Null]';\n}\n\n/**\n * Checks if a value is undefined.\n * @param val The value to check.\n * @returns True if the value is undefined, false otherwise.\n */\nexport function isUndefined(val: dynamic): val is undefined {\n return Object.prototype.toString.call(val) === '[object Undefined]';\n}\n\n/**\n * Checks if a value is defined, i.e., not undefined and not null.\n * @param val The value to check.\n * @returns True if the value is defined, false otherwise.\n */\nexport function isDefined(val: T): val is NonNullable {\n return !isUndefined(val) && !isNull(val);\n}\n\n/**\n * Checks if a value is a number, including NaN.\n * @param val The value to check.\n * @returns True if the value is a number, false otherwise.\n */\nexport function isNumber(val: dynamic): val is number {\n // Note: NaN is also a number\n return Object.prototype.toString.call(val) === '[object Number]';\n}\n\n/**\n * Checks if a value is a string.\n * @param val The value to check.\n * @returns True if the value is a string, false otherwise.\n */\nexport function isString(val: dynamic): val is string {\n return Object.prototype.toString.call(val) === '[object String]';\n}\n\n/**\n * Checks if a value is a boolean.\n * @param val The value to check.\n * @returns True if the value is a boolean, false otherwise.\n */\nexport function isBoolean(val: dynamic): val is boolean {\n return Object.prototype.toString.call(val) === '[object Boolean]';\n}\n\n/**\n * Checks if a value is NaN.\n * @param val The value to check.\n * @returns True if the value is NaN, false otherwise.\n */\nexport function isNaN(val: dynamic): val is number {\n // NaN is the only JavaScript value that is treated as unequal to itself\n return val !== val;\n}\n\n/**\n * Checks if a value is a Date object.\n * @param val The value to check.\n * @returns True if the value is a Date object, false otherwise.\n */\nexport function isDate(val: dynamic): val is Date {\n return Object.prototype.toString.call(val) === '[object Date]';\n}\n\n/**\n * Checks if a value is a function.\n * @param val The value to check.\n * @returns True if the value is a function, false otherwise.\n */\nexport function isFunction(val: dynamic): val is FunctionType {\n return Object.prototype.toString.call(val) === '[object Function]';\n}\n\n/**\n * Checks if a value is a regular expression.\n * @param val The value to check.\n * @returns True if the value is a regular expression, false otherwise.\n */\nexport function isRegex(val: dynamic): val is RegExp {\n return Object.prototype.toString.call(val) === '[object RegExp]';\n}\n\n/**\n * Checks if a value is a Promise.\n * @param val The value to check.\n * @returns True if the value is a Promise, false otherwise.\n */\nexport function isPromise(val: dynamic): val is Promise {\n return Object.prototype.toString.call(val) === '[object Promise]';\n}\n\n/**\n * Determines the type of the given value using various type-checking utility functions.\n * @param val The value to determine the type of.\n * @returns A string representing the type of the value.\n */\nexport function getType(val: dynamic): string {\n // Check if the value is an Object (excluding arrays, functions, etc.)\n return isObject(val)\n ? 'Object'\n : // Check if the value is an Array\n isArray(val)\n ? 'Array'\n : // Check if the value is null\n isNull(val)\n ? 'Null'\n : // Check if the value is undefined\n isUndefined(val)\n ? 'Undefined'\n : // Check if the value is NaN (Not a Number)\n isNaN(val)\n ? 'NaN'\n : // Check if the value is a Number (including NaN)\n isNumber(val)\n ? 'Number'\n : // Check if the value is a String\n isString(val)\n ? 'String'\n : // Check if the value is a Boolean\n isBoolean(val)\n ? 'Boolean'\n : // Check if the value is a Date object\n isDate(val)\n ? 'Date'\n : // Check if the value is a Regular Expression\n isRegex(val)\n ? 'Regex'\n : // Check if the value is a Function\n isFunction(val)\n ? 'Function'\n : // Check if the value is a Promise\n isPromise(val)\n ? 'Promise'\n : // If none of the above, return 'Unknown Type'\n 'Unknown Type';\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isPromise } from '../utils/DataTypeUtil';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { StatusEnum } from '../enums/StatusEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { Constants } from '../constants';\nimport {\n assignRangeValues,\n getBucketingSeed,\n getGroupDetailsIfCampaignPartOfIt,\n scaleVariationWeights,\n} from './CampaignUtil';\nimport { cloneObject } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { evaluateGroups } from './MegUtil';\nimport { getUUID } from './UuidUtil';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\n\nexport const checkWhitelistingAndPreSeg = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise<[boolean, any]> => {\n const vwoUserId = getUUID(context.getId(), settings.getAccountId());\n const campaignId = campaign.getId();\n\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // set _vwoUserId for variation targeting variables\n context.setVariationTargetingVariables(\n Object.assign({}, context.getVariationTargetingVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { variationTargetingVariables: context.getVariationTargetingVariables() }); // for integration\n\n // check if the campaign satisfies the whitelisting\n if (campaign.getIsForcedVariationEnabled()) {\n const whitelistedVariation = await _checkCampaignWhitelisting(campaign, context);\n if (whitelistedVariation && Object.keys(whitelistedVariation).length > 0) {\n return [true, whitelistedVariation];\n }\n } else {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey: campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n }\n }\n // userlist segment is also available for campaign pre segmentation\n context.setCustomVariables(\n Object.assign({}, context.getCustomVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { customVariables: context.getCustomVariables() }); // for integeration\n\n // Check if RUle being evaluated is part of Mutually Exclusive Group\n const { groupId } = getGroupDetailsIfCampaignPartOfIt(\n settings,\n campaign.getId(),\n campaign.getType() === CampaignTypeEnum.PERSONALIZE ? campaign.getVariations()[0].getId() : null,\n );\n // Check if group is already evaluated and we have eligible winner campaigns\n const groupWinnerCampaignId = megGroupWinnerCampaigns?.get(groupId);\n if (groupWinnerCampaignId) {\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId) {\n return [true, null];\n }\n } else if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId + '_' + campaign.getVariations()[0].getId()) {\n return [true, null];\n }\n }\n // as group is already evaluated, no need to check again, return false directly\n return [false, null];\n } else {\n // check in storage if the group is already evaluated for the user\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n storageService,\n );\n if (storedData && storedData.experimentKey && storedData.experimentId) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n if (storedData.experimentId === campaignId) {\n // return the campaign if the called campaignId matches\n if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (storedData.experimentVariationId === campaign.getVariations()[0].getId()) {\n // if personalise then check if the reqeusted variation is the winner\n return [true, null];\n } else {\n // if requested variation is not the winner then set the winner campaign in the map and return\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n return [false, null];\n }\n } else {\n return [true, null];\n }\n }\n if (storedData.experimentVariationId != -1) {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n } else {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId);\n }\n return [false, null];\n }\n }\n\n // If Whitelisting is skipped/failed and campaign not part of any MEG Groups\n // Check campaign's pre-segmentation\n const isPreSegmentationPassed = await new CampaignDecisionService().getPreSegmentationDecision(campaign, context);\n\n if (isPreSegmentationPassed && groupId) {\n const winnerCampaign = await evaluateGroups(\n settings,\n feature,\n groupId,\n evaluatedFeatureMap,\n context,\n storageService,\n );\n\n if (winnerCampaign && winnerCampaign.id === campaignId) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n return [true, null];\n } else {\n // if personalise then check if the reqeusted variation is the winner\n if (winnerCampaign.variations[0].id === campaign.getVariations()[0].getId()) {\n return [true, null];\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n return [false, null];\n }\n }\n } else if (winnerCampaign) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id);\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n }\n return [false, null];\n }\n megGroupWinnerCampaigns.set(groupId, -1);\n return [false, null];\n }\n\n return [isPreSegmentationPassed, null];\n};\n\nexport const evaluateTrafficAndGetVariation = (\n settings: SettingsModel,\n campaign: CampaignModel,\n userId: string | number,\n): VariationModel => {\n const variation = new CampaignDecisionService().getVariationAlloted(userId, settings.getAccountId(), campaign);\n if (!variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: 'did not get any variation',\n }),\n );\n\n return null;\n }\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: `got variation:${variation.getKey()}`,\n }),\n );\n\n return variation;\n};\n\n/******************\n * PRIVATE METHODS\n ******************/\n\n/**\n * Check for whitelisting\n * @param campaign Campaign object\n * @param userId User ID\n * @param variationTargetingVariables Variation targeting variables\n * @returns\n */\nconst _checkCampaignWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n // check if the campaign satisfies the whitelisting\n const whitelistingResult = await _evaluateWhitelisting(campaign, context);\n const status = whitelistingResult ? StatusEnum.PASSED : StatusEnum.FAILED;\n const variationString = whitelistingResult ? whitelistingResult.variation.key : '';\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status,\n variationString,\n }),\n );\n\n return whitelistingResult;\n};\n\nconst _evaluateWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n const targetedVariations = [];\n const promises: Promise[] = [];\n\n let whitelistedVariation;\n\n campaign.getVariations().forEach((variation) => {\n if (isObject(variation.getSegments()) && !Object.keys(variation.getSegments()).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n variation: variation.getKey() ? `for variation: ${variation.getKey()}` : '',\n }),\n );\n\n return;\n }\n // check for segmentation and evaluate\n if (isObject(variation.getSegments())) {\n let SegmentEvaluatorResult = SegmentationManager.Instance.validateSegmentation(\n variation.getSegments(),\n context.getVariationTargetingVariables(),\n );\n SegmentEvaluatorResult = isPromise(SegmentEvaluatorResult)\n ? SegmentEvaluatorResult\n : Promise.resolve(SegmentEvaluatorResult);\n SegmentEvaluatorResult.then((evaluationResult) => {\n if (evaluationResult) {\n targetedVariations.push(cloneObject(variation));\n }\n });\n\n promises.push(SegmentEvaluatorResult);\n }\n });\n\n // Wait for all promises to resolve\n await Promise.all(promises);\n\n if (targetedVariations.length > 1) {\n scaleVariationWeights(targetedVariations);\n for (let i = 0, currentAllocation = 0, stepFactor = 0; i < targetedVariations.length; i++) {\n stepFactor = assignRangeValues(targetedVariations[i], currentAllocation);\n currentAllocation += stepFactor;\n }\n whitelistedVariation = new CampaignDecisionService().getVariation(\n targetedVariations,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), campaign, null)),\n );\n } else {\n whitelistedVariation = targetedVariations[0];\n }\n\n if (whitelistedVariation) {\n return {\n variation: whitelistedVariation,\n variationName: whitelistedVariation.name,\n variationId: whitelistedVariation.id,\n };\n }\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { dynamic } from '../types/Common';\nimport { isString } from './DataTypeUtil';\n\n/**\n * Clones an object deeply.\n * @param {dynamic} obj - The object to clone.\n * @returns {any} The cloned object.\n */\nexport function cloneObject(obj: dynamic): any {\n if (!obj) {\n // Return the original object if it is null or undefined\n return obj;\n }\n // Use JSON stringify and parse method to perform a deep clone\n const clonedObj = JSON.parse(JSON.stringify(obj));\n return clonedObj;\n}\n\n/**\n * Gets the current Unix timestamp in seconds.\n * @returns {number} The current Unix timestamp.\n */\nexport function getCurrentUnixTimestamp(): number {\n // Convert the current date to Unix timestamp in seconds\n return Math.ceil(+new Date() / 1000);\n}\n\n/**\n * Gets the current Unix timestamp in milliseconds.\n * @returns {number} The current Unix timestamp in milliseconds.\n */\nexport function getCurrentUnixTimestampInMillis(): number {\n // Convert the current date to Unix timestamp in milliseconds\n return +new Date();\n}\n\n/**\n * Generates a random number between 0 and 1.\n * @returns {number} A random number.\n */\nexport function getRandomNumber(): number {\n // Use Math.random to generate a random number\n return Math.random();\n}\n\n/**\n * Retrieves specific rules based on the type from a feature.\n * @param {FeatureModel} feature - The key of the feature.\n * @param {CampaignTypeEnum | null} type - The type of the rules to retrieve.\n * @returns {Array} An array of rules that match the type.\n */\nexport function getSpecificRulesBasedOnType(feature: FeatureModel, type: CampaignTypeEnum = null) {\n // Return an empty array if no linked campaigns are found\n if (feature && !feature?.getRulesLinkedCampaign()) {\n return [];\n }\n // Filter the rules by type if a type is specified and is a string\n if (feature && feature.getRulesLinkedCampaign() && type && isString(type)) {\n return feature.getRulesLinkedCampaign().filter((rule) => {\n const ruleModel = new CampaignModel().modelFromDictionary(rule);\n return ruleModel.getType() === type;\n });\n }\n // Return all linked campaigns if no type is specified\n return feature.getRulesLinkedCampaign();\n}\n\n/**\n * Retrieves all AB and Personalize rules from a feature.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of AB and Personalize rules.\n */\nexport function getAllExperimentRules(feature: FeatureModel) {\n // Retrieve the feature by its key\n // Filter the rules to include only AB and Personalize types\n return (\n feature\n ?.getRulesLinkedCampaign()\n .filter((rule) => rule.getType() === CampaignTypeEnum.AB || rule.getType() === CampaignTypeEnum.PERSONALIZE) || []\n );\n}\n\n/**\n * Retrieves a feature by its key from the settings.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature to find.\n * @returns {any} The feature if found, otherwise undefined.\n */\nexport function getFeatureFromKey(settings: SettingsModel, featureKey: string) {\n // Find the feature by its key\n return settings?.getFeatures()?.find((feature) => feature.getKey() === featureKey);\n}\n\n/**\n * Checks if an event exists within any feature's metrics.\n * @param {string} eventName - The name of the event to check.\n * @param {any} settings - The settings containing features.\n * @returns {boolean} True if the event exists, otherwise false.\n */\nexport function doesEventBelongToAnyFeature(eventName: string, settings: SettingsModel): boolean {\n // Use the `some` method to check if any feature contains the event in its metrics\n return settings\n .getFeatures()\n .some((feature) => feature.getMetrics().some((metric) => metric.getIdentifier() === eventName));\n}\n\n/**\n * Adds linked campaigns to each feature in the settings based on rules.\n * @param {any} settings - The settings file to modify.\n */\nexport function addLinkedCampaignsToSettings(settings: SettingsModel): void {\n // Create maps for quick access to campaigns and variations\n const campaignMap = new Map(\n settings.getCampaigns().map((campaign) => [campaign.getId(), campaign]),\n );\n\n // Loop over all features\n for (const feature of settings.getFeatures()) {\n const rulesLinkedCampaign = feature\n .getRules()\n .map((rule) => {\n const campaign: CampaignModel = campaignMap.get(rule.getCampaignId());\n if (!campaign) return null;\n\n // Create a linked campaign object with the rule and campaign\n const linkedCampaign: any = { key: campaign.getKey(), ...campaign, ruleKey: rule.getRuleKey() };\n // If a variationId is specified, find and add the variation\n if (rule.getVariationId()) {\n const variation = campaign.getVariations().find((v) => v.getId() === rule.getVariationId());\n if (variation) {\n linkedCampaign.variations = [variation];\n }\n }\n\n return linkedCampaign;\n })\n .filter((campaign) => campaign !== null); // Filter out any null entries\n\n const rulesLinkedCampaignModel = rulesLinkedCampaign.map((campaign) => {\n const campaignModel = new CampaignModel();\n campaignModel.modelFromDictionary(campaign);\n return campaignModel;\n });\n // Assign the linked campaigns to the feature\n feature.setRulesLinkedCampaign(rulesLinkedCampaignModel);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { Deferred } from './PromiseUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Asynchronously retrieves data from a web service using the specified query parameters and endpoint.\n * @param queryParams - The parameters to be used in the query string of the request.\n * @param endpoint - The endpoint URL to which the request is sent.\n * @returns A promise that resolves to the response data or false if an error occurs.\n */\nexport async function getFromGatewayService(queryParams: any, endpoint: any): Promise {\n // Create a new deferred object to manage promise resolution\n const deferredObject = new Deferred();\n // Singleton instance of the network manager\n const networkInstance = NetworkManager.Instance;\n\n // Check if the base URL is not set correctly\n if (!SettingsService.Instance.isGatewayServiceProvided) {\n // Log an informational message about the invalid URL\n LogManager.Instance.error(ErrorLogMessagesEnum.GATEWAY_URL_ERROR);\n // Resolve the promise with false indicating an error or invalid state\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n\n try {\n // Create a new request model instance with the provided parameters\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n queryParams,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n // Perform the network GET request\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n // Resolve the deferred object with the data from the response\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n // Reject the deferred object with the error response\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n // Resolve the promise with false as fallback\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n}\n\n/**\n * Encodes the query parameters to ensure they are URL-safe.\n * @param queryParams The query parameters to be encoded.\n * @returns An object containing the encoded query parameters.\n */\nexport function getQueryParams(queryParams: Record): Record {\n const encodedParams: Record = {};\n\n for (const [key, value] of Object.entries(queryParams)) {\n // Encode the parameter value to ensure it is URL-safe\n const encodedValue = encodeURIComponent(String(value));\n // Add the encoded parameter to the result object\n encodedParams[key] = encodedValue;\n }\n\n return encodedParams;\n}\n\n/**\n * Adds isGatewayServiceRequired flag to each feature in the settings based on pre segmentation.\n * @param {any} settings - The settings file to modify.\n */\nexport function addIsGatewayServiceRequiredFlag(settings: SettingsModel): void {\n // \\b(? 0) {\n feature.setIsGatewayServiceRequired(true);\n break;\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { getEventsBaseProperties, getTrackUserPayloadData, sendPostApiRequest } from './NetworkUtil';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\n\n/**\n * Creates and sends an impression for a variation shown event.\n * This function constructs the necessary properties and payload for the event\n * and uses the NetworkUtil to send a POST API request.\n *\n * @param {SettingsModel} settings - The settings model containing configuration.\n * @param {number} campaignId - The ID of the campaign.\n * @param {number} variationId - The ID of the variation shown to the user.\n * @param {ContextModel} context - The user context model containing user-specific data.\n */\nexport const createAndSendImpressionForVariationShown = async (\n settings: SettingsModel,\n campaignId: number,\n variationId: number,\n context: ContextModel,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_VARIATION_SHOWN,\n encodeURIComponent(context.getUserAgent()), // Encode user agent to ensure URL safety\n context.getIpAddress(),\n );\n\n // Construct payload data for tracking the user\n const payload = getTrackUserPayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_VARIATION_SHOWN,\n campaignId,\n variationId,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed properties and payload as a POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from '../utils/DataTypeUtil';\n\nconst nargs = /\\{([0-9a-zA-Z_]+)\\}/g;\n\n/**\n * Constructs a message by replacing placeholders in a template with corresponding values from a data object.\n *\n * @param {string} template - The message template containing placeholders in the format `{key}`.\n * @param {Record} data - An object containing keys and values used to replace the placeholders in the template.\n * @returns {string} The constructed message with all placeholders replaced by their corresponding values from the data object.\n */\nexport function buildMessage(template: string, data: Record = {}): string {\n try {\n return template.replace(nargs, (match, key, index) => {\n // Check for escaped placeholders\n if (template[index - 1] === '{' && template[index + match.length] === '}') {\n return key;\n }\n\n // Retrieve the value from the data object\n const value = data[key];\n\n // If the key does not exist or the value is null/undefined, return an empty string\n if (value === undefined || value === null) {\n return '';\n }\n\n // If the value is a function, evaluate it\n return isFunction(value) ? value() : value;\n });\n } catch (err) {\n return template; // Return the original template in case of an error\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport {\n getBucketingSeed,\n getCampaignIdsFromFeatureKey,\n getCampaignsByGroupId,\n getFeatureKeysFromCampaignIds,\n getVariationFromCampaignKey,\n setCampaignAllocation,\n} from './CampaignUtil';\nimport { isObject, isUndefined } from './DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from './DecisionUtil';\nimport { cloneObject, getFeatureFromKey, getSpecificRulesBasedOnType } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\n\n/**\n * Evaluates groups for a given feature and group ID.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param groupId - The ID of the group.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to the evaluation result.\n */\nexport const evaluateGroups = async (\n settings: SettingsModel,\n feature: FeatureModel,\n groupId: number,\n evaluatedFeatureMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const featureToSkip = [];\n const campaignMap: Map = new Map();\n // get all feature keys and all campaignIds from the groupId\n const { featureKeys, groupCampaignIds } = getFeatureKeysFromGroup(settings, groupId);\n for (const featureKey of featureKeys) {\n const feature = getFeatureFromKey(settings, featureKey);\n // check if the feature is already evaluated\n if (featureToSkip.includes(featureKey)) {\n continue;\n }\n // evaluate the feature rollout rules\n const isRolloutRulePassed = await _isRolloutRuleForFeaturePassed(\n settings,\n feature,\n evaluatedFeatureMap,\n featureToSkip,\n storageService,\n context,\n );\n if (isRolloutRulePassed) {\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRulesLinkedCampaign().forEach((rule) => {\n if (\n groupCampaignIds.includes(rule.getId().toString()) ||\n groupCampaignIds.includes(`${rule.getId()}_${rule.getVariations()[0].getId()}`.toString())\n ) {\n if (!campaignMap.has(featureKey)) {\n campaignMap.set(featureKey, []);\n }\n // check if the campaign is already present in the campaignMap for the feature\n if (campaignMap.get(featureKey).findIndex((item) => item.ruleKey === rule.getRuleKey()) === -1) {\n campaignMap.get(featureKey).push(rule);\n }\n }\n });\n }\n });\n }\n }\n const { eligibleCampaigns, eligibleCampaignsWithStorage } = await _getEligbleCampaigns(\n settings,\n campaignMap,\n context,\n storageService,\n );\n\n return await _findWinnerCampaignAmongEligibleCampaigns(\n settings,\n feature.getKey(),\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n groupId,\n context,\n storageService,\n );\n};\n\n/**\n * Retrieves feature keys associated with a group based on the group ID.\n *\n * @param settings - The settings model.\n * @param groupId - The ID of the group.\n * @returns An object containing feature keys and group campaign IDs.\n */\nexport function getFeatureKeysFromGroup(settings: SettingsModel, groupId: number) {\n const groupCampaignIds = getCampaignsByGroupId(settings, groupId);\n const featureKeys = getFeatureKeysFromCampaignIds(settings, groupCampaignIds);\n\n return { featureKeys, groupCampaignIds };\n}\n\n/*******************************\n * PRIVATE methods - MegUtil\n ******************************/\n\n/**\n * Evaluates the feature rollout rules for a given feature.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param featureToSkip - An array of features to skip during evaluation.\n * @param storageService - The storage service.\n * @param context - The context model.\n * @returns A promise that resolves to true if the feature passes the rollout rules, false otherwise.\n */\nconst _isRolloutRuleForFeaturePassed = async (\n settings: SettingsModel,\n feature: FeatureModel,\n evaluatedFeatureMap: Map,\n featureToSkip: any[],\n storageService: IStorageService,\n context: ContextModel,\n): Promise => {\n if (evaluatedFeatureMap.has(feature.getKey()) && 'rolloutId' in evaluatedFeatureMap.get(feature.getKey())) {\n return true;\n }\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT);\n if (rollOutRules.length > 0) {\n let ruleToTestForTraffic = null;\n for (const rule of rollOutRules) {\n const { preSegmentationResult } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n {},\n );\n if (preSegmentationResult) {\n ruleToTestForTraffic = rule;\n break;\n }\n continue;\n }\n if (ruleToTestForTraffic !== null) {\n const campaign = new CampaignModel().modelFromDictionary(ruleToTestForTraffic);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n if (isObject(variation) && Object.keys(variation).length > 0) {\n evaluatedFeatureMap.set(feature.getKey(), {\n rolloutId: ruleToTestForTraffic.id,\n rolloutKey: ruleToTestForTraffic.key,\n rolloutVariationId: ruleToTestForTraffic.variations[0].id,\n });\n return true;\n }\n }\n // no rollout rule passed\n featureToSkip.push(feature.getKey());\n return false;\n }\n // no rollout rule, evaluate experiments\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS, {\n featureKey: feature.getKey(),\n }),\n );\n return true;\n};\n\n/**\n * Retrieves eligible campaigns based on the provided campaign map and context.\n *\n * @param settings - The settings model.\n * @param campaignMap - A map containing feature keys and corresponding campaigns.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to an object containing eligible campaigns, campaigns with storage, and ineligible campaigns.\n */\nconst _getEligbleCampaigns = async (\n settings: SettingsModel,\n campaignMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const eligibleCampaigns = [];\n const eligibleCampaignsWithStorage = [];\n const inEligibleCampaigns = [];\n const campaignMapArray = Array.from<[string, CampaignModel[]]>(campaignMap);\n\n // Iterate over the campaign map to determine eligible campaigns\n for (const [featureKey, campaigns] of campaignMapArray) {\n for (const campaign of campaigns) {\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if campaign is stored in storage\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey && storedData.experimentKey === campaign.getKey()) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n\n if (eligibleCampaignsWithStorage.findIndex((item) => item.key === campaign.getKey()) === -1) {\n eligibleCampaignsWithStorage.push(campaign);\n }\n continue;\n }\n }\n }\n\n // Check if user is eligible for the campaign\n if (\n (await new CampaignDecisionService().getPreSegmentationDecision(\n new CampaignModel().modelFromDictionary(campaign),\n context,\n )) &&\n new CampaignDecisionService().isUserPartOfCampaign(context.getId(), campaign)\n ) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_ELIGIBLE, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n\n eligibleCampaigns.push(campaign);\n continue;\n }\n\n inEligibleCampaigns.push(campaign);\n }\n }\n\n return Promise.resolve({\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n inEligibleCampaigns,\n });\n};\n\n/**\n * Evaluates the eligible campaigns and determines the winner campaign based on the provided settings, feature key, eligible campaigns, eligible campaigns with storage, group ID, and context.\n *\n * @param settings - The settings model.\n * @param featureKey - The key of the feature.\n * @param eligibleCampaigns - An array of eligible campaigns.\n * @param eligibleCampaignsWithStorage - An array of eligible campaigns with storage.\n * @param groupId - The ID of the group.\n * @param context - The context model.\n * @returns A promise that resolves to the winner campaign.\n */\nconst _findWinnerCampaignAmongEligibleCampaigns = async (\n settings: SettingsModel,\n featureKey: string,\n eligibleCampaigns: any[],\n eligibleCampaignsWithStorage: any[],\n groupId: number,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n // getCampaignIds from featureKey\n let winnerCampaign = null;\n const campaignIds = getCampaignIdsFromFeatureKey(settings, featureKey);\n // get the winner from each group and store it in winnerFromEachGroup\n const megAlgoNumber = !isUndefined(settings?.getGroups()[groupId]?.et)\n ? settings.getGroups()[groupId].et\n : Constants.RANDOM_ALGO;\n\n // if eligibleCampaignsWithStorage has only one campaign, then that campaign is the winner\n if (eligibleCampaignsWithStorage.length === 1) {\n winnerCampaign = eligibleCampaignsWithStorage[0];\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaignsWithStorage[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaignsWithStorage[0].getKey()\n : eligibleCampaignsWithStorage[0].getName() + '_' + eligibleCampaignsWithStorage[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaignsWithStorage.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is random, then find the winner using random algo\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaignsWithStorage.length > 1) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is not random, then find the winner using advanced algo\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n\n if (eligibleCampaignsWithStorage.length === 0) {\n if (eligibleCampaigns.length === 1) {\n winnerCampaign = eligibleCampaigns[0];\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaigns[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaigns[0].getKey()\n : eligibleCampaigns[0].getName() + '_' + eligibleCampaigns[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaigns.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaigns.length > 1) {\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n }\n return winnerCampaign;\n};\n\n/**\n * Normalizes the weights of shortlisted campaigns and determines the winning campaign using random allocation.\n *\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _normalizeWeightsAndFindWinningCampaign = (\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n): any => {\n // Normalize the weights of all the shortlisted campaigns\n shortlistedCampaigns.forEach((campaign) => {\n campaign.weight = Math.round((100 / shortlistedCampaigns.length) * 10000) / 10000;\n });\n\n // make shortlistedCampaigns as array of VariationModel\n shortlistedCampaigns = shortlistedCampaigns.map((campaign) => new VariationModel().modelFromDictionary(campaign));\n // re-distribute the traffic for each camapign\n setCampaignAllocation(shortlistedCampaigns);\n const winnerCampaign = new CampaignDecisionService().getVariation(\n shortlistedCampaigns,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.getType() === CampaignTypeEnum.AB\n ? winnerCampaign.getKey()\n : winnerCampaign.getKey() + '_' + winnerCampaign.getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: 'using random algorithm',\n }),\n );\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.getId(),\n experimentKey: winnerCampaign.getKey(),\n experimentVariationId:\n winnerCampaign.getType() === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.getVariations()[0].getId() : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.getId())) {\n return winnerCampaign;\n }\n }\n return null;\n};\n\n/**\n * Advanced algorithm to find the winning campaign based on priority order and weighted random distribution.\n *\n * @param settings - The settings model.\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _getCampaignUsingAdvancedAlgo = (\n settings: SettingsModel,\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n) => {\n let winnerCampaign = null;\n let found = false; // flag to check whether winnerCampaign has been found or not and helps to break from the outer loop\n const priorityOrder = !isUndefined(settings.getGroups()[groupId].p) ? settings.getGroups()[groupId].p : {};\n const wt = !isUndefined(settings.getGroups()[groupId].wt) ? settings.getGroups()[groupId].wt : {};\n\n for (let i = 0; i < priorityOrder.length; i++) {\n for (let j = 0; j < shortlistedCampaigns.length; j++) {\n if (shortlistedCampaigns[j].id == priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n } else if (shortlistedCampaigns[j].id + '_' + shortlistedCampaigns[j].variations[0].id === priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n }\n }\n if (found === true) break;\n }\n\n // If winnerCampaign not found through Priority, then go for weighted Random distribution and for that,\n // Store the list of campaigns (participatingCampaigns) out of shortlistedCampaigns and their corresponding weights present in weightage distribution array (wt)\n if (winnerCampaign === null) {\n let participatingCampaignList = [];\n // iterate over shortlisted campaigns and add weights from the weight array\n for (let i = 0; i < shortlistedCampaigns.length; i++) {\n const campaignId = shortlistedCampaigns[i].id;\n if (!isUndefined(wt[campaignId])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId];\n participatingCampaignList.push(clonedCampaign);\n } else if (!isUndefined(wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id];\n participatingCampaignList.push(clonedCampaign);\n }\n }\n /* Finding winner campaign using weighted Distibution :\n 1. Re-distribute the traffic by assigning range values for each camapign in particaptingCampaignList\n 2. Calculate bucket value for the given userId and groupId\n 3. Get the winnerCampaign by checking the Start and End Bucket Allocations of each campaign\n */\n\n // make participatingCampaignList as array of VariationModel\n participatingCampaignList = participatingCampaignList.map((campaign) =>\n new VariationModel().modelFromDictionary(campaign),\n );\n setCampaignAllocation(participatingCampaignList);\n winnerCampaign = new CampaignDecisionService().getVariation(\n participatingCampaignList,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n }\n // WinnerCampaign should not be null, in case when winnerCampaign hasn't been found through PriorityOrder and\n // also shortlistedCampaigns and wt array does not have a single campaign id in common\n if (winnerCampaign) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.type === CampaignTypeEnum.AB\n ? winnerCampaign.key\n : winnerCampaign.key + '_' + winnerCampaign.ruleKey,\n groupId,\n userId: context.getId(),\n algo: 'using advanced algorithm',\n }),\n );\n } else {\n // TODO -- Log the error message\n // LogManager.Instance.info(\n // buildMessage(InfoLogMessagesEnum.MEG_NO_WINNER_CAMPAIGN, {\n // groupId,\n // userId: context.getId(),\n // }),\n // );\n LogManager.Instance.info(`No winner campaign found for MEG group: ${groupId}`);\n }\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.id,\n experimentKey: winnerCampaign.key,\n experimentVariationId:\n winnerCampaign.type === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.variations[0].id : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.id)) {\n return winnerCampaign;\n }\n }\n return null;\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getCurrentUnixTimestamp, getCurrentUnixTimestampInMillis, getRandomNumber } from './FunctionUtil';\nimport { getUUID } from './UuidUtil';\n\nimport { Constants } from '../constants';\nimport { HeadersEnum } from '../enums/HeadersEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { UrlEnum } from '../enums/UrlEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { dynamic } from '../types/Common';\nimport { isObject } from './DataTypeUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Constructs base properties for bulk operations.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The base properties including session ID and UUID.\n */\nexport function getBasePropertiesForBulk(accountId: string, userId: string): Record {\n const path: Record = {\n sId: getCurrentUnixTimestamp(), // Session ID based on current Unix timestamp\n u: getUUID(userId, accountId), // UUID generated based on user and account ID\n };\n return path;\n}\n\n/**\n * Constructs the settings path with API key and account ID.\n * @param {string} sdkKey - The API key.\n * @param {any} accountId - The account identifier.\n * @returns {Record} - The settings path including API key, random number, and account ID.\n */\nexport function getSettingsPath(sdkKey: string, accountId: string | number): Record {\n const path: Record = {\n i: `${sdkKey}`, // Inject API key\n r: Math.random(), // Random number for cache busting\n a: accountId, // Account ID\n };\n return path;\n}\n\n/**\n * Constructs the tracking path for an event.\n * @param {string} event - The event type.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The tracking path for the event.\n */\nexport function getTrackEventPath(event: string, accountId: string, userId: string): Record {\n const path: Record = {\n event_type: event, // Type of the event\n account_id: accountId, // Account ID\n uId: userId, // User ID\n u: getUUID(userId, accountId), // UUID generated for the user\n sdk: Constants.SDK_NAME, // SDK name constant\n 'sdk-v': Constants.SDK_VERSION, // SDK version\n random: getRandomNumber(), // Random number for uniqueness\n ap: Constants.PLATFORM, // Application platform\n sId: getCurrentUnixTimestamp(), // Session ID\n ed: JSON.stringify({ p: 'server' }), // Additional encoded data\n };\n\n return path;\n}\n\n/**\n * Constructs query parameters for event batching.\n * @param {string} accountId - The account identifier.\n * @returns {Record} - The query parameters for event batching.\n */\nexport function getEventBatchingQueryParams(accountId: string): Record {\n const path: Record = {\n a: accountId, // Account ID\n sd: Constants.SDK_NAME, // SDK name\n sv: Constants.SDK_VERSION, // SDK version\n };\n\n return path;\n}\n\n/**\n * Builds generic properties for different tracking calls required by VWO servers.\n * @param {Object} configObj\n * @param {String} eventName\n * @returns properties\n */\nexport function getEventsBaseProperties(\n setting: SettingsModel,\n eventName: string,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const sdkKey = setting.getSdkkey();\n\n const properties = Object.assign({\n en: eventName,\n a: setting.getAccountId(),\n env: sdkKey,\n eTime: getCurrentUnixTimestampInMillis(),\n random: getRandomNumber(),\n p: 'FS',\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n });\n\n properties.url = Constants.HTTPS_PROTOCOL + UrlUtil.getBaseUrl() + UrlEnum.EVENTS;\n return properties;\n}\n\n/**\n * Builds generic payload required by all the different tracking calls.\n * @param {Object} settings settings file\n * @param {String} userId user id\n * @param {String} eventName event name\n * @returns properties\n */\nexport function _getEventBasePayload(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n visitorUserAgent = '',\n ipAddress = '',\n): Record {\n const uuid = getUUID(userId.toString(), settings.getAccountId());\n const sdkKey = settings.getSdkkey();\n\n const props: {\n vwo_sdkName: string;\n vwo_sdkVersion: string;\n vwo_envKey: string;\n id?: string | number;\n variation?: string | number;\n isFirst?: number;\n isCustomEvent?: boolean;\n } = {\n vwo_sdkName: Constants.SDK_NAME,\n vwo_sdkVersion: Constants.SDK_VERSION,\n vwo_envKey: sdkKey,\n };\n\n const properties = {\n d: {\n msgId: `${uuid}-${getCurrentUnixTimestampInMillis()}`,\n visId: uuid,\n sessionId: getCurrentUnixTimestamp(),\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n event: {\n props: props,\n name: eventName,\n time: getCurrentUnixTimestampInMillis(),\n },\n visitor: {\n props: {\n vwo_fs_environment: sdkKey,\n },\n },\n },\n };\n\n return properties;\n}\n\n/**\n * Builds payload to track the visitor.\n * @param {Object} configObj\n * @param {String} userId\n * @param {String} eventName\n * @param {String} campaignId\n * @param {Number} variationId\n * @returns track-user payload\n */\nexport function getTrackUserPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n campaignId: number,\n variationId: number,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.id = campaignId;\n properties.d.event.props.variation = variationId;\n properties.d.event.props.isFirst = 1;\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n accountId: settings.getAccountId(),\n userId,\n campaignId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for tracking goals with custom event properties.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} eventProperties - Custom properties for the event.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getTrackGoalPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n eventProperties: Record,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props.variation = 1; // Temporary value for variation\n properties.d.event.props.id = 1; // Temporary value for ID\n\n // Add custom event properties if provided\n if (eventProperties && isObject(eventProperties) && Object.keys(eventProperties).length > 0) {\n for (const prop in eventProperties) {\n properties.d.event.props[prop] = eventProperties[prop];\n }\n }\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for syncing visitor attributes.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} attributeKey - Key of the attribute to sync.\n * @param {any} attributeValue - Value of the attribute.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getAttributePayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n attributeKey: string,\n attributeValue: dynamic,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props[Constants.VWO_FS_ENVIRONMENT] = settings.getSdkkey(); // Set environment key\n properties.d.visitor.props[attributeKey] = attributeValue; // Set attribute value\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Sends a POST API request with the specified properties and payload.\n * @param {any} properties - Properties for the request.\n * @param {any} payload - Payload for the request.\n */\nexport async function sendPostApiRequest(properties: any, payload: any): Promise {\n NetworkManager.Instance.attachClient();\n\n const headers: Record = {};\n\n const userAgent = payload.d.visitor_ua; // Extract user agent from payload\n const ipAddress = payload.d.visitor_ip; // Extract IP address from payload\n\n // Set headers if available\n if (userAgent) headers[HeadersEnum.USER_AGENT] = userAgent;\n if (ipAddress) headers[HeadersEnum.IP] = ipAddress;\n\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.POST,\n UrlEnum.EVENTS,\n properties,\n payload,\n headers,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n await NetworkManager.Instance.post(request).catch((err: ResponseModel) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n });\n}\n\n/**\n * Sends a GET API request to the specified endpoint with the given properties.\n * @param {any} properties - Properties for the request.\n * @param {any} endpoint - Endpoint for the GET request.\n * @returns {Promise} - The response from the GET request.\n */\nexport async function sendGetApiRequest(properties: any, endpoint: any): Promise {\n NetworkManager.Instance.attachClient();\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n properties,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n try {\n const response: ResponseModel = await NetworkManager.Instance.get(request);\n return response; // Return the response model\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.GET,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n return null;\n }\n}\n\n// Flag to determine if the SDK should wait for a network response.\nlet shouldWaitForTrackingCalls = false;\n\n/**\n * Checks if the SDK should wait for a network response.\n * @returns {boolean} - True if the SDK should wait for a network response, false otherwise.\n */\nexport function getShouldWaitForTrackingCalls(): boolean {\n return shouldWaitForTrackingCalls;\n}\n\n/**\n * Sets the value to determine if the SDK should wait for a network response.\n * @param value - The value to set.\n */\nexport function setShouldWaitForTrackingCalls(value: boolean): void {\n shouldWaitForTrackingCalls = value;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\n/**\n * Creates a Deferred object with properties for promise, resolve, and reject.\n * This allows manual control over the resolution and rejection of a promise.\n * @returns {Deferred} The Deferred object with promise, resolve, and reject methods.\n */\nexport function Deferred(): void {\n // Create a new Promise and attach resolve and reject methods to the Deferred object\n this.promise = new Promise((resolve: dynamic, reject: dynamic) => {\n this.resolve = resolve; // Method to resolve the promise\n this.reject = reject; // Method to reject the promise\n });\n\n return this; // Return the Deferred object with attached methods\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from './DataTypeUtil';\nimport { checkWhitelistingAndPreSeg } from './DecisionUtil';\nimport { getShouldWaitForTrackingCalls } from './NetworkUtil';\nimport { createAndSendImpressionForVariationShown } from './ImpressionUtil';\n\n/**\n * Evaluates the rules for a given campaign and feature based on the provided context.\n * This function checks for whitelisting and pre-segmentation conditions, and if applicable,\n * sends an impression for the variation shown.\n *\n * @param {SettingsModel} settings - The settings configuration for the evaluation.\n * @param {FeatureModel} feature - The feature being evaluated.\n * @param {CampaignModel} campaign - The campaign associated with the feature.\n * @param {ContextModel} context - The user context for evaluation.\n * @param {Map} evaluatedFeatureMap - A map of evaluated features.\n * @param {Map} megGroupWinnerCampaigns - A map of MEG group winner campaigns.\n * @param {StorageService} storageService - The storage service for persistence.\n * @param {any} decision - The decision object that will be updated based on the evaluation.\n * @returns {Promise<[boolean, any]>} A promise that resolves to a tuple containing the result of the pre-segmentation\n * and the whitelisted object, if any.\n */\nexport const evaluateRule = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise> => {\n // Perform whitelisting and pre-segmentation checks\n const [preSegmentationResult, whitelistedObject] = await checkWhitelistingAndPreSeg(\n settings,\n feature,\n campaign,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n // If pre-segmentation is successful and a whitelisted object exists, proceed to send an impression\n if (preSegmentationResult && isObject(whitelistedObject) && Object.keys(whitelistedObject).length > 0) {\n // Update the decision object with campaign and variation details\n Object.assign(decision, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n\n // Send an impression for the variation shown\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n campaign.getId(),\n whitelistedObject.variation.id,\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), whitelistedObject.variation.id, context);\n }\n }\n\n // Return the results of the evaluation\n return { preSegmentationResult, whitelistedObject, updatedDecision: decision };\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOClient } from './../VWOClient';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { setVariationAllocation } from './CampaignUtil';\nimport { addLinkedCampaignsToSettings } from './FunctionUtil';\nimport { addIsGatewayServiceRequiredFlag } from './GatewayServiceUtil';\n\n/**\n * Sets settings and adds campaigns to rules\n * @param settings settings\n * @param vwoClientInstance VWOClient instance\n */\nexport function setSettingsAndAddCampaignsToRules(settings: any, vwoClientInstance: IVWOClient) {\n // create settings model and set it to vwoClientInstance\n vwoClientInstance.settings = new SettingsModel(settings);\n vwoClientInstance.originalSettings = settings;\n // Optimize loop by avoiding multiple calls to `getCampaigns()`\n const campaigns = vwoClientInstance.settings.getCampaigns();\n campaigns.forEach((campaign, index) => {\n setVariationAllocation(campaign);\n campaigns[index] = campaign;\n });\n addLinkedCampaignsToSettings(vwoClientInstance.settings);\n addIsGatewayServiceRequiredFlag(vwoClientInstance.settings);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsService } from '../services/SettingsService';\nimport { isString } from './DataTypeUtil';\n\ninterface IUrlUtil {\n collectionPrefix?: string;\n init({ collectionPrefix }?: { collectionPrefix?: string }): IUrlUtil;\n getBaseUrl(): string;\n}\n\nexport const UrlUtil: IUrlUtil = {\n /**\n * Initializes the UrlUtil with optional collectionPrefix and gatewayServiceUrl.\n * If provided, these values are set after validation.\n * @param {string} [collectionPrefix] - Optional prefix for URL collections.\n * @returns {IUrlUtil} The instance of UrlUtil with updated properties.\n */\n init: ({ collectionPrefix }: { collectionPrefix?: string } = {}) => {\n // Set collectionPrefix if it is a valid string\n if (collectionPrefix && isString(collectionPrefix)) {\n UrlUtil.collectionPrefix = collectionPrefix;\n }\n\n return UrlUtil;\n },\n\n /**\n * Retrieves the base URL.\n * If gatewayServiceUrl is set, it returns that; otherwise, it constructs the URL using baseUrl and collectionPrefix.\n * @returns {string} The base URL.\n */\n getBaseUrl: () => {\n const baseUrl: string = SettingsService.Instance.hostname;\n\n if (SettingsService.Instance.isGatewayServiceProvided) {\n return baseUrl;\n }\n\n // Construct URL with collectionPrefix if it exists\n if (UrlUtil.collectionPrefix) {\n return `${baseUrl}/${UrlUtil.collectionPrefix}`;\n }\n\n // Return the default baseUrl if no specific URL components are set\n return baseUrl;\n },\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SEED_URL } from '../constants/Url';\nimport { v4 as uuidv4 } from 'uuid';\nimport { v5 as uuidv5 } from 'uuid';\n\n/**\n * Generates a random UUID based on an API key.\n * @param sdkKey The API key used to generate a namespace for the UUID.\n * @returns A random UUID string.\n */\nexport function getRandomUUID(sdkKey: string): string {\n // Generate a namespace based on the API key using DNS namespace\n const namespace = uuidv5(sdkKey, uuidv5.DNS);\n // Generate a random UUID using the namespace derived from the API key\n const randomUUID = uuidv5(uuidv4(), namespace);\n\n return randomUUID;\n}\n\n/**\n * Generates a UUID for a user based on their userId and accountId.\n * @param userId The user's ID.\n * @param accountId The account ID associated with the user.\n * @returns A UUID string formatted without dashes and in uppercase.\n */\nexport function getUUID(userId: string, accountId: string): string {\n const VWO_NAMESPACE = uuidv5(SEED_URL, uuidv5.URL);\n // Convert userId and accountId to string to ensure proper type\n userId = String(userId);\n accountId = String(accountId);\n // Generate a namespace UUID based on the accountId\n const userIdNamespace = generateUUID(accountId, VWO_NAMESPACE);\n // Generate a UUID based on the userId and the previously generated namespace\n const uuidForUserIdAccountId = generateUUID(userId, userIdNamespace);\n\n // Remove all dashes from the UUID and convert it to uppercase\n const desiredUuid = uuidForUserIdAccountId?.replace(/-/gi, '').toUpperCase();\n\n return desiredUuid;\n}\n\n/**\n * Helper function to generate a UUID v5 based on a name and a namespace.\n * @param name The name from which to generate the UUID.\n * @param namespace The namespace used to generate the UUID.\n * @returns A UUID string or undefined if inputs are invalid.\n */\nexport function generateUUID(name: string, namespace: string) {\n // Check for valid input to prevent errors\n if (!name || !namespace) {\n return;\n }\n\n // Generate and return the UUID v5\n return uuidv5(name, namespace);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\n\nconst noop = () => {};\n\nexport function sendGetCall(options) {\n sendRequest(HttpMethodEnum.GET, options);\n}\n\nexport function sendPostCall(options) {\n sendRequest(HttpMethodEnum.POST, options);\n}\n\nfunction sendRequest(method, options) {\n const { networkOptions, successCallback = noop, errorCallback = noop } = options;\n\n let url = `${networkOptions.scheme}://${networkOptions.hostname}${networkOptions.path}`;\n if (networkOptions.port) {\n url = `${networkOptions.scheme}://${networkOptions.hostname}:${networkOptions.port}${networkOptions.path}`;\n }\n const body = networkOptions.body;\n const customHeaders = networkOptions.headers || {};\n const timeout = networkOptions.timeout;\n\n const xhr = new XMLHttpRequest();\n\n if (timeout) {\n xhr.timeout = timeout;\n }\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n const response = xhr.responseText;\n\n if (method === HttpMethodEnum.GET) {\n const parsedResponse = JSON.parse(response);\n successCallback(parsedResponse);\n } else {\n successCallback(response);\n }\n } else {\n errorCallback(xhr.statusText);\n }\n };\n\n // Set up a callback function that is called if the request fails\n xhr.onerror = function () {\n // An error occurred during the transaction\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `${xhr.statusText}, status: ${xhr.status}`,\n }),\n );\n errorCallback(xhr.statusText);\n };\n\n // Set up a callback function that is called if the request times out\n if (timeout) {\n xhr.ontimeout = function () {\n // The request timed out\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `Request timed out`,\n }),\n );\n };\n }\n\n xhr.open(method, url, true);\n\n for (const headerName in customHeaders) {\n if (headerName in customHeaders) {\n // Skip the Content-Type header\n // Request header field content-type is not allowed by Access-Control-Allow-Headers\n if (headerName !== 'Content-Type' && headerName !== 'Content-Length') {\n xhr.setRequestHeader(headerName, customHeaders[headerName]);\n }\n }\n }\n\n if (method === HttpMethodEnum.POST) {\n xhr.send(JSON.stringify(body));\n } else if (method === HttpMethodEnum.GET) {\n xhr.send();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function get() {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function get() {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function get() {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function get() {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function get() {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function get() {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function get() {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function get() {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function get() {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar _default = {\n randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\n\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = {\n debugMessages: require('./src/debug-messages.json'),\n infoMessages: require('./src/info-messages.json'),\n warnMessages: require('./src/warn-messages.json'),\n errorMessages: require('./src/error-messages.json'),\n traceMessages: require('./src/trace-messages.json')\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexports.Struct = Struct;\nexports.StructError = StructError;\nexports.any = any;\nexports.array = array;\nexports.assert = assert;\nexports.assign = assign;\nexports.boolean = boolean;\nexports.coerce = coerce;\nexports.create = create;\nexports.date = date;\nexports.defaulted = defaulted;\nexports.define = define;\nexports.deprecated = deprecated;\nexports.dynamic = dynamic;\nexports.empty = empty;\nexports.enums = enums;\nexports.func = func;\nexports.instance = instance;\nexports.integer = integer;\nexports.intersection = intersection;\nexports.is = is;\nexports.lazy = lazy;\nexports.literal = literal;\nexports.map = map;\nexports.mask = mask;\nexports.max = max;\nexports.min = min;\nexports.never = never;\nexports.nullable = nullable;\nexports.number = number;\nexports.object = object;\nexports.omit = omit;\nexports.optional = optional;\nexports.partial = partial;\nexports.pattern = pattern;\nexports.pick = pick;\nexports.record = record;\nexports.refine = refine;\nexports.regexp = regexp;\nexports.set = set;\nexports.size = size;\nexports.string = string;\nexports.struct = struct;\nexports.trimmed = trimmed;\nexports.tuple = tuple;\nexports.type = type;\nexports.union = union;\nexports.unknown = unknown;\nexports.validate = validate;\n//# sourceMappingURL=index.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LogLevelEnum } from './packages/logger/enums/LogLevelEnum';\nimport { Connector } from './packages/storage/Connector';\n\nexport { LogLevelEnum, Connector as StorageConnector };\nexport { init, onInit } from './VWO';\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/client/vwo-fme-javascript-sdk.min.js b/dist/client/vwo-fme-javascript-sdk.min.js index 9e124ca..ddb0841 100644 --- a/dist/client/vwo-fme-javascript-sdk.min.js +++ b/dist/client/vwo-fme-javascript-sdk.min.js @@ -1,5 +1,5 @@ /*! - * vwo-fme-javascript-sdk - v1.7.0 + * vwo-fme-javascript-sdk - v1.8.0 * URL - https://github.com/wingify/vwo-node-sdk * * Copyright 2024 Wingify Software Pvt. Ltd. @@ -22,5 +22,5 @@ * 3. uuid - ^9.0.1 * 4. vwo-fme-sdk-log-messages - ^0.1.2 */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vwoSdk=t():e.vwoSdk=t()}(this,(()=>(()=>{var e={8005:e=>{!function(){const t=e=>(new TextEncoder).encode(e);function n(e,n){let r,o,i,a,s,u,c,l;for("string"==typeof e&&(e=t(e)),r=3&e.length,o=e.length-r,i=n,s=3432918353,u=461845907,l=0;l>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,i^=c,i=i<<13|i>>>19,a=5*(65535&i)+((5*(i>>>16)&65535)<<16)&4294967295,i=27492+(65535&a)+((58964+(a>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&e[l+2])<<16;case 2:c^=(255&e[l+1])<<8;case 1:c^=255&e[l],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,i^=c}return i^=e.length,i^=i>>>16,i=2246822507*(65535&i)+((2246822507*(i>>>16)&65535)<<16)&4294967295,i^=i>>>13,i=3266489909*(65535&i)+((3266489909*(i>>>16)&65535)<<16)&4294967295,i^=i>>>16,i>>>0}const r=n;r.v2=function(e,n){"string"==typeof e&&(e=t(e));let r,o=e.length,i=n^o,a=0;for(;o>=4;)r=255&e[a]|(255&e[++a])<<8|(255&e[++a])<<16|(255&e[++a])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^r,o-=4,++a;switch(o){case 3:i^=(255&e[a+2])<<16;case 2:i^=(255&e[a+1])<<8;case 1:i^=255&e[a],i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)}return i^=i>>>13,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>15,i>>>0},r.v3=n,e.exports=r}()},9709:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VWOBuilder=void 0;var r=n(4580),o=n(6710),i=n(4986),a=n(9401),s=n(1522),u=n(470),c=n(7128),l=n(1359),g=n(8667),p=n(8754),d=n(4782),f=n(362),h=n(1720),v=function(){function e(e){this.options=e}return e.prototype.setNetworkManager=function(){var e,t,n,i=o.NetworkManager.Instance;return i.attachClient(null===(t=null===(e=this.options)||void 0===e?void 0:e.network)||void 0===t?void 0:t.client),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Network Layer"})),i.getConfig().setDevelopmentMode(null===(n=this.options)||void 0===n?void 0:n.isDevelopmentMode),this},e.prototype.setSegmentation=function(){var e;return i.SegmentationManager.Instance.attachEvaluator(null===(e=this.options)||void 0===e?void 0:e.segmentation),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Segmentation Evaluator"})),this},e.prototype.fetchSettings=function(e){var t=this,n=new d.Deferred;return this.isSettingsFetchInProgress?this.fetchSettings(e):(this.isSettingsFetchInProgress=!0,this.settingFileManager.getSettings(e).then((function(r){e||(t.originalSettings=r),t.isSettingsFetchInProgress=!1,n.resolve(r)})),n.promise)},e.prototype.getSettings=function(e){var t=new d.Deferred;try{!e&&this.settings?(r.LogManager.Instance.info("Using already fetched and cached settings"),t.resolve(this.settings)):this.fetchSettings(e).then((function(e){t.resolve(e)}))}catch(e){r.LogManager.Instance.error("Failed to fetch settings. Error: "+e),t.resolve({})}return t.promise},e.prototype.setStorage=function(){return this.options.storage?this.storage=a.Storage.Instance.attachConnector(this.options.storage):this.storage=null,this},e.prototype.setSettingsService=function(){return this.settingFileManager=new u.SettingsService(this.options),this},e.prototype.setLogger=function(){return this.logManager=new r.LogManager(this.options.logger||{}),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Logger"})),this},e.prototype.getRandomUserId=function(){var e="getRandomUserId";try{return r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.API_CALLED,{apiName:e})),(0,h.getRandomUUID)(this.options.sdkKey)}catch(t){r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.API_THROW_ERROR,{apiName:e,err:t}))}},e.prototype.initPolling=function(){return this.options.pollInterval?this.options.pollInterval&&!(0,l.isNumber)(this.options.pollInterval)||this.options.pollInterval&&this.options.pollInterval<1e3?(r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.INIT_OPTIONS_INVALID,{key:"pollInterval",correctType:"number"})),this):(this.checkAndPoll(),this):this},e.prototype.build=function(e){return this.vwoInstance=new s.VWOClient(e,this.options),this.vwoInstance},e.prototype.checkAndPoll=function(){var e=this,t=this.options.pollInterval;setInterval((function(){e.getSettings(!0).then((function(t){var n=JSON.stringify(e.originalSettings);if(JSON.stringify(t)!==n){e.originalSettings=t;var o=(0,g.cloneObject)(t);r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_SET_SETTINGS),(0,f.setSettingsAndAddCampaignsToRules)(o,e.vwoInstance)}else r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS)})).catch((function(){r.LogManager.Instance.error(c.ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED)}))}),t)},e}();t.VWOBuilder=v},1522:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)||o)return[3,10];G=[],j=0,F=k,i.label=3;case 3:return j0?(W=(new l.CampaignModel).modelFromDictionary(G[0]),te=(0,y.evaluateTrafficAndGetVariation)(t,W,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,M=!0,A=te,O(W,te,w,V),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,W.getId(),te.getId(),n)]:[3,8]):[3,9]):[3,9];case 7:return i.sent(),[3,9];case 8:(0,E.createAndSendImpressionForVariationShown)(t,W.getId(),te.getId(),n),i.label=9;case 9:return[3,11];case 10:0===k.length&&(p.LogManager.Instance.debug(c.DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT),M=!0),i.label=11;case 11:if(!M)return[3,18];H=[],B=(0,m.getAllExperimentRules)(C),q=new Map,Q=0,Y=B,i.label=12;case 12:return Q0?(ee=(new l.CampaignModel).modelFromDictionary(H[0]),te=(0,y.evaluateTrafficAndGetVariation)(t,ee,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,R=te,O(ee,te,w,V),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n)]:[3,17]):[3,18]):[3,18];case 16:return i.sent(),[3,18];case 17:(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n),i.label=18;case 18:return o&&(new a.StorageDecorator).setDataInStorage(r({featureKey:e,context:n},w),P),T.set(V),T.execute(T.get()),(null===(oe=C.getImpactCampaign())||void 0===oe?void 0:oe.getCampaignId())?(p.LogManager.Instance.info((0,I.buildMessage)(c.InfoLogMessagesEnum.IMPACT_ANALYSIS,{userId:n.getId(),featureKey:e,status:o?"enabled":"disabled"})),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,null===(ie=C.getImpactCampaign())||void 0===ie?void 0:ie.getCampaignId(),o?2:1,n)]:[3,20]):[3,21];case 19:return i.sent(),[3,21];case 20:(0,E.createAndSendImpressionForVariationShown)(t,null===(ae=C.getImpactCampaign())||void 0===ae?void 0:ae.getCampaignId(),o?2:1,n),i.label=21;case 21:return ne=null!==(ue=null!==(se=null==R?void 0:R.variables)&&void 0!==se?se:null==A?void 0:A.variables)&&void 0!==ue?ue:[],L.resolve({isEnabled:function(){return o},getVariables:function(){return ne},getVariable:function(e,t){var n,r=ne.find((function(t){return t.key===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:t}}),[2,L.promise]}}))}))},e}();function O(e,t,n,r){e.getType()===u.CampaignTypeEnum.ROLLOUT?Object.assign(n,{rolloutId:e.getId(),rolloutKey:e.getKey(),rolloutVariationId:t.getId()}):Object.assign(n,{experimentId:e.getId(),experimentKey:e.getKey(),experimentVariationId:t.getId()}),Object.assign(r,n)}t.FlagApi=T},8164:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_URL=t.HTTPS_PROTOCOL=t.HTTP_PROTOCOL=t.SEED_URL=t.HTTPS=t.HTTP=void 0,t.HTTP="http",t.HTTPS="https",t.SEED_URL="https://vwo.com",t.HTTP_PROTOCOL="".concat(t.HTTP,"://"),t.HTTPS_PROTOCOL="".concat(t.HTTPS,"://"),t.BASE_URL="dev.visualwebsiteoptimizer.com"},5399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=void 0;var r,o,i=n(5520),a=n(2346);r={name:"vwo-fme-javascript-sdk",version:"1.7.0"},o=i.PlatformEnum.CLIENT,t.Constants={SDK_NAME:r.name,SDK_VERSION:r.version,PLATFORM:o,MAX_TRAFFIC_PERCENT:100,MAX_TRAFFIC_VALUE:1e4,STATUS_RUNNING:"RUNNING",SEED_VALUE:1,MAX_EVENTS_PER_REQUEST:5e3,DEFAULT_REQUEST_TIME_INTERVAL:600,DEFAULT_EVENTS_PER_REQUEST:100,SEED_URL:a.SEED_URL,HTTP_PROTOCOL:a.HTTP_PROTOCOL,HTTPS_PROTOCOL:a.HTTPS_PROTOCOL,SETTINGS:"settings",SETTINGS_EXPIRY:1e7,SETTINGS_TIMEOUT:5e4,HOST_NAME:"dev.visualwebsiteoptimizer.com",SETTINTS_ENDPOINT:"/server-side/v2-settings",LOCATION_ENDPOINT:"/getLocation",VWO_FS_ENVIRONMENT:"vwo_fs_environment",RANDOM_ALGO:1,API_VERSION:"1",VWO_META_MEG_KEY:"_vwo_meta_meg_"}},3780:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ApiEnum=void 0,function(e){e.GET_FLAG="getFlag",e.TRACK="track"}(n||(t.ApiEnum=n={}))},4273:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignTypeEnum=void 0,function(e){e.ROLLOUT="FLAG_ROLLOUT",e.AB="FLAG_TESTING",e.PERSONALIZE="FLAG_PERSONALIZE"}(n||(t.CampaignTypeEnum=n={}))},9693:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventEnum=void 0,function(e){e.VWO_VARIATION_SHOWN="vwo_variationShown",e.VWO_SYNC_VISITOR_PROP="vwo_syncVisitorProp"}(n||(t.EventEnum=n={}))},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadersEnum=void 0,function(e){e.USER_AGENT="X-Device-User-Agent",e.IP="VWO-X-Forwarded-For"}(n||(t.HeadersEnum=n={}))},8202:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpMethodEnum=void 0,function(e){e.GET="GET",e.POST="POST"}(n||(t.HttpMethodEnum=n={}))},5520:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformEnum=void 0,function(e){e.CLIENT="client",e.SERVER="server"}(n||(t.PlatformEnum=n={}))},9217:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StatusEnum=void 0,function(e){e.PASSED="passed",e.FAILED="failed"}(n||(t.StatusEnum=n={}))},1172:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StorageEnum=void 0,function(e){e[e.STORAGE_UNDEFINED=0]="STORAGE_UNDEFINED",e[e.INCORRECT_DATA=1]="INCORRECT_DATA",e[e.NO_DATA_FOUND=2]="NO_DATA_FOUND",e[e.CAMPAIGN_PAUSED=3]="CAMPAIGN_PAUSED",e[e.VARIATION_NOT_FOUND=4]="VARIATION_NOT_FOUND",e[e.WHITELISTED_VARIATION=5]="WHITELISTED_VARIATION"}(n||(t.StorageEnum=n={}))},9528:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UrlEnum=void 0,function(e){e.BASE_URL="dev.visualwebsiteoptimizer.com",e.SETTINGS_URL="/server-side/settings",e.EVENTS="/events/t",e.ATTRIBUTE_CHECK="/check-attribute",e.GET_USER_DATA="/get-user-details"}(n||(t.UrlEnum=n={}))},7128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLogMessagesEnum=t.InfoLogMessagesEnum=t.DebugLogMessagesEnum=void 0;var r=n(3095),o=r.debugMessages;t.DebugLogMessagesEnum=o;var i=r.infoMessages;t.InfoLogMessagesEnum=i;var a=r.errorMessages;t.ErrorLogMessagesEnum=a},2144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignModel=void 0;var r=n(9094),o=n(502),i=n(2365),a=function(){function e(){this.variations=[],this.metrics=[],this.variables=[]}return e.prototype.copy=function(e){this.metrics=e.metrics,this.variations=e.variations,this.variables=e.variables,this.processCampaignKeys(e)},e.prototype.modelFromDictionary=function(e){return this.processCampaignProperties(e),this.processCampaignKeys(e),this},e.prototype.processCampaignProperties=function(e){var t=this;e.variables&&(e.variables.constructor==={}.constructor?this.variables=[]:e.variables.forEach((function(e){t.variables.push((new o.VariableModel).modelFromDictionary(e))}))),e.variations&&(e.variations.constructor==={}.constructor?this.variations=[]:e.variations.forEach((function(e){t.variations.push((new i.VariationModel).modelFromDictionary(e))}))),e.metrics&&(e.metrics&&e.metrics.constructor==={}.constructor?this.metrics=[]:(e.metrics||[]).forEach((function(e){t.metrics.push((new r.MetricModel).modelFromDictionary(e))})))},e.prototype.processCampaignKeys=function(e){this.id=e.id,this.percentTraffic=e.percentTraffic,this.name=e.name,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this.isForcedVariationEnabled=e.isForcedVariationEnabled,this.isUserListEnabled=e.isUserListEnabled,this.segments=e.segments,this.key=e.key,this.type=e.type},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.getSegments=function(){return this.segments},e.prototype.getTraffic=function(){return this.percentTraffic},e.prototype.getType=function(){return this.type},e.prototype.getIsForcedVariationEnabled=function(){return this.isForcedVariationEnabled},e.prototype.getIsUserListEnabled=function(){return this.isUserListEnabled},e.prototype.getKey=function(){return this.key},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getVariations=function(){return this.variations},e.prototype.getVariables=function(){return this.variables},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.CampaignModel=a},3836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureModel=void 0;var r=n(9378),o=n(9094),i=n(324),a=function(){function e(){this.m=[],this.metrics=[],this.rules=[],this.impactCampaign=null,this.rulesLinkedCampaign=[],this.isGatewayServiceRequired=!1}return e.prototype.modelFromDictionary=function(e){var t,n,a,s=this;if(this.id=e.id,this.key=e.key,this.name=e.name,this.type=e.type,(null==e?void 0:e.isGatewayServiceRequired)&&(this.isGatewayServiceRequired=e.isGatewayServiceRequired),e.impactCampaign&&(this.impactCampaign=(new r.ImpactCapmaignModel).modelFromDictionary(e.impactCampaign)),e.m&&e.m.constructor==={}.constructor||(null===(t=e.metrics)||void 0===t?void 0:t.constructor)==={}.constructor)this.metrics=[];else{var u=e.m||e.metrics;null==u||u.forEach((function(e){s.metrics.push((new o.MetricModel).modelFromDictionary(e))}))}if((null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.constructor)==={}.constructor)this.rules=[];else{var c=e.rules;null==c||c.forEach((function(e){s.rules.push((new i.RuleModel).modelFromDictionary(e))}))}if((null==e?void 0:e.rulesLinkedCampaign)&&(null===(a=e.rulesLinkedCampaign)||void 0===a?void 0:a.constructor)!=={}.constructor){var l=e.rulesLinkedCampaign;this.rulesLinkedCampaign=l}return this},e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRules=function(){return this.rules},e.prototype.getImpactCampaign=function(){return this.impactCampaign},e.prototype.getRulesLinkedCampaign=function(){return this.rulesLinkedCampaign},e.prototype.setRulesLinkedCampaign=function(e){this.rulesLinkedCampaign=e},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getIsGatewayServiceRequired=function(){return this.isGatewayServiceRequired},e.prototype.setIsGatewayServiceRequired=function(e){this.isGatewayServiceRequired=e},e}();t.FeatureModel=a},9378:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImpactCapmaignModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.campaignId=e.campaignId,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getType=function(){return this.type},e}();t.ImpactCapmaignModel=n},9094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetricModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.identifier=e.identifier||e.key,this.id=e.i||e.id,this.type=e.t||e.type,this},e.prototype.getId=function(){return this.id},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getType=function(){return this.type},e}();t.MetricModel=n},324:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuleModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.status=e.status,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getVariationId=function(){return this.variationId},e.prototype.getStatus=function(){return this.status},e.prototype.getType=function(){return this.type},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.RuleModel=n},502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariableModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.value=e.val||e.value,this.type=e.type,this.key=e.k||e.key,this.id=e.i||e.id,this},e.prototype.setValue=function(e){this.value=e},e.prototype.setKey=function(e){this.key=e},e.prototype.setType=function(e){this.type=e},e.prototype.getId=function(){return this.id},e.prototype.getValue=function(){return this.value},e.prototype.getType=function(){return this.type},e.prototype.getKey=function(){return this.key},e}();t.VariableModel=n},2365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariationModel=void 0;var r=n(502),o=function(){function e(){this.variables=[],this.variations=[]}return e.prototype.modelFromDictionary=function(t){var n=this;return this.id=t.i||t.id,this.key=t.n||t.key||t.name,this.weight=t.w||t.weight,this.ruleKey=t.ruleKey,this.type=t.type,this.setStartRange(t.startRangeVariation),this.setEndRange(t.endRangeVariation),(t.seg||t.segments)&&(this.segments=t.seg||t.segments),t.variables&&(t.variables.constructor==={}.constructor?this.variables=[]:t.variables.forEach((function(e){n.variables.push((new r.VariableModel).modelFromDictionary(e))}))),t.variations&&(t.variations.constructor==={}.constructor?this.variations=[]:t.variations.forEach((function(t){n.variations.push((new e).modelFromDictionary(t))}))),this},e.prototype.setStartRange=function(e){this.startRangeVariation=e},e.prototype.setEndRange=function(e){this.endRangeVariation=e},e.prototype.setWeight=function(e){this.weight=e},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRuleKey=function(){return this.ruleKey},e.prototype.getWeight=function(){return this.weight},e.prototype.getSegments=function(){return this.segments},e.prototype.getStartRangeVariation=function(){return this.startRangeVariation},e.prototype.getEndRangeVariation=function(){return this.endRangeVariation},e.prototype.getVariables=function(){return this.variables},e.prototype.getVariations=function(){return this.variations},e.prototype.getType=function(){return this.type},e}();t.VariationModel=o},9846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSchema=void 0;var r=n(3185),o=function(){function e(){this.initializeSchemas()}return e.prototype.initializeSchemas=function(){this.campaignMetricSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),identifier:(0,r.string)(),mca:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),hasProps:(0,r.optional)((0,r.boolean)()),revenueProp:(0,r.optional)((0,r.string)())}),this.variableObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),value:(0,r.union)([(0,r.number)(),(0,r.string)(),(0,r.boolean)(),(0,r.object)()])}),this.campaignVariationSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),name:(0,r.string)(),weight:(0,r.union)([(0,r.number)(),(0,r.string)()]),segments:(0,r.optional)((0,r.object)()),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema)),startRangeVariation:(0,r.optional)((0,r.number)()),endRangeVariation:(0,r.optional)((0,r.number)())}),this.campaignObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),percentTraffic:(0,r.optional)((0,r.number)()),status:(0,r.string)(),variations:(0,r.array)(this.campaignVariationSchema),segments:(0,r.object)(),isForcedVariationEnabled:(0,r.optional)((0,r.boolean)()),isAlwaysCheckSegment:(0,r.optional)((0,r.boolean)()),name:(0,r.string)()}),this.ruleSchema=(0,r.object)({type:(0,r.string)(),ruleKey:(0,r.string)(),campaignId:(0,r.number)(),variationId:(0,r.optional)((0,r.number)())}),this.featureSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),key:(0,r.string)(),status:(0,r.string)(),name:(0,r.string)(),type:(0,r.string)(),metrics:(0,r.array)(this.campaignMetricSchema),impactCampaign:(0,r.optional)((0,r.object)()),rules:(0,r.optional)((0,r.array)(this.ruleSchema)),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema))}),this.settingsSchema=(0,r.object)({sdkKey:(0,r.optional)((0,r.string)()),version:(0,r.union)([(0,r.number)(),(0,r.string)()]),accountId:(0,r.union)([(0,r.number)(),(0,r.string)()]),features:(0,r.optional)((0,r.array)(this.featureSchema)),campaigns:(0,r.array)(this.campaignObjectSchema),groups:(0,r.optional)((0,r.object)()),campaignGroups:(0,r.optional)((0,r.object)()),collectionPrefix:(0,r.optional)((0,r.string)())})},e.prototype.isSettingsValid=function(e){return!!e&&!(0,r.validate)(e,this.settingsSchema)[0]},e}();t.SettingsSchema=o},6130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsModel=void 0;var r=n(2144),o=n(3836),i=function(){function e(e){var t=this;return this.f=[],this.features=[],this.c=[],this.campaigns=[],this.campaignGroups={},this.cG={},this.groups={},this.g={},this.sdkKey=e.sK||e.sdkKey,this.accountId=e.a||e.accountId,this.version=e.v||e.version,this.collectionPrefix=e.collectionPrefix,(e.f&&e.f.constructor!=={}.constructor||e.features&&e.features.constructor!=={}.constructor)&&(e.f||e.features).forEach((function(e){t.features.push((new o.FeatureModel).modelFromDictionary(e))})),(e.c&&e.c.constructor!=={}.constructor||e.campaigns&&e.campaigns.constructor!=={}.constructor)&&(e.c||e.campaigns).forEach((function(e){t.campaigns.push((new r.CampaignModel).modelFromDictionary(e))})),(e.cG||e.campaignGroups)&&(this.campaignGroups=e.cG||e.campaignGroups),(e.g||e.groups)&&(this.groups=e.g||e.groups),this}return e.prototype.getFeatures=function(){return this.features},e.prototype.getCampaigns=function(){return this.campaigns},e.prototype.getSdkkey=function(){return this.sdkKey},e.prototype.getAccountId=function(){return this.accountId},e.prototype.getVersion=function(){return this.version},e.prototype.getCollectionPrefix=function(){return this.collectionPrefix},e.prototype.getCampaignGroups=function(){return this.campaignGroups},e.prototype.getGroups=function(){return this.groups},e}();t.SettingsModel=i},9752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextModel=void 0;var r=n(1880),o=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.id=e.id,this.userAgent=e.userAgent,this.ipAddress=e.ipAddress,(null==e?void 0:e.customVariables)&&(this.customVariables=e.customVariables),(null==e?void 0:e.variationTargetingVariables)&&(this.variationTargetingVariables=e.variationTargetingVariables),(null==e?void 0:e._vwo)&&(this._vwo=(new r.ContextVWOModel).modelFromDictionary(e._vwo)),this},e.prototype.getId=function(){var e;return null===(e=this.id)||void 0===e?void 0:e.toString()},e.prototype.getUserAgent=function(){return this.userAgent},e.prototype.getIpAddress=function(){return this.ipAddress},e.prototype.getCustomVariables=function(){return this.customVariables},e.prototype.setCustomVariables=function(e){this.customVariables=e},e.prototype.getVariationTargetingVariables=function(){return this.variationTargetingVariables},e.prototype.setVariationTargetingVariables=function(e){this.variationTargetingVariables=e},e.prototype.getVwo=function(){return this._vwo},e.prototype.setVwo=function(e){this._vwo=e},e}();t.ContextModel=o},1880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextVWOModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return(null==e?void 0:e.location)&&(this.location=e.location),(null==e?void 0:e.userAgent)&&(this.userAgent=e.userAgent),this},e.prototype.getLocation=function(){return this.location},e.prototype.getUaInfo=function(){return this.userAgent},e}();t.ContextVWOModel=n},6775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionMaker=void 0;var r=n(8005),o=function(){function e(){}return e.prototype.generateBucketValue=function(e,t,n){void 0===n&&(n=1);var r=(t*(e/Math.pow(2,32))+1)*n;return Math.floor(r)},e.prototype.getBucketValueForUser=function(e,t){void 0===t&&(t=100);var n=r.v3(e,1);return this.generateBucketValue(n,t)},e.prototype.calculateBucketValue=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1e4);var r=this.generateHashValue(e);return this.generateBucketValue(r,n,t)},e.prototype.generateHashValue=function(e){return r.v3(e,1)},e}();t.DecisionMaker=o},2752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogMessageBuilder=void 0;var r=n(4940),o="",i="",a=function(){function e(e,t){this.loggerConfig=e,this.transportConfig=t,this.prefix=this.transportConfig.prefix||this.loggerConfig.prefix||"",this.dateTimeFormat=this.transportConfig.dateTimeFormat||this.loggerConfig.dateTimeFormat}return e.prototype.formatMessage=function(e,t){return"[".concat(this.getFormattedLevel(e),"]: ").concat(this.getFormattedPrefix(this.prefix)," ").concat(this.getFormattedDateTime()," ").concat(t)},e.prototype.getFormattedPrefix=function(e){return this.loggerConfig.isAnsiColorEnabled?"".concat(o).concat("").concat(e).concat(i):"".concat(e)},e.prototype.getFormattedLevel=function(e){var t,n,a,s=e.toUpperCase();return this.loggerConfig.isAnsiColorEnabled?((t={})[r.LogLevelEnum.TRACE]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.DEBUG]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.INFO]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.WARN]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.ERROR]="".concat(o).concat("").concat(s).concat(i),a=t):((n={})[r.LogLevelEnum.TRACE]=s,n[r.LogLevelEnum.DEBUG]=s,n[r.LogLevelEnum.INFO]=s,n[r.LogLevelEnum.WARN]=s,n[r.LogLevelEnum.ERROR]=s,a=n),a[e]},e.prototype.getFormattedDateTime=function(){return this.dateTimeFormat()},e}();t.LogMessageBuilder=a},5374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=function(){}},3293:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogManager=void 0;var i=n(2831),a=n(5374),s=n(6325),u=n(4820),c=n(1359),l=n(4940),g=function(e){function t(n){var r=e.call(this)||this;return r.name="VWO Logger",r.requestId=(0,i.v4)(),r.level=l.LogLevelEnum.ERROR,r.prefix="VWO-SDK",r.config=n,!n.isAlwaysNewInstance&&t.instance||(t.instance=r,r.config.name=n.name||r.name,r.config.requestId=n.requestId||r.requestId,r.config.level=n.level||r.level,r.config.prefix=n.prefix||r.prefix,r.config.dateTimeFormat=n.dateTimeFormat||r.dateTimeFormat,r.transportManager=new u.LogTransportManager(r.config),r.handleTransports()),t.instance}return o(t,e),t.prototype.dateTimeFormat=function(){return(new Date).toISOString()},Object.defineProperty(t,"Instance",{get:function(){return t.instance},enumerable:!1,configurable:!0}),t.prototype.handleTransports=function(){var e=this.config.transports;(null==e?void 0:e.length)?this.addTransports(this.config.transports):this.config.transport&&(0,c.isObject)(this.config.transport)?this.addTransport(this.config.transport):this.addTransport(new s.ConsoleTransport({level:this.config.level}))},t.prototype.addTransport=function(e){this.transportManager.addTransport(e)},t.prototype.addTransports=function(e){for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogTransportManager=void 0;var r,o=n(4940),i=n(2752),a=n(1359);!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(r||(r={}));var s=function(){function e(e){this.transports=[],this.config=e}return e.prototype.addTransport=function(e){this.transports.push(e)},e.prototype.shouldLog=function(e,t){return r[e.toUpperCase()]>=r[(t||this.config.level).toUpperCase()]},e.prototype.trace=function(e){this.log(o.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.log(o.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.log(o.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.log(o.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.log(o.LogLevelEnum.ERROR,e)},e.prototype.log=function(e,t){for(var n=0;n{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=void 0,function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(n||(t.LogLevelEnum=n={}))},4580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=t.LogManager=void 0;var r=n(3293);Object.defineProperty(t,"LogManager",{enumerable:!0,get:function(){return r.LogManager}});var o=n(4940);Object.defineProperty(t,"LogLevelEnum",{enumerable:!0,get:function(){return o.LogLevelEnum}})},6325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleTransport=void 0;var r=n(4940),o=function(){function e(e){void 0===e&&(e={}),this.config=e,this.level=this.config.level}return e.prototype.trace=function(e){this.consoleLog(r.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.consoleLog(r.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.consoleLog(r.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.consoleLog(r.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.consoleLog(r.LogLevelEnum.ERROR,e)},e.prototype.consoleLog=function(e,t){console[e](t)},e}();t.ConsoleTransport=o},1703:(e,t,n)=>{"use strict";t.o=void 0;var r=n(3890),o=n(4782),i=n(5573),a=function(){function e(){}return e.prototype.GET=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendGetCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e.prototype.POST=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendPostCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e}();t.o=a},415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestHandler=void 0;var n=function(){function e(){}return e.prototype.createRequest=function(e,t){if(!(null!==t.getBaseUrl()&&void 0!==t.getBaseUrl()||null!==e.getUrl()&&void 0!==e.getUrl()))return null;e.setUrl(e.getUrl()||t.getBaseUrl()),e.setTimeout(e.getTimeout()||t.getTimeout()),e.setBody(e.getBody()||t.getBody()),e.setHeaders(e.getHeaders()||t.getHeaders());var n=e.getQuery()||{},r=t.getQuery()||{};for(var o in r)Object.prototype.hasOwnProperty.call(n,o)||(n[o]=r[o]);return e.setQuery(n),e},e}();t.RequestHandler=n},6710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=t.RequestModel=t.GlobalRequestModel=t.NetworkManager=t.NetworkClient=void 0,t.NetworkClient=n(1703).o;var r=n(7885);Object.defineProperty(t,"NetworkManager",{enumerable:!0,get:function(){return r.NetworkManager}});var o=n(4036);Object.defineProperty(t,"GlobalRequestModel",{enumerable:!0,get:function(){return o.GlobalRequestModel}});var i=n(2887);Object.defineProperty(t,"RequestModel",{enumerable:!0,get:function(){return i.RequestModel}});var a=n(5573);Object.defineProperty(t,"ResponseModel",{enumerable:!0,get:function(){return a.ResponseModel}})},7885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkManager=void 0;var r=n(4782),o=n(415),i=n(4036),a=function(){function e(){}return e.prototype.attachClient=function(e){var t=n(1703).o;this.client=e||new t,this.config=new i.GlobalRequestModel(null,null,null,null)},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.setConfig=function(e){this.config=e},e.prototype.getConfig=function(){return this.config},e.prototype.createRequest=function(e){return(new o.RequestHandler).createRequest(e,this.config)},e.prototype.get=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.GET(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e.prototype.post=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.POST(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e}();t.NetworkManager=a},4036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalRequestModel=void 0;var n=function(){function e(e,t,n,r){this.timeout=3e3,this.url=e,this.query=t,this.body=n,this.headers=r}return e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setBody=function(e){this.body=e},e.prototype.getBody=function(){return this.body},e.prototype.setBaseUrl=function(e){this.url=e},e.prototype.getBaseUrl=function(){return this.url},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.getTimeout=function(){return this.timeout},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.setDevelopmentMode=function(e){this.isDevelopmentMode=e},e.prototype.getDevelopmentMode=function(){return this.isDevelopmentMode},e}();t.GlobalRequestModel=n},2887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModel=void 0;var r=n(8202),o=n(2346),i=function(){function e(e,t,n,i,a,s,u,c){void 0===t&&(t=r.HttpMethodEnum.GET),void 0===u&&(u=o.HTTPS),this.url=e,this.method=t,this.path=n,this.query=i,this.body=a,this.headers=s,this.scheme=u,this.port=c}return e.prototype.getMethod=function(){return this.method},e.prototype.setMethod=function(e){this.method=e},e.prototype.getBody=function(){return this.body},e.prototype.setBody=function(e){this.body=e},e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setHeaders=function(e){return this.headers=e,this},e.prototype.getHeaders=function(){return this.headers},e.prototype.setTimeout=function(e){return this.timeout=e,this},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){return this.url=e,this},e.prototype.getScheme=function(){return this.scheme},e.prototype.setScheme=function(e){return this.scheme=e,this},e.prototype.getPort=function(){return this.port},e.prototype.setPort=function(e){return this.port=e,this},e.prototype.getPath=function(){return this.path},e.prototype.setPath=function(e){return this.path=e,this},e.prototype.getOptions=function(){var e="";for(var t in this.query)e+="".concat(t,"=").concat(this.query[t],"&");var n=this.url.split("/"),r=n[0],o=n[1],i={hostname:r,agent:!1};if(this.scheme&&(i.scheme=this.scheme),this.port&&(i.port=this.port),this.headers&&(i.headers=this.headers),this.method&&(i.method=this.method),this.body){var a=JSON.stringify(this.body);i.headers=i.headers||{},i.headers["Content-Type"]="application/json","undefined"==typeof Buffer?i.headers["Content-Length"]=(new TextEncoder).encode(a).length:i.headers["Content-Length"]=Buffer.byteLength(a),i.body=this.body}return this.path&&(i.path=""!==e?this.path+"?"+e||"":this.path),o&&(i.path="/".concat(o)+i.path),this.timeout&&(i.timeout=this.timeout),"&"===i.path.charAt(i.path.length-1)&&(i.path=i.path.substring(0,i.path.length-1)),i},e}();t.RequestModel=i},5573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=void 0;var n=function(){function e(){}return e.prototype.setStatusCode=function(e){this.statusCode=e},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.setData=function(e){this.data=e},e.prototype.setError=function(e){this.error=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.getData=function(){return this.data},e.prototype.getStatusCode=function(){return this.statusCode},e.prototype.getError=function(){return this.error},e}();t.ResponseModel=n},6373:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandRegexEnum=void 0,function(e){e.LOWER="^lower",e.LOWER_MATCH="^lower\\((.*)\\)",e.WILDCARD="^wildcard",e.WILDCARD_MATCH="^wildcard\\((.*)\\)",e.REGEX="^regex",e.REGEX_MATCH="^regex\\((.*)\\)",e.STARTING_STAR="^\\*",e.ENDING_STAR="\\*$",e.GREATER_THAN_MATCH="^gt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.GREATER_THAN_EQUAL_TO_MATCH="^gte\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_MATCH="^lt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_EQUAL_TO_MATCH="^lte\\((\\d+\\.?\\d*|\\.\\d+)\\)"}(n||(t.SegmentOperandRegexEnum=n={}))},6905:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandValueEnum=void 0,function(e){e[e.LOWER_VALUE=1]="LOWER_VALUE",e[e.STARTING_ENDING_STAR_VALUE=2]="STARTING_ENDING_STAR_VALUE",e[e.STARTING_STAR_VALUE=3]="STARTING_STAR_VALUE",e[e.ENDING_STAR_VALUE=4]="ENDING_STAR_VALUE",e[e.REGEX_VALUE=5]="REGEX_VALUE",e[e.EQUAL_VALUE=6]="EQUAL_VALUE",e[e.GREATER_THAN_VALUE=7]="GREATER_THAN_VALUE",e[e.GREATER_THAN_EQUAL_TO_VALUE=8]="GREATER_THAN_EQUAL_TO_VALUE",e[e.LESS_THAN_VALUE=9]="LESS_THAN_VALUE",e[e.LESS_THAN_EQUAL_TO_VALUE=10]="LESS_THAN_EQUAL_TO_VALUE"}(n||(t.SegmentOperandValueEnum=n={}))},4076:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperatorValueEnum=void 0,function(e){e.AND="and",e.NOT="not",e.OR="or",e.CUSTOM_VARIABLE="custom_variable",e.USER="user",e.COUNTRY="country",e.REGION="region",e.CITY="city",e.OPERATING_SYSTEM="os",e.DEVICE_TYPE="device_type",e.DEVICE="device",e.BROWSER_AGENT="browser_string",e.UA="ua",e.FEATURE_ID="featureId"}(n||(t.SegmentOperatorValueEnum=n={}))},8011:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,!0]:[2,!1]}}))}))},e.prototype.checkValuePresent=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){for(r in n=function(n){if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];r.forEach((function(e,t){r[t]=e.toLowerCase()}));for(var o=t[n],i=0,a=r;i0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]-1);break;case a.SegmentOperandValueEnum.STARTING_STAR_VALUE:null!==n&&(r=n.endsWith(t));break;case a.SegmentOperandValueEnum.ENDING_STAR_VALUE:null!==n&&(r=n.startsWith(t));break;case a.SegmentOperandValueEnum.REGEX_VALUE:try{r=!!new RegExp(t,"g").test(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.GREATER_THAN_VALUE:if(null!==n)try{r=parseFloat(t)parseFloat(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:if(null!==n)try{r=parseFloat(t)>=parseFloat(n)}catch(e){r=!1}break;default:r=n===t}return r},e}();t.SegmentOperandEvaluator=p},4986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentEvaluator=t.SegmentationManager=void 0;var r=n(6373);Object.defineProperty(t,"SegmentationManager",{enumerable:!0,get:function(){return r.SegmentationManager}});var o=n(8011);Object.defineProperty(t,"SegmentEvaluator",{enumerable:!0,get:function(){return o.SegmentEvaluator}})},3769:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchWithRegex=t.getKeyValue=void 0;var r=n(1359);t.getKeyValue=function(e){if((0,r.isObject)(e)){var t=Object.keys(e)[0];return{key:t,value:e[t]}}},t.matchWithRegex=function(e,t){try{return e.match(new RegExp(t))}catch(e){return null}}},5030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=void 0;t.Connector=function(){}},2780:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var n=function(){function e(){}return e.prototype.attachConnector=function(e){var t,n,r,o;return"class"===(null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.prototype)||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.trim())||void 0===o?void 0:o.substring(0,5))?this.connector=new e:this.connector=e,this.connector},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.getConnector=function(){return this.connector},e}();t.Storage=n},9401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var r=n(2780);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return r.Storage}})},973:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=r.getStartRangeVariation()&&t<=r.getEndRangeVariation())return r}return null},e.prototype.checkInRange=function(e,t){if(t>=e.getStartRangeVariation()&&t<=e.getEndRangeVariation())return e},e.prototype.bucketUserToVariation=function(e,t,n){var r;if(!n||!e)return null;n.getTraffic()&&(r=1);var o=n.getTraffic(),s=(new i.DecisionMaker).generateHashValue("".concat(n.getId(),"_").concat(t,"_").concat(e)),c=(new i.DecisionMaker).generateBucketValue(s,u.Constants.MAX_TRAFFIC_VALUE,r);return a.LogManager.Instance.debug((0,p.buildMessage)(l.DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION,{userId:e,campaignKey:n.getKey(),percentTraffic:o,bucketValue:c,hashValue:s})),this.getVariation(n.getVariations(),c)},e.prototype.getPreSegmentationDecision=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=e.getType(),r={},n===c.CampaignTypeEnum.ROLLOUT||n===c.CampaignTypeEnum.PERSONALIZE?r=e.getVariations()[0].getSegments():n===c.CampaignTypeEnum.AB&&(r=e.getSegments()),!(0,g.isObject)(r)||Object.keys(r).length?[3,1]:(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_SKIP,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey()})),[2,!0]);case 1:return[4,s.SegmentationManager.Instance.validateSegmentation(r,t.getCustomVariables())];case 2:return o.sent()?(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"passed"})),[2,!0]):(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"failed"})),[2,!1])}}))}))},e.prototype.getVariationAlloted=function(e,t,n){var r=this.isUserPartOfCampaign(e,n);return n.getType()===c.CampaignTypeEnum.ROLLOUT||n.getType()===c.CampaignTypeEnum.PERSONALIZE?r?n.getVariations()[0]:null:r?this.bucketUserToVariation(e,t,n):null},e}();t.CampaignDecisionService=d},7675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1359),o=function(){function e(e){var t;this.callback=null===(t=e.integrations)||void 0===t?void 0:t.callback,this.isCallBackFunction=(0,r.isFunction)(this.callback),this.decision={}}return e.prototype.execute=function(e){this.isCallBackFunction&&this.callback(e)},e.prototype.set=function(e){this.isCallBackFunction&&(this.decision=e)},e.prototype.get=function(){return this.decision},e}();t.default=o},470:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRuleTypeUsingCampaignIdFromFeature=t.assignRangeValuesMEG=t.getCampaignIdsFromFeatureKey=t.getFeatureKeysFromCampaignIds=t.getCampaignsByGroupId=t.findGroupsFeaturePartOf=t.getGroupDetailsIfCampaignPartOfIt=t.setCampaignAllocation=t.getVariationFromCampaignKey=t.getBucketingSeed=t.scaleVariationWeights=t.assignRangeValues=t.setVariationAllocation=void 0;var r=n(5399),o=n(4273),i=n(7128),a=n(2365),s=n(4580),u=n(8754);function c(e,t){var n=p(e.getWeight());return n?(e.setStartRange(t+1),e.setEndRange(t+n)):(e.setStartRange(-1),e.setEndRange(-1)),n}function l(e,t,n){void 0===n&&(n=null);var r=t.toString();return null!==n&&(r="".concat(t,"_").concat(n).toString()),e.getCampaignGroups()&&Object.prototype.hasOwnProperty.call(e.getCampaignGroups(),r)?{groupId:e.getCampaignGroups()[r],groupName:e.getGroups()[e.getCampaignGroups()[r]].name}:{}}function g(e,t){var n=p(e.weight);return n?(e.startRangeVariation=t+1,e.endRangeVariation=t+n):(e.startRangeVariation=-1,e.endRangeVariation=-1),n}function p(e){if(!e||0===e)return 0;var t=Math.ceil(100*e);return Math.min(t,r.Constants.MAX_TRAFFIC_VALUE)}t.setVariationAllocation=function(e){if(e.getType()===o.CampaignTypeEnum.ROLLOUT||e.getType()===o.CampaignTypeEnum.PERSONALIZE)!function(e){for(var t=0;t{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return"[object Null]"===Object.prototype.toString.call(e)}function i(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function u(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function c(e){return e!=e}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function g(e){return"[object Function]"===Object.prototype.toString.call(e)}function p(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function d(e){return"[object Promise]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.isPromise=t.isRegex=t.isFunction=t.isDate=t.isNaN=t.isBoolean=t.isString=t.isNumber=t.isDefined=t.isUndefined=t.isNull=t.isArray=t.isObject=void 0,t.isObject=n,t.isArray=r,t.isNull=o,t.isUndefined=i,t.isDefined=function(e){return!i(e)&&!o(e)},t.isNumber=a,t.isString=s,t.isBoolean=u,t.isNaN=c,t.isDate=l,t.isFunction=g,t.isRegex=p,t.isPromise=d,t.getType=function(e){return n(e)?"Object":r(e)?"Array":o(e)?"Null":i(e)?"Undefined":c(e)?"NaN":a(e)?"Number":s(e)?"String":u(e)?"Boolean":l(e)?"Date":p(e)?"Regex":g(e)?"Function":d(e)?"Promise":"Unknown Type"}},2245:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,[!0,_]]:[3,3];case 2:l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:n.getRuleKey(),userId:i.getId()})),o.label=3;case 3:if(i.setCustomVariables(Object.assign({},i.getCustomVariables(),{_vwoUserId:n.getIsUserListEnabled()?r:i.getId()})),Object.assign(d,{customVariables:i.getCustomVariables()}),S=(0,h.getGroupDetailsIfCampaignPartOfIt)(e,n.getId(),n.getType()===a.CampaignTypeEnum.PERSONALIZE?n.getVariations()[0].getId():null).groupId,!(T=null==c?void 0:c.get(S)))return[3,4];if(n.getType()===a.CampaignTypeEnum.AB){if(T===v)return[2,[!0,null]]}else if(n.getType()===a.CampaignTypeEnum.PERSONALIZE&&T===v+"_"+n.getVariations()[0].getId())return[2,[!0,null]];return[2,[!1,null]];case 4:return[4,(new I.StorageDecorator).getFeatureFromStorage("".concat(f.Constants.VWO_META_MEG_KEY).concat(S),i,g)];case 5:if((O=o.sent())&&O.experimentKey&&O.experimentId)return l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE,{campaignKey:O.experimentKey,userId:i.getId()})),O.experimentId===v?n.getType()===a.CampaignTypeEnum.PERSONALIZE?O.experimentVariationId===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(S,O.experimentId+"_"+O.experimentVariationId),[2,[!1,null]]):[2,[!0,null]]:(-1!=O.experimentVariationId?c.set(S,O.experimentId+"_"+O.experimentVariationId):c.set(S,O.experimentId),[2,[!1,null]]);o.label=6;case 6:return[4,(new p.CampaignDecisionService).getPreSegmentationDecision(n,i)];case 7:return(A=o.sent())&&S?[4,(0,m.evaluateGroups)(e,t,S,s,i,g)]:[3,9];case 8:return(R=o.sent())&&R.id===v?R.type===a.CampaignTypeEnum.AB||R.variations[0].id===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(S,R.id+"_"+R.variations[0].id),[2,[!1,null]]):R?(R.type===a.CampaignTypeEnum.AB?c.set(S,R.id):c.set(S,R.id+"_"+R.variations[0].id),[2,[!1,null]]):(c.set(S,-1),[2,[!1,null]]);case 9:return[2,[A,null]]}}))}))},t.evaluateTrafficAndGetVariation=function(e,t,n){var r=(new p.CampaignDecisionService).getVariationAlloted(n,e.getAccountId(),t);return r?(l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"got variation:".concat(r.getKey())})),r):(l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"did not get any variation"})),null)};var b=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,_(e,t)];case 1:return n=o.sent(),r=n?s.StatusEnum.PASSED:s.StatusEnum.FAILED,i=n?n.variation.key:"",l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_STATUS,{userId:t.getId(),campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:r,variationString:i})),[2,n]}}))}))},_=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,s,f,m,E;return o(this,(function(o){switch(o.label){case 0:return n=[],r=[],e.getVariations().forEach((function(o){if(!(0,d.isObject)(o.getSegments())||Object.keys(o.getSegments()).length){if((0,d.isObject)(o.getSegments())){var s=g.SegmentationManager.Instance.validateSegmentation(o.getSegments(),t.getVariationTargetingVariables());(s=(0,i.isPromise)(s)?s:Promise.resolve(s)).then((function(e){e&&n.push((0,v.cloneObject)(o))})),r.push(s)}}else l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),userId:t.getId(),variation:o.getKey()?"for variation: ".concat(o.getKey()):""}))})),[4,Promise.all(r)];case 1:if(o.sent(),n.length>1){for((0,h.scaleVariationWeights)(n),f=0,m=0,E=0;f0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0){o.setIsGatewayServiceRequired(!0);break}}}}},162:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildMessage=void 0;var r=n(1359),o=/\{([0-9a-zA-Z_]+)\}/g;t.buildMessage=function(e,t){void 0===t&&(t={});try{return e.replace(o,(function(n,o,i){if("{"===e[i-1]&&"}"===e[i+n.length])return o;var a=t[o];return null==a?"":(0,r.isFunction)(a)?a():a}))}catch(t){return e}}},7928:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0))return[3,5];g=null,d=0,h=r,o.label=1;case 1:return d0)?(n.set(t.getKey(),{rolloutId:g.id,rolloutKey:g.key,rolloutVariationId:g.variations[0].id}),[2,!0]):(i.push(t.getKey()),[2,!1]);case 5:return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS,{featureKey:t.getKey()})),[2,!0]}}))}))},_=function(e,t,n,i){return r(void 0,void 0,void 0,(function(){var r,l,g,f,v,y,m,I,b,_,S,T,O;return o(this,(function(A){switch(A.label){case 0:r=[],l=[],g=[],f=Array.from(t),v=0,y=f,A.label=1;case 1:if(!(v1&&f===i.Constants.RANDOM_ALGO?r=T(a,l,d,c,g):a.length>1&&(r=O(e,a,l,d,c,g)),0===a.length&&(1===n.length?(r=n[0],p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:n[0].getType()===s.CampaignTypeEnum.AB?n[0].getKey():n[0].getName()+"_"+n[0].getRuleKey(),groupId:c,userId:l.getId(),algo:""}))):n.length>1&&f===i.Constants.RANDOM_ALGO?r=T(n,l,d,c,g):n.length>1&&(r=O(e,n,l,d,c,g))),[2,r]}))}))},T=function(e,t,n,r,o){e.forEach((function(t){t.weight=Math.round(100/e.length*1e4)/1e4})),e=e.map((function(e){return(new l.VariationModel).modelFromDictionary(e)})),(0,h.setCampaignAllocation)(e);var c=(new d.CampaignDecisionService).getVariation(e,(new g.DecisionMaker).calculateBucketValue((0,h.getBucketingSeed)(t.getId(),void 0,r)));return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:c.getType()===s.CampaignTypeEnum.AB?c.getKey():c.getKey()+"_"+c.getRuleKey(),groupId:r,userId:t.getId(),algo:"using random algorithm"})),c&&((new a.StorageDecorator).setDataInStorage({featureKey:"".concat(i.Constants.VWO_META_MEG_KEY).concat(r),context:t,experimentId:c.getId(),experimentKey:c.getKey(),experimentVariationId:c.getType()===s.CampaignTypeEnum.PERSONALIZE?c.getVariations()[0].getId():-1},o),n.includes(c.getId()))?c:null},O=function(e,t,n,r,o,c){for(var f=null,y=!1,I=(0,v.isUndefined)(e.getGroups()[o].p)?{}:e.getGroups()[o].p,b=(0,v.isUndefined)(e.getGroups()[o].wt)?{}:e.getGroups()[o].wt,_=0;_0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)for(var s in r)a.d.event.props[s]=r[s];return p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),a},t.getAttributePayloadData=function(e,t,n,r,o,i,a){void 0===i&&(i=""),void 0===a&&(a="");var u=m(e,t,n,i,a);return u.d.event.props.isCustomEvent=!0,u.d.event.props[s.Constants.VWO_FS_ENVIRONMENT]=e.getSdkkey(),u.d.visitor.props[r]=o,p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),u},t.sendPostApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:return d.NetworkManager.Instance.attachClient(),n={},r=t.d.visitor_ua,i=t.d.visitor_ip,r&&(n[u.HeadersEnum.USER_AGENT]=r),i&&(n[u.HeadersEnum.IP]=i),a=new d.RequestModel(y.UrlUtil.getBaseUrl(),c.HttpMethodEnum.POST,l.UrlEnum.EVENTS,e,t,n,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),[4,d.NetworkManager.Instance.post(a).catch((function(e){p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.POST,err:(0,h.isObject)(e)?JSON.stringify(e):e}))}))];case 1:return o.sent(),[2]}}))}))},t.sendGetApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:d.NetworkManager.Instance.attachClient(),n=new d.RequestModel(y.UrlUtil.getBaseUrl(),c.HttpMethodEnum.GET,t,e,null,null,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.NetworkManager.Instance.get(n)];case 2:return[2,o.sent()];case 3:return r=o.sent(),p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.GET,err:(0,h.isObject)(r)?JSON.stringify(r):r})),[2,null];case 4:return[2]}}))}))};var E=!1;t.getShouldWaitForTrackingCalls=function(){return E},t.setShouldWaitForTrackingCalls=function(e){E=e}},4782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){var e=this;return this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),this}},6195:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?(Object.assign(d,{experimentId:n.getId(),experimentKey:n.getKey(),experimentVariationId:h.variationId}),(0,s.getShouldWaitForTrackingCalls)()?[4,(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c)]:[3,3]):[3,4];case 2:return o.sent(),[3,4];case 3:(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c),o.label=4;case 4:return[2,{preSegmentationResult:f,whitelistedObject:h,updatedDecision:d}]}}))}))}},362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSettingsAndAddCampaignsToRules=void 0;var r=n(6130),o=n(9181),i=n(8667),a=n(2898);t.setSettingsAndAddCampaignsToRules=function(e,t){t.settings=new r.SettingsModel(e),t.originalSettings=e;var n=t.settings.getCampaigns();n.forEach((function(e,t){(0,o.setVariationAllocation)(e),n[t]=e})),(0,i.addLinkedCampaignsToSettings)(t.settings),(0,a.addIsGatewayServiceRequiredFlag)(t.settings)}},8694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtil=void 0;var r=n(470),o=n(1359);t.UrlUtil={init:function(e){var n=(void 0===e?{}:e).collectionPrefix;return n&&(0,o.isString)(n)&&(t.UrlUtil.collectionPrefix=n),t.UrlUtil},getBaseUrl:function(){var e=r.SettingsService.Instance.hostname;return r.SettingsService.Instance.isGatewayServiceProvided?e:t.UrlUtil.collectionPrefix?"".concat(e,"/").concat(t.UrlUtil.collectionPrefix):e}}},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=t.getUUID=t.getRandomUUID=void 0;var r=n(2346),o=n(2831),i=n(2831);function a(e,t){if(e&&t)return(0,i.v5)(e,t)}t.getRandomUUID=function(e){var t=(0,i.v5)(e,i.v5.DNS);return(0,i.v5)((0,o.v4)(),t)},t.getUUID=function(e,t){var n=(0,i.v5)(r.SEED_URL,i.v5.URL);e=String(e);var o=a(t=String(t),n),s=a(e,o);return null==s?void 0:s.replace(/-/gi,"").toUpperCase()},t.generateUUID=a},3890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendPostCall=t.sendGetCall=void 0;var r=n(8202),o=n(4580),i=n(8754),a=n(7128),s=function(){};function u(e,t){var n=t.networkOptions,u=t.successCallback,c=void 0===u?s:u,l=t.errorCallback,g=void 0===l?s:l,p="".concat(n.scheme,"://").concat(n.hostname).concat(n.path);n.port&&(p="".concat(n.scheme,"://").concat(n.hostname,":").concat(n.port).concat(n.path));var d=n.body,f=n.headers||{},h=n.timeout,v=new XMLHttpRequest;for(var y in h&&(v.timeout=h),v.onload=function(){if(v.status>=200&&v.status<300){var t=v.responseText;if(e===r.HttpMethodEnum.GET){var n=JSON.parse(t);c(n)}else c(t)}else g(v.statusText)},v.onerror=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"".concat(v.statusText,", status: ").concat(v.status)})),g(v.statusText)},h&&(v.ontimeout=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"Request timed out"}))}),v.open(e,p,!0),f)y in f&&"Content-Type"!==y&&"Content-Length"!==y&&v.setRequestHeader(y,f[y]);e===r.HttpMethodEnum.POST?v.send(JSON.stringify(d)):e===r.HttpMethodEnum.GET&&v.send()}t.sendGetCall=function(e){u(r.HttpMethodEnum.GET,e)},t.sendPostCall=function(e){u(r.HttpMethodEnum.POST,e)}},2831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return u.default}});var r=p(n(3518)),o=p(n(4948)),i=p(n(5073)),a=p(n(7186)),s=p(n(4808)),u=p(n(7775)),c=p(n(7037)),l=p(n(9910)),g=p(n(6792));function p(e){return e&&e.__esModule?e:{default:e}}},2311:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r((s=r(r(t,e),r(o,a)))<<(u=i)|s>>>32-u,n);var s,u}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,i=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=n},4808:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},6792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}},7656:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},2858:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},9042:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;g=l,l=c,c=r(u,30)>>>0,u=a,a=s}o[0]=o[0]+a>>>0,o[1]=o[1]+u>>>0,o[2]=o[2]+c>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+g>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]}},9910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=a;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}t.default=function(e,t=0){const n=a(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(2858))&&r.__esModule?r:{default:r},i=n(9910);let a,s,u=0,c=0;t.default=function(e,t,n){let r=t&&n||0;const l=t||new Array(16);let g=(e=e||{}).node||a,p=void 0!==e.clockseq?e.clockseq:s;if(null==g||null==p){const t=e.random||(e.rng||o.default)();null==g&&(g=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==p&&(p=s=16383&(t[6]<<8|t[7]))}let d=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:c+1;const h=d-u+(f-c)/1e4;if(h<0&&void 0===e.clockseq&&(p=p+1&16383),(h<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=f,s=p,d+=122192928e5;const v=(1e4*(268435455&d)+f)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=p>>>8|128,l[r++]=255&p;for(let e=0;e<6;++e)l[r+e]=g[e];return t||(0,i.unsafeStringify)(l)}},4948:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9025)),o=i(n(2311));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,o.default);t.default=a},9025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,a,s){var u;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(6140)),o=a(n(2858)),i=n(9910);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const a=(e=e||{}).random||(e.rng||o.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,i.unsafeStringify)(a)}},7186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9025)),o=i(n(9042));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,o.default);t.default=a},7037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7656))&&r.__esModule?r:{default:r};t.default=function(e){return"string"==typeof e&&o.default.test(e)}},7775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},3095:(e,t,n)=>{e.exports={debugMessages:n(805),infoMessages:n(7778),warnMessages:n(8854),errorMessages:n(1198),traceMessages:n(6611)}},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends TypeError{constructor(e,t){let n;const{message:r,...o}=e,{path:i}=e;super(0===i.length?r:"At path: "+i.join(".")+" -- "+r),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var r;return null!=(r=n)?r:n=[e,...t()]}}}function r(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function i(e){return"string"==typeof e?JSON.stringify(e):""+e}function a(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:a}=t,{type:s}=n,{refinement:u,message:c="Expected a value of type `"+s+"`"+(u?" with refinement `"+u+"`":"")+", but received: `"+i(r)+"`"}=e;return{value:r,type:s,refinement:u,key:o[o.length-1],path:o,branch:a,...e,message:c}}function*s(e,t,n,o){var i;r(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const r of e){const e=a(r,t,n,o);e&&(yield e)}}function*u(e,t,n={}){const{path:o=[],branch:i=[e],coerce:a=!1,mask:s=!1}=n,c={path:o,branch:i};if(a&&(e=t.coercer(e,c),s&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let l=!0;for(const n of t.validator(e,c))l=!1,yield[n,void 0];for(let[n,g,p]of t.entries(e,c)){const t=u(g,p,{path:void 0===n?o:[...o,n],branch:void 0===n?i:[...i,g],coerce:a,mask:s});for(const o of t)o[0]?(l=!1,yield[o[0],void 0]):a&&(g=o[1],void 0===n?e=g:e instanceof Map?e.set(n,g):e instanceof Set?e.add(g):r(e)&&(e[n]=g))}if(l)for(const n of t.refiner(e,c))l=!1,yield[n,void 0];l&&(yield[void 0,e])}class c{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>s(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>s(o(e,t),t,this,e):()=>[]}assert(e){return l(e,this)}create(e){return g(e,this)}is(e){return d(e,this)}mask(e){return p(e,this)}validate(e,t={}){return f(e,this,t)}}function l(e,t){const n=f(e,t);if(n[0])throw n[0]}function g(e,t){const n=f(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function p(e,t){const n=f(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function d(e,t){return!f(e,t)[0]}function f(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function h(e,t){return new c({type:e,schema:null,validator:t})}function v(){return h("never",(()=>!1))}function y(e){const t=e?Object.keys(e):[],n=v();return new c({type:"object",schema:e||null,*entries(o){if(e&&r(o)){const r=new Set(Object.keys(o));for(const n of t)r.delete(n),yield[n,o[n],e[n]];for(const e of r)yield[e,o[e],n]}},validator:e=>r(e)||"Expected an object, but received: "+i(e),coercer:e=>r(e)?{...e}:e})}function m(e){return new c({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function E(){return h("string",(e=>"string"==typeof e||"Expected a string, but received: "+i(e)))}function I(){return h("unknown",(()=>!0))}function b(e,t,n){return new c({...e,coercer:(r,o)=>d(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}function _(e,t,n){return new c({...e,*refiner(r,o){yield*e.refiner(r,o);const i=s(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}t.Struct=c,t.StructError=n,t.any=function(){return h("any",(()=>!0))},t.array=function(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+i(e)})},t.assert=l,t.assign=function(...e){const t=e.map((e=>e.schema));return y(Object.assign({},...t))},t.boolean=function(){return h("boolean",(e=>"boolean"==typeof e))},t.coerce=b,t.create=g,t.date=function(){return h("date",(e=>e instanceof Date&&!isNaN(e.getTime())||"Expected a valid `Date` object, but received: "+i(e)))},t.defaulted=function(e,t,n={}){return b(e,I(),(e=>{const r="function"==typeof t?t():t;if(void 0===e)return r;if(!n.strict&&o(e)&&o(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))},t.define=h,t.deprecated=function(e,t){return new c({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})},t.dynamic=function(e){return new c({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n)})},t.empty=function(e){const t="Expected an empty "+e.type;return _(e,"empty",(e=>{if(e instanceof Map||e instanceof Set){const{size:n}=e;return 0===n||t+" but received one with a size of `"+n+"`"}{const{length:n}=e;return 0===n||t+" but received one with a length of `"+n+"`"}}))},t.enums=function(e){const t={},n=e.map((e=>i(e))).join();for(const n of e)t[n]=n;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||"Expected one of `"+n+"`, but received: "+i(t)})},t.func=function(){return h("func",(e=>"function"==typeof e||"Expected a function, but received: "+i(e)))},t.instance=function(e){return h("instance",(t=>t instanceof e||"Expected a `"+e.name+"` instance, but received: "+i(t)))},t.integer=function(){return h("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+i(e)))},t.intersection=function(e){return new c({type:"intersection",schema:null,*entries(t,n){for(const r of e)yield*r.entries(t,n)},*validator(t,n){for(const r of e)yield*r.validator(t,n)},*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})},t.is=d,t.lazy=function(e){let t;return new c({type:"lazy",schema:null,*entries(n,r){null!=t||(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(null!=t||(t=e()),t.validator(n,r)),coercer:(n,r)=>(null!=t||(t=e()),t.coercer(n,r))})},t.literal=function(e){const t=i(e),n=typeof e;return new c({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `"+t+"`, but received: "+i(n)})},t.map=function(e,t){return new c({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,o]of n.entries())yield[r,r,e],yield[r,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||"Expected a `Map` object, but received: "+i(e)})},t.mask=p,t.max=function(e,t,n={}){const{exclusive:r}=n;return _(e,"max",(n=>r?nr?n>t:n>=t||"Expected a "+e.type+" greater than "+(r?"":"or equal to ")+t+" but received `"+n+"`"))},t.never=v,t.nullable=function(e){return new c({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})},t.number=function(){return h("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+i(e)))},t.object=y,t.omit=function(e,t){const{schema:n}=e,r={...n};for(const e of t)delete r[e];return y(r)},t.optional=m,t.partial=function(e){const t=e instanceof c?{...e.schema}:{...e};for(const e in t)t[e]=m(t[e]);return y(t)},t.pattern=function(e,t){return _(e,"pattern",(n=>t.test(n)||"Expected a "+e.type+" matching `/"+t.source+'/` but received "'+n+'"'))},t.pick=function(e,t){const{schema:n}=e,r={};for(const e of t)r[e]=n[e];return y(r)},t.record=function(e,t){return new c({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>r(e)||"Expected an object, but received: "+i(e)})},t.refine=_,t.regexp=function(){return h("regexp",(e=>e instanceof RegExp))},t.set=function(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||"Expected a `Set` object, but received: "+i(e)})},t.size=function(e,t,n=t){const r="Expected a "+e.type,o=t===n?"of `"+t+"`":"between `"+t+"` and `"+n+"`";return _(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||r+" "+o+" but received `"+e+"`";if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=n||r+" with a size "+o+" but received one with a size of `"+i+"`"}{const{length:i}=e;return t<=i&&i<=n||r+" with a length "+o+" but received one with a length of `"+i+"`"}}))},t.string=E,t.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),h(e,t)},t.trimmed=function(e){return b(e,E(),(e=>e.trim()))},t.tuple=function(e){const t=v();return new c({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;oArray.isArray(e)||"Expected an array, but received: "+i(e)})},t.type=function(e){const t=Object.keys(e);return new c({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||"Expected an object, but received: "+i(e)})},t.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,validator(n,r){const o=[];for(const t of e){const[...e]=u(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return["Expected the value to satisfy a union of `"+t+"`, but received: "+i(n),...o]}})},t.unknown=I,t.validate=f},805:e=>{"use strict";e.exports=JSON.parse('{"API_CALLED":"API - {apiName} called","SERVICE_INITIALIZED":"VWO {service} initialized while creating an instance of SDK","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED":"Rollout rule got passed for user {userId}. Hence, evaluating experiments","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT":"No Rollout rules present for the feature. Hence, checking experiment rules","USER_BUCKET_TO_VARIATION":"User ID:{userId} for experiment:{campaignKey} having percent traffic:{percentTraffic} got bucket-value:{bucketValue} and hash-value:{hashValue}","IMPRESSION_FOR_TRACK_USER":"Impression built for vwo_variationShown(VWO standard event for tracking user) event haivng Account ID:{accountId}, User ID:{userId}, and experiment ID:{campaignId}","IMPRESSION_FOR_TRACK_GOAL":"Impression built for event:{eventName} event having Account ID:{accountId}, and user ID:{userId}","IMPRESSION_FOR_SYNC_VISITOR_PROP":"Impression built for {eventName}(VWO internal event) event for Account ID:{accountId}, and user ID:{userId}"}')},1198:e=>{"use strict";e.exports=JSON.parse('{"INIT_OPTIONS_ERROR":"[ERROR]: VWO-SDK {date} Options should be of type object","INIT_OPTIONS_SDK_KEY_ERROR":"[ERROR]: VWO-SDK {date} Please provide the sdkKey in the options and should be a of type string","INIT_OPTIONS_ACCOUNT_ID_ERROR":"[ERROR]: VWO-SDK {date} Please provide VWO account ID in the options and should be a of type string|number","INIT_OPTIONS_INVALID":"Invalid key:{key} passed in options. Should be of type:{correctType} and greater than equal to 1000","SETTINGS_FETCH_ERROR":"Settings could not be fetched. Error:{err}","SETTINGS_SCHEMA_INVALID":"Settings are not valid. Failed schema validation","POLLING_FETCH_SETTINGS_FAILED":"Error while fetching VWO settings with polling","API_THROW_ERROR":"API - {apiName} failed to execute. Trace:{err}","API_INVALID_PARAM":"Key:{key} passed to API:{apiName} is not of valid type. Got type:{type}, should be:{correctType}","API_SETTING_INVALID":"Settings are not valid. Contact VWO Support","API_CONTEXT_INVALID":"Context should be an object and must contain a mandatory key - id, which is User ID","FEATURE_NOT_FOUND":"Feature not found for the key:{featureKey}","EVENT_NOT_FOUND":"Event:{eventName} not found in any of the features\' metrics","STORED_DATA_ERROR":"Error in getting data from storage. Error:{err}","STORING_DATA_ERROR":"Key:{featureKey} is not valid. Not able to store data into storage","GATEWAY_URL_ERROR":"Please provide a valid URL for VWO Gateway Service while initializing the SDK","NETWORK_CALL_FAILED":"Error occurred while sending {method} request. Error:{err}"}')},7778:e=>{"use strict";e.exports=JSON.parse('{"ON_INIT_ALREADY_RESOLVED":"[INFO]: VWO-SDK {date} {apiName} already resolved","ON_INIT_SETTINGS_FAILED":"[INFO]: VWO-SDK {date} VWO settings could not be fetched","POLLING_SET_SETTINGS":"There\'s a change in settings from the last settings fetched. Hence, instantiating a new VWO client internally","POLLING_NO_CHANGE_IN_SETTINGS":"No change in settings with the last settings fetched. Hence, not instantiating new VWO client","SETTINGS_FETCH_SUCCESS":"Settings fetched successfully","CLIENT_INITIALIZED":"VWO Client initialized","STORED_VARIATION_FOUND":"Variation {variationKey} found in storage for the user {userId} for the {experimentType} experiment:{experimentKey}","USER_PART_OF_CAMPAIGN":"User ID:{userId} is {notPart} part of experiment:{campaignKey}","SEGMENTATION_SKIP":"For userId:{userId} of experiment:{campaignKey}, segments was missing. Hence, skipping segmentation","SEGMENTATION_STATUS":"Segmentation {status} for userId:{userId} of experiment:{campaignKey}","USER_CAMPAIGN_BUCKET_INFO":"User ID:{userId} for experiment:{campaignKey} {status}","WHITELISTING_SKIP":"Whitelisting is not used for experiment:{campaignKey}, hence skipping evaluating whitelisting {variation} for User ID:{userId}","WHITELISTING_STATUS":"User ID:{userId} for experiment:{campaignKey} {status} whitelisting {variationString}","VARIATION_RANGE_ALLOCATION":"Variation:{variationKey} of experiment:{campaignKey} having weight:{variationWeight} got bucketing range: ({startRange} - {endRange})","IMPACT_ANALYSIS":"Tracking feature:{featureKey} being {status} for Impact Analysis Campaign for the user {userId}","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS":"No rollout rule found for feature:{featureKey}. Hence, evaluating experiments","MEG_CAMPAIGN_FOUND_IN_STORAGE":"Campaign {campaignKey} found in storage for user ID:{userId}","MEG_CAMPAIGN_ELIGIBLE":"Campaign {campaignKey} is eligible for user ID:{userId}","MEG_WINNER_CAMPAIGN":"MEG: Campaign {campaignKey} is the winner for group {groupId} for user ID:{userId} {algo}"}')},6611:e=>{"use strict";e.exports={}},8854:e=>{"use strict";e.exports={}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.onInit=e.init=e.StorageConnector=e.LogLevelEnum=void 0;var t=n(4940);Object.defineProperty(e,"LogLevelEnum",{enumerable:!0,get:function(){return t.LogLevelEnum}});var o=n(5030);Object.defineProperty(e,"StorageConnector",{enumerable:!0,get:function(){return o.Connector}});var i=n(9709);Object.defineProperty(e,"init",{enumerable:!0,get:function(){return i.init}}),Object.defineProperty(e,"onInit",{enumerable:!0,get:function(){return i.onInit}})})(),r})())); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vwoSdk=t():e.vwoSdk=t()}(this,(()=>(()=>{var e={8005:e=>{!function(){const t=e=>(new TextEncoder).encode(e);function n(e,n){let r,o,i,a,s,u,c,l;for("string"==typeof e&&(e=t(e)),r=3&e.length,o=e.length-r,i=n,s=3432918353,u=461845907,l=0;l>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,i^=c,i=i<<13|i>>>19,a=5*(65535&i)+((5*(i>>>16)&65535)<<16)&4294967295,i=27492+(65535&a)+((58964+(a>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&e[l+2])<<16;case 2:c^=(255&e[l+1])<<8;case 1:c^=255&e[l],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,i^=c}return i^=e.length,i^=i>>>16,i=2246822507*(65535&i)+((2246822507*(i>>>16)&65535)<<16)&4294967295,i^=i>>>13,i=3266489909*(65535&i)+((3266489909*(i>>>16)&65535)<<16)&4294967295,i^=i>>>16,i>>>0}const r=n;r.v2=function(e,n){"string"==typeof e&&(e=t(e));let r,o=e.length,i=n^o,a=0;for(;o>=4;)r=255&e[a]|(255&e[++a])<<8|(255&e[++a])<<16|(255&e[++a])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^r,o-=4,++a;switch(o){case 3:i^=(255&e[a+2])<<16;case 2:i^=(255&e[a+1])<<8;case 1:i^=255&e[a],i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)}return i^=i>>>13,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>15,i>>>0},r.v3=n,e.exports=r}()},9709:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VWOBuilder=void 0;var r=n(4580),o=n(6710),i=n(4986),a=n(9401),s=n(1522),u=n(470),c=n(7128),l=n(1359),g=n(8667),p=n(8754),d=n(4782),f=n(362),h=n(1720),v=function(){function e(e){this.options=e}return e.prototype.setNetworkManager=function(){var e,t,n,i=o.NetworkManager.Instance;return i.attachClient(null===(t=null===(e=this.options)||void 0===e?void 0:e.network)||void 0===t?void 0:t.client),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Network Layer"})),i.getConfig().setDevelopmentMode(null===(n=this.options)||void 0===n?void 0:n.isDevelopmentMode),this},e.prototype.setSegmentation=function(){var e;return i.SegmentationManager.Instance.attachEvaluator(null===(e=this.options)||void 0===e?void 0:e.segmentation),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Segmentation Evaluator"})),this},e.prototype.fetchSettings=function(e){var t=this,n=new d.Deferred;return this.isSettingsFetchInProgress?this.fetchSettings(e):(this.isSettingsFetchInProgress=!0,this.settingFileManager.getSettings(e).then((function(r){e||(t.originalSettings=r),t.isSettingsFetchInProgress=!1,n.resolve(r)})),n.promise)},e.prototype.getSettings=function(e){var t=new d.Deferred;try{!e&&this.settings?(r.LogManager.Instance.info("Using already fetched and cached settings"),t.resolve(this.settings)):this.fetchSettings(e).then((function(e){t.resolve(e)}))}catch(e){r.LogManager.Instance.error("Failed to fetch settings. Error: "+e),t.resolve({})}return t.promise},e.prototype.setStorage=function(){return this.options.storage?this.storage=a.Storage.Instance.attachConnector(this.options.storage):this.storage=null,this},e.prototype.setSettingsService=function(){return this.settingFileManager=new u.SettingsService(this.options),this},e.prototype.setLogger=function(){return this.logManager=new r.LogManager(this.options.logger||{}),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Logger"})),this},e.prototype.getRandomUserId=function(){var e="getRandomUserId";try{return r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.API_CALLED,{apiName:e})),(0,h.getRandomUUID)(this.options.sdkKey)}catch(t){r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.API_THROW_ERROR,{apiName:e,err:t}))}},e.prototype.initPolling=function(){return this.options.pollInterval?this.options.pollInterval&&!(0,l.isNumber)(this.options.pollInterval)||this.options.pollInterval&&this.options.pollInterval<1e3?(r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.INIT_OPTIONS_INVALID,{key:"pollInterval",correctType:"number"})),this):(this.checkAndPoll(),this):this},e.prototype.build=function(e){return this.vwoInstance=new s.VWOClient(e,this.options),this.vwoInstance},e.prototype.checkAndPoll=function(){var e=this,t=this.options.pollInterval;setInterval((function(){e.getSettings(!0).then((function(t){var n=JSON.stringify(e.originalSettings);if(JSON.stringify(t)!==n){e.originalSettings=t;var o=(0,g.cloneObject)(t);r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_SET_SETTINGS),(0,f.setSettingsAndAddCampaignsToRules)(o,e.vwoInstance)}else r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS)})).catch((function(){r.LogManager.Instance.error(c.ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED)}))}),t)},e}();t.VWOBuilder=v},1522:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)||o)return[3,10];G=[],j=0,F=k,i.label=3;case 3:return j0?(W=(new l.CampaignModel).modelFromDictionary(G[0]),te=(0,y.evaluateTrafficAndGetVariation)(t,W,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,M=!0,A=te,O(W,te,w,V),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,W.getId(),te.getId(),n)]:[3,8]):[3,9]):[3,9];case 7:return i.sent(),[3,9];case 8:(0,E.createAndSendImpressionForVariationShown)(t,W.getId(),te.getId(),n),i.label=9;case 9:return[3,11];case 10:0===k.length&&(p.LogManager.Instance.debug(c.DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT),M=!0),i.label=11;case 11:if(!M)return[3,18];H=[],B=(0,m.getAllExperimentRules)(C),q=new Map,Q=0,Y=B,i.label=12;case 12:return Q0?(ee=(new l.CampaignModel).modelFromDictionary(H[0]),te=(0,y.evaluateTrafficAndGetVariation)(t,ee,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,R=te,O(ee,te,w,V),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n)]:[3,17]):[3,18]):[3,18];case 16:return i.sent(),[3,18];case 17:(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n),i.label=18;case 18:return o&&(new a.StorageDecorator).setDataInStorage(r({featureKey:e,context:n},w),P),T.set(V),T.execute(T.get()),(null===(oe=C.getImpactCampaign())||void 0===oe?void 0:oe.getCampaignId())?(p.LogManager.Instance.info((0,I.buildMessage)(c.InfoLogMessagesEnum.IMPACT_ANALYSIS,{userId:n.getId(),featureKey:e,status:o?"enabled":"disabled"})),(0,S.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,null===(ie=C.getImpactCampaign())||void 0===ie?void 0:ie.getCampaignId(),o?2:1,n)]:[3,20]):[3,21];case 19:return i.sent(),[3,21];case 20:(0,E.createAndSendImpressionForVariationShown)(t,null===(ae=C.getImpactCampaign())||void 0===ae?void 0:ae.getCampaignId(),o?2:1,n),i.label=21;case 21:return ne=null!==(ue=null!==(se=null==R?void 0:R.variables)&&void 0!==se?se:null==A?void 0:A.variables)&&void 0!==ue?ue:[],L.resolve({isEnabled:function(){return o},getVariables:function(){return ne},getVariable:function(e,t){var n,r=ne.find((function(t){return t.key===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:t}}),[2,L.promise]}}))}))},e}();function O(e,t,n,r){e.getType()===u.CampaignTypeEnum.ROLLOUT?Object.assign(n,{rolloutId:e.getId(),rolloutKey:e.getKey(),rolloutVariationId:t.getId()}):Object.assign(n,{experimentId:e.getId(),experimentKey:e.getKey(),experimentVariationId:t.getId()}),Object.assign(r,n)}t.FlagApi=T},8164:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_URL=t.HTTPS_PROTOCOL=t.HTTP_PROTOCOL=t.SEED_URL=t.HTTPS=t.HTTP=void 0,t.HTTP="http",t.HTTPS="https",t.SEED_URL="https://vwo.com",t.HTTP_PROTOCOL="".concat(t.HTTP,"://"),t.HTTPS_PROTOCOL="".concat(t.HTTPS,"://"),t.BASE_URL="dev.visualwebsiteoptimizer.com"},5399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=void 0;var r,o,i=n(5520),a=n(2346);r={name:"vwo-fme-javascript-sdk",version:"1.8.0"},o=i.PlatformEnum.CLIENT,t.Constants={SDK_NAME:r.name,SDK_VERSION:r.version,PLATFORM:o,MAX_TRAFFIC_PERCENT:100,MAX_TRAFFIC_VALUE:1e4,STATUS_RUNNING:"RUNNING",SEED_VALUE:1,MAX_EVENTS_PER_REQUEST:5e3,DEFAULT_REQUEST_TIME_INTERVAL:600,DEFAULT_EVENTS_PER_REQUEST:100,SEED_URL:a.SEED_URL,HTTP_PROTOCOL:a.HTTP_PROTOCOL,HTTPS_PROTOCOL:a.HTTPS_PROTOCOL,SETTINGS:"settings",SETTINGS_EXPIRY:1e7,SETTINGS_TIMEOUT:5e4,HOST_NAME:"dev.visualwebsiteoptimizer.com",SETTINTS_ENDPOINT:"/server-side/v2-settings",LOCATION_ENDPOINT:"/getLocation",VWO_FS_ENVIRONMENT:"vwo_fs_environment",RANDOM_ALGO:1,API_VERSION:"1",VWO_META_MEG_KEY:"_vwo_meta_meg_"}},3780:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ApiEnum=void 0,function(e){e.GET_FLAG="getFlag",e.TRACK="track"}(n||(t.ApiEnum=n={}))},4273:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignTypeEnum=void 0,function(e){e.ROLLOUT="FLAG_ROLLOUT",e.AB="FLAG_TESTING",e.PERSONALIZE="FLAG_PERSONALIZE"}(n||(t.CampaignTypeEnum=n={}))},9693:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventEnum=void 0,function(e){e.VWO_VARIATION_SHOWN="vwo_variationShown",e.VWO_SYNC_VISITOR_PROP="vwo_syncVisitorProp"}(n||(t.EventEnum=n={}))},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadersEnum=void 0,function(e){e.USER_AGENT="X-Device-User-Agent",e.IP="VWO-X-Forwarded-For"}(n||(t.HeadersEnum=n={}))},8202:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpMethodEnum=void 0,function(e){e.GET="GET",e.POST="POST"}(n||(t.HttpMethodEnum=n={}))},5520:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformEnum=void 0,function(e){e.CLIENT="client",e.SERVER="server"}(n||(t.PlatformEnum=n={}))},9217:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StatusEnum=void 0,function(e){e.PASSED="passed",e.FAILED="failed"}(n||(t.StatusEnum=n={}))},1172:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StorageEnum=void 0,function(e){e[e.STORAGE_UNDEFINED=0]="STORAGE_UNDEFINED",e[e.INCORRECT_DATA=1]="INCORRECT_DATA",e[e.NO_DATA_FOUND=2]="NO_DATA_FOUND",e[e.CAMPAIGN_PAUSED=3]="CAMPAIGN_PAUSED",e[e.VARIATION_NOT_FOUND=4]="VARIATION_NOT_FOUND",e[e.WHITELISTED_VARIATION=5]="WHITELISTED_VARIATION"}(n||(t.StorageEnum=n={}))},9528:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UrlEnum=void 0,function(e){e.BASE_URL="dev.visualwebsiteoptimizer.com",e.SETTINGS_URL="/server-side/settings",e.EVENTS="/events/t",e.ATTRIBUTE_CHECK="/check-attribute",e.GET_USER_DATA="/get-user-details"}(n||(t.UrlEnum=n={}))},7128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLogMessagesEnum=t.InfoLogMessagesEnum=t.DebugLogMessagesEnum=void 0;var r=n(3095),o=r.debugMessages;t.DebugLogMessagesEnum=o;var i=r.infoMessages;t.InfoLogMessagesEnum=i;var a=r.errorMessages;t.ErrorLogMessagesEnum=a},2144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignModel=void 0;var r=n(9094),o=n(502),i=n(2365),a=function(){function e(){this.variations=[],this.metrics=[],this.variables=[]}return e.prototype.copy=function(e){this.metrics=e.metrics,this.variations=e.variations,this.variables=e.variables,this.processCampaignKeys(e)},e.prototype.modelFromDictionary=function(e){return this.processCampaignProperties(e),this.processCampaignKeys(e),this},e.prototype.processCampaignProperties=function(e){var t=this;e.variables&&(e.variables.constructor==={}.constructor?this.variables=[]:e.variables.forEach((function(e){t.variables.push((new o.VariableModel).modelFromDictionary(e))}))),e.variations&&(e.variations.constructor==={}.constructor?this.variations=[]:e.variations.forEach((function(e){t.variations.push((new i.VariationModel).modelFromDictionary(e))}))),e.metrics&&(e.metrics&&e.metrics.constructor==={}.constructor?this.metrics=[]:(e.metrics||[]).forEach((function(e){t.metrics.push((new r.MetricModel).modelFromDictionary(e))})))},e.prototype.processCampaignKeys=function(e){this.id=e.id,this.percentTraffic=e.percentTraffic,this.name=e.name,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this.isForcedVariationEnabled=e.isForcedVariationEnabled,this.isUserListEnabled=e.isUserListEnabled,this.segments=e.segments,this.key=e.key,this.type=e.type},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.getSegments=function(){return this.segments},e.prototype.getTraffic=function(){return this.percentTraffic},e.prototype.getType=function(){return this.type},e.prototype.getIsForcedVariationEnabled=function(){return this.isForcedVariationEnabled},e.prototype.getIsUserListEnabled=function(){return this.isUserListEnabled},e.prototype.getKey=function(){return this.key},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getVariations=function(){return this.variations},e.prototype.getVariables=function(){return this.variables},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.CampaignModel=a},3836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureModel=void 0;var r=n(9378),o=n(9094),i=n(324),a=function(){function e(){this.m=[],this.metrics=[],this.rules=[],this.impactCampaign=null,this.rulesLinkedCampaign=[],this.isGatewayServiceRequired=!1}return e.prototype.modelFromDictionary=function(e){var t,n,a,s=this;if(this.id=e.id,this.key=e.key,this.name=e.name,this.type=e.type,(null==e?void 0:e.isGatewayServiceRequired)&&(this.isGatewayServiceRequired=e.isGatewayServiceRequired),e.impactCampaign&&(this.impactCampaign=(new r.ImpactCapmaignModel).modelFromDictionary(e.impactCampaign)),e.m&&e.m.constructor==={}.constructor||(null===(t=e.metrics)||void 0===t?void 0:t.constructor)==={}.constructor)this.metrics=[];else{var u=e.m||e.metrics;null==u||u.forEach((function(e){s.metrics.push((new o.MetricModel).modelFromDictionary(e))}))}if((null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.constructor)==={}.constructor)this.rules=[];else{var c=e.rules;null==c||c.forEach((function(e){s.rules.push((new i.RuleModel).modelFromDictionary(e))}))}if((null==e?void 0:e.rulesLinkedCampaign)&&(null===(a=e.rulesLinkedCampaign)||void 0===a?void 0:a.constructor)!=={}.constructor){var l=e.rulesLinkedCampaign;this.rulesLinkedCampaign=l}return this},e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRules=function(){return this.rules},e.prototype.getImpactCampaign=function(){return this.impactCampaign},e.prototype.getRulesLinkedCampaign=function(){return this.rulesLinkedCampaign},e.prototype.setRulesLinkedCampaign=function(e){this.rulesLinkedCampaign=e},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getIsGatewayServiceRequired=function(){return this.isGatewayServiceRequired},e.prototype.setIsGatewayServiceRequired=function(e){this.isGatewayServiceRequired=e},e}();t.FeatureModel=a},9378:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImpactCapmaignModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.campaignId=e.campaignId,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getType=function(){return this.type},e}();t.ImpactCapmaignModel=n},9094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetricModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.identifier=e.identifier||e.key,this.id=e.i||e.id,this.type=e.t||e.type,this},e.prototype.getId=function(){return this.id},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getType=function(){return this.type},e}();t.MetricModel=n},324:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuleModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.status=e.status,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getVariationId=function(){return this.variationId},e.prototype.getStatus=function(){return this.status},e.prototype.getType=function(){return this.type},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.RuleModel=n},502:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariableModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.value=e.val||e.value,this.type=e.type,this.key=e.k||e.key,this.id=e.i||e.id,this},e.prototype.setValue=function(e){this.value=e},e.prototype.setKey=function(e){this.key=e},e.prototype.setType=function(e){this.type=e},e.prototype.getId=function(){return this.id},e.prototype.getValue=function(){return this.value},e.prototype.getType=function(){return this.type},e.prototype.getKey=function(){return this.key},e}();t.VariableModel=n},2365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariationModel=void 0;var r=n(502),o=function(){function e(){this.variables=[],this.variations=[]}return e.prototype.modelFromDictionary=function(t){var n=this;return this.id=t.i||t.id,this.key=t.n||t.key||t.name,this.weight=t.w||t.weight,this.ruleKey=t.ruleKey,this.type=t.type,this.setStartRange(t.startRangeVariation),this.setEndRange(t.endRangeVariation),(t.seg||t.segments)&&(this.segments=t.seg||t.segments),t.variables&&(t.variables.constructor==={}.constructor?this.variables=[]:t.variables.forEach((function(e){n.variables.push((new r.VariableModel).modelFromDictionary(e))}))),t.variations&&(t.variations.constructor==={}.constructor?this.variations=[]:t.variations.forEach((function(t){n.variations.push((new e).modelFromDictionary(t))}))),this},e.prototype.setStartRange=function(e){this.startRangeVariation=e},e.prototype.setEndRange=function(e){this.endRangeVariation=e},e.prototype.setWeight=function(e){this.weight=e},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRuleKey=function(){return this.ruleKey},e.prototype.getWeight=function(){return this.weight},e.prototype.getSegments=function(){return this.segments},e.prototype.getStartRangeVariation=function(){return this.startRangeVariation},e.prototype.getEndRangeVariation=function(){return this.endRangeVariation},e.prototype.getVariables=function(){return this.variables},e.prototype.getVariations=function(){return this.variations},e.prototype.getType=function(){return this.type},e}();t.VariationModel=o},9846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSchema=void 0;var r=n(3185),o=function(){function e(){this.initializeSchemas()}return e.prototype.initializeSchemas=function(){this.campaignMetricSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),identifier:(0,r.string)(),mca:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),hasProps:(0,r.optional)((0,r.boolean)()),revenueProp:(0,r.optional)((0,r.string)())}),this.variableObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),value:(0,r.union)([(0,r.number)(),(0,r.string)(),(0,r.boolean)(),(0,r.object)()])}),this.campaignVariationSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),name:(0,r.string)(),weight:(0,r.union)([(0,r.number)(),(0,r.string)()]),segments:(0,r.optional)((0,r.object)()),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema)),startRangeVariation:(0,r.optional)((0,r.number)()),endRangeVariation:(0,r.optional)((0,r.number)())}),this.campaignObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),percentTraffic:(0,r.optional)((0,r.number)()),status:(0,r.string)(),variations:(0,r.array)(this.campaignVariationSchema),segments:(0,r.object)(),isForcedVariationEnabled:(0,r.optional)((0,r.boolean)()),isAlwaysCheckSegment:(0,r.optional)((0,r.boolean)()),name:(0,r.string)()}),this.ruleSchema=(0,r.object)({type:(0,r.string)(),ruleKey:(0,r.string)(),campaignId:(0,r.number)(),variationId:(0,r.optional)((0,r.number)())}),this.featureSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),key:(0,r.string)(),status:(0,r.string)(),name:(0,r.string)(),type:(0,r.string)(),metrics:(0,r.array)(this.campaignMetricSchema),impactCampaign:(0,r.optional)((0,r.object)()),rules:(0,r.optional)((0,r.array)(this.ruleSchema)),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema))}),this.settingsSchema=(0,r.object)({sdkKey:(0,r.optional)((0,r.string)()),version:(0,r.union)([(0,r.number)(),(0,r.string)()]),accountId:(0,r.union)([(0,r.number)(),(0,r.string)()]),features:(0,r.optional)((0,r.array)(this.featureSchema)),campaigns:(0,r.array)(this.campaignObjectSchema),groups:(0,r.optional)((0,r.object)()),campaignGroups:(0,r.optional)((0,r.object)()),collectionPrefix:(0,r.optional)((0,r.string)())})},e.prototype.isSettingsValid=function(e){return!!e&&!(0,r.validate)(e,this.settingsSchema)[0]},e}();t.SettingsSchema=o},6130:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsModel=void 0;var r=n(2144),o=n(3836),i=function(){function e(e){var t=this;return this.f=[],this.features=[],this.c=[],this.campaigns=[],this.campaignGroups={},this.cG={},this.groups={},this.g={},this.sdkKey=e.sK||e.sdkKey,this.accountId=e.a||e.accountId,this.version=e.v||e.version,this.collectionPrefix=e.collectionPrefix,(e.f&&e.f.constructor!=={}.constructor||e.features&&e.features.constructor!=={}.constructor)&&(e.f||e.features).forEach((function(e){t.features.push((new o.FeatureModel).modelFromDictionary(e))})),(e.c&&e.c.constructor!=={}.constructor||e.campaigns&&e.campaigns.constructor!=={}.constructor)&&(e.c||e.campaigns).forEach((function(e){t.campaigns.push((new r.CampaignModel).modelFromDictionary(e))})),(e.cG||e.campaignGroups)&&(this.campaignGroups=e.cG||e.campaignGroups),(e.g||e.groups)&&(this.groups=e.g||e.groups),this}return e.prototype.getFeatures=function(){return this.features},e.prototype.getCampaigns=function(){return this.campaigns},e.prototype.getSdkkey=function(){return this.sdkKey},e.prototype.getAccountId=function(){return this.accountId},e.prototype.getVersion=function(){return this.version},e.prototype.getCollectionPrefix=function(){return this.collectionPrefix},e.prototype.getCampaignGroups=function(){return this.campaignGroups},e.prototype.getGroups=function(){return this.groups},e}();t.SettingsModel=i},9752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextModel=void 0;var r=n(1880),o=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.id=e.id,this.userAgent=e.userAgent,this.ipAddress=e.ipAddress,(null==e?void 0:e.customVariables)&&(this.customVariables=e.customVariables),(null==e?void 0:e.variationTargetingVariables)&&(this.variationTargetingVariables=e.variationTargetingVariables),(null==e?void 0:e._vwo)&&(this._vwo=(new r.ContextVWOModel).modelFromDictionary(e._vwo)),this},e.prototype.getId=function(){var e;return null===(e=this.id)||void 0===e?void 0:e.toString()},e.prototype.getUserAgent=function(){return this.userAgent},e.prototype.getIpAddress=function(){return this.ipAddress},e.prototype.getCustomVariables=function(){return this.customVariables},e.prototype.setCustomVariables=function(e){this.customVariables=e},e.prototype.getVariationTargetingVariables=function(){return this.variationTargetingVariables},e.prototype.setVariationTargetingVariables=function(e){this.variationTargetingVariables=e},e.prototype.getVwo=function(){return this._vwo},e.prototype.setVwo=function(e){this._vwo=e},e}();t.ContextModel=o},1880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextVWOModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return(null==e?void 0:e.location)&&(this.location=e.location),(null==e?void 0:e.userAgent)&&(this.userAgent=e.userAgent),this},e.prototype.getLocation=function(){return this.location},e.prototype.getUaInfo=function(){return this.userAgent},e}();t.ContextVWOModel=n},6775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionMaker=void 0;var r=n(8005),o=function(){function e(){}return e.prototype.generateBucketValue=function(e,t,n){void 0===n&&(n=1);var r=(t*(e/Math.pow(2,32))+1)*n;return Math.floor(r)},e.prototype.getBucketValueForUser=function(e,t){void 0===t&&(t=100);var n=r.v3(e,1);return this.generateBucketValue(n,t)},e.prototype.calculateBucketValue=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1e4);var r=this.generateHashValue(e);return this.generateBucketValue(r,n,t)},e.prototype.generateHashValue=function(e){return r.v3(e,1)},e}();t.DecisionMaker=o},2752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogMessageBuilder=void 0;var r=n(4940),o="",i="",a=function(){function e(e,t){this.loggerConfig=e,this.transportConfig=t,this.prefix=this.transportConfig.prefix||this.loggerConfig.prefix||"",this.dateTimeFormat=this.transportConfig.dateTimeFormat||this.loggerConfig.dateTimeFormat}return e.prototype.formatMessage=function(e,t){return"[".concat(this.getFormattedLevel(e),"]: ").concat(this.getFormattedPrefix(this.prefix)," ").concat(this.getFormattedDateTime()," ").concat(t)},e.prototype.getFormattedPrefix=function(e){return this.loggerConfig.isAnsiColorEnabled?"".concat(o).concat("").concat(e).concat(i):"".concat(e)},e.prototype.getFormattedLevel=function(e){var t,n,a,s=e.toUpperCase();return this.loggerConfig.isAnsiColorEnabled?((t={})[r.LogLevelEnum.TRACE]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.DEBUG]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.INFO]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.WARN]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.ERROR]="".concat(o).concat("").concat(s).concat(i),a=t):((n={})[r.LogLevelEnum.TRACE]=s,n[r.LogLevelEnum.DEBUG]=s,n[r.LogLevelEnum.INFO]=s,n[r.LogLevelEnum.WARN]=s,n[r.LogLevelEnum.ERROR]=s,a=n),a[e]},e.prototype.getFormattedDateTime=function(){return this.dateTimeFormat()},e}();t.LogMessageBuilder=a},5374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=function(){}},3293:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogManager=void 0;var i=n(2831),a=n(5374),s=n(6325),u=n(4820),c=n(1359),l=n(4940),g=function(e){function t(n){var r=e.call(this)||this;return r.name="VWO Logger",r.requestId=(0,i.v4)(),r.level=l.LogLevelEnum.ERROR,r.prefix="VWO-SDK",r.config=n,!n.isAlwaysNewInstance&&t.instance||(t.instance=r,r.config.name=n.name||r.name,r.config.requestId=n.requestId||r.requestId,r.config.level=n.level||r.level,r.config.prefix=n.prefix||r.prefix,r.config.dateTimeFormat=n.dateTimeFormat||r.dateTimeFormat,r.transportManager=new u.LogTransportManager(r.config),r.handleTransports()),t.instance}return o(t,e),t.prototype.dateTimeFormat=function(){return(new Date).toISOString()},Object.defineProperty(t,"Instance",{get:function(){return t.instance},enumerable:!1,configurable:!0}),t.prototype.handleTransports=function(){var e=this.config.transports;(null==e?void 0:e.length)?this.addTransports(this.config.transports):this.config.transport&&(0,c.isObject)(this.config.transport)?this.addTransport(this.config.transport):this.addTransport(new s.ConsoleTransport({level:this.config.level}))},t.prototype.addTransport=function(e){this.transportManager.addTransport(e)},t.prototype.addTransports=function(e){for(var t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogTransportManager=void 0;var r,o=n(4940),i=n(2752),a=n(1359);!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(r||(r={}));var s=function(){function e(e){this.transports=[],this.config=e}return e.prototype.addTransport=function(e){this.transports.push(e)},e.prototype.shouldLog=function(e,t){return r[e.toUpperCase()]>=r[(t||this.config.level).toUpperCase()]},e.prototype.trace=function(e){this.log(o.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.log(o.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.log(o.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.log(o.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.log(o.LogLevelEnum.ERROR,e)},e.prototype.log=function(e,t){for(var n=0;n{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=void 0,function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(n||(t.LogLevelEnum=n={}))},4580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=t.LogManager=void 0;var r=n(3293);Object.defineProperty(t,"LogManager",{enumerable:!0,get:function(){return r.LogManager}});var o=n(4940);Object.defineProperty(t,"LogLevelEnum",{enumerable:!0,get:function(){return o.LogLevelEnum}})},6325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleTransport=void 0;var r=n(4940),o=function(){function e(e){void 0===e&&(e={}),this.config=e,this.level=this.config.level}return e.prototype.trace=function(e){this.consoleLog(r.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.consoleLog(r.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.consoleLog(r.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.consoleLog(r.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.consoleLog(r.LogLevelEnum.ERROR,e)},e.prototype.consoleLog=function(e,t){console[e](t)},e}();t.ConsoleTransport=o},1703:(e,t,n)=>{"use strict";t.o=void 0;var r=n(3890),o=n(4782),i=n(5573),a=function(){function e(){}return e.prototype.GET=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendGetCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e.prototype.POST=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendPostCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e}();t.o=a},415:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestHandler=void 0;var n=function(){function e(){}return e.prototype.createRequest=function(e,t){if(!(null!==t.getBaseUrl()&&void 0!==t.getBaseUrl()||null!==e.getUrl()&&void 0!==e.getUrl()))return null;e.setUrl(e.getUrl()||t.getBaseUrl()),e.setTimeout(e.getTimeout()||t.getTimeout()),e.setBody(e.getBody()||t.getBody()),e.setHeaders(e.getHeaders()||t.getHeaders());var n=e.getQuery()||{},r=t.getQuery()||{};for(var o in r)Object.prototype.hasOwnProperty.call(n,o)||(n[o]=r[o]);return e.setQuery(n),e},e}();t.RequestHandler=n},6710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=t.RequestModel=t.GlobalRequestModel=t.NetworkManager=t.NetworkClient=void 0,t.NetworkClient=n(1703).o;var r=n(7885);Object.defineProperty(t,"NetworkManager",{enumerable:!0,get:function(){return r.NetworkManager}});var o=n(4036);Object.defineProperty(t,"GlobalRequestModel",{enumerable:!0,get:function(){return o.GlobalRequestModel}});var i=n(2887);Object.defineProperty(t,"RequestModel",{enumerable:!0,get:function(){return i.RequestModel}});var a=n(5573);Object.defineProperty(t,"ResponseModel",{enumerable:!0,get:function(){return a.ResponseModel}})},7885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkManager=void 0;var r=n(4782),o=n(415),i=n(4036),a=function(){function e(){}return e.prototype.attachClient=function(e){var t=n(1703).o;this.client=e||new t,this.config=new i.GlobalRequestModel(null,null,null,null)},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.setConfig=function(e){this.config=e},e.prototype.getConfig=function(){return this.config},e.prototype.createRequest=function(e){return(new o.RequestHandler).createRequest(e,this.config)},e.prototype.get=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.GET(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e.prototype.post=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.POST(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e}();t.NetworkManager=a},4036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalRequestModel=void 0;var n=function(){function e(e,t,n,r){this.timeout=3e3,this.url=e,this.query=t,this.body=n,this.headers=r}return e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setBody=function(e){this.body=e},e.prototype.getBody=function(){return this.body},e.prototype.setBaseUrl=function(e){this.url=e},e.prototype.getBaseUrl=function(){return this.url},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.getTimeout=function(){return this.timeout},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.setDevelopmentMode=function(e){this.isDevelopmentMode=e},e.prototype.getDevelopmentMode=function(){return this.isDevelopmentMode},e}();t.GlobalRequestModel=n},2887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModel=void 0;var r=n(8202),o=n(2346),i=function(){function e(e,t,n,i,a,s,u,c){void 0===t&&(t=r.HttpMethodEnum.GET),void 0===u&&(u=o.HTTPS),this.url=e,this.method=t,this.path=n,this.query=i,this.body=a,this.headers=s,this.scheme=u,this.port=c}return e.prototype.getMethod=function(){return this.method},e.prototype.setMethod=function(e){this.method=e},e.prototype.getBody=function(){return this.body},e.prototype.setBody=function(e){this.body=e},e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setHeaders=function(e){return this.headers=e,this},e.prototype.getHeaders=function(){return this.headers},e.prototype.setTimeout=function(e){return this.timeout=e,this},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){return this.url=e,this},e.prototype.getScheme=function(){return this.scheme},e.prototype.setScheme=function(e){return this.scheme=e,this},e.prototype.getPort=function(){return this.port},e.prototype.setPort=function(e){return this.port=e,this},e.prototype.getPath=function(){return this.path},e.prototype.setPath=function(e){return this.path=e,this},e.prototype.getOptions=function(){var e="";for(var t in this.query)e+="".concat(t,"=").concat(this.query[t],"&");var n=this.url.split("/"),r=n[0],o=n[1],i={hostname:r,agent:!1};if(this.scheme&&(i.scheme=this.scheme),this.port&&(i.port=this.port),this.headers&&(i.headers=this.headers),this.method&&(i.method=this.method),this.body){var a=JSON.stringify(this.body);i.headers=i.headers||{},i.headers["Content-Type"]="application/json","undefined"==typeof Buffer?i.headers["Content-Length"]=(new TextEncoder).encode(a).length:i.headers["Content-Length"]=Buffer.byteLength(a),i.body=this.body}return this.path&&(i.path=""!==e?this.path+"?"+e||"":this.path),o&&(i.path="/".concat(o)+i.path),this.timeout&&(i.timeout=this.timeout),"&"===i.path.charAt(i.path.length-1)&&(i.path=i.path.substring(0,i.path.length-1)),i},e}();t.RequestModel=i},5573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=void 0;var n=function(){function e(){}return e.prototype.setStatusCode=function(e){this.statusCode=e},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.setData=function(e){this.data=e},e.prototype.setError=function(e){this.error=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.getData=function(){return this.data},e.prototype.getStatusCode=function(){return this.statusCode},e.prototype.getError=function(){return this.error},e}();t.ResponseModel=n},6373:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandRegexEnum=void 0,function(e){e.LOWER="^lower",e.LOWER_MATCH="^lower\\((.*)\\)",e.WILDCARD="^wildcard",e.WILDCARD_MATCH="^wildcard\\((.*)\\)",e.REGEX="^regex",e.REGEX_MATCH="^regex\\((.*)\\)",e.STARTING_STAR="^\\*",e.ENDING_STAR="\\*$",e.GREATER_THAN_MATCH="^gt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.GREATER_THAN_EQUAL_TO_MATCH="^gte\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_MATCH="^lt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_EQUAL_TO_MATCH="^lte\\((\\d+\\.?\\d*|\\.\\d+)\\)"}(n||(t.SegmentOperandRegexEnum=n={}))},6905:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandValueEnum=void 0,function(e){e[e.LOWER_VALUE=1]="LOWER_VALUE",e[e.STARTING_ENDING_STAR_VALUE=2]="STARTING_ENDING_STAR_VALUE",e[e.STARTING_STAR_VALUE=3]="STARTING_STAR_VALUE",e[e.ENDING_STAR_VALUE=4]="ENDING_STAR_VALUE",e[e.REGEX_VALUE=5]="REGEX_VALUE",e[e.EQUAL_VALUE=6]="EQUAL_VALUE",e[e.GREATER_THAN_VALUE=7]="GREATER_THAN_VALUE",e[e.GREATER_THAN_EQUAL_TO_VALUE=8]="GREATER_THAN_EQUAL_TO_VALUE",e[e.LESS_THAN_VALUE=9]="LESS_THAN_VALUE",e[e.LESS_THAN_EQUAL_TO_VALUE=10]="LESS_THAN_EQUAL_TO_VALUE"}(n||(t.SegmentOperandValueEnum=n={}))},4076:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperatorValueEnum=void 0,function(e){e.AND="and",e.NOT="not",e.OR="or",e.CUSTOM_VARIABLE="custom_variable",e.USER="user",e.COUNTRY="country",e.REGION="region",e.CITY="city",e.OPERATING_SYSTEM="os",e.DEVICE_TYPE="device_type",e.DEVICE="device",e.BROWSER_AGENT="browser_string",e.UA="ua",e.FEATURE_ID="featureId"}(n||(t.SegmentOperatorValueEnum=n={}))},8011:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,!0]:[2,!1]}}))}))},e.prototype.checkValuePresent=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){for(r in n=function(n){if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];r.forEach((function(e,t){r[t]=e.toLowerCase()}));for(var o=t[n],i=0,a=r;i0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]-1);break;case a.SegmentOperandValueEnum.STARTING_STAR_VALUE:null!==n&&(r=n.endsWith(t));break;case a.SegmentOperandValueEnum.ENDING_STAR_VALUE:null!==n&&(r=n.startsWith(t));break;case a.SegmentOperandValueEnum.REGEX_VALUE:try{r=!!new RegExp(t,"g").test(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.GREATER_THAN_VALUE:if(null!==n)try{r=parseFloat(t)parseFloat(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:if(null!==n)try{r=parseFloat(t)>=parseFloat(n)}catch(e){r=!1}break;default:r=n===t}return r},e}();t.SegmentOperandEvaluator=p},4986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentEvaluator=t.SegmentationManager=void 0;var r=n(6373);Object.defineProperty(t,"SegmentationManager",{enumerable:!0,get:function(){return r.SegmentationManager}});var o=n(8011);Object.defineProperty(t,"SegmentEvaluator",{enumerable:!0,get:function(){return o.SegmentEvaluator}})},3769:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchWithRegex=t.getKeyValue=void 0;var r=n(1359);t.getKeyValue=function(e){if((0,r.isObject)(e)){var t=Object.keys(e)[0];return{key:t,value:e[t]}}},t.matchWithRegex=function(e,t){try{return e.match(new RegExp(t))}catch(e){return null}}},5030:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=void 0;t.Connector=function(){}},2780:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var n=function(){function e(){}return e.prototype.attachConnector=function(e){var t,n,r,o;return"class"===(null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.prototype)||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.trim())||void 0===o?void 0:o.substring(0,5))?this.connector=new e:this.connector=e,this.connector},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.getConnector=function(){return this.connector},e}();t.Storage=n},9401:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var r=n(2780);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return r.Storage}})},973:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=r.getStartRangeVariation()&&t<=r.getEndRangeVariation())return r}return null},e.prototype.checkInRange=function(e,t){if(t>=e.getStartRangeVariation()&&t<=e.getEndRangeVariation())return e},e.prototype.bucketUserToVariation=function(e,t,n){var r;if(!n||!e)return null;n.getTraffic()&&(r=1);var o=n.getTraffic(),s=(new i.DecisionMaker).generateHashValue("".concat(n.getId(),"_").concat(t,"_").concat(e)),c=(new i.DecisionMaker).generateBucketValue(s,u.Constants.MAX_TRAFFIC_VALUE,r);return a.LogManager.Instance.debug((0,p.buildMessage)(l.DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION,{userId:e,campaignKey:n.getKey(),percentTraffic:o,bucketValue:c,hashValue:s})),this.getVariation(n.getVariations(),c)},e.prototype.getPreSegmentationDecision=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=e.getType(),r={},n===c.CampaignTypeEnum.ROLLOUT||n===c.CampaignTypeEnum.PERSONALIZE?r=e.getVariations()[0].getSegments():n===c.CampaignTypeEnum.AB&&(r=e.getSegments()),!(0,g.isObject)(r)||Object.keys(r).length?[3,1]:(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_SKIP,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey()})),[2,!0]);case 1:return[4,s.SegmentationManager.Instance.validateSegmentation(r,t.getCustomVariables())];case 2:return o.sent()?(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"passed"})),[2,!0]):(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"failed"})),[2,!1])}}))}))},e.prototype.getVariationAlloted=function(e,t,n){var r=this.isUserPartOfCampaign(e,n);return n.getType()===c.CampaignTypeEnum.ROLLOUT||n.getType()===c.CampaignTypeEnum.PERSONALIZE?r?n.getVariations()[0]:null:r?this.bucketUserToVariation(e,t,n):null},e}();t.CampaignDecisionService=d},7675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1359),o=function(){function e(e){var t;this.callback=null===(t=e.integrations)||void 0===t?void 0:t.callback,this.isCallBackFunction=(0,r.isFunction)(this.callback),this.decision={}}return e.prototype.execute=function(e){this.isCallBackFunction&&this.callback(e)},e.prototype.set=function(e){this.isCallBackFunction&&(this.decision=e)},e.prototype.get=function(){return this.decision},e}();t.default=o},470:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRuleTypeUsingCampaignIdFromFeature=t.assignRangeValuesMEG=t.getCampaignIdsFromFeatureKey=t.getFeatureKeysFromCampaignIds=t.getCampaignsByGroupId=t.findGroupsFeaturePartOf=t.getGroupDetailsIfCampaignPartOfIt=t.setCampaignAllocation=t.getVariationFromCampaignKey=t.getBucketingSeed=t.scaleVariationWeights=t.assignRangeValues=t.setVariationAllocation=void 0;var r=n(5399),o=n(4273),i=n(7128),a=n(2365),s=n(4580),u=n(8754);function c(e,t){var n=p(e.getWeight());return n?(e.setStartRange(t+1),e.setEndRange(t+n)):(e.setStartRange(-1),e.setEndRange(-1)),n}function l(e,t,n){void 0===n&&(n=null);var r=t.toString();return null!==n&&(r="".concat(t,"_").concat(n).toString()),e.getCampaignGroups()&&Object.prototype.hasOwnProperty.call(e.getCampaignGroups(),r)?{groupId:e.getCampaignGroups()[r],groupName:e.getGroups()[e.getCampaignGroups()[r]].name}:{}}function g(e,t){var n=p(e.weight);return n?(e.startRangeVariation=t+1,e.endRangeVariation=t+n):(e.startRangeVariation=-1,e.endRangeVariation=-1),n}function p(e){if(!e||0===e)return 0;var t=Math.ceil(100*e);return Math.min(t,r.Constants.MAX_TRAFFIC_VALUE)}t.setVariationAllocation=function(e){if(e.getType()===o.CampaignTypeEnum.ROLLOUT||e.getType()===o.CampaignTypeEnum.PERSONALIZE)!function(e){for(var t=0;t{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return"[object Null]"===Object.prototype.toString.call(e)}function i(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function u(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function c(e){return e!=e}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function g(e){return"[object Function]"===Object.prototype.toString.call(e)}function p(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function d(e){return"[object Promise]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.isPromise=t.isRegex=t.isFunction=t.isDate=t.isNaN=t.isBoolean=t.isString=t.isNumber=t.isDefined=t.isUndefined=t.isNull=t.isArray=t.isObject=void 0,t.isObject=n,t.isArray=r,t.isNull=o,t.isUndefined=i,t.isDefined=function(e){return!i(e)&&!o(e)},t.isNumber=a,t.isString=s,t.isBoolean=u,t.isNaN=c,t.isDate=l,t.isFunction=g,t.isRegex=p,t.isPromise=d,t.getType=function(e){return n(e)?"Object":r(e)?"Array":o(e)?"Null":i(e)?"Undefined":c(e)?"NaN":a(e)?"Number":s(e)?"String":u(e)?"Boolean":l(e)?"Date":p(e)?"Regex":g(e)?"Function":d(e)?"Promise":"Unknown Type"}},2245:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,[!0,_]]:[3,3];case 2:l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:n.getRuleKey(),userId:i.getId()})),o.label=3;case 3:if(i.setCustomVariables(Object.assign({},i.getCustomVariables(),{_vwoUserId:n.getIsUserListEnabled()?r:i.getId()})),Object.assign(d,{customVariables:i.getCustomVariables()}),S=(0,h.getGroupDetailsIfCampaignPartOfIt)(e,n.getId(),n.getType()===a.CampaignTypeEnum.PERSONALIZE?n.getVariations()[0].getId():null).groupId,!(T=null==c?void 0:c.get(S)))return[3,4];if(n.getType()===a.CampaignTypeEnum.AB){if(T===v)return[2,[!0,null]]}else if(n.getType()===a.CampaignTypeEnum.PERSONALIZE&&T===v+"_"+n.getVariations()[0].getId())return[2,[!0,null]];return[2,[!1,null]];case 4:return[4,(new I.StorageDecorator).getFeatureFromStorage("".concat(f.Constants.VWO_META_MEG_KEY).concat(S),i,g)];case 5:if((O=o.sent())&&O.experimentKey&&O.experimentId)return l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE,{campaignKey:O.experimentKey,userId:i.getId()})),O.experimentId===v?n.getType()===a.CampaignTypeEnum.PERSONALIZE?O.experimentVariationId===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(S,O.experimentId+"_"+O.experimentVariationId),[2,[!1,null]]):[2,[!0,null]]:(-1!=O.experimentVariationId?c.set(S,O.experimentId+"_"+O.experimentVariationId):c.set(S,O.experimentId),[2,[!1,null]]);o.label=6;case 6:return[4,(new p.CampaignDecisionService).getPreSegmentationDecision(n,i)];case 7:return(A=o.sent())&&S?[4,(0,m.evaluateGroups)(e,t,S,s,i,g)]:[3,9];case 8:return(R=o.sent())&&R.id===v?R.type===a.CampaignTypeEnum.AB||R.variations[0].id===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(S,R.id+"_"+R.variations[0].id),[2,[!1,null]]):R?(R.type===a.CampaignTypeEnum.AB?c.set(S,R.id):c.set(S,R.id+"_"+R.variations[0].id),[2,[!1,null]]):(c.set(S,-1),[2,[!1,null]]);case 9:return[2,[A,null]]}}))}))},t.evaluateTrafficAndGetVariation=function(e,t,n){var r=(new p.CampaignDecisionService).getVariationAlloted(n,e.getAccountId(),t);return r?(l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"got variation:".concat(r.getKey())})),r):(l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"did not get any variation"})),null)};var b=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,_(e,t)];case 1:return n=o.sent(),r=n?s.StatusEnum.PASSED:s.StatusEnum.FAILED,i=n?n.variation.key:"",l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_STATUS,{userId:t.getId(),campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:r,variationString:i})),[2,n]}}))}))},_=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,s,f,m,E;return o(this,(function(o){switch(o.label){case 0:return n=[],r=[],e.getVariations().forEach((function(o){if(!(0,d.isObject)(o.getSegments())||Object.keys(o.getSegments()).length){if((0,d.isObject)(o.getSegments())){var s=g.SegmentationManager.Instance.validateSegmentation(o.getSegments(),t.getVariationTargetingVariables());(s=(0,i.isPromise)(s)?s:Promise.resolve(s)).then((function(e){e&&n.push((0,v.cloneObject)(o))})),r.push(s)}}else l.LogManager.Instance.info((0,y.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),userId:t.getId(),variation:o.getKey()?"for variation: ".concat(o.getKey()):""}))})),[4,Promise.all(r)];case 1:if(o.sent(),n.length>1){for((0,h.scaleVariationWeights)(n),f=0,m=0,E=0;f0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0){o.setIsGatewayServiceRequired(!0);break}}}}},162:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildMessage=void 0;var r=n(1359),o=/\{([0-9a-zA-Z_]+)\}/g;t.buildMessage=function(e,t){void 0===t&&(t={});try{return e.replace(o,(function(n,o,i){if("{"===e[i-1]&&"}"===e[i+n.length])return o;var a=t[o];return null==a?"":(0,r.isFunction)(a)?a():a}))}catch(t){return e}}},7928:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0))return[3,5];g=null,d=0,h=r,o.label=1;case 1:return d0)?(n.set(t.getKey(),{rolloutId:g.id,rolloutKey:g.key,rolloutVariationId:g.variations[0].id}),[2,!0]):(i.push(t.getKey()),[2,!1]);case 5:return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS,{featureKey:t.getKey()})),[2,!0]}}))}))},_=function(e,t,n,i){return r(void 0,void 0,void 0,(function(){var r,l,g,f,v,y,m,I,b,_,S,T,O;return o(this,(function(A){switch(A.label){case 0:r=[],l=[],g=[],f=Array.from(t),v=0,y=f,A.label=1;case 1:if(!(v1&&f===i.Constants.RANDOM_ALGO?r=T(a,l,d,c,g):a.length>1&&(r=O(e,a,l,d,c,g)),0===a.length&&(1===n.length?(r=n[0],p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:n[0].getType()===s.CampaignTypeEnum.AB?n[0].getKey():n[0].getName()+"_"+n[0].getRuleKey(),groupId:c,userId:l.getId(),algo:""}))):n.length>1&&f===i.Constants.RANDOM_ALGO?r=T(n,l,d,c,g):n.length>1&&(r=O(e,n,l,d,c,g))),[2,r]}))}))},T=function(e,t,n,r,o){e.forEach((function(t){t.weight=Math.round(100/e.length*1e4)/1e4})),e=e.map((function(e){return(new l.VariationModel).modelFromDictionary(e)})),(0,h.setCampaignAllocation)(e);var c=(new d.CampaignDecisionService).getVariation(e,(new g.DecisionMaker).calculateBucketValue((0,h.getBucketingSeed)(t.getId(),void 0,r)));return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:c.getType()===s.CampaignTypeEnum.AB?c.getKey():c.getKey()+"_"+c.getRuleKey(),groupId:r,userId:t.getId(),algo:"using random algorithm"})),c&&((new a.StorageDecorator).setDataInStorage({featureKey:"".concat(i.Constants.VWO_META_MEG_KEY).concat(r),context:t,experimentId:c.getId(),experimentKey:c.getKey(),experimentVariationId:c.getType()===s.CampaignTypeEnum.PERSONALIZE?c.getVariations()[0].getId():-1},o),n.includes(c.getId()))?c:null},O=function(e,t,n,r,o,c){for(var f=null,y=!1,I=(0,v.isUndefined)(e.getGroups()[o].p)?{}:e.getGroups()[o].p,b=(0,v.isUndefined)(e.getGroups()[o].wt)?{}:e.getGroups()[o].wt,_=0;_0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)for(var s in r)a.d.event.props[s]=r[s];return p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),a},t.getAttributePayloadData=function(e,t,n,r,o,i,a){void 0===i&&(i=""),void 0===a&&(a="");var u=m(e,t,n,i,a);return u.d.event.props.isCustomEvent=!0,u.d.event.props[s.Constants.VWO_FS_ENVIRONMENT]=e.getSdkkey(),u.d.visitor.props[r]=o,p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),u},t.sendPostApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:return d.NetworkManager.Instance.attachClient(),n={},r=t.d.visitor_ua,i=t.d.visitor_ip,r&&(n[u.HeadersEnum.USER_AGENT]=r),i&&(n[u.HeadersEnum.IP]=i),a=new d.RequestModel(y.UrlUtil.getBaseUrl(),c.HttpMethodEnum.POST,l.UrlEnum.EVENTS,e,t,n,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),[4,d.NetworkManager.Instance.post(a).catch((function(e){p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.POST,err:(0,h.isObject)(e)?JSON.stringify(e):e}))}))];case 1:return o.sent(),[2]}}))}))},t.sendGetApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:d.NetworkManager.Instance.attachClient(),n=new d.RequestModel(y.UrlUtil.getBaseUrl(),c.HttpMethodEnum.GET,t,e,null,null,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.NetworkManager.Instance.get(n)];case 2:return[2,o.sent()];case 3:return r=o.sent(),p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.GET,err:(0,h.isObject)(r)?JSON.stringify(r):r})),[2,null];case 4:return[2]}}))}))};var E=!1;t.getShouldWaitForTrackingCalls=function(){return E},t.setShouldWaitForTrackingCalls=function(e){E=e}},4782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){var e=this;return this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),this}},6195:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?(Object.assign(d,{experimentId:n.getId(),experimentKey:n.getKey(),experimentVariationId:h.variationId}),(0,s.getShouldWaitForTrackingCalls)()?[4,(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c)]:[3,3]):[3,4];case 2:return o.sent(),[3,4];case 3:(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c),o.label=4;case 4:return[2,{preSegmentationResult:f,whitelistedObject:h,updatedDecision:d}]}}))}))}},362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSettingsAndAddCampaignsToRules=void 0;var r=n(6130),o=n(9181),i=n(8667),a=n(2898);t.setSettingsAndAddCampaignsToRules=function(e,t){t.settings=new r.SettingsModel(e),t.originalSettings=e;var n=t.settings.getCampaigns();n.forEach((function(e,t){(0,o.setVariationAllocation)(e),n[t]=e})),(0,i.addLinkedCampaignsToSettings)(t.settings),(0,a.addIsGatewayServiceRequiredFlag)(t.settings)}},8694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtil=void 0;var r=n(470),o=n(1359);t.UrlUtil={init:function(e){var n=(void 0===e?{}:e).collectionPrefix;return n&&(0,o.isString)(n)&&(t.UrlUtil.collectionPrefix=n),t.UrlUtil},getBaseUrl:function(){var e=r.SettingsService.Instance.hostname;return r.SettingsService.Instance.isGatewayServiceProvided?e:t.UrlUtil.collectionPrefix?"".concat(e,"/").concat(t.UrlUtil.collectionPrefix):e}}},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=t.getUUID=t.getRandomUUID=void 0;var r=n(2346),o=n(2831),i=n(2831);function a(e,t){if(e&&t)return(0,i.v5)(e,t)}t.getRandomUUID=function(e){var t=(0,i.v5)(e,i.v5.DNS);return(0,i.v5)((0,o.v4)(),t)},t.getUUID=function(e,t){var n=(0,i.v5)(r.SEED_URL,i.v5.URL);e=String(e);var o=a(t=String(t),n),s=a(e,o);return null==s?void 0:s.replace(/-/gi,"").toUpperCase()},t.generateUUID=a},3890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendPostCall=t.sendGetCall=void 0;var r=n(8202),o=n(4580),i=n(8754),a=n(7128),s=function(){};function u(e,t){var n=t.networkOptions,u=t.successCallback,c=void 0===u?s:u,l=t.errorCallback,g=void 0===l?s:l,p="".concat(n.scheme,"://").concat(n.hostname).concat(n.path);n.port&&(p="".concat(n.scheme,"://").concat(n.hostname,":").concat(n.port).concat(n.path));var d=n.body,f=n.headers||{},h=n.timeout,v=new XMLHttpRequest;for(var y in h&&(v.timeout=h),v.onload=function(){if(v.status>=200&&v.status<300){var t=v.responseText;if(e===r.HttpMethodEnum.GET){var n=JSON.parse(t);c(n)}else c(t)}else g(v.statusText)},v.onerror=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"".concat(v.statusText,", status: ").concat(v.status)})),g(v.statusText)},h&&(v.ontimeout=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"Request timed out"}))}),v.open(e,p,!0),f)y in f&&"Content-Type"!==y&&"Content-Length"!==y&&v.setRequestHeader(y,f[y]);e===r.HttpMethodEnum.POST?v.send(JSON.stringify(d)):e===r.HttpMethodEnum.GET&&v.send()}t.sendGetCall=function(e){u(r.HttpMethodEnum.GET,e)},t.sendPostCall=function(e){u(r.HttpMethodEnum.POST,e)}},2831:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return u.default}});var r=p(n(3518)),o=p(n(4948)),i=p(n(5073)),a=p(n(7186)),s=p(n(4808)),u=p(n(7775)),c=p(n(7037)),l=p(n(9910)),g=p(n(6792));function p(e){return e&&e.__esModule?e:{default:e}}},2311:(e,t)=>{"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r((s=r(r(t,e),r(o,a)))<<(u=i)|s>>>32-u,n);var s,u}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,i=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=n},4808:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},6792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}},7656:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},2858:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},9042:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;g=l,l=c,c=r(u,30)>>>0,u=a,a=s}o[0]=o[0]+a>>>0,o[1]=o[1]+u>>>0,o[2]=o[2]+c>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+g>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]}},9910:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=a;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]}t.default=function(e,t=0){const n=a(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(2858))&&r.__esModule?r:{default:r},i=n(9910);let a,s,u=0,c=0;t.default=function(e,t,n){let r=t&&n||0;const l=t||new Array(16);let g=(e=e||{}).node||a,p=void 0!==e.clockseq?e.clockseq:s;if(null==g||null==p){const t=e.random||(e.rng||o.default)();null==g&&(g=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==p&&(p=s=16383&(t[6]<<8|t[7]))}let d=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:c+1;const h=d-u+(f-c)/1e4;if(h<0&&void 0===e.clockseq&&(p=p+1&16383),(h<0||d>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=f,s=p,d+=122192928e5;const v=(1e4*(268435455&d)+f)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=p>>>8|128,l[r++]=255&p;for(let e=0;e<6;++e)l[r+e]=g[e];return t||(0,i.unsafeStringify)(l)}},4948:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9025)),o=i(n(2311));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,o.default);t.default=a},9025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,a,s){var u;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(6140)),o=a(n(2858)),i=n(9910);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const a=(e=e||{}).random||(e.rng||o.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=a[e];return t}return(0,i.unsafeStringify)(a)}},7186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9025)),o=i(n(9042));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,o.default);t.default=a},7037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7656))&&r.__esModule?r:{default:r};t.default=function(e){return"string"==typeof e&&o.default.test(e)}},7775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7037))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},3095:(e,t,n)=>{e.exports={debugMessages:n(805),infoMessages:n(7778),warnMessages:n(8854),errorMessages:n(1198),traceMessages:n(6611)}},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends TypeError{constructor(e,t){let n;const{message:r,...o}=e,{path:i}=e;super(0===i.length?r:"At path: "+i.join(".")+" -- "+r),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var r;return null!=(r=n)?r:n=[e,...t()]}}}function r(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function i(e){return"string"==typeof e?JSON.stringify(e):""+e}function a(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:a}=t,{type:s}=n,{refinement:u,message:c="Expected a value of type `"+s+"`"+(u?" with refinement `"+u+"`":"")+", but received: `"+i(r)+"`"}=e;return{value:r,type:s,refinement:u,key:o[o.length-1],path:o,branch:a,...e,message:c}}function*s(e,t,n,o){var i;r(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const r of e){const e=a(r,t,n,o);e&&(yield e)}}function*u(e,t,n={}){const{path:o=[],branch:i=[e],coerce:a=!1,mask:s=!1}=n,c={path:o,branch:i};if(a&&(e=t.coercer(e,c),s&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let l=!0;for(const n of t.validator(e,c))l=!1,yield[n,void 0];for(let[n,g,p]of t.entries(e,c)){const t=u(g,p,{path:void 0===n?o:[...o,n],branch:void 0===n?i:[...i,g],coerce:a,mask:s});for(const o of t)o[0]?(l=!1,yield[o[0],void 0]):a&&(g=o[1],void 0===n?e=g:e instanceof Map?e.set(n,g):e instanceof Set?e.add(g):r(e)&&(e[n]=g))}if(l)for(const n of t.refiner(e,c))l=!1,yield[n,void 0];l&&(yield[void 0,e])}class c{constructor(e){const{type:t,schema:n,validator:r,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=i,this.validator=r?(e,t)=>s(r(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>s(o(e,t),t,this,e):()=>[]}assert(e){return l(e,this)}create(e){return g(e,this)}is(e){return d(e,this)}mask(e){return p(e,this)}validate(e,t={}){return f(e,this,t)}}function l(e,t){const n=f(e,t);if(n[0])throw n[0]}function g(e,t){const n=f(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function p(e,t){const n=f(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function d(e,t){return!f(e,t)[0]}function f(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function h(e,t){return new c({type:e,schema:null,validator:t})}function v(){return h("never",(()=>!1))}function y(e){const t=e?Object.keys(e):[],n=v();return new c({type:"object",schema:e||null,*entries(o){if(e&&r(o)){const r=new Set(Object.keys(o));for(const n of t)r.delete(n),yield[n,o[n],e[n]];for(const e of r)yield[e,o[e],n]}},validator:e=>r(e)||"Expected an object, but received: "+i(e),coercer:e=>r(e)?{...e}:e})}function m(e){return new c({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function E(){return h("string",(e=>"string"==typeof e||"Expected a string, but received: "+i(e)))}function I(){return h("unknown",(()=>!0))}function b(e,t,n){return new c({...e,coercer:(r,o)=>d(r,t)?e.coercer(n(r,o),o):e.coercer(r,o)})}function _(e,t,n){return new c({...e,*refiner(r,o){yield*e.refiner(r,o);const i=s(n(r,o),o,e,r);for(const e of i)yield{...e,refinement:t}}})}t.Struct=c,t.StructError=n,t.any=function(){return h("any",(()=>!0))},t.array=function(e){return new c({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+i(e)})},t.assert=l,t.assign=function(...e){const t=e.map((e=>e.schema));return y(Object.assign({},...t))},t.boolean=function(){return h("boolean",(e=>"boolean"==typeof e))},t.coerce=b,t.create=g,t.date=function(){return h("date",(e=>e instanceof Date&&!isNaN(e.getTime())||"Expected a valid `Date` object, but received: "+i(e)))},t.defaulted=function(e,t,n={}){return b(e,I(),(e=>{const r="function"==typeof t?t():t;if(void 0===e)return r;if(!n.strict&&o(e)&&o(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))},t.define=h,t.deprecated=function(e,t){return new c({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})},t.dynamic=function(e){return new c({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n)})},t.empty=function(e){const t="Expected an empty "+e.type;return _(e,"empty",(e=>{if(e instanceof Map||e instanceof Set){const{size:n}=e;return 0===n||t+" but received one with a size of `"+n+"`"}{const{length:n}=e;return 0===n||t+" but received one with a length of `"+n+"`"}}))},t.enums=function(e){const t={},n=e.map((e=>i(e))).join();for(const n of e)t[n]=n;return new c({type:"enums",schema:t,validator:t=>e.includes(t)||"Expected one of `"+n+"`, but received: "+i(t)})},t.func=function(){return h("func",(e=>"function"==typeof e||"Expected a function, but received: "+i(e)))},t.instance=function(e){return h("instance",(t=>t instanceof e||"Expected a `"+e.name+"` instance, but received: "+i(t)))},t.integer=function(){return h("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+i(e)))},t.intersection=function(e){return new c({type:"intersection",schema:null,*entries(t,n){for(const r of e)yield*r.entries(t,n)},*validator(t,n){for(const r of e)yield*r.validator(t,n)},*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})},t.is=d,t.lazy=function(e){let t;return new c({type:"lazy",schema:null,*entries(n,r){null!=t||(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(null!=t||(t=e()),t.validator(n,r)),coercer:(n,r)=>(null!=t||(t=e()),t.coercer(n,r))})},t.literal=function(e){const t=i(e),n=typeof e;return new c({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `"+t+"`, but received: "+i(n)})},t.map=function(e,t){return new c({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,o]of n.entries())yield[r,r,e],yield[r,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||"Expected a `Map` object, but received: "+i(e)})},t.mask=p,t.max=function(e,t,n={}){const{exclusive:r}=n;return _(e,"max",(n=>r?nr?n>t:n>=t||"Expected a "+e.type+" greater than "+(r?"":"or equal to ")+t+" but received `"+n+"`"))},t.never=v,t.nullable=function(e){return new c({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})},t.number=function(){return h("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+i(e)))},t.object=y,t.omit=function(e,t){const{schema:n}=e,r={...n};for(const e of t)delete r[e];return y(r)},t.optional=m,t.partial=function(e){const t=e instanceof c?{...e.schema}:{...e};for(const e in t)t[e]=m(t[e]);return y(t)},t.pattern=function(e,t){return _(e,"pattern",(n=>t.test(n)||"Expected a "+e.type+" matching `/"+t.source+'/` but received "'+n+'"'))},t.pick=function(e,t){const{schema:n}=e,r={};for(const e of t)r[e]=n[e];return y(r)},t.record=function(e,t){return new c({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator:e=>r(e)||"Expected an object, but received: "+i(e)})},t.refine=_,t.regexp=function(){return h("regexp",(e=>e instanceof RegExp))},t.set=function(e){return new c({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||"Expected a `Set` object, but received: "+i(e)})},t.size=function(e,t,n=t){const r="Expected a "+e.type,o=t===n?"of `"+t+"`":"between `"+t+"` and `"+n+"`";return _(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||r+" "+o+" but received `"+e+"`";if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=n||r+" with a size "+o+" but received one with a size of `"+i+"`"}{const{length:i}=e;return t<=i&&i<=n||r+" with a length "+o+" but received one with a length of `"+i+"`"}}))},t.string=E,t.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),h(e,t)},t.trimmed=function(e){return b(e,E(),(e=>e.trim()))},t.tuple=function(e){const t=v();return new c({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let o=0;oArray.isArray(e)||"Expected an array, but received: "+i(e)})},t.type=function(e){const t=Object.keys(e);return new c({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||"Expected an object, but received: "+i(e)})},t.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new c({type:"union",schema:null,validator(n,r){const o=[];for(const t of e){const[...e]=u(n,t,r),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return["Expected the value to satisfy a union of `"+t+"`, but received: "+i(n),...o]}})},t.unknown=I,t.validate=f},805:e=>{"use strict";e.exports=JSON.parse('{"API_CALLED":"API - {apiName} called","SERVICE_INITIALIZED":"VWO {service} initialized while creating an instance of SDK","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED":"Rollout rule got passed for user {userId}. Hence, evaluating experiments","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT":"No Rollout rules present for the feature. Hence, checking experiment rules","USER_BUCKET_TO_VARIATION":"User ID:{userId} for experiment:{campaignKey} having percent traffic:{percentTraffic} got bucket-value:{bucketValue} and hash-value:{hashValue}","IMPRESSION_FOR_TRACK_USER":"Impression built for vwo_variationShown(VWO standard event for tracking user) event haivng Account ID:{accountId}, User ID:{userId}, and experiment ID:{campaignId}","IMPRESSION_FOR_TRACK_GOAL":"Impression built for event:{eventName} event having Account ID:{accountId}, and user ID:{userId}","IMPRESSION_FOR_SYNC_VISITOR_PROP":"Impression built for {eventName}(VWO internal event) event for Account ID:{accountId}, and user ID:{userId}"}')},1198:e=>{"use strict";e.exports=JSON.parse('{"INIT_OPTIONS_ERROR":"[ERROR]: VWO-SDK {date} Options should be of type object","INIT_OPTIONS_SDK_KEY_ERROR":"[ERROR]: VWO-SDK {date} Please provide the sdkKey in the options and should be a of type string","INIT_OPTIONS_ACCOUNT_ID_ERROR":"[ERROR]: VWO-SDK {date} Please provide VWO account ID in the options and should be a of type string|number","INIT_OPTIONS_INVALID":"Invalid key:{key} passed in options. Should be of type:{correctType} and greater than equal to 1000","SETTINGS_FETCH_ERROR":"Settings could not be fetched. Error:{err}","SETTINGS_SCHEMA_INVALID":"Settings are not valid. Failed schema validation","POLLING_FETCH_SETTINGS_FAILED":"Error while fetching VWO settings with polling","API_THROW_ERROR":"API - {apiName} failed to execute. Trace:{err}","API_INVALID_PARAM":"Key:{key} passed to API:{apiName} is not of valid type. Got type:{type}, should be:{correctType}","API_SETTING_INVALID":"Settings are not valid. Contact VWO Support","API_CONTEXT_INVALID":"Context should be an object and must contain a mandatory key - id, which is User ID","FEATURE_NOT_FOUND":"Feature not found for the key:{featureKey}","EVENT_NOT_FOUND":"Event:{eventName} not found in any of the features\' metrics","STORED_DATA_ERROR":"Error in getting data from storage. Error:{err}","STORING_DATA_ERROR":"Key:{featureKey} is not valid. Not able to store data into storage","GATEWAY_URL_ERROR":"Please provide a valid URL for VWO Gateway Service while initializing the SDK","NETWORK_CALL_FAILED":"Error occurred while sending {method} request. Error:{err}","SET_USER_ALIAS":"Error in setting user alias for user ID:{userId} and alias ID:{aliasUserId}. Error:{err}","GET_USER_ALIAS":"Error in getting user alias for user ID:{userId}. Error:{err}"}')},7778:e=>{"use strict";e.exports=JSON.parse('{"ON_INIT_ALREADY_RESOLVED":"[INFO]: VWO-SDK {date} {apiName} already resolved","ON_INIT_SETTINGS_FAILED":"[INFO]: VWO-SDK {date} VWO settings could not be fetched","POLLING_SET_SETTINGS":"There\'s a change in settings from the last settings fetched. Hence, instantiating a new VWO client internally","POLLING_NO_CHANGE_IN_SETTINGS":"No change in settings with the last settings fetched. Hence, not instantiating new VWO client","SETTINGS_FETCH_SUCCESS":"Settings fetched successfully","CLIENT_INITIALIZED":"VWO Client initialized","STORED_VARIATION_FOUND":"Variation {variationKey} found in storage for the user {userId} for the {experimentType} experiment:{experimentKey}","USER_PART_OF_CAMPAIGN":"User ID:{userId} is {notPart} part of experiment:{campaignKey}","SEGMENTATION_SKIP":"For userId:{userId} of experiment:{campaignKey}, segments was missing. Hence, skipping segmentation","SEGMENTATION_STATUS":"Segmentation {status} for userId:{userId} of experiment:{campaignKey}","USER_CAMPAIGN_BUCKET_INFO":"User ID:{userId} for experiment:{campaignKey} {status}","WHITELISTING_SKIP":"Whitelisting is not used for experiment:{campaignKey}, hence skipping evaluating whitelisting {variation} for User ID:{userId}","WHITELISTING_STATUS":"User ID:{userId} for experiment:{campaignKey} {status} whitelisting {variationString}","VARIATION_RANGE_ALLOCATION":"Variation:{variationKey} of experiment:{campaignKey} having weight:{variationWeight} got bucketing range: ({startRange} - {endRange})","IMPACT_ANALYSIS":"Tracking feature:{featureKey} being {status} for Impact Analysis Campaign for the user {userId}","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS":"No rollout rule found for feature:{featureKey}. Hence, evaluating experiments","MEG_CAMPAIGN_FOUND_IN_STORAGE":"Campaign {campaignKey} found in storage for user ID:{userId}","MEG_CAMPAIGN_ELIGIBLE":"Campaign {campaignKey} is eligible for user ID:{userId}","MEG_WINNER_CAMPAIGN":"MEG: Campaign {campaignKey} is the winner for group {groupId} for user ID:{userId} {algo}"}')},6611:e=>{"use strict";e.exports={}},8854:e=>{"use strict";e.exports={}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.onInit=e.init=e.StorageConnector=e.LogLevelEnum=void 0;var t=n(4940);Object.defineProperty(e,"LogLevelEnum",{enumerable:!0,get:function(){return t.LogLevelEnum}});var o=n(5030);Object.defineProperty(e,"StorageConnector",{enumerable:!0,get:function(){return o.Connector}});var i=n(9709);Object.defineProperty(e,"init",{enumerable:!0,get:function(){return i.init}}),Object.defineProperty(e,"onInit",{enumerable:!0,get:function(){return i.onInit}})})(),r})())); //# sourceMappingURL=vwo-fme-javascript-sdk.min.js.map \ No newline at end of file diff --git a/dist/client/vwo-fme-javascript-sdk.min.js.map b/dist/client/vwo-fme-javascript-sdk.min.js.map index 44b329d..2fea284 100644 --- a/dist/client/vwo-fme-javascript-sdk.min.js.map +++ b/dist/client/vwo-fme-javascript-sdk.min.js.map @@ -1 +1 @@ -{"version":3,"file":"vwo-fme-javascript-sdk.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAE1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IAEQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,O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Q4hC,QAAUA,EAClB5hC,EAAQmZ,SAAWA,C,yrJC1nCfyrB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBt3B,IAAjBu3B,EACH,OAAOA,EAAa/kC,QAGrB,IAAIC,EAAS2kC,EAAyBE,GAAY,CAGjD9kC,QAAS,CAAC,GAOX,OAHAglC,EAAoBF,GAAUlkB,KAAK3gB,EAAOD,QAASC,EAAQA,EAAOD,QAAS6kC,GAGpE5kC,EAAOD,OACf,C,oJCNA,cAGS,4EAHA,EAAAgd,YAAY,IACrB,cAEoC,gFAF3B,EAAAkO,SAAS,IAGlB,cAAS,sEAAA7iB,IAAI,IAAE,wEAAA48B,MAAM,G","sources":["webpack://vwoSdk/webpack/universalModuleDefinition","webpack://vwoSdk/./node_modules/murmurhash/murmurhash.js","webpack://vwoSdk/./lib/VWO.ts","webpack://vwoSdk/./lib/VWOBuilder.ts","webpack://vwoSdk/./lib/VWOClient.ts","webpack://vwoSdk/./lib/api/GetFlag.ts","webpack://vwoSdk/./lib/api/SetAttribute.ts","webpack://vwoSdk/./lib/api/TrackEvent.ts","webpack://vwoSdk/./lib/constants/Url.ts","webpack://vwoSdk/./lib/constants/index.ts","webpack://vwoSdk/./lib/decorators/StorageDecorator.ts","webpack://vwoSdk/./lib/enums/ApiEnum.ts","webpack://vwoSdk/./lib/enums/CampaignTypeEnum.ts","webpack://vwoSdk/./lib/enums/EventEnum.ts","webpack://vwoSdk/./lib/enums/HeadersEnum.ts","webpack://vwoSdk/./lib/enums/HttpMethodEnum.ts","webpack://vwoSdk/./lib/enums/PlatformEnum.ts","webpack://vwoSdk/./lib/enums/StatusEnum.ts","webpack://vwoSdk/./lib/enums/StorageEnum.ts","webpack://vwoSdk/./lib/enums/UrlEnum.ts","webpack://vwoSdk/./lib/enums/log-messages/index.ts","webpack://vwoSdk/./lib/models/campaign/CampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/FeatureModel.ts","webpack://vwoSdk/./lib/models/campaign/ImpactCampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/MetricModel.ts","webpack://vwoSdk/./lib/models/campaign/RuleModel.ts","webpack://vwoSdk/./lib/models/campaign/VariableModel.ts","webpack://vwoSdk/./lib/models/campaign/VariationModel.ts","webpack://vwoSdk/./lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwoSdk/./lib/models/settings/SettingsModel.ts","webpack://vwoSdk/./lib/models/user/ContextModel.ts","webpack://vwoSdk/./lib/models/user/ContextVWOModel.ts","webpack://vwoSdk/./lib/packages/decision-maker/index.ts","webpack://vwoSdk/./lib/packages/logger/LogMessageBuilder.ts","webpack://vwoSdk/./lib/packages/logger/Logger.ts","webpack://vwoSdk/./lib/packages/logger/core/LogManager.ts","webpack://vwoSdk/./lib/packages/logger/core/TransportManager.ts","webpack://vwoSdk/./lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwoSdk/./lib/packages/logger/index.ts","webpack://vwoSdk/./lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwoSdk/./lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwoSdk/./lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwoSdk/./lib/packages/network-layer/index.ts","webpack://vwoSdk/./lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwoSdk/./lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/RequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/ResponseModel.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/index.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwoSdk/./lib/packages/storage/Connector.ts","webpack://vwoSdk/./lib/packages/storage/Storage.ts","webpack://vwoSdk/./lib/packages/storage/index.ts","webpack://vwoSdk/./lib/services/CampaignDecisionService.ts","webpack://vwoSdk/./lib/services/HooksService.ts","webpack://vwoSdk/./lib/services/SettingsService.ts","webpack://vwoSdk/./lib/services/StorageService.ts","webpack://vwoSdk/./lib/utils/CampaignUtil.ts","webpack://vwoSdk/./lib/utils/DataTypeUtil.ts","webpack://vwoSdk/./lib/utils/DecisionUtil.ts","webpack://vwoSdk/./lib/utils/FunctionUtil.ts","webpack://vwoSdk/./lib/utils/GatewayServiceUtil.ts","webpack://vwoSdk/./lib/utils/ImpressionUtil.ts","webpack://vwoSdk/./lib/utils/LogMessageUtil.ts","webpack://vwoSdk/./lib/utils/MegUtil.ts","webpack://vwoSdk/./lib/utils/NetworkUtil.ts","webpack://vwoSdk/./lib/utils/PromiseUtil.ts","webpack://vwoSdk/./lib/utils/RuleEvaluationUtil.ts","webpack://vwoSdk/./lib/utils/SettingsUtil.ts","webpack://vwoSdk/./lib/utils/UrlUtil.ts","webpack://vwoSdk/./lib/utils/UuidUtil.ts","webpack://vwoSdk/./lib/utils/XMLUtil.ts","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/index.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/md5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/native.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/nil.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/parse.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/regex.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/rng.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v3.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v35.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v4.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/validate.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/version.js","webpack://vwoSdk/./node_modules/vwo-fme-sdk-log-messages/index.js","webpack://vwoSdk/./node_modules/superstruct/lib/index.cjs","webpack://vwoSdk/webpack/bootstrap","webpack://vwoSdk/./lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t// CommonJS2\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\t// AMD\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\t// CommonJS\n\telse if(typeof exports === 'object')\n\t\texports[\"vwoSdk\"] = factory();\n\t// Root\n\telse\n\t\troot[\"vwoSdk\"] = factory();\n})(this, () => {\nreturn ","(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VWOBuilder } from './VWOBuilder';\nimport { IVWOClient } from './VWOClient';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { dynamic } from './types/Common';\nimport { isObject, isString } from './utils/DataTypeUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { InfoLogMessagesEnum, ErrorLogMessagesEnum } from './enums/log-messages';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { PlatformEnum } from './enums/PlatformEnum';\n\nexport class VWO {\n private static vwoBuilder: VWOBuilder;\n private static instance: dynamic;\n\n /**\n * Constructor for the VWO class.\n * Initializes a new instance of VWO with the provided options.\n * @param {Record} options - Configuration options for the VWO instance.\n * @returns The instance of VWO.\n */\n constructor(options: IVWOOptions) {\n return VWO.setInstance(options);\n }\n\n /**\n * Sets the singleton instance of VWO.\n * Configures and builds the VWO instance using the provided options.\n * @param {Record} options - Configuration options for setting up VWO.\n * @returns A Promise resolving to the configured VWO instance.\n */\n private static setInstance(options: IVWOOptions): Promise {\n const optionsVWOBuilder: any = options?.vwoBuilder;\n this.vwoBuilder = optionsVWOBuilder || new VWOBuilder(options);\n\n this.instance = this.vwoBuilder\n .setLogger() // Sets up logging for debugging and monitoring.\n .setSettingsService() // Sets the settings service for configuration management.\n .setStorage() // Configures storage for data persistence.\n .setNetworkManager() // Configures network management for API communication.\n .setSegmentation() // Sets up segmentation for targeted functionality.\n // .initBatching() // Initializes batching for bulk data processing.\n .initPolling(); // Starts polling mechanism for regular updates.\n // .setAnalyticsCallback() // Sets up analytics callback for data analysis.\n\n return this.vwoBuilder.getSettings().then((settings: SettingsModel) => {\n return this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings.\n });\n }\n\n /**\n * Gets the singleton instance of VWO.\n * @returns The singleton instance of VWO.\n */\n static get Instance(): dynamic {\n return this.instance;\n }\n}\n\nlet _global: Record = {};\n/**\n * Initializes a new instance of VWO with the provided options.\n * @param options Configuration options for the VWO instance.\n * @property {string} sdkKey - The SDK key for the VWO account.\n * @property {string} accountId - The account ID for the VWO account.\n * @property {GatewayServiceModel} gatewayService - The gateway service configuration.\n * @property {StorageService} storage - The storage configuration.\n * @returns\n */\n\nexport async function init(options: IVWOOptions): Promise {\n const apiName = 'init';\n const date = new Date().toISOString();\n\n try {\n if (!isObject(options)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ERROR, {\n date,\n });\n console.error(msg); // Ensures options is an object.\n }\n\n if (!options?.sdkKey || !isString(options?.sdkKey)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_SDK_KEY_ERROR, {\n date,\n });\n console.error(msg); // Validates sdkKey presence and type.\n }\n\n if (!options.accountId) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ACCOUNT_ID_ERROR, {\n date,\n });\n console.error(msg); // Validates accountId presence and type.\n }\n\n if (typeof process.env === 'undefined') {\n options.platform = PlatformEnum.CLIENT;\n } else {\n options.platform = PlatformEnum.SERVER;\n }\n\n const instance: any = new VWO(options); // Creates a new VWO instance with the validated options.\n\n _global = {\n vwoInitDeferred: new Deferred(),\n isSettingsFetched: false,\n instance: null,\n };\n\n return instance.then((_vwoInstance) => {\n _global.isSettingsFetched = true;\n _global.instance = _vwoInstance;\n _global.vwoInitDeferred.resolve(_vwoInstance);\n\n return _vwoInstance;\n });\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n\nexport async function onInit() {\n const apiName = 'onInit';\n\n try {\n _global.vwoInitDeferred = new Deferred();\n const date = new Date().toISOString();\n\n // If settings are already fetched, resolve the promise\n if (_global.isSettingsFetched) {\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_ALREADY_RESOLVED, {\n date,\n apiName,\n });\n\n console.info(msg);\n _global.vwoInitDeferred.resolve(_global.instance);\n } else {\n // wait for five seconds, else reject the promise\n setTimeout(() => {\n if (_global.isSettingsFetched) {\n return;\n }\n\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_SETTINGS_FAILED, {\n date,\n });\n\n console.error(msg);\n _global.vwoInitDeferred.reject(new Error('VWO settings could not be fetched'));\n }, 5000);\n }\n\n return _global.vwoInitDeferred.promise;\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from './types/Common';\n\nimport { ILogManager, LogManager } from './packages/logger';\nimport { NetworkManager } from './packages/network-layer';\nimport { SegmentationManager } from './packages/segmentation-evaluator';\n\nimport { Storage } from './packages/storage';\n\nimport { IVWOClient, VWOClient } from './VWOClient';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { SettingsService } from './services/SettingsService';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { isNumber } from './utils/DataTypeUtil';\nimport { cloneObject } from './utils/FunctionUtil';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { getRandomUUID } from './utils/UuidUtil';\n\nexport interface IVWOBuilder {\n settings: SettingsModel; // Holds the configuration settings for the VWO client\n storage: Storage; // Interface for storage management\n logManager: ILogManager; // Manages logging across the VWO SDK\n isSettingsFetchInProgress: boolean; // Flag to check if settings fetch is in progress\n vwoInstance: IVWOClient;\n\n build(settings: SettingsModel): IVWOClient; // Builds and returns a new VWOClient instance\n\n fetchSettings(): Promise; // Asynchronously fetches settings from the server\n setSettingsService(): this; // Sets up the settings manager with provided options\n getSettings(force: boolean): Promise; // Fetches settings, optionally forcing a refresh\n setStorage(): this; // Sets up the storage connector based on provided options\n setNetworkManager(): this; // Configures the network manager with client and mode\n // initBatching(): this; // Initializes event batching with provided configuration\n // setAnalyticsCallback(): this; // Configures the analytics callback based on provided options\n initPolling(): this; // Sets up polling for settings at a specified interval\n setLogger(): this; // Sets up the logger with specified options\n setSegmentation(): this; // Configures the segmentation evaluator with provided options\n}\n\nexport class VWOBuilder implements IVWOBuilder {\n readonly sdkKey: string;\n readonly options: IVWOOptions;\n\n private settingFileManager: SettingsService;\n\n settings: SettingsModel;\n storage: Storage;\n logManager: ILogManager;\n originalSettings: dynamic;\n isSettingsFetchInProgress: boolean;\n vwoInstance: IVWOClient;\n\n constructor(options: IVWOOptions) {\n this.options = options;\n }\n\n /**\n * Sets the network manager with the provided client and development mode options.\n * @returns {this} The instance of this builder.\n */\n setNetworkManager(): this {\n const networkInstance = NetworkManager.Instance;\n // Attach the network client from options\n networkInstance.attachClient(this.options?.network?.client);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Network Layer`,\n }),\n );\n // Set the development mode based on options\n networkInstance.getConfig().setDevelopmentMode(this.options?.isDevelopmentMode);\n return this;\n }\n\n /**\n * Sets the segmentation evaluator with the provided segmentation options.\n * @returns {this} The instance of this builder.\n */\n setSegmentation(): this {\n SegmentationManager.Instance.attachEvaluator(this.options?.segmentation);\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Segmentation Evaluator`,\n }),\n );\n return this;\n }\n\n /**\n * Fetches settings asynchronously, ensuring no parallel fetches.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the fetched settings.\n */\n fetchSettings(force?: boolean): Promise {\n const deferredObject = new Deferred();\n\n // Check if a fetch operation is already in progress\n if (!this.isSettingsFetchInProgress) {\n this.isSettingsFetchInProgress = true;\n this.settingFileManager.getSettings(force).then((settings: SettingsModel) => {\n // if force is false, update original settings, if true the request is from polling and no need to update original settings\n if (!force) {\n this.originalSettings = settings;\n }\n\n this.isSettingsFetchInProgress = false;\n deferredObject.resolve(settings);\n });\n\n return deferredObject.promise;\n } else {\n // Avoid parallel fetches by recursively calling fetchSettings\n return this.fetchSettings(force);\n }\n }\n\n /**\n * Gets the settings, fetching them if not cached or if forced.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the settings.\n */\n getSettings(force?: boolean): Promise {\n const deferredObject = new Deferred();\n\n try {\n // Use cached settings if available and not forced to fetch\n if (!force && this.settings) {\n LogManager.Instance.info('Using already fetched and cached settings');\n deferredObject.resolve(this.settings);\n } else {\n // Fetch settings if not cached or forced\n this.fetchSettings(force).then((settings: SettingsModel) => {\n deferredObject.resolve(settings);\n });\n }\n } catch (err) {\n LogManager.Instance.error('Failed to fetch settings. Error: ' + err);\n deferredObject.resolve({});\n }\n return deferredObject.promise;\n }\n\n /**\n * Sets the storage connector based on the provided storage options.\n * @returns {this} The instance of this builder.\n */\n setStorage(): this {\n if (this.options.storage) {\n // Attach the storage connector from options\n this.storage = Storage.Instance.attachConnector(this.options.storage);\n } else {\n // Set storage to null if no storage options provided\n this.storage = null;\n }\n\n return this;\n }\n\n /**\n * Sets the settings manager with the provided options.\n * @returns {this} The instance of this builder.\n */\n setSettingsService(): this {\n this.settingFileManager = new SettingsService(this.options);\n\n return this;\n }\n\n /**\n * Sets the logger with the provided logger options.\n * @returns {this} The instance of this builder.\n */\n setLogger(): this {\n this.logManager = new LogManager(this.options.logger || {});\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Logger`,\n }),\n );\n return this;\n }\n\n /**\n * Sets the analytics callback with the provided analytics options.\n * @returns {this} The instance of this builder.\n */\n /* setAnalyticsCallback(): this {\n if (!isObject(this.options.analyticsEvent)) {\n // TODO: add logging here\n return this;\n }\n\n if (!isFunction(this.options.analyticsEvent.eventCallback)) {\n // TODO: add logging here\n return this;\n }\n\n if (\n this.options.analyticsEvent.isBatchingSupported &&\n !isBoolean(this.options.analyticsEvent.isBatchingSupported)\n ) {\n // TODO:- add logging here\n return this;\n }\n\n // AnalyticsEvent.Instance.attachCallback(\n // this.options.analyticsEvent.eventCallback,\n // this.options.analyticsEvent.isBatchingSupported\n // );\n return this;\n } */\n\n /**\n * Generates a random user ID based on the provided API key.\n * @returns {string} The generated random user ID.\n */\n getRandomUserId(): string {\n const apiName = 'getRandomUserId';\n try {\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n return getRandomUUID(this.options.sdkKey);\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n\n /**\n * Initializes the batching with the provided batch events options.\n * @returns {this} The instance of this builder.\n */\n /* initBatching(): this {\n if (!isObject(this.options.batchEvents)) {\n // TODO:- add logging here\n return this;\n }\n\n if (\n isObject(this.options.batchEvents) &&\n (!(\n (isNumber(this.options.batchEvents.eventsPerRequest) &&\n this.options.batchEvents.eventsPerRequest > 0 &&\n this.options.batchEvents.eventsPerRequest <= Constants.MAX_EVENTS_PER_REQUEST) ||\n (isNumber(this.options.batchEvents.requestTimeInterval) && this.options.batchEvents.requestTimeInterval >= 1)\n ) ||\n !isFunction(this.options.batchEvents.flushCallback))\n ) {\n LogManager.Instance.error('Invalid batchEvents config');\n // throw new Error('Invalid batchEvents config');\n return this;\n }\n\n // BatchEventsQueue.Instance.setBatchConfig(this.options.batchEvents, this.options.sdkKey); // TODO\n\n return this;\n } */\n\n /**\n * Initializes the polling with the provided poll interval.\n * @returns {this} The instance of this builder.\n */\n initPolling(): this {\n if (!this.options.pollInterval) {\n return this;\n }\n\n if (this.options.pollInterval && !isNumber(this.options.pollInterval)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n if (this.options.pollInterval && this.options.pollInterval < 1000) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n this.checkAndPoll();\n\n return this;\n }\n\n /**\n * Builds a new VWOClient instance with the provided settings.\n * @param {SettingsModel} settings - The settings for the VWOClient.\n * @returns {VWOClient} The new VWOClient instance.\n */\n build(settings: SettingsModel): IVWOClient {\n this.vwoInstance = new VWOClient(settings, this.options);\n\n return this.vwoInstance;\n }\n\n /**\n * Checks and polls for settings updates at the provided interval.\n */\n checkAndPoll(): void {\n const pollingInterval = this.options.pollInterval;\n\n setInterval(() => {\n this.getSettings(true)\n .then((latestSettings: SettingsModel) => {\n const lastSettings = JSON.stringify(this.originalSettings);\n const stringifiedLatestSettings = JSON.stringify(latestSettings);\n if (stringifiedLatestSettings !== lastSettings) {\n this.originalSettings = latestSettings;\n const clonedSettings = cloneObject(latestSettings);\n\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_SET_SETTINGS);\n setSettingsAndAddCampaignsToRules(clonedSettings, this.vwoInstance);\n } else {\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS);\n }\n })\n .catch(() => {\n LogManager.Instance.error(ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED);\n });\n }, pollingInterval);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from './packages/logger';\nimport { Storage } from './packages/storage';\n\nimport { FlagApi } from './api/GetFlag';\nimport { SetAttributeApi } from './api/SetAttribute';\nimport { TrackApi } from './api/TrackEvent';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { SettingsModel } from './models/settings/SettingsModel';\n\nimport { dynamic } from './types/Common';\n// import { BatchEventsQueue } from './services/batchEventsQueue';\n\nimport { SettingsSchema } from './models/schemas/SettingsSchemaValidation';\nimport { ContextModel } from './models/user/ContextModel';\nimport HooksService from './services/HooksService';\nimport { UrlUtil } from './utils/UrlUtil';\n\nimport { getType, isBoolean, isNumber, isObject, isString } from './utils/DataTypeUtil';\n\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { setShouldWaitForTrackingCalls } from './utils/NetworkUtil';\n\nexport interface IVWOClient {\n readonly options?: IVWOOptions;\n settings: SettingsModel;\n\n getFlag(featureKey: string, context: Record): Record;\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record,\n ): Promise>;\n setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise;\n}\n\nexport class VWOClient implements IVWOClient {\n settings: SettingsModel;\n originalSettings: Record;\n storage: Storage;\n\n constructor(settings: SettingsModel, options: IVWOOptions) {\n this.options = options;\n\n setSettingsAndAddCampaignsToRules(settings, this);\n\n UrlUtil.init({\n collectionPrefix: this.settings.getCollectionPrefix(),\n });\n\n setShouldWaitForTrackingCalls(this.options.shouldWaitForTrackingCalls || false);\n\n LogManager.Instance.info(InfoLogMessagesEnum.CLIENT_INITIALIZED);\n return this;\n }\n options?: IVWOOptions;\n /**\n * Retrieves the value of a feature flag for a given feature key and context.\n * This method validates the feature key and context, ensures the settings are valid, and then uses the FlagApi to get the flag value.\n *\n * @param {string} featureKey - The key of the feature to retrieve.\n * @param {ContextModel} context - The context in which the feature flag is being retrieved, must include a valid user ID.\n * @returns {Promise>} - A promise that resolves to the feature flag value.\n */\n getFlag(featureKey: string, context: Record): Record {\n const apiName = 'getFlag';\n const deferredObject = new Deferred();\n const errorReturnSchema = {\n isEnabled: (): boolean => false,\n getVariables: (): Array> => [],\n getVariable: (_key: string, defaultValue: any): dynamic => defaultValue,\n };\n\n try {\n const hooksService = new HooksService(this.options);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate featureKey is a string\n if (!isString(featureKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'featureKey',\n type: getType(featureKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: featureKey should be a string');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n new FlagApi()\n .get(featureKey, this.settings, contextModel, hooksService)\n .then((data: any) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve(errorReturnSchema);\n });\n } catch (err) {\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve(errorReturnSchema);\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Tracks an event with specified properties and context.\n * This method validates the types of the inputs and ensures the settings and user context are valid before proceeding.\n *\n * @param {string} eventName - The name of the event to track.\n * @param {ContextModel} context - The context in which the event is being tracked, must include a valid user ID.\n * @param {Record} eventProperties - The properties associated with the event.\n * @returns {Promise>} - A promise that resolves to the result of the tracking operation.\n */\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record = {},\n ): Promise> {\n const apiName = 'trackEvent';\n const deferredObject = new Deferred();\n\n try {\n const hooksService = new HooksService(this.options);\n\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate eventName is a string\n if (!isString(eventName)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventName',\n type: getType(eventName),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: Event-name should be a string');\n }\n\n // Validate eventProperties is an object\n if (!isObject(eventProperties)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventProperties',\n type: getType(eventProperties),\n correctType: 'object',\n }),\n );\n\n throw new TypeError('TypeError: eventProperties should be an object');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with tracking the event\n new TrackApi()\n .track(this.settings, eventName, contextModel, eventProperties, hooksService)\n .then((data) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve({ [eventName]: false });\n });\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve({ [eventName]: false });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Sets an attribute for a user in the context provided.\n * This method validates the types of the inputs before proceeding with the API call.\n *\n * @param {string} attributeKey - The key of the attribute to set.\n * @param {string} attributeValue - The value of the attribute to set.\n * @param {ContextModel} context - The context in which the attribute should be set, must include a valid user ID.\n */\n async setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise {\n const apiName = 'setAttribute';\n\n try {\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate attributeKey is a string\n if (!isString(attributeKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeKey',\n type: getType(attributeKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: attributeKey should be a string');\n }\n // Validate attributeValue is a string\n if (!isString(attributeValue) && !isNumber(attributeValue) && !isBoolean(attributeValue)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeValue',\n type: getType(attributeValue),\n correctType: 'boolean | string | number',\n }),\n );\n\n throw new TypeError('TypeError: attributeValue should be a string');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with setting the attribute if validation is successful\n await new SetAttributeApi().setAttribute(this.settings, attributeKey, attributeValue, contextModel);\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { VariableModel } from '../models/campaign/VariableModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport IHooksService from '../services/HooksService';\nimport { StorageService } from '../services/StorageService';\nimport { getVariationFromCampaignKey } from '../utils/CampaignUtil';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from '../utils/DecisionUtil';\nimport { getAllExperimentRules, getFeatureFromKey, getSpecificRulesBasedOnType } from '../utils/FunctionUtil';\nimport { createAndSendImpressionForVariationShown } from '../utils/ImpressionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport { getShouldWaitForTrackingCalls } from '../utils/NetworkUtil';\n\ninterface IGetFlag {\n get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise;\n}\n\nexport class FlagApi implements IGetFlag {\n async get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise {\n let isEnabled = false;\n let rolloutVariationToReturn = null;\n let experimentVariationToReturn = null;\n let shouldCheckForExperimentsRules = false;\n\n const passedRulesInformation = {}; // for storing and integration callback\n const deferredObject = new Deferred();\n const evaluatedFeatureMap: Map = new Map();\n\n // get feature object from feature key\n const feature = getFeatureFromKey(settings, featureKey);\n const decision = {\n featureName: feature?.getName(),\n featureId: feature?.getId(),\n featureKey: feature?.getKey(),\n userId: context?.getId(),\n api: ApiEnum.GET_FLAG,\n };\n\n const storageService = new StorageService();\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'experiment',\n experimentKey: storedData.experimentKey,\n }),\n );\n deferredObject.resolve({\n isEnabled: () => true,\n getVariables: () => variation?.getVariables(),\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) =>\n variation\n ?.getVariables()\n .find((variable) => new VariableModel().modelFromDictionary(variable).getKey() === key)\n ?.getValue() || defaultValue,\n });\n\n return deferredObject.promise;\n }\n }\n } else if (storedData?.rolloutKey && storedData?.rolloutId) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.rolloutKey,\n storedData.rolloutVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'rollout',\n experimentKey: storedData.rolloutKey,\n }),\n );\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED, {\n userId: context.getId(),\n }),\n );\n\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n const featureInfo = {\n rolloutId: storedData.rolloutId,\n rolloutKey: storedData.rolloutKey,\n rolloutVariationId: storedData.rolloutVariationId,\n };\n evaluatedFeatureMap.set(featureKey, featureInfo);\n Object.assign(passedRulesInformation, featureInfo);\n }\n }\n\n if (!isObject(feature) || feature === undefined) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.FEATURE_NOT_FOUND, {\n featureKey,\n }),\n );\n\n deferredObject.reject({});\n\n return deferredObject.promise;\n }\n\n // TODO: remove await from here, need not wait for gateway service at the time of calling getFlag\n await SegmentationManager.Instance.setContextualData(settings, feature, context);\n\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT); // get all rollout rules\n\n if (rollOutRules.length > 0 && !isEnabled) {\n const rolloutRulesToEvaluate = [];\n\n for (const rule of rollOutRules) {\n const { preSegmentationResult, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n // if pre segment passed, then break the loop and check the traffic allocation\n rolloutRulesToEvaluate.push(rule);\n\n evaluatedFeatureMap.set(featureKey, {\n rolloutId: rule.getId(),\n rolloutKey: rule.getKey(),\n rolloutVariationId: rule.getVariations()[0]?.getId(),\n });\n\n break;\n }\n\n continue; // if rule does not satisfy, then check for other ROLLOUT rules\n }\n\n if (rolloutRulesToEvaluate.length > 0) {\n const passedRolloutCampaign = new CampaignModel().modelFromDictionary(rolloutRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, passedRolloutCampaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(passedRolloutCampaign, variation, passedRulesInformation, decision);\n\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n }\n }\n }\n } else if (rollOutRules.length === 0) {\n LogManager.Instance.debug(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT);\n shouldCheckForExperimentsRules = true;\n }\n\n if (shouldCheckForExperimentsRules) {\n const experimentRulesToEvaluate = [];\n\n // if rollout rule is passed, get all ab and Personalize rules\n const experimentRules = getAllExperimentRules(feature);\n const megGroupWinnerCampaigns: Map = new Map();\n\n for (const rule of experimentRules) {\n const { preSegmentationResult, whitelistedObject, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n if (whitelistedObject === null) {\n // whitelistedObject will be null if pre segment passed but whitelisting failed\n experimentRulesToEvaluate.push(rule);\n } else {\n isEnabled = true;\n experimentVariationToReturn = whitelistedObject.variation;\n Object.assign(passedRulesInformation, {\n experimentId: rule.getId(),\n experimentKey: rule.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n }\n\n break;\n }\n continue;\n }\n\n if (experimentRulesToEvaluate.length > 0) {\n const campaign = new CampaignModel().modelFromDictionary(experimentRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n experimentVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(campaign, variation, passedRulesInformation, decision);\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n }\n }\n }\n }\n\n // If flag is enabled, store it in data\n if (isEnabled) {\n // set storage data\n new StorageDecorator().setDataInStorage(\n {\n featureKey,\n context,\n ...passedRulesInformation,\n },\n storageService,\n );\n }\n\n // call integration callback, if defined\n hooksService.set(decision);\n hooksService.execute(hooksService.get());\n\n // Send data for Impact Campaign, if defined\n if (feature.getImpactCampaign()?.getCampaignId()) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.IMPACT_ANALYSIS, {\n userId: context.getId(),\n featureKey,\n status: isEnabled ? 'enabled' : 'disabled',\n }),\n );\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n }\n }\n\n const variablesForEvaluatedFlag =\n experimentVariationToReturn?.variables ?? rolloutVariationToReturn?.variables ?? [];\n\n deferredObject.resolve({\n isEnabled: () => isEnabled,\n getVariables: () => variablesForEvaluatedFlag,\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) => {\n const variable = variablesForEvaluatedFlag.find((variable) => variable.key === key);\n\n return variable?.value ?? defaultValue;\n },\n });\n\n return deferredObject.promise;\n }\n}\n\n// Not PRIVATE methods but helper methods. If need be, move them to some util file to be reused by other API(s)\n\nfunction _updateIntegrationsDecisionObject(\n campaign: CampaignModel,\n variation: VariationModel,\n passedRulesInformation: any,\n decision: any,\n): void {\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT) {\n Object.assign(passedRulesInformation, {\n rolloutId: campaign.getId(),\n rolloutKey: campaign.getKey(),\n rolloutVariationId: variation.getId(),\n });\n } else {\n Object.assign(passedRulesInformation, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: variation.getId(),\n });\n }\n Object.assign(decision, passedRulesInformation);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\nimport {\n getEventsBaseProperties,\n getAttributePayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\ninterface ISetAttribute {\n /**\n * Sets an attribute for a user.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise;\n}\n\nexport class SetAttributeApi implements ISetAttribute {\n /**\n * Implementation of setAttribute to create an impression for a user attribute.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n async setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise {\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n } else {\n createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n }\n }\n}\n\n/**\n * Creates an impression for a user attribute and sends it to the server.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute.\n * @param attributeValue The value of the attribute.\n * @param user User details.\n */\nconst createImpressionForAttribute = async (\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n) => {\n // Retrieve base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_SYNC_VISITOR_PROP,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Construct payload data for the attribute\n const payload = getAttributePayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_SYNC_VISITOR_PROP,\n attributeKey,\n attributeValue,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed payload via POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport IHooksService from '../services/HooksService';\nimport { dynamic } from '../types/Common';\nimport { doesEventBelongToAnyFeature } from '../utils/FunctionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport {\n getEventsBaseProperties,\n getTrackGoalPayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\n\ninterface ITrack {\n /**\n * Tracks an event with given properties and context.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param context Contextual information like user details.\n * @param eventProperties Properties associated with the event.\n * @param hooksService Manager for handling hooks and callbacks.\n * @returns A promise that resolves to a record indicating the success or failure of the event tracking.\n */\n track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: Record,\n hooksService: IHooksService,\n ): Promise>;\n}\n\nexport class TrackApi implements ITrack {\n /**\n * Implementation of the track method to handle event tracking.\n * Checks if the event exists, creates an impression, and executes hooks.\n */\n async track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n hooksService: IHooksService,\n ): Promise> {\n if (doesEventBelongToAnyFeature(eventName, settings)) {\n // Create an impression for the track event\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForTrack(settings, eventName, context, eventProperties);\n } else {\n createImpressionForTrack(settings, eventName, context, eventProperties);\n }\n // Set and execute integration callback for the track event\n hooksService.set({ eventName: eventName, api: ApiEnum.TRACK });\n hooksService.execute(hooksService.get());\n\n return { [eventName]: true };\n }\n // Log an error if the event does not exist\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.EVENT_NOT_FOUND, {\n eventName,\n }),\n );\n\n return { [eventName]: false };\n }\n}\n\n/**\n * Creates an impression for a track event and sends it via a POST API request.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param user User details.\n * @param eventProperties Properties associated with the event.\n */\nconst createImpressionForTrack = async (\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n eventName,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Prepare the payload for the track goal\n const payload = getTrackGoalPayloadData(\n settings,\n context.getId(),\n eventName,\n eventProperties,\n context?.getUserAgent(),\n context?.getIpAddress(),\n );\n // Send the prepared payload via POST API request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const HTTP = 'http';\nexport const HTTPS = 'https';\n\nexport const SEED_URL = 'https://vwo.com';\nexport const HTTP_PROTOCOL = `${HTTP}://`;\nexport const HTTPS_PROTOCOL = `${HTTPS}://`;\nexport const BASE_URL = 'dev.visualwebsiteoptimizer.com';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* global SDK_VERSION */\nimport { PlatformEnum } from '../enums/PlatformEnum';\nimport { SEED_URL, HTTP_PROTOCOL, HTTPS_PROTOCOL } from './Url';\n\nlet packageFile;\nlet platform;\n\n// For client-side SDK, to keep the build size low\n// avoid adding the whole package file in the bundle\nif (typeof process.env === 'undefined') {\n packageFile = {\n name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build\n // @ts-expect-error This will be relaved by webpack at the time of build for browser\n version: SDK_VERSION, // will be replaced by webpack for browser build\n };\n\n platform = PlatformEnum.CLIENT;\n} else {\n packageFile = require('../../package.json');\n platform = PlatformEnum.SERVER;\n}\n\nexport const Constants = {\n SDK_NAME: packageFile.name,\n SDK_VERSION: packageFile.version,\n\n PLATFORM: platform,\n\n MAX_TRAFFIC_PERCENT: 100,\n MAX_TRAFFIC_VALUE: 10000,\n STATUS_RUNNING: 'RUNNING',\n\n SEED_VALUE: 1,\n MAX_EVENTS_PER_REQUEST: 5000,\n DEFAULT_REQUEST_TIME_INTERVAL: 600, // 10 * 60(secs) = 600 secs i.e. 10 minutes\n DEFAULT_EVENTS_PER_REQUEST: 100,\n\n SEED_URL,\n HTTP_PROTOCOL,\n HTTPS_PROTOCOL,\n\n SETTINGS: 'settings',\n SETTINGS_EXPIRY: 10000000,\n SETTINGS_TIMEOUT: 50000,\n\n HOST_NAME: 'dev.visualwebsiteoptimizer.com',\n SETTINTS_ENDPOINT: '/server-side/v2-settings',\n LOCATION_ENDPOINT: '/getLocation',\n\n VWO_FS_ENVIRONMENT: 'vwo_fs_environment',\n\n RANDOM_ALGO: 1,\n\n API_VERSION: '1',\n\n VWO_META_MEG_KEY: '_vwo_meta_meg_',\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from '../packages/logger';\n\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { IStorageService } from '../services/StorageService';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\ninterface IStorageDecorator {\n /**\n * Sets data in storage.\n * @param data The data to be stored.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to a VariationModel.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise;\n\n /**\n * Retrieves a feature from storage.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n getFeatureFromStorage(featureKey: FeatureModel, context: ContextModel, storageService: IStorageService): Promise;\n}\n\nexport class StorageDecorator implements IStorageDecorator {\n /**\n * Asynchronously retrieves a feature from storage based on the feature key and user.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n async getFeatureFromStorage(featureKey: any, context: ContextModel, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n storageService.getDataInStorage(featureKey, context).then((campaignMap: Record | StorageEnum) => {\n switch (campaignMap) {\n case StorageEnum.STORAGE_UNDEFINED:\n deferredObject.resolve(null); // No storage defined\n break;\n case StorageEnum.NO_DATA_FOUND:\n deferredObject.resolve(null); // No data found in storage\n break;\n case StorageEnum.INCORRECT_DATA:\n deferredObject.resolve(StorageEnum.INCORRECT_DATA); // Incorrect data found\n break;\n case StorageEnum.CAMPAIGN_PAUSED:\n deferredObject.resolve(null); // Campaign is paused\n break;\n case StorageEnum.VARIATION_NOT_FOUND:\n deferredObject.resolve(StorageEnum.VARIATION_NOT_FOUND); // No variation found\n break;\n case StorageEnum.WHITELISTED_VARIATION:\n deferredObject.resolve(null); // Whitelisted variation, handle accordingly\n break;\n default:\n deferredObject.resolve(campaignMap); // Valid data found, resolve with it\n }\n });\n\n return deferredObject.promise;\n }\n\n /**\n * Sets data in storage based on the provided data object.\n * @param data The data to be stored, including feature key and user details.\n * @param storageService The storage service instance.\n * @returns A promise that resolves when the data is successfully stored.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n const {\n featureKey,\n context,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n } = data;\n\n if (!featureKey) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'featureKey',\n }),\n );\n\n deferredObject.reject(); // Reject promise if feature key is invalid\n return;\n }\n if (!context.id) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Context or Context.id',\n }),\n );\n\n deferredObject.reject(); // Reject promise if user ID is invalid\n return;\n }\n if (rolloutKey && !experimentKey && !rolloutVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(rolloutKey, experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if rollout variation is invalid\n return;\n }\n if (experimentKey && !experimentVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if experiment variation is invalid\n return;\n }\n\n storageService.setDataInStorage({\n featureKey,\n userId: context.id,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n });\n\n deferredObject.resolve(); // Resolve promise when data is successfully set\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum ApiEnum {\n GET_FLAG = 'getFlag',\n TRACK = 'track',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum CampaignTypeEnum {\n ROLLOUT = 'FLAG_ROLLOUT',\n AB = 'FLAG_TESTING',\n PERSONALIZE = 'FLAG_PERSONALIZE',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum EventEnum {\n VWO_VARIATION_SHOWN = 'vwo_variationShown',\n VWO_SYNC_VISITOR_PROP = 'vwo_syncVisitorProp',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HeadersEnum {\n USER_AGENT = 'X-Device-User-Agent',\n IP = 'VWO-X-Forwarded-For',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HttpMethodEnum {\n GET = 'GET',\n POST = 'POST',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum PlatformEnum {\n CLIENT = 'client',\n SERVER = 'server',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StatusEnum {\n PASSED = 'passed',\n FAILED = 'failed',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StorageEnum {\n STORAGE_UNDEFINED,\n INCORRECT_DATA,\n NO_DATA_FOUND,\n CAMPAIGN_PAUSED,\n VARIATION_NOT_FOUND,\n WHITELISTED_VARIATION,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum UrlEnum {\n BASE_URL = 'dev.visualwebsiteoptimizer.com',\n SETTINGS_URL = '/server-side/settings',\n // WEBHOOK_SETTINGS_URL = '/server-side/pull',\n // BATCH_EVENTS = '/server-side/batch-events',\n EVENTS = '/events/t',\n ATTRIBUTE_CHECK = '/check-attribute',\n GET_USER_DATA = '/get-user-details',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as messages from 'vwo-fme-sdk-log-messages';\n\nconst DebugLogMessagesEnum = messages.debugMessages;\nconst InfoLogMessagesEnum = messages.infoMessages;\nconst ErrorLogMessagesEnum = messages.errorMessages;\n\nexport { DebugLogMessagesEnum, InfoLogMessagesEnum, ErrorLogMessagesEnum };\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { MetricModel } from './MetricModel';\nimport { VariableModel } from './VariableModel';\nimport { VariationModel } from './VariationModel';\n\nexport class CampaignModel {\n private id: number;\n private segments: Record;\n private percentTraffic: number;\n private isUserListEnabled: boolean;\n private key: string;\n private type: string;\n private name: string;\n private isForcedVariationEnabled: boolean;\n private variations: Array = [];\n private metrics: Array = [];\n private variables: Array = [];\n private variationId: number;\n private campaignId: number;\n private ruleKey: string;\n\n copy(campaignModel: CampaignModel): void {\n this.metrics = campaignModel.metrics;\n this.variations = campaignModel.variations;\n this.variables = campaignModel.variables;\n this.processCampaignKeys(campaignModel);\n }\n\n modelFromDictionary(campaign: CampaignModel): this {\n this.processCampaignProperties(campaign);\n this.processCampaignKeys(campaign);\n return this;\n }\n\n processCampaignProperties(campaign: CampaignModel): void {\n if (campaign.variables) {\n // campaign.var ||\n if (\n // (campaign.var && campaign.var.constructor === {}.constructor) ||\n campaign.variables.constructor === {}.constructor\n ) {\n this.variables = [];\n } else {\n const variableList: Array = campaign.variables; // campaign.var ||\n variableList.forEach((variable: any) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (campaign.variations) {\n // campaign.v ||\n if (\n // (campaign.v && campaign.v.constructor === {}.constructor) ||\n campaign.variations.constructor === {}.constructor\n ) {\n this.variations = [];\n } else {\n const variationList: Array = campaign.variations; // campaign.v ||\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n if (campaign.metrics) {\n // campaign.m ||\n if (campaign.metrics && campaign.metrics.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricsList: Array = campaign.metrics || [];\n metricsList.forEach((metric: any) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n }\n }\n\n processCampaignKeys(campaign: CampaignModel): void {\n this.id = campaign.id;\n this.percentTraffic = campaign.percentTraffic; // campaign.pT ||\n this.name = campaign.name; // campaign.n ||\n this.variationId = campaign.variationId; // campaign.vId ||\n this.campaignId = campaign.campaignId; // campaign.cId ||\n this.ruleKey = campaign.ruleKey; // campaign.rK ||\n this.isForcedVariationEnabled = campaign.isForcedVariationEnabled; // campaign.iFVE ||\n this.isUserListEnabled = campaign.isUserListEnabled; // campaign.iULE ||\n this.segments = campaign.segments;\n this.key = campaign.key; // campaign.k ||\n // this.priority = campaign.pr || campaign.priority;\n this.type = campaign.type; // campaign.t ||\n }\n\n getId(): number {\n return this.id;\n }\n\n getName(): string {\n return this.name;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getTraffic(): number {\n return this.percentTraffic;\n }\n\n getType(): string {\n return this.type;\n }\n\n getIsForcedVariationEnabled(): boolean {\n return this.isForcedVariationEnabled;\n }\n\n getIsUserListEnabled(): boolean {\n return this.isUserListEnabled;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from './CampaignModel';\nimport { ImpactCapmaignModel } from './ImpactCampaignModel';\nimport { MetricModel } from './MetricModel';\nimport { RuleModel } from './RuleModel';\n\nexport class FeatureModel {\n private m: Array = [];\n private metrics: Array = [];\n private id: number;\n private key: string;\n private name: string;\n private type: string;\n private rules: Array = [];\n private impactCampaign: ImpactCapmaignModel = null;\n\n private rulesLinkedCampaign: Array = [];\n private isGatewayServiceRequired: boolean = false;\n\n modelFromDictionary(feature: FeatureModel): this {\n this.id = feature.id;\n this.key = feature.key;\n this.name = feature.name;\n this.type = feature.type;\n if (feature?.isGatewayServiceRequired) {\n this.isGatewayServiceRequired = feature.isGatewayServiceRequired;\n }\n if (feature.impactCampaign) {\n this.impactCampaign = new ImpactCapmaignModel().modelFromDictionary(feature.impactCampaign);\n }\n\n if ((feature.m && feature.m.constructor === {}.constructor) || feature.metrics?.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricList: Array = feature.m || feature.metrics;\n metricList?.forEach((metric) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n\n if (feature?.rules?.constructor === {}.constructor) {\n this.rules = [];\n } else {\n const ruleList: Array = feature.rules;\n ruleList?.forEach((rule) => {\n this.rules.push(new RuleModel().modelFromDictionary(rule));\n });\n }\n\n if (feature?.rulesLinkedCampaign && feature.rulesLinkedCampaign?.constructor !== {}.constructor) {\n const linkedCampaignList: Array = feature.rulesLinkedCampaign;\n this.rulesLinkedCampaign = linkedCampaignList;\n }\n\n return this;\n }\n\n getName(): string {\n return this.name;\n }\n\n getType(): string {\n return this.type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRules(): Array {\n return this.rules;\n }\n\n getImpactCampaign(): ImpactCapmaignModel {\n return this.impactCampaign;\n }\n\n getRulesLinkedCampaign(): Array {\n return this.rulesLinkedCampaign;\n }\n\n setRulesLinkedCampaign(rulesLinkedCampaign: Array): void {\n this.rulesLinkedCampaign = rulesLinkedCampaign;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getIsGatewayServiceRequired(): boolean {\n return this.isGatewayServiceRequired;\n }\n\n setIsGatewayServiceRequired(isGatewayServiceRequired: boolean): void {\n this.isGatewayServiceRequired = isGatewayServiceRequired;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ImpactCapmaignModel {\n private campaignId: number;\n private type: string;\n\n modelFromDictionary(impactCampaign: ImpactCapmaignModel): this {\n this.type = impactCampaign.type;\n this.campaignId = impactCampaign.campaignId;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class MetricModel {\n private key: string;\n private identifier: string;\n\n private i: number;\n private id: number;\n\n private t: string;\n private type: string;\n\n modelFromDictionary(metric: MetricModel): this {\n this.identifier = metric.identifier || metric.key;\n this.id = metric.i || metric.id;\n this.type = metric.t || metric.type;\n return this;\n }\n\n getId(): number {\n return this.id;\n }\n\n getIdentifier(): string {\n return this.identifier;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class RuleModel {\n private status: boolean;\n private variationId: number;\n private campaignId: number;\n private type: string;\n private ruleKey: string;\n\n modelFromDictionary(rule: RuleModel): this {\n this.type = rule.type;\n this.status = rule.status;\n this.variationId = rule.variationId;\n this.campaignId = rule.campaignId;\n this.ruleKey = rule.ruleKey;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getVariationId(): number {\n return this.variationId;\n }\n\n getStatus(): boolean {\n return this.status;\n }\n\n getType(): string {\n return this.type;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport class VariableModel {\n private val: dynamic;\n private value: dynamic;\n\n private type: string;\n\n private k: string;\n private key: string;\n\n private i: number;\n private id: number;\n\n modelFromDictionary(variable: VariableModel): this {\n this.value = variable.val || variable.value;\n this.type = variable.type;\n this.key = variable.k || variable.key;\n this.id = variable.i || variable.id;\n\n return this;\n }\n\n setValue(value: dynamic): void {\n this.value = value;\n }\n\n setKey(key: string): void {\n this.key = key;\n }\n\n setType(type: string): void {\n this.type = type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getValue(): dynamic {\n return this.value;\n }\n\n getType(): string {\n return this.type;\n }\n\n getKey(): string {\n return this.key;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { VariableModel } from './VariableModel';\n\nexport class VariationModel {\n private i: number;\n private id: number;\n private type: string;\n\n private n: string;\n private key: string;\n private name: string;\n private ruleKey: string;\n\n private w: number;\n private weight: number;\n\n private startRangeVariation: number;\n private endRangeVariation: number;\n private variables: Array = [];\n private variations: Array = [];\n\n private seg: Record;\n private segments: Record;\n\n modelFromDictionary(variation: VariationModel): this {\n this.id = variation.i || variation.id;\n this.key = variation.n || variation.key || variation.name;\n this.weight = variation.w || variation.weight;\n this.ruleKey = variation.ruleKey;\n this.type = variation.type;\n this.setStartRange(variation.startRangeVariation);\n this.setEndRange(variation.endRangeVariation);\n if (variation.seg || variation.segments) {\n this.segments = variation.seg || variation.segments;\n }\n\n if (variation.variables) {\n if (variation.variables.constructor === {}.constructor) {\n this.variables = [];\n } else {\n const variableList: Array = variation.variables;\n variableList.forEach((variable) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (variation.variations) {\n if (variation.variations.constructor === {}.constructor) {\n this.variations = [];\n } else {\n const variationList: Array = variation.variations;\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n return this;\n }\n\n setStartRange(startRange: number): void {\n this.startRangeVariation = startRange;\n }\n\n setEndRange(endRange: number): void {\n this.endRangeVariation = endRange;\n }\n\n setWeight(weight: number): void {\n this.weight = weight;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n\n getWeight(): number {\n return this.weight;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getStartRangeVariation(): number {\n return this.startRangeVariation;\n }\n\n getEndRangeVariation(): number {\n return this.endRangeVariation;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Struct, array, boolean, number, object, optional, string, union, validate } from 'superstruct';\nimport { dynamic } from '../../types/Common';\nimport { SettingsModel } from '../settings/SettingsModel';\n\nexport class SettingsSchema {\n private campaignMetricSchema: Struct;\n private variableObjectSchema: Struct;\n private campaignVariationSchema: Struct;\n private campaignObjectSchema: Struct;\n private settingsSchema: Struct;\n private featureSchema: Struct;\n private ruleSchema: Struct;\n\n constructor() {\n this.initializeSchemas();\n }\n\n private initializeSchemas(): void {\n this.campaignMetricSchema = object({\n id: union([number(), string()]),\n type: string(),\n identifier: string(),\n mca: optional(union([number(), string()])),\n hasProps: optional(boolean()),\n revenueProp: optional(string()),\n });\n\n this.variableObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n value: union([number(), string(), boolean(), object()]),\n });\n\n this.campaignVariationSchema = object({\n id: union([number(), string()]),\n name: string(),\n weight: union([number(), string()]),\n segments: optional(object()),\n variables: optional(array(this.variableObjectSchema)),\n startRangeVariation: optional(number()),\n endRangeVariation: optional(number()),\n });\n\n this.campaignObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n percentTraffic: optional(number()),\n status: string(),\n variations: array(this.campaignVariationSchema),\n segments: object(),\n isForcedVariationEnabled: optional(boolean()),\n isAlwaysCheckSegment: optional(boolean()),\n name: string(),\n });\n\n this.ruleSchema = object({\n type: string(),\n ruleKey: string(),\n campaignId: number(),\n variationId: optional(number()),\n });\n\n this.featureSchema = object({\n id: union([number(), string()]),\n key: string(),\n status: string(),\n name: string(),\n type: string(),\n metrics: array(this.campaignMetricSchema),\n impactCampaign: optional(object()),\n rules: optional(array(this.ruleSchema)),\n variables: optional(array(this.variableObjectSchema)),\n });\n\n this.settingsSchema = object({\n sdkKey: optional(string()),\n version: union([number(), string()]),\n accountId: union([number(), string()]),\n features: optional(array(this.featureSchema)),\n campaigns: array(this.campaignObjectSchema),\n groups: optional(object()),\n campaignGroups: optional(object()),\n collectionPrefix: optional(string()),\n });\n }\n\n isSettingsValid(settings: any | SettingsModel): boolean {\n if (!settings) {\n return false;\n }\n\n const [error] = validate(settings, this.settingsSchema);\n return !error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../campaign/CampaignModel';\nimport { FeatureModel } from '../campaign/FeatureModel';\n\nexport class SettingsModel {\n private sK?: string;\n private sdkKey: string;\n\n private f?: Array = [];\n private features: Array = [];\n\n private c?: Array = [];\n private campaigns: Array = [];\n\n private campaignGroups?: Record = {};\n private cG?: Record = {};\n\n private groups?: Record = {};\n private g?: Record = {};\n\n private a?: string;\n private accountId: string;\n\n private v?: number;\n private version: number;\n private collectionPrefix?: string;\n\n constructor(settings: SettingsModel) {\n this.sdkKey = settings.sK || settings.sdkKey;\n this.accountId = settings.a || settings.accountId;\n this.version = settings.v || settings.version;\n this.collectionPrefix = settings.collectionPrefix;\n\n if (\n (settings.f && settings.f.constructor !== {}.constructor) ||\n (settings.features && settings.features.constructor !== {}.constructor)\n ) {\n const featureList: Array = settings.f || settings.features;\n featureList.forEach((feature) => {\n this.features.push(new FeatureModel().modelFromDictionary(feature));\n });\n }\n\n if (\n (settings.c && settings.c.constructor !== {}.constructor) ||\n (settings.campaigns && settings.campaigns.constructor !== {}.constructor)\n ) {\n const campaignList: Array = settings.c || settings.campaigns;\n campaignList.forEach((campaign) => {\n this.campaigns.push(new CampaignModel().modelFromDictionary(campaign));\n });\n }\n\n if (settings.cG || settings.campaignGroups) {\n this.campaignGroups = settings.cG || settings.campaignGroups;\n }\n\n if (settings.g || settings.groups) {\n this.groups = settings.g || settings.groups;\n }\n\n return this;\n }\n getFeatures(): Array {\n return this.features;\n }\n\n getCampaigns(): Array {\n return this.campaigns;\n }\n\n getSdkkey(): string {\n return this.sdkKey;\n }\n\n getAccountId(): string {\n return this.accountId;\n }\n\n getVersion(): number {\n return this.version;\n }\n\n getCollectionPrefix(): string {\n return this.collectionPrefix;\n }\n\n getCampaignGroups(): Record {\n return this.campaignGroups;\n }\n\n getGroups(): Record {\n return this.groups;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { ContextVWOModel } from './ContextVWOModel';\n\nexport class ContextModel {\n private id: string | number;\n private userAgent?: string;\n private ipAddress?: string;\n private customVariables?: Record;\n private variationTargetingVariables?: Record;\n private _vwo?: ContextVWOModel;\n\n modelFromDictionary(context: Record): this {\n this.id = context.id;\n this.userAgent = context.userAgent;\n this.ipAddress = context.ipAddress;\n if (context?.customVariables) {\n this.customVariables = context.customVariables;\n }\n if (context?.variationTargetingVariables) {\n this.variationTargetingVariables = context.variationTargetingVariables;\n }\n if (context?._vwo) {\n this._vwo = new ContextVWOModel().modelFromDictionary(context._vwo);\n }\n return this;\n }\n\n getId(): string {\n return this.id?.toString();\n }\n\n getUserAgent(): string {\n return this.userAgent;\n }\n\n getIpAddress(): string {\n return this.ipAddress;\n }\n\n getCustomVariables(): Record {\n return this.customVariables;\n }\n\n setCustomVariables(customVariables: Record): void {\n this.customVariables = customVariables;\n }\n\n getVariationTargetingVariables(): Record {\n return this.variationTargetingVariables;\n }\n\n setVariationTargetingVariables(variationTargetingVariables: Record): void {\n this.variationTargetingVariables = variationTargetingVariables;\n }\n\n getVwo(): ContextVWOModel {\n return this._vwo;\n }\n\n setVwo(_vwo: ContextVWOModel): void {\n this._vwo = _vwo;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ContextVWOModel {\n private location: Record;\n private userAgent: Record;\n\n modelFromDictionary(context: Record): this {\n if (context?.location) {\n this.location = context.location;\n }\n\n if (context?.userAgent) {\n this.userAgent = context.userAgent;\n }\n return this;\n }\n\n getLocation(): Record {\n return this.location;\n }\n\n getUaInfo(): Record {\n return this.userAgent;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Hasher from 'murmurhash';\n\nconst SEED_VALUE = 1; // Seed value for the hash function\nexport class DecisionMaker {\n /**\n * Generates a bucket value based on the hash value, maximum value, and an optional multiplier.\n *\n * @param {number} hashValue - The hash value used for calculation\n * @param {number} maxValue - The maximum value for bucket scaling\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @returns {number} - The calculated bucket value\n */\n generateBucketValue(hashValue: number, maxValue: number, multiplier = 1): number {\n // Calculate the ratio based on the hash value\n const ratio = hashValue / Math.pow(2, 32);\n // Calculate the multiplied value\n const multipliedValue = (maxValue * ratio + 1) * multiplier;\n // Round down to get the final value\n const value = Math.floor(multipliedValue);\n\n return value;\n }\n\n /**\n * Gets the bucket value for a user based on the hash key and maximum value.\n *\n * @param {string} hashKey - The hash key for the user\n * @param {number} [maxValue=100] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value for the user\n */\n getBucketValueForUser(hashKey: string, maxValue = 100): number {\n const hashValue = Hasher.v3(hashKey, SEED_VALUE); // Calculate the hash value\n const bucketValue = this.generateBucketValue(hashValue, maxValue); // Calculate the bucket value\n\n return bucketValue; // Return the calculated bucket value\n }\n\n /**\n * Calculates the bucket value for a given string with optional multiplier and maximum value.\n *\n * @param {string} str - The input string to calculate the bucket value for\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @param {number} [maxValue=10000] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value\n */\n calculateBucketValue(str: string, multiplier = 1, maxValue = 10000): number {\n const hashValue = this.generateHashValue(str); // Generate the hash value for the input string\n\n return this.generateBucketValue(hashValue, maxValue, multiplier); // Generate and return the bucket value\n }\n\n /**\n * Generates the hash value for a given hash key using murmurHash v3.\n *\n * @param {string} hashKey - The hash key for which the hash value is generated\n * @returns {number} - The generated hash value\n */\n generateHashValue(hashKey: string): number {\n return Hasher.v3(hashKey, SEED_VALUE); // Return the hash value generated using murmurHash\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { LogLevelEnum } from './enums/LogLevelEnum';\n\nconst AnsiColorEnum = {\n BOLD: '\\x1b[1m',\n CYAN: '\\x1b[36m',\n GREEN: '\\x1b[32m',\n LIGHTBLUE: '\\x1b[94m',\n RED: '\\x1b[31m',\n RESET: '\\x1b[0m',\n WHITE: '\\x1b[30m',\n YELLOW: '\\x1b[33m',\n};\n/**\n * Interface defining the structure for a log message builder.\n */\ninterface ILogMessageBuilder {\n loggerConfig: Record; // Configuration for the logger\n transportConfig: Record; // Configuration for the transport mechanism\n prefix: string; // Prefix to be added to each log message\n dateTimeFormat: dynamic; // Function or format for date and time in log messages\n\n formatMessage(level: string, message: string): string; // Method to format a log message\n getFormattedLevel(level: string): string; // Method to format the log level\n getFormattedDateTime(): string; // Method to get formatted date and time\n}\n\n/**\n * Implements the ILogMessageBuilder interface to provide a concrete log message builder.\n */\nexport class LogMessageBuilder implements ILogMessageBuilder {\n loggerConfig: Record;\n transportConfig: Record;\n prefix: string;\n dateTimeFormat: any;\n\n /**\n * Constructs a new LogMessageBuilder instance.\n * @param {Record} loggerConfig - Configuration for the logger.\n * @param {Record} transportConfig - Configuration for the transport mechanism.\n */\n constructor(loggerConfig: Record, transportConfig: Record) {\n this.loggerConfig = loggerConfig;\n this.transportConfig = transportConfig;\n\n // Set the prefix, defaulting to an empty string if not provided.\n this.prefix = this.transportConfig.prefix || this.loggerConfig.prefix || '';\n // Set the date and time format, defaulting to the logger's format if the transport's format is not provided.\n this.dateTimeFormat = this.transportConfig.dateTimeFormat || this.loggerConfig.dateTimeFormat;\n }\n\n /**\n * Formats a log message combining level, prefix, date/time, and the actual message.\n * @param {string} level - The log level.\n * @param {string} message - The message to log.\n * @returns {string} The formatted log message.\n */\n formatMessage(level: string, message: string): string {\n return `[${this.getFormattedLevel(level)}]: ${this.getFormattedPrefix(this.prefix)} ${this.getFormattedDateTime()} ${message}`;\n }\n\n getFormattedPrefix(prefix: string): string {\n if (this.loggerConfig.isAnsiColorEnabled) {\n return `${AnsiColorEnum.BOLD}${AnsiColorEnum.GREEN}${prefix}${AnsiColorEnum.RESET}`;\n }\n\n return `${prefix}`;\n }\n\n /**\n * Returns the formatted log level with appropriate coloring based on the log level.\n * @param {string} level - The log level.\n * @returns {string} The formatted log level.\n */\n getFormattedLevel(level: string): string {\n const upperCaseLevel = level.toUpperCase();\n let LogLevelColorInfoEnum;\n\n if (this.loggerConfig.isAnsiColorEnabled) {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.WHITE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.DEBUG]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.LIGHTBLUE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.INFO]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.CYAN}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.WARN]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.YELLOW}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.ERROR]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.RED}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n };\n } else {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: upperCaseLevel,\n [LogLevelEnum.DEBUG]: upperCaseLevel,\n [LogLevelEnum.INFO]: upperCaseLevel,\n [LogLevelEnum.WARN]: upperCaseLevel,\n [LogLevelEnum.ERROR]: upperCaseLevel,\n };\n }\n\n return LogLevelColorInfoEnum[level];\n }\n\n /**\n * Retrieves the current date and time formatted according to the specified format.\n * @returns {string} The formatted date and time.\n */\n getFormattedDateTime(): string {\n return this.dateTimeFormat();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Abstract class representing a logger.\n * This class provides the structure for logging mechanisms and should be extended by specific logger implementations.\n */\nexport abstract class Logger {\n /**\n * Logs a message at the trace level.\n * @param {string} message - The message to log.\n */\n abstract trace(message: string): void;\n\n /**\n * Logs a message at the debug level.\n * @param {string} message - The message to log.\n */\n abstract debug(message: string): void;\n\n /**\n * Logs a message at the info level.\n * @param {string} message - The message to log.\n */\n abstract info(message: string): void;\n\n /**\n * Logs a message at the warn level.\n * @param {string} message - The message to log.\n */\n abstract warn(message: string): void;\n\n /**\n * Logs a message at the error level.\n * @param {string} message - The message to log.\n */\n abstract error(message: string): void;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { dynamic } from '../../../types/Common';\n\nimport { Logger } from '../Logger';\nimport { ConsoleTransport } from '../transports/ConsoleTransport';\nimport { LogTransportManager } from './TransportManager';\n\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\n\n/**\n * Interface defining the structure and methods for LogManager.\n */\nexport interface ILogManager {\n transportManager?: LogTransportManager;\n config?: Record;\n name?: string;\n requestId?: string;\n level: string;\n prefix?: string;\n dateTimeFormat?: () => string;\n\n transport?: Record;\n transports?: Array>;\n\n addTransport?(transportObject: Record): void;\n addTransports?(transportsList: Array>): void;\n}\n\n/**\n * LogManager class provides logging functionality with support for multiple transports.\n * It is designed as a singleton to ensure a single instance throughout the application.\n */\nexport class LogManager extends Logger implements ILogManager {\n private static instance: LogManager; // Singleton instance of LogManager\n transportManager: LogTransportManager;\n config: Record;\n name = 'VWO Logger'; // Default logger name\n requestId = uuidv4(); // Unique request ID generated for each instance\n level = LogLevelEnum.ERROR; // Default logging level\n prefix = 'VWO-SDK'; // Default prefix for log messages\n public dateTimeFormat(): string {\n return new Date().toISOString(); // Default date-time format for log messages\n }\n transport: Record;\n transports: Array>;\n\n /**\n * Constructor for LogManager.\n * @param {Record} config - Configuration object for LogManager.\n */\n constructor(config?: Record) {\n super();\n\n this.config = config;\n\n if (config.isAlwaysNewInstance || !LogManager.instance) {\n LogManager.instance = this;\n\n // Initialize configuration with defaults or provided values\n this.config.name = config.name || this.name;\n this.config.requestId = config.requestId || this.requestId;\n this.config.level = config.level || this.level;\n this.config.prefix = config.prefix || this.prefix;\n this.config.dateTimeFormat = config.dateTimeFormat || this.dateTimeFormat;\n\n this.transportManager = new LogTransportManager(this.config);\n\n this.handleTransports();\n }\n\n return LogManager.instance;\n }\n\n /**\n * Provides access to the singleton instance of LogManager.\n * @returns {LogManager} The singleton instance.\n */\n static get Instance(): LogManager {\n return LogManager.instance;\n }\n\n /**\n * Handles the initialization and setup of transports based on configuration.\n */\n handleTransports(): void {\n const transports = this.config.transports;\n\n if (transports?.length) {\n this.addTransports(this.config.transports);\n } else if (this.config.transport && isObject(this.config.transport)) {\n this.addTransport(this.config.transport);\n } else {\n // if (this.config.defaultTransport)\n // Add default ConsoleTransport if no other transport is specified\n this.addTransport(\n new ConsoleTransport({\n level: this.config.level,\n }),\n );\n }\n }\n\n /**\n * Adds a single transport to the LogManager.\n * @param {Record} transport - The transport object to add.\n */\n addTransport(transport: Record): void {\n this.transportManager.addTransport(transport);\n }\n\n /**\n * Adds multiple transports to the LogManager.\n * @param {Array>} transports - The list of transport objects to add.\n */\n addTransports(transports: Record): void {\n for (let i = 0; i < transports.length; i++) {\n this.addTransport(transports[i]);\n }\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log at trace level.\n */\n trace(message: string): void {\n this.transportManager.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log at debug level.\n */\n debug(message: string): void {\n this.transportManager.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log at info level.\n */\n info(message: string): void {\n this.transportManager.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log at warn level.\n */\n warn(message: string): void {\n this.transportManager.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log at error level.\n */\n error(message: string): void {\n this.transportManager.log(LogLevelEnum.ERROR, message);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dynamic } from '../../../types/Common';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { LogMessageBuilder } from '../LogMessageBuilder';\nimport { Logger } from '../Logger';\nimport { isFunction } from '../../../utils/DataTypeUtil';\n\nenum LogLevelNumberEnum {\n TRACE = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n}\n\ninterface IlogTransport extends Logger {\n transports: Array>;\n config: Record;\n\n // Determines if a message should be logged based on the transport and configuration levels\n shouldLog(transportLevel: string, configLevel: string): boolean;\n // Logs a message at a specified level\n log(level: string, message: string): void;\n}\n\n/**\n * Manages logging transports and delegates logging messages to them based on configuration.\n * Implements the IlogTransport interface.\n */\nexport class LogTransportManager implements IlogTransport {\n transports: Array>;\n config: Record;\n\n /**\n * Initializes the manager with a configuration object.\n * @param {Record} config - Configuration settings for the log manager.\n */\n constructor(config: Record) {\n this.transports = [];\n this.config = config;\n }\n\n /**\n * Adds a new transport to the manager.\n * @param {Record} transport - The transport object to be added.\n */\n addTransport(transport: Record): void {\n this.transports.push(transport);\n }\n\n /**\n * Determines if the log should be processed based on the transport and configuration levels.\n * @param {string} transportLevel - The log level set for the transport.\n * @param {string} configLevel - The log level set in the configuration.\n * @returns {boolean} - Returns true if the log level is appropriate for logging, false otherwise.\n */\n shouldLog(transportLevel: string, configLevel: string): boolean {\n // Default to the most specific level available\n // transportLevel = transportLevel || configLevel || this.config.level;\n\n const targetLevel = LogLevelNumberEnum[transportLevel.toUpperCase()];\n const desiredLevel = LogLevelNumberEnum[(configLevel || this.config.level).toUpperCase()];\n\n return targetLevel >= desiredLevel;\n }\n\n /**\n * Logs a message at TRACE level.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a message at DEBUG level.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs a message at INFO level.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a message at WARN level.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs a message at ERROR level.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.log(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Delegates the logging of messages to the appropriate transports.\n * @param {string} level - The level at which to log the message.\n * @param {string} message - The message to log.\n */\n log(level: string, message: string): void {\n for (let i = 0; i < this.transports.length; i++) {\n const logMessageBuilder = new LogMessageBuilder(this.config, this.transports[i]);\n const formattedMessage = logMessageBuilder.formatMessage(level, message);\n if (this.shouldLog(level, this.transports[i].level)) {\n if (this.transports[i].log && isFunction(this.transports[i].log)) {\n // Use custom log handler if available\n this.transports[i].log(level, message);\n } else {\n // Otherwise, use the default log method\n this.transports[i][level](formattedMessage);\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum LogLevelEnum {\n TRACE = 'trace',\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { LogManager, ILogManager } from './core/LogManager';\nexport { LogLevelEnum } from './enums/LogLevelEnum';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { Logger } from '../Logger';\n\n/**\n * ConsoleTransport class implements the Logger interface to provide logging functionality.\n * It outputs logs to the console based on the log level set in the configuration.\n */\nexport class ConsoleTransport implements Logger {\n config: Record; // Configuration object for the logger\n level: string; // Current log level\n\n /**\n * Constructor initializes the ConsoleTransport with a configuration object.\n * @param {Record} config - Configuration settings for the logger, including 'level'.\n */\n constructor(config: Record = {}) {\n this.config = config; // Store the configuration\n this.level = this.config.level; // Set the logging level from the configuration\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.consoleLog(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.consoleLog(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.consoleLog(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.consoleLog(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.consoleLog(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Generic log function that logs messages to the console based on the log level.\n * @param {string} level - The log level under which the message should be logged.\n * @param {string} message - The message to log.\n */\n consoleLog(level: string, message: string): void {\n console[level](message); // Use console's logging function dynamically based on the level\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { sendGetCall, sendPostCall } from '../../../utils/XMLUtil';\nimport { dynamic } from '../../../types/Common';\nimport { Deferred } from '../../../utils/PromiseUtil';\n\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\nimport { NetworkClientInterface } from './NetworkClientInterface';\n\n/**\n * Implements the NetworkClientInterface to handle network requests.\n */\nexport class NetworkBrowserClient implements NetworkClientInterface {\n /**\n * Performs a GET request using the provided RequestModel.\n * @param {RequestModel} requestModel - The model containing request options.\n * @returns {Promise} A promise that resolves to a ResponseModel.\n */\n GET(requestModel: RequestModel): Promise {\n const deferred = new Deferred();\n\n // Extract network options from the request model.\n const networkOptions: Record = requestModel.getOptions();\n const responseModel = new ResponseModel();\n\n sendGetCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /*try {\n fetch(url)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n return deferred.promise;\n }\n\n /**\n * Performs a POST request using the provided RequestModel.\n * @param {RequestModel} request - The model containing request options.\n * @returns {Promise} A promise that resolves or rejects with a ResponseModel.\n */\n POST(request: RequestModel): Promise {\n const deferred = new Deferred();\n const networkOptions: Record = request.getOptions();\n const responseModel = new ResponseModel();\n\n sendPostCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /* try {\n const options: any = Object.assign(\n {},\n { method: HttpMethodEnum.POST },\n { body: networkOptions.body },\n { headers: networkOptions.headers }\n );\n\n fetch(url, options)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n\n return deferred.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\n\n/**\n * A class responsible for creating and modifying request models based on a global configuration.\n */\nexport class RequestHandler {\n /**\n * Creates a new request by merging properties from a base request and a configuration model.\n * If both the request URL and the base URL from the configuration are missing, it returns null.\n * Otherwise, it merges the properties from the configuration into the request if they are not already set.\n *\n * @param {RequestModel} request - The initial request model.\n * @param {GlobalRequestModel} config - The global request configuration model.\n * @returns {RequestModel} The merged request model or null if both URLs are missing.\n */\n createRequest(request: RequestModel, config: GlobalRequestModel): RequestModel {\n // Check if both the request URL and the configuration base URL are missing\n if (\n (config.getBaseUrl() === null || config.getBaseUrl() === undefined) &&\n (request.getUrl() === null || request.getUrl() === undefined)\n ) {\n return null; // Return null if no URL is specified\n }\n // Set the request URL, defaulting to the configuration base URL if not set\n request.setUrl(request.getUrl() || config.getBaseUrl());\n // Set the request timeout, defaulting to the configuration timeout if not set\n request.setTimeout(request.getTimeout() || config.getTimeout());\n // Set the request body, defaulting to the configuration body if not set\n request.setBody(request.getBody() || config.getBody());\n // Set the request headers, defaulting to the configuration headers if not set\n request.setHeaders(request.getHeaders() || config.getHeaders());\n // Initialize request query parameters, defaulting to an empty object if not set\n const requestQueryParams: Record = request.getQuery() || {};\n // Initialize configuration query parameters, defaulting to an empty object if not set\n const configQueryParams: Record = config.getQuery() || {};\n\n // Merge configuration query parameters into the request query parameters if they don't exist\n for (const queryKey in configQueryParams) {\n if (!Object.prototype.hasOwnProperty.call(requestQueryParams, queryKey)) {\n requestQueryParams[queryKey] = configQueryParams[queryKey];\n }\n }\n // Set the merged query parameters back to the request\n request.setQuery(requestQueryParams);\n return request; // Return the modified request\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet NetworkClient;\n\nif ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkBrowserClient').NetworkBrowserClient;\n} else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkClient').NetworkClient;\n}\n\nexport { NetworkClient };\nexport { NetworkClientInterface } from './client/NetworkClientInterface';\nexport { NetworkManager } from './manager/NetworkManager';\nexport { GlobalRequestModel } from './models/GlobalRequestModel';\nexport { RequestModel } from './models/RequestModel';\nexport { ResponseModel } from './models/ResponseModel';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Deferred } from '../../../utils/PromiseUtil';\nimport { NetworkClientInterface } from '../client/NetworkClientInterface';\nimport { RequestHandler } from '../handlers/RequestHandler';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\n\nexport class NetworkManager {\n private config: GlobalRequestModel; // Holds the global configuration for network requests\n private client: NetworkClientInterface; // Interface for the network client handling the actual HTTP requests\n private static instance: NetworkManager; // Singleton instance of NetworkManager\n\n /**\n * Attaches a network client to the manager, or uses a default if none provided.\n * @param {NetworkClientInterface} client - The client to attach, optional.\n */\n attachClient(client?: NetworkClientInterface): void {\n if ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkBrowserClient } = require('../client/NetworkBrowserClient');\n\n this.client = client || new NetworkBrowserClient(); // Use provided client or default to NetworkClient\n } else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkClient } = require('../client/NetworkClient');\n\n this.client = client || new NetworkClient(); // Use provided client or default to NetworkClient\n }\n\n this.config = new GlobalRequestModel(null, null, null, null); // Initialize with default config\n }\n\n /**\n * Singleton accessor for the NetworkManager instance.\n * @returns {NetworkManager} The singleton instance.\n */\n static get Instance(): NetworkManager {\n this.instance = this.instance || new NetworkManager(); // Create instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Sets the global configuration for network requests.\n * @param {GlobalRequestModel} config - The configuration to set.\n */\n setConfig(config: GlobalRequestModel): void {\n this.config = config; // Set the global request configuration\n }\n\n /**\n * Retrieves the current global configuration.\n * @returns {GlobalRequestModel} The current configuration.\n */\n getConfig(): GlobalRequestModel {\n return this.config; // Return the global request configuration\n }\n\n /**\n * Creates a network request model by merging specific request data with global config.\n * @param {RequestModel} request - The specific request data.\n * @returns {RequestModel} The merged request model.\n */\n createRequest(request: RequestModel): RequestModel {\n const options: RequestModel = new RequestHandler().createRequest(request, this.config); // Merge and create request\n return options;\n }\n\n /**\n * Performs a GET request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n get(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .GET(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((errorResponse: ResponseModel) => {\n deferred.reject(errorResponse); // Reject with the error response\n });\n }\n\n return deferred.promise; // Return the promise\n }\n\n /**\n * Performs a POST request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n post(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .POST(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((error: ResponseModel) => {\n deferred.reject(error); // Reject with the error\n });\n }\n\n return deferred.promise; // Return the promise\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents a model for global HTTP requests configuration.\n * This class encapsulates all necessary details such as URL, query parameters, body, headers,\n * timeout settings, and development mode flag.\n */\nexport class GlobalRequestModel {\n private url: string; // Base URL of the HTTP request\n private timeout = 3000; // Default timeout for the HTTP request in milliseconds\n private query: Record; // Query parameters for the HTTP request\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n private isDevelopmentMode: boolean; // Flag to indicate if the request is in development mode\n\n /**\n * Constructs an instance of the GlobalRequestModel.\n * @param url The base URL of the HTTP request.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n */\n constructor(\n url: string,\n query: Record,\n body: Record,\n headers: Record,\n ) {\n this.url = url;\n this.query = query;\n this.body = body;\n this.headers = headers;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setBaseUrl(url: string): void {\n this.url = url;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getBaseUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the development mode status for the request.\n * @param isDevelopmentMode Boolean flag indicating if the request is in development mode.\n */\n setDevelopmentMode(isDevelopmentMode: boolean): void {\n this.isDevelopmentMode = isDevelopmentMode;\n }\n\n /**\n * Retrieves the development mode status of the request.\n * @returns Boolean indicating if the request is in development mode.\n */\n getDevelopmentMode(): boolean {\n return this.isDevelopmentMode;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../../../enums/HttpMethodEnum';\nimport { dynamic } from '../../../types/Common';\nimport { HTTPS } from '../../../constants/Url';\n\n/**\n * Represents a model for HTTP requests.\n * This class encapsulates all necessary details such as URL, method, path, query parameters, body, headers,\n * scheme, port, and timeout settings.\n */\nexport class RequestModel {\n private url: string; // Base URL of the HTTP request\n private method: string; // HTTP method (GET, POST, etc.)\n private scheme: string; // Protocol scheme (http, https)\n private port: number; // Port number\n private path: string; // Path of the URL\n private query: Record; // Query parameters\n private timeout: number; // Timeout for the HTTP request in milliseconds\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n\n /**\n * Constructs an instance of the RequestModel.\n * @param url The base URL of the HTTP request.\n * @param method HTTP method, default is 'GET'.\n * @param path URL path.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n * @param scheme Protocol scheme, default is 'http'.\n * @param port Port number, default is 80.\n */\n constructor(\n url: string,\n method: string = HttpMethodEnum.GET,\n path: string,\n query: Record,\n body: Record,\n headers: Record,\n scheme: string = HTTPS,\n port: number,\n ) {\n this.url = url;\n this.method = method;\n this.path = path;\n this.query = query;\n this.body = body;\n this.headers = headers;\n this.scheme = scheme;\n this.port = port;\n }\n\n /**\n * Retrieves the HTTP method.\n * @returns The HTTP method as a string.\n */\n getMethod(): string {\n return this.method;\n }\n\n /**\n * Sets the HTTP method.\n * @param method The HTTP method to set.\n */\n setMethod(method: string): void {\n this.method = method;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): this {\n this.headers = headers;\n return this;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): this {\n this.timeout = timeout;\n return this;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setUrl(url: string): this {\n this.url = url;\n return this;\n }\n\n /**\n * Retrieves the scheme of the HTTP request.\n * @returns The scheme as a string.\n */\n getScheme(): string {\n return this.scheme;\n }\n\n /**\n * Sets the scheme of the HTTP request.\n * @param scheme The scheme to set (http or https).\n */\n setScheme(scheme: string): this {\n this.scheme = scheme;\n return this;\n }\n\n /**\n * Retrieves the port number of the HTTP request.\n * @returns The port number as an integer.\n */\n getPort(): number {\n return this.port;\n }\n\n /**\n * Sets the port number for the HTTP request.\n * @param port The port number to set.\n */\n setPort(port: number): this {\n this.port = port;\n return this;\n }\n\n /**\n * Retrieves the path of the HTTP request.\n * @returns The path as a string.\n */\n getPath(): string {\n return this.path;\n }\n\n /**\n * Sets the path of the HTTP request.\n * @param path The path to set.\n */\n setPath(path: string): this {\n this.path = path;\n return this;\n }\n\n /**\n * Constructs the options for the HTTP request based on the current state of the model.\n * This method is used to prepare the request options for execution.\n * @returns A record containing all relevant options for the HTTP request.\n */\n getOptions(): Record {\n let queryParams = '';\n for (const key in this.query) {\n const queryString = `${key}=${this.query[key]}&`;\n queryParams += queryString;\n }\n\n const [hostname, collectionPrefix] = this.url.split('/');\n const options: Record = {\n hostname, // if url is example.com/as01, hostname will be example.com\n agent: false,\n };\n\n if (this.scheme) {\n options.scheme = this.scheme;\n }\n if (this.port) {\n options.port = this.port;\n }\n if (this.headers) {\n options.headers = this.headers;\n }\n\n if (this.method) {\n options.method = this.method;\n }\n\n if (this.body) {\n const postBody = JSON.stringify(this.body);\n options.headers = options.headers || {};\n options.headers['Content-Type'] = 'application/json';\n\n if (typeof Buffer === 'undefined') {\n options.headers['Content-Length'] = new TextEncoder().encode(postBody).length;\n } else {\n options.headers['Content-Length'] = Buffer.byteLength(postBody);\n }\n options.body = this.body;\n }\n\n if (this.path) {\n if (queryParams !== '') {\n options.path = this.path + '?' + queryParams || '';\n } else {\n options.path = this.path;\n }\n }\n\n if (collectionPrefix) {\n options.path = `/${collectionPrefix}` + options.path;\n }\n if (this.timeout) {\n options.timeout = this.timeout;\n }\n if (options.path.charAt(options.path.length - 1) === '&') {\n options.path = options.path.substring(0, options.path.length - 1);\n }\n\n return options;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents the response model for network operations.\n * This class encapsulates details about the HTTP response including status code, headers, data, and errors.\n */\nexport class ResponseModel {\n private statusCode: number; // HTTP status code of the response\n private error: dynamic; // Error object if the request failed\n private headers: Record; // Headers received in the response\n private data: dynamic; // Data payload of the response\n\n /**\n * Sets the status code of the response.\n * @param {number} statusCode - The HTTP status code\n */\n setStatusCode(statusCode: number): void {\n this.statusCode = statusCode;\n }\n\n /**\n * Sets the headers of the response.\n * @param {Record} headers - The headers of the response\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Sets the data of the response.\n * @param {dynamic} data - The data payload of the response\n */\n setData(data: dynamic): void {\n this.data = data;\n }\n\n /**\n * Sets the error object of the response.\n * @param {dynamic} error - The error object if the request failed\n */\n setError(error: dynamic): void {\n this.error = error;\n }\n\n /**\n * Retrieves the headers of the response.\n * @returns {Record} The headers of the response\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Retrieves the data payload of the response.\n * @returns {dynamic} The data payload of the response\n */\n getData(): dynamic {\n return this.data;\n }\n\n /**\n * Retrieves the status code of the response.\n * @returns {number} The HTTP status code\n */\n getStatusCode(): number {\n return this.statusCode;\n }\n\n /**\n * Retrieves the error object of the response.\n * @returns {dynamic} The error object if the request failed\n */\n getError(): dynamic {\n return this.error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SegmentEvaluator } from '../evaluators/SegmentEvaluator';\nimport { dynamic } from '../../../types/Common';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { getFromGatewayService, getQueryParams } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\nimport { ContextVWOModel } from '../../../models/user/ContextVWOModel';\nimport { SettingsService } from '../../../services/SettingsService';\nimport { isUndefined } from '../../../utils/DataTypeUtil';\n\nexport class SegmentationManager {\n private static instance: SegmentationManager; // Singleton instance of SegmentationManager\n evaluator: SegmentEvaluator; // Holds the instance of SegmentEvaluator\n\n /**\n * Singleton pattern implementation for getting the instance of SegmentationManager.\n * @returns {SegmentationManager} The singleton instance.\n */\n static get Instance(): SegmentationManager {\n this.instance = this.instance || new SegmentationManager(); // Create new instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Attaches an evaluator to the manager, or creates a new one if none is provided.\n * @param {SegmentEvaluator} evaluator - Optional evaluator to attach.\n */\n attachEvaluator(evaluator?: SegmentEvaluator): void {\n this.evaluator = evaluator || new SegmentEvaluator(); // Use provided evaluator or create new one\n }\n\n /**\n * Sets the contextual data for the segmentation process.\n * @param {any} settings - The settings data.\n * @param {any} feature - The feature data including segmentation needs.\n * @param {any} context - The context data for the evaluation.\n */\n async setContextualData(settings: SettingsModel, feature: FeatureModel, context: ContextModel) {\n this.attachEvaluator(); // Ensure a fresh evaluator instance\n this.evaluator.settings = settings; // Set settings in evaluator\n this.evaluator.context = context; // Set context in evaluator\n this.evaluator.feature = feature; // Set feature in evaluator\n\n // if both user agent and ip is null then we should not get data from gateway service\n if (context?.getUserAgent() === null && context?.getIpAddress() === null) {\n return;\n }\n\n if (feature.getIsGatewayServiceRequired() === true) {\n if (\n SettingsService.Instance.isGatewayServiceProvided &&\n (isUndefined(context.getVwo()) || context.getVwo() === null)\n ) {\n const queryParams = {};\n if (context?.getUserAgent()) {\n queryParams['userAgent'] = context.getUserAgent();\n }\n\n if (context?.getIpAddress()) {\n queryParams['ipAddress'] = context.getIpAddress();\n }\n try {\n const params = getQueryParams(queryParams);\n const _vwo = await getFromGatewayService(params, UrlEnum.GET_USER_DATA);\n context.setVwo(new ContextVWOModel().modelFromDictionary(_vwo));\n } catch (err) {\n LogManager.Instance.error(`Error in setting contextual data for segmentation. Got error: ${err.error}`);\n }\n }\n }\n }\n\n /**\n * Validates the segmentation against provided DSL and properties.\n * @param {Record} dsl - The segmentation DSL.\n * @param {Record} properties - The properties to validate against.\n * @param {SettingsModel} settings - The settings model.\n * @param {any} context - Optional context.\n * @returns {Promise} True if segmentation is valid, otherwise false.\n */\n async validateSegmentation(dsl: Record, properties: Record): Promise {\n return await this.evaluator.isSegmentationValid(dsl, properties); // Delegate to evaluator's method\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandRegexEnum {\n LOWER = '^lower',\n LOWER_MATCH = '^lower\\\\((.*)\\\\)',\n WILDCARD = '^wildcard',\n WILDCARD_MATCH = '^wildcard\\\\((.*)\\\\)',\n REGEX = '^regex',\n REGEX_MATCH = '^regex\\\\((.*)\\\\)',\n STARTING_STAR = '^\\\\*',\n ENDING_STAR = '\\\\*$',\n GREATER_THAN_MATCH = '^gt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n GREATER_THAN_EQUAL_TO_MATCH = '^gte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_MATCH = '^lt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_EQUAL_TO_MATCH = '^lte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandValueEnum {\n LOWER_VALUE = 1,\n STARTING_ENDING_STAR_VALUE = 2,\n STARTING_STAR_VALUE = 3,\n ENDING_STAR_VALUE = 4,\n REGEX_VALUE = 5,\n EQUAL_VALUE = 6,\n GREATER_THAN_VALUE = 7,\n GREATER_THAN_EQUAL_TO_VALUE = 8,\n LESS_THAN_VALUE = 9,\n LESS_THAN_EQUAL_TO_VALUE = 10,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperatorValueEnum {\n AND = 'and',\n NOT = 'not',\n OR = 'or',\n CUSTOM_VARIABLE = 'custom_variable',\n USER = 'user',\n COUNTRY = 'country',\n REGION = 'region',\n CITY = 'city',\n OPERATING_SYSTEM = 'os',\n DEVICE_TYPE = 'device_type',\n DEVICE = 'device',\n BROWSER_AGENT = 'browser_string',\n UA = 'ua',\n FEATURE_ID = 'featureId',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageDecorator } from '../../../decorators/StorageDecorator';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { LogManager } from '../../logger';\nimport { StorageService } from '../../../services/StorageService';\nimport { dynamic } from '../../../types/Common';\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { SegmentOperatorValueEnum } from '../enums/SegmentOperatorValueEnum';\nimport { Segmentation } from '../Segmentation';\nimport { getKeyValue } from '../utils/SegmentUtil';\nimport { SegmentOperandEvaluator } from './SegmentOperandEvaluator';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\n\nexport class SegmentEvaluator implements Segmentation {\n context: ContextModel;\n settings: SettingsModel;\n feature: FeatureModel;\n\n /**\n * Validates if the segmentation defined in the DSL is applicable based on the provided properties.\n * @param dsl The domain-specific language defining the segmentation rules.\n * @param properties The properties against which the DSL rules are evaluated.\n * @returns A Promise resolving to a boolean indicating if the segmentation is valid.\n */\n async isSegmentationValid(dsl: Record, properties: Record): Promise {\n const { key, value } = getKeyValue(dsl);\n const operator = key;\n const subDsl = value;\n\n // Evaluate based on the type of segmentation operator\n switch (operator) {\n case SegmentOperatorValueEnum.NOT:\n return !(await this.isSegmentationValid(subDsl, properties));\n case SegmentOperatorValueEnum.AND:\n return await this.every(subDsl, properties);\n case SegmentOperatorValueEnum.OR:\n return await this.some(subDsl, properties);\n case SegmentOperatorValueEnum.CUSTOM_VARIABLE:\n return await new SegmentOperandEvaluator().evaluateCustomVariableDSL(subDsl, properties);\n case SegmentOperatorValueEnum.USER:\n return new SegmentOperandEvaluator().evaluateUserDSL(subDsl, properties);\n case SegmentOperatorValueEnum.UA:\n return new SegmentOperandEvaluator().evaluateUserAgentDSL(subDsl, this.context);\n default:\n return false;\n }\n }\n\n /**\n * Evaluates if any of the DSL nodes are valid using the OR logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if any of the nodes are valid.\n */\n async some(dslNodes: Array>, customVariables: Record): Promise {\n const uaParserMap: Record = {};\n let keyCount: number = 0; // Initialize count of keys encountered\n let isUaParser = false;\n\n for (const dsl of dslNodes) {\n for (const key in dsl) {\n // Check for user agent related keys\n if (\n key === SegmentOperatorValueEnum.OPERATING_SYSTEM ||\n key === SegmentOperatorValueEnum.BROWSER_AGENT ||\n key === SegmentOperatorValueEnum.DEVICE_TYPE ||\n key === SegmentOperatorValueEnum.DEVICE\n ) {\n isUaParser = true;\n const value = dsl[key];\n\n if (!uaParserMap[key]) {\n uaParserMap[key] = [];\n }\n\n // Ensure value is treated as an array of strings\n const valuesArray = Array.isArray(value) ? value : [value];\n valuesArray.forEach((val: dynamic) => {\n if (typeof val === 'string') {\n uaParserMap[key].push(val);\n }\n });\n\n keyCount++; // Increment count of keys encountered\n }\n\n // Check for feature toggle based on feature ID\n if (key === SegmentOperatorValueEnum.FEATURE_ID) {\n const featureIdObject = dsl[key] as Record;\n const featureIdKey: string = Object.keys(featureIdObject)[0];\n const featureIdValue: string = featureIdObject[featureIdKey];\n\n if (featureIdValue === 'on' || featureIdValue === 'off') {\n const features = this.settings.getFeatures();\n const feature = features.find((feature) => feature.getId() === parseInt(featureIdKey));\n\n if (feature) {\n const featureKey = feature.getKey();\n const result = await this.checkInUserStorage(this.settings, featureKey, this.context);\n // if the result is false, then we need to return true as feature is not present in the user storage\n if (featureIdValue === 'off') {\n return !result;\n }\n return result;\n } else {\n LogManager.Instance.error('Feature not found with featureIdKey: ' + featureIdKey);\n return null; // Handle the case when feature is not found\n }\n }\n }\n }\n\n // Check if the count of keys encountered is equal to dslNodes.length\n if (isUaParser && keyCount === dslNodes.length) {\n try {\n const uaParserResult = await this.checkUserAgentParser(uaParserMap);\n return uaParserResult;\n } catch (err) {\n LogManager.Instance.error('Failed to validate User Agent. Erro: ' + err);\n }\n }\n\n // Recursively check each DSL node\n if (await this.isSegmentationValid(dsl, customVariables)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates all DSL nodes using the AND logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if all nodes are valid.\n */\n async every(dslNodes: Array>, customVariables: Record): Promise {\n const locationMap: Record = {};\n for (const dsl of dslNodes) {\n // Check if the DSL node contains location-related keys\n if (\n SegmentOperatorValueEnum.COUNTRY in dsl ||\n SegmentOperatorValueEnum.REGION in dsl ||\n SegmentOperatorValueEnum.CITY in dsl\n ) {\n this.addLocationValuesToMap(dsl, locationMap);\n // Check if the number of location keys matches the number of DSL nodes\n if (Object.keys(locationMap).length === dslNodes.length) {\n const segmentResult = await this.checkLocationPreSegmentation(locationMap);\n return segmentResult;\n }\n continue;\n }\n const res = await this.isSegmentationValid(dsl, customVariables);\n if (!res) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Adds location values from a DSL node to a map.\n * @param dsl DSL node containing location data.\n * @param locationMap Map to store location data.\n */\n addLocationValuesToMap(dsl: Record, locationMap: Record): void {\n // Add country, region, and city information to the location map if present\n if (SegmentOperatorValueEnum.COUNTRY in dsl) {\n locationMap[SegmentOperatorValueEnum.COUNTRY] = dsl[SegmentOperatorValueEnum.COUNTRY];\n }\n if (SegmentOperatorValueEnum.REGION in dsl) {\n locationMap[SegmentOperatorValueEnum.REGION] = dsl[SegmentOperatorValueEnum.REGION];\n }\n if (SegmentOperatorValueEnum.CITY in dsl) {\n locationMap[SegmentOperatorValueEnum.CITY] = dsl[SegmentOperatorValueEnum.CITY];\n }\n }\n\n /**\n * Checks if the user's location matches the expected location criteria.\n * @param locationMap Map of expected location values.\n * @returns A Promise resolving to a boolean indicating if the location matches.\n */\n async checkLocationPreSegmentation(locationMap: Record): Promise {\n // Ensure user's IP address is available\n if (this.context?.getIpAddress() === undefined) {\n LogManager.Instance.error('To evaluate location pre Segment, please pass ipAddress in context object');\n return false;\n }\n // Check if location data is available and matches the expected values\n if (\n !this.context?.getVwo()?.getLocation() ||\n this.context?.getVwo()?.getLocation() === undefined ||\n this.context?.getVwo()?.getLocation() === null\n ) {\n return false;\n }\n return this.valuesMatch(locationMap, this.context?.getVwo()?.getLocation());\n }\n\n /**\n * Checks if the user's device information matches the expected criteria.\n * @param uaParserMap Map of expected user agent values.\n * @returns A Promise resolving to a boolean indicating if the user agent matches.\n */\n async checkUserAgentParser(uaParserMap: Record): Promise {\n // Ensure user's user agent is available\n if (!this.context?.getUserAgent() || this.context?.getUserAgent() === undefined) {\n LogManager.Instance.error('To evaluate user agent related segments, please pass userAgent in context object');\n return false;\n }\n // Check if user agent data is available and matches the expected values\n if (!this.context?.getVwo()?.getUaInfo() || this.context?.getVwo()?.getUaInfo() === undefined) {\n return false;\n }\n\n return this.checkValuePresent(uaParserMap, this.context?.getVwo()?.getUaInfo());\n }\n\n /**\n * Checks if the feature is enabled for the user by querying the storage.\n * @param settings The settings model containing configuration.\n * @param featureKey The key of the feature to check.\n * @param user The user object to check against.\n * @returns A Promise resolving to a boolean indicating if the feature is enabled for the user.\n */\n async checkInUserStorage(settings: SettingsModel, featureKey: string, context: ContextModel): Promise {\n const storageService = new StorageService();\n // Retrieve feature data from storage\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if the stored data is an object and not empty\n if (isObject(storedData) && Object.keys(storedData).length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Checks if the actual values match the expected values specified in the map.\n * @param expectedMap A map of expected values for different keys.\n * @param actualMap A map of actual values to compare against.\n * @returns A Promise resolving to a boolean indicating if all actual values match the expected values.\n */\n async checkValuePresent(expectedMap: Record, actualMap: Record): Promise {\n for (const key in actualMap) {\n if (Object.prototype.hasOwnProperty.call(expectedMap, key)) {\n const expectedValues = expectedMap[key];\n // convert expected values to lowercase\n expectedValues.forEach((value, index) => {\n expectedValues[index] = value.toLowerCase();\n });\n const actualValue = actualMap[key];\n\n // Handle wildcard patterns for all keys\n for (const val of expectedValues) {\n // Check if the value is a wildcard pattern and matches the actual value using regex\n if (val.startsWith('wildcard(') && val.endsWith(')')) {\n // Extract pattern from wildcard string\n const wildcardPattern = val.slice(9, -1);\n // Convert wildcard pattern to regex and check if it matches the actual value\n const regex = new RegExp(wildcardPattern.replace(/\\*/g, '.*'), 'i'); // Convert wildcard pattern to regex, 'i' for case-insensitive\n // Check if the actual value matches the regex pattern for the key\n if (regex.test(actualValue)) {\n // match found, return true as we only need to check if any of the expected values match the actual value\n return true;\n }\n }\n }\n\n // this will be checked for all cases where wildcard is not present\n if (expectedValues.includes(actualValue?.toLowerCase())) {\n return true; // Direct value match found, return true\n }\n }\n }\n return false; // No matches found\n }\n\n /**\n * Compares expected location values with user's location to determine a match.\n * @param expectedLocationMap A map of expected location values.\n * @param userLocation The user's actual location.\n * @returns A boolean indicating if the user's location matches the expected values.\n */\n async valuesMatch(expectedLocationMap, userLocation) {\n for (const [key, value] of Object.entries(expectedLocationMap)) {\n if (key in userLocation) {\n const normalizedValue1 = this.normalizeValue(value);\n const normalizedValue2 = this.normalizeValue(userLocation[key]);\n if (normalizedValue1 !== normalizedValue2) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true; // If all values match, return true\n }\n\n /**\n * Normalizes a value to a consistent format for comparison.\n * @param value The value to normalize.\n * @returns The normalized value.\n */\n normalizeValue(value) {\n if (value === null || value === undefined) {\n return null;\n }\n // Remove quotes and trim whitespace\n return value.toString().replace(/^\"|\"$/g, '').trim();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getKeyValue, matchWithRegex } from '../utils/SegmentUtil';\nimport { SegmentOperandValueEnum } from '../enums/SegmentOperandValueEnum';\nimport { SegmentOperandRegexEnum } from '../enums/SegmentOperandRegexEnum';\nimport { isBoolean } from '../../../utils/DataTypeUtil';\nimport { dynamic } from '../../../types/Common';\nimport { getFromGatewayService } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\n\n/**\n * SegmentOperandEvaluator class provides methods to evaluate different types of DSL (Domain Specific Language)\n * expressions based on the segment conditions defined for custom variables, user IDs, and user agents.\n */\nexport class SegmentOperandEvaluator {\n /**\n * Evaluates a custom variable DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the custom variable.\n * @param {Record} properties - The properties object containing the actual values to be matched against.\n * @returns {Promise} - A promise that resolves to a boolean indicating if the DSL condition is met.\n */\n async evaluateCustomVariableDSL(\n dslOperandValue: Record,\n properties: Record,\n ): Promise {\n // Extract key and value from the DSL operand\n const { key, value } = getKeyValue(dslOperandValue);\n const operandKey = key;\n const operand = value;\n\n // Check if the property exists\n if (!Object.prototype.hasOwnProperty.call(properties, operandKey)) {\n return false;\n }\n\n // Handle 'inlist' operand\n if (operand.includes('inlist')) {\n const listIdRegex = /inlist\\(([^)]+)\\)/;\n const match = operand.match(listIdRegex);\n if (!match || match.length < 2) {\n LogManager.Instance.error(\"Invalid 'inList' operand format\");\n return false;\n }\n\n // Process the tag value and prepare query parameters\n const tagValue = properties[operandKey];\n const attributeValue = this.preProcessTagValue(tagValue);\n const listId = match[1];\n const queryParamsObj = {\n attribute: attributeValue,\n listId: listId,\n };\n\n // Make a web service call to check the attribute against the list\n try {\n const res = await getFromGatewayService(queryParamsObj, UrlEnum.ATTRIBUTE_CHECK);\n if (!res || res === undefined || res === 'false' || res.status === 0) {\n return false;\n }\n return res;\n } catch (error) {\n LogManager.Instance.error('Error while fetching data: ' + error);\n return false;\n }\n } else {\n // Process other types of operands\n let tagValue = properties[operandKey];\n tagValue = this.preProcessTagValue(tagValue);\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue;\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n }\n\n /**\n * Evaluates a user DSL expression to check if a user ID is in a specified list.\n * @param {Record} dslOperandValue - The DSL expression containing user IDs.\n * @param {Record} properties - The properties object containing the actual user ID to check.\n * @returns {boolean} - True if the user ID is in the list, otherwise false.\n */\n evaluateUserDSL(dslOperandValue: Record, properties: Record): boolean {\n const users = dslOperandValue.split(',');\n for (let i = 0; i < users.length; i++) {\n if (users[i].trim() == properties._vwoUserId) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates a user agent DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the user agent.\n * @param {any} context - The context object containing the user agent string.\n * @returns {boolean} - True if the user agent matches the DSL condition, otherwise false.\n */\n evaluateUserAgentDSL(dslOperandValue: Record, context: ContextModel): boolean {\n const operand = dslOperandValue;\n if (!context.getUserAgent() || context.getUserAgent() === undefined) {\n LogManager.Instance.info('To Evaluate UserAgent segmentation, please provide userAgent in context');\n return false;\n }\n let tagValue = decodeURIComponent(context.getUserAgent());\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue as string; // Fix: Type assertion to ensure tagValue is of type string\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n\n /**\n * Pre-processes the tag value to ensure it is in the correct format for evaluation.\n * @param {any} tagValue - The value to be processed.\n * @returns {string | boolean} - The processed tag value, either as a string or a boolean.\n */\n preProcessTagValue(tagValue: any): string | boolean {\n // Default to empty string if undefined\n if (tagValue === undefined) {\n tagValue = '';\n }\n // Convert boolean values to boolean type\n if (isBoolean(tagValue)) {\n tagValue = tagValue ? true : false;\n }\n // Convert all non-null values to string\n if (tagValue !== null) {\n tagValue = tagValue.toString();\n }\n return tagValue;\n }\n\n /**\n * Pre-processes the operand value to determine its type and extract the value based on regex matches.\n * @param {any} operand - The operand to be processed.\n * @returns {Record} - An object containing the operand type and value.\n */\n preProcessOperandValue(operand: any): Record {\n let operandType: SegmentOperandValueEnum;\n let operandValue: dynamic;\n // Determine the type of operand and extract value based on regex patterns\n if (matchWithRegex(operand, SegmentOperandRegexEnum.LOWER_MATCH)) {\n operandType = SegmentOperandValueEnum.LOWER_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LOWER_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.WILDCARD_MATCH)) {\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.WILDCARD_MATCH);\n const startingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.STARTING_STAR);\n const endingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.ENDING_STAR);\n // Determine specific wildcard type\n if (startingStar && endingStar) {\n operandType = SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE;\n } else if (startingStar) {\n operandType = SegmentOperandValueEnum.STARTING_STAR_VALUE;\n } else if (endingStar) {\n operandType = SegmentOperandValueEnum.ENDING_STAR_VALUE;\n }\n // Remove wildcard characters from the operand value\n operandValue = operandValue\n .replace(new RegExp(SegmentOperandRegexEnum.STARTING_STAR), '')\n .replace(new RegExp(SegmentOperandRegexEnum.ENDING_STAR), '');\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.REGEX_MATCH)) {\n operandType = SegmentOperandValueEnum.REGEX_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.REGEX_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH);\n } else {\n operandType = SegmentOperandValueEnum.EQUAL_VALUE;\n operandValue = operand;\n }\n return {\n operandType,\n operandValue,\n };\n }\n\n /**\n * Extracts the operand value from a string based on a specified regex pattern.\n * @param {any} operand - The operand string to extract from.\n * @param {string} regex - The regex pattern to use for extraction.\n * @returns {string} - The extracted value.\n */\n extractOperandValue(operand: any, regex: string): string {\n // Match operand with regex and return the first capturing group\n return matchWithRegex(operand, regex) && matchWithRegex(operand, regex)[1];\n }\n\n /**\n * Processes numeric values from operand and tag values, converting them to strings.\n * @param {any} operandValue - The operand value to process.\n * @param {any} tagValue - The tag value to process.\n * @returns {Record} - An object containing the processed operand and tag values as strings.\n */\n processValues(operandValue: any, tagValue: any): Record {\n // Convert operand and tag values to floats\n const processedOperandValue = parseFloat(operandValue);\n const processedTagValue = parseFloat(tagValue);\n // Return original values if conversion fails\n if (!processedOperandValue || !processedTagValue) {\n return {\n operandValue: operandValue,\n tagValue: tagValue,\n };\n }\n // now we have surity that both are numbers\n // now we can convert them independently to int type if they\n // are int rather than floats\n // if (processedOperandValue === Math.floor(processedOperandValue)) {\n // processedOperandValue = parseInt(processedOperandValue, 10);\n // }\n // if (processedTagValue === Math.floor(processedTagValue)) {\n // processedTagValue = parseInt(processedTagValue, 10);\n // }\n // Convert numeric values back to strings\n return {\n operandValue: processedOperandValue.toString(),\n tagValue: processedTagValue.toString(),\n };\n }\n\n /**\n * Extracts the result of the evaluation based on the operand type and values.\n * @param {SegmentOperandValueEnum} operandType - The type of the operand.\n * @param {any} operandValue - The value of the operand.\n * @param {any} tagValue - The value of the tag to compare against.\n * @returns {boolean} - The result of the evaluation.\n */\n extractResult(operandType: SegmentOperandValueEnum, operandValue: any, tagValue: any): boolean {\n let result: boolean;\n\n switch (operandType) {\n case SegmentOperandValueEnum.LOWER_VALUE:\n // Check if both values are equal, ignoring case\n if (tagValue !== null) {\n result = operandValue.toLowerCase() === tagValue.toLowerCase();\n }\n break;\n case SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE:\n // Check if the tagValue contains the operandValue\n if (tagValue !== null) {\n result = tagValue.indexOf(operandValue) > -1;\n }\n break;\n case SegmentOperandValueEnum.STARTING_STAR_VALUE:\n // Check if the tagValue ends with the operandValue\n if (tagValue !== null) {\n result = tagValue.endsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.ENDING_STAR_VALUE:\n // Check if the tagValue starts with the operandValue\n if (tagValue !== null) {\n result = tagValue.startsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.REGEX_VALUE:\n // Evaluate the tagValue against the regex pattern of operandValue\n try {\n const pattern = new RegExp(operandValue, 'g');\n result = !!pattern.test(tagValue);\n } catch (err) {\n result = false;\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) < parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) <= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) > parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) >= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n default:\n // Check if the tagValue is exactly equal to the operandValue\n result = tagValue === operandValue;\n }\n\n return result;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { SegmentationManager } from './core/SegmentationManger';\nexport { SegmentEvaluator } from './evaluators/SegmentEvaluator';\nexport { Segmentation } from './Segmentation';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isObject } from '../../../utils/DataTypeUtil';\n\n/**\n * Extracts the first key-value pair from the provided object.\n * @param {Record} obj - The object from which to extract the key-value pair.\n * @returns {Record | undefined} An object containing the first key and value, or undefined if input is not an object.\n */\nexport function getKeyValue(obj: Record): Record | undefined {\n // Check if the input is a valid object using isObject utility function\n if (!isObject(obj)) {\n return;\n }\n\n // Extract the first key from the object\n const key = Object.keys(obj)[0];\n // Retrieve the value associated with the first key\n const value = obj[key];\n // Return an object containing the key and value\n return {\n key,\n value,\n };\n}\n\n/**\n * Matches a string against a regular expression and returns the match result.\n * @param {string} string - The string to match against the regex.\n * @param {string} regex - The regex pattern as a string.\n * @returns {RegExpMatchArray | null} The results of the regex match, or null if an error occurs.\n */\nexport function matchWithRegex(string: string, regex: string): RegExpMatchArray | null {\n try {\n // Attempt to match the string with the regex\n return string.match(new RegExp(regex));\n } catch (err) {\n // Return null if an error occurs during regex matching\n return null;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport abstract class Connector {\n // abstract connect(_config: Record): this;\n\n abstract set(_key: string, _data: dynamic): void | Promise;\n\n abstract get(_key: string): this | Promise;\n\n // abstract getAll(): Record | Promise>>;\n\n // abstract getKeys(): string[] | Promise;\n\n // abstract has(_key: string): boolean | Promise;\n\n // abstract hasData(): boolean | Promise;\n\n // abstract update(_key: string, _data: dynamic, ttl: number): Promise;\n\n // abstract remove(_key: string): this | Promise;\n\n // abstract clear(): this | Promise;\n\n // abstract close(): this; // TODO: stop\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Connector } from './Connector';\n\n// TODO: move to file\n// enum ConnectorEnum {\n// MEMORY = 'memory',\n// REDIS = 'redis'\n// }\n\nexport class Storage {\n public static instance: Storage;\n public connector: Connector | Record; // RedisConnector |\n // public storageType: dynamic;\n\n public attachConnector(connector: any): any {\n if (connector?.prototype?.constructor?.toString()?.trim()?.substring(0, 5) === 'class') {\n this.connector = new connector();\n } else {\n this.connector = connector;\n }\n\n return this.connector;\n }\n\n public static get Instance(): Storage {\n this.instance = this.instance || new Storage();\n\n return this.instance;\n }\n\n public getConnector(): any {\n return this.connector;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { Storage } from './Storage';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\n\nimport { Constants } from '../constants';\nimport { VariationModel } from '../models/campaign/VariationModel';\n\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\n\ninterface ICampaignDecisionService {\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean;\n getVariation(variations: Array, bucketValue: number): VariationModel;\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel;\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise;\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n}\n\nexport class CampaignDecisionService implements ICampaignDecisionService {\n /**\n * Calculate if this user should become part of the campaign or not\n *\n * @param {String} userId the unique ID assigned to a user\n * @param {Object} campaign fot getting the value of traffic allotted to the campaign\n *\n * @return {Boolean} if User is a part of Campaign or not\n */\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean {\n // if (!ValidateUtil.isValidValue(userId) || !campaign) {\n // return false;\n // }\n\n if (!campaign || !userId) {\n return false;\n }\n let trafficAllocation;\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n trafficAllocation = campaign.getVariations()[0].getWeight();\n } else {\n trafficAllocation = campaign.getTraffic();\n }\n const valueAssignedToUser = new DecisionMaker().getBucketValueForUser(`${campaign.getId()}_${userId}`);\n const isUserPart = valueAssignedToUser !== 0 && valueAssignedToUser <= trafficAllocation;\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_PART_OF_CAMPAIGN, {\n userId,\n notPart: isUserPart ? '' : 'not',\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return isUserPart;\n }\n\n /**\n * Returns the Variation by checking the Start and End Bucket Allocations of each Variation\n *\n * @param {Object} campaign which contains the variations\n * @param {Number} bucketValue the bucket Value of the user\n *\n * @return {Object|null} variation data allotted to the user or null if not\n */\n getVariation(variations: Array, bucketValue: number): VariationModel {\n for (let i = 0; i < variations.length; i++) {\n const variation = variations[i];\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n return null;\n }\n\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel {\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n /**\n * Validates the User ID and generates Variation into which the User is bucketed in.\n *\n * @param {String} userId the unique ID assigned to User\n * @param {Object} campaign the Campaign of which User is a part of\n *\n * @return {Object|null} variation data into which user is bucketed in or null if not\n */\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n let multiplier;\n\n if (!campaign || !userId) {\n return null;\n }\n\n if (campaign.getTraffic()) {\n multiplier = 1;\n }\n\n const percentTraffic = campaign.getTraffic();\n const hashValue = new DecisionMaker().generateHashValue(`${campaign.getId()}_${accountId}_${userId}`);\n const bucketValue = new DecisionMaker().generateBucketValue(hashValue, Constants.MAX_TRAFFIC_VALUE, multiplier);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION, {\n userId,\n campaignKey: campaign.getKey(),\n percentTraffic,\n bucketValue,\n hashValue,\n }),\n );\n\n return this.getVariation(campaign.getVariations(), bucketValue);\n }\n\n async getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise {\n // validate segmentation\n const campaignType = campaign.getType();\n let segments = {};\n\n if (campaignType === CampaignTypeEnum.ROLLOUT || campaignType === CampaignTypeEnum.PERSONALIZE) {\n segments = campaign.getVariations()[0].getSegments();\n } else if (campaignType === CampaignTypeEnum.AB) {\n segments = campaign.getSegments();\n }\n if (isObject(segments) && !Object.keys(segments).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_SKIP, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return true;\n } else {\n const preSegmentationResult = await SegmentationManager.Instance.validateSegmentation(\n segments,\n context.getCustomVariables(),\n );\n\n if (!preSegmentationResult) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'failed',\n }),\n );\n\n return false;\n }\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'passed',\n }),\n );\n\n return true;\n }\n }\n\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n const isUserPart = this.isUserPartOfCampaign(userId, campaign);\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (isUserPart) {\n return campaign.getVariations()[0];\n } else {\n return null;\n }\n } else {\n if (isUserPart) {\n return this.bucketUserToVariation(userId, accountId, campaign);\n } else {\n return null;\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOOptions } from '../models/VWOOptionsModel';\nimport { isFunction } from '../utils/DataTypeUtil';\n\nexport interface IHooksService {\n execute(properties: Record): void;\n set(properties: Record): void;\n get(): Record;\n}\nclass HooksService implements IHooksService {\n private callback: ((properties: Record) => void) | undefined;\n private isCallBackFunction: boolean;\n private decision: Record;\n\n constructor(options: IVWOOptions) {\n this.callback = options.integrations?.callback;\n this.isCallBackFunction = isFunction(this.callback);\n this.decision = {};\n }\n\n /**\n * Executes the callback\n * @param {Record} properties Properties from the callback\n */\n execute(properties: Record): void {\n if (this.isCallBackFunction) {\n this.callback(properties);\n }\n }\n\n /**\n * Sets properties to the decision object\n * @param {Record} properties Properties to set\n */\n set(properties: Record): void {\n if (this.isCallBackFunction) {\n this.decision = properties;\n }\n }\n\n /**\n * Retrieves the decision object\n * @returns {Record} The decision object\n */\n get(): Record {\n return this.decision;\n }\n}\n\nexport default HooksService;\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\n\nimport { Deferred } from '../utils/PromiseUtil';\n\nimport { Constants } from '../constants';\nimport { HTTPS_PROTOCOL, HTTP_PROTOCOL } from '../constants/Url';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsSchema } from '../models/schemas/SettingsSchemaValidation';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { getSettingsPath } from '../utils/NetworkUtil';\n\ninterface ISettingsService {\n sdkKey: string;\n\n getSettings(forceFetch: boolean): Promise;\n\n fetchSettings(): Promise;\n}\n\nexport class SettingsService implements ISettingsService {\n sdkKey: string;\n accountId: number;\n expiry: number;\n networkTimeout: number;\n hostname: string;\n port: number;\n protocol: string;\n isGatewayServiceProvided: boolean = false;\n private static instance: SettingsService;\n\n constructor(options: Record) {\n this.sdkKey = options.sdkKey;\n this.accountId = options.accountId;\n this.expiry = options?.settings?.expiry || Constants.SETTINGS_EXPIRY;\n this.networkTimeout = options?.settings?.timeout || Constants.SETTINGS_TIMEOUT;\n\n if (options?.gatewayService?.url) {\n let parsedUrl;\n this.isGatewayServiceProvided = true;\n if (\n options.gatewayService.url.startsWith(HTTP_PROTOCOL) ||\n options.gatewayService.url.startsWith(HTTPS_PROTOCOL)\n ) {\n parsedUrl = new URL(`${options.gatewayService.url}`);\n } else if (options.gatewayService?.protocol) {\n parsedUrl = new URL(`${options.gatewayService.protocol}://${options.gatewayService.url}`);\n } else {\n parsedUrl = new URL(`${HTTPS_PROTOCOL}${options.gatewayService.url}`);\n }\n this.hostname = parsedUrl.hostname;\n this.protocol = parsedUrl.protocol.replace(':', '');\n if (parsedUrl.port) {\n this.port = parseInt(parsedUrl.port);\n } else if (options.gatewayService?.port) {\n this.port = options.gatewayService.port;\n }\n } else {\n this.hostname = Constants.HOST_NAME;\n }\n\n // if (this.expiry > 0) {\n // this.setSettingsExpiry();\n // }\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: 'Settings Manager',\n }),\n );\n SettingsService.instance = this;\n }\n\n static get Instance(): SettingsService {\n return SettingsService.instance;\n }\n\n private setSettingsExpiry() {\n const settingsTimeout = setTimeout(() => {\n this.fetchSettingsAndCacheInStorage().then(() => {\n clearTimeout(settingsTimeout);\n // again set the timer\n // NOTE: setInterval could be used but it will not consider the time required to fetch settings\n // This breaks the timer rythm and also sends more call than required\n this.setSettingsExpiry();\n });\n }, this.expiry);\n }\n\n private fetchSettingsAndCacheInStorage() {\n const deferredObject = new Deferred();\n // const storageConnector = Storage.Instance.getConnector();\n\n this.fetchSettings()\n .then(async (res) => {\n // LogManager.Instance.info('Settings fetched successfully');\n\n // const method = update ? 'update' : 'set';\n\n // storageConnector[method](Constants.SETTINGS, res).then(() => {\n // LogManager.Instance.info('Settings persisted in cache: memory');\n // deferredObject.resolve(res);\n // });\n deferredObject.resolve(res);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.resolve(null);\n });\n\n return deferredObject.promise;\n }\n\n fetchSettings(): Promise {\n const deferredObject = new Deferred();\n\n if (!this.sdkKey || !this.accountId) {\n deferredObject.reject(new Error('sdkKey is required for fetching account settings. Aborting!'));\n }\n\n const networkInstance = NetworkManager.Instance;\n const options: Record = getSettingsPath(this.sdkKey, this.accountId);\n\n options.platform = Constants.PLATFORM;\n options['api-version'] = Constants.API_VERSION;\n\n if (!networkInstance.getConfig().getDevelopmentMode()) {\n options.s = 'prod';\n }\n\n try {\n const request: RequestModel = new RequestModel(\n this.hostname,\n HttpMethodEnum.GET,\n Constants.SETTINTS_ENDPOINT,\n options,\n null,\n null,\n this.protocol,\n this.port,\n );\n request.setTimeout(this.networkTimeout);\n\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.reject(err);\n return deferredObject.promise;\n }\n }\n\n getSettings(forceFetch = false): Promise {\n const deferredObject = new Deferred();\n\n if (forceFetch) {\n this.fetchSettingsAndCacheInStorage().then((settings) => {\n deferredObject.resolve(settings);\n });\n } else {\n // const storageConnector = Storage.Instance.getConnector();\n\n // if (storageConnector) {\n // storageConnector\n // .get(Constants.SETTINGS)\n // .then((storedSettings: dynamic) => {\n // if (!isObject(storedSettings)) {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n // if (isSettingsValid) {\n // deferredObject.resolve(fetchedSettings);\n // } else {\n // deferredObject.reject(new Error('Settings are not valid. Failed schema validation.'));\n // }\n // });\n // } else {\n // deferredObject.resolve(storedSettings);\n // }\n // })\n // .catch(() => {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // deferredObject.resolve(fetchedSettings);\n // });\n // });\n // } else {\n this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n if (isSettingsValid) {\n LogManager.Instance.info(InfoLogMessagesEnum.SETTINGS_FETCH_SUCCESS);\n\n deferredObject.resolve(fetchedSettings);\n } else {\n LogManager.Instance.error(ErrorLogMessagesEnum.SETTINGS_SCHEMA_INVALID);\n\n deferredObject.resolve({});\n }\n });\n // }\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { Storage } from '../packages/storage';\nimport { dynamic } from '../types/Common';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { LogManager } from '../packages/logger';\nimport { isNull, isUndefined } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\nexport interface IStorageService {\n getDataInStorage(featureKey: any, context: ContextModel): Promise>;\n setDataInStorage(data: Record): Promise;\n}\nexport class StorageService implements IStorageService {\n private storageData: Record = {};\n\n /**\n * Retrieves data from storage based on the feature key and user ID.\n * @param featureKey The key to identify the feature data.\n * @param user The user object containing at least an ID.\n * @returns A promise that resolves to the data retrieved or an error/storage status enum.\n */\n async getDataInStorage(featureKey: any, context: ContextModel): Promise> {\n const deferredObject = new Deferred();\n const storageInstance = Storage.Instance.getConnector();\n\n // Check if the storage instance is available\n if (isNull(storageInstance) || isUndefined(storageInstance)) {\n deferredObject.resolve(StorageEnum.STORAGE_UNDEFINED);\n } else {\n storageInstance\n .get(featureKey, context.getId())\n .then((data: Record) => {\n deferredObject.resolve(data);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORED_DATA_ERROR, {\n err,\n }),\n );\n\n deferredObject.resolve(StorageEnum.NO_DATA_FOUND);\n });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Stores data in the storage.\n * @param data The data to be stored as a record.\n * @returns A promise that resolves to true if data is successfully stored, otherwise false.\n */\n async setDataInStorage(data: Record): Promise {\n const deferredObject = new Deferred();\n\n const storageInstance = Storage.Instance.getConnector();\n // Check if the storage instance is available\n if (storageInstance === null || storageInstance === undefined) {\n deferredObject.resolve(false);\n } else {\n storageInstance\n .set(data)\n .then(() => {\n deferredObject.resolve(true);\n })\n .catch(() => {\n deferredObject.resolve(false);\n });\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { RuleModel } from '../models/campaign/RuleModel';\n/**\n * Sets the variation allocation for a given campaign based on its type.\n * If the campaign type is ROLLOUT or PERSONALIZE, it handles the campaign using `_handleRolloutCampaign`.\n * Otherwise, it assigns range values to each variation in the campaign.\n * @param {CampaignModel} campaign - The campaign for which to set the variation allocation.\n */\nexport function setVariationAllocation(campaign: CampaignModel): void {\n // Check if the campaign type is ROLLOUT or PERSONALIZE\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n _handleRolloutCampaign(campaign);\n } else {\n let currentAllocation = 0;\n // Iterate over each variation in the campaign\n campaign.getVariations().forEach((variation) => {\n // Assign range values to the variation and update the current allocation\n const stepFactor = assignRangeValues(variation, currentAllocation);\n currentAllocation += stepFactor;\n // Log the range allocation for debugging\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: variation.getStartRangeVariation(),\n endRange: variation.getEndRangeVariation(),\n }),\n );\n });\n }\n}\n\n/**\n * Assigns start and end range values to a variation based on its weight.\n * @param {VariationModel} data - The variation model to assign range values.\n * @param {number} currentAllocation - The current allocation value before this variation.\n * @returns {number} The step factor calculated from the variation's weight.\n */\nexport function assignRangeValues(data: VariationModel, currentAllocation: number) {\n // Calculate the bucket range based on the variation's weight\n const stepFactor: number = _getVariationBucketRange(data.getWeight());\n\n // Set the start and end range of the variation\n if (stepFactor) {\n data.setStartRange(currentAllocation + 1);\n data.setEndRange(currentAllocation + stepFactor);\n } else {\n data.setStartRange(-1);\n data.setEndRange(-1);\n }\n return stepFactor;\n}\n\n/**\n * Scales the weights of variations to sum up to 100%.\n * @param {any[]} variations - The list of variations to scale.\n */\nexport function scaleVariationWeights(variations: any) {\n // Calculate the total weight of all variations\n const totalWeight = variations.reduce((acc, variation) => {\n return acc + variation.weight;\n }, 0);\n // If total weight is zero, assign equal weight to each variation\n if (!totalWeight) {\n const equalWeight = 100 / variations.length;\n variations.forEach((variation) => (variation.weight = equalWeight));\n } else {\n // Scale each variation's weight to make the total 100%\n variations.forEach((variation) => (variation.weight = (variation.weight / totalWeight) * 100));\n }\n}\n\n/**\n * Generates a bucketing seed based on user ID, campaign, and optional group ID.\n * @param {string} userId - The user ID.\n * @param {any} campaign - The campaign object.\n * @param {string} [groupId] - The optional group ID.\n * @returns {string} The bucketing seed.\n */\nexport function getBucketingSeed(userId: string, campaign: CampaignModel, groupId: number) {\n // Return a seed combining group ID and user ID if group ID is provided\n if (groupId) {\n return `${groupId}_${userId}`;\n }\n // Return a seed combining campaign ID and user ID otherwise\n return `${campaign.getId()}_${userId}`;\n}\n\n/**\n * Retrieves a variation by its ID within a specific campaign identified by its key.\n * @param {SettingsModel} settings - The settings model containing all campaigns.\n * @param {string} campaignKey - The key of the campaign.\n * @param {string} variationId - The ID of the variation to retrieve.\n * @returns {VariationModel | null} The found variation model or null if not found.\n */\nexport function getVariationFromCampaignKey(settings: SettingsModel, campaignKey: string, variationId: number) {\n // Find the campaign by its key\n const campaign: CampaignModel = settings.getCampaigns().find((campaign: CampaignModel) => {\n return campaign.getKey() === campaignKey;\n });\n\n if (campaign) {\n // Find the variation by its ID within the found campaign\n const variation: VariationModel = campaign.getVariations().find((variation: VariationModel) => {\n return variation.getId() === variationId;\n });\n\n if (variation) {\n // Return a new instance of VariationModel based on the found variation\n return new VariationModel().modelFromDictionary(variation);\n }\n }\n return null;\n}\n\n/**\n * Sets the allocation ranges for a list of campaigns.\n * @param {CampaignModel[]} campaigns - The list of campaigns to set allocations for.\n */\nexport function setCampaignAllocation(campaigns: any[]) {\n let stepFactor = 0;\n for (let i = 0, currentAllocation = 0; i < campaigns.length; i++) {\n const campaign = campaigns[i];\n\n // Assign range values to each campaign and update the current allocation\n stepFactor = assignRangeValuesMEG(campaign, currentAllocation);\n currentAllocation += stepFactor;\n }\n}\n\n/**\n * Determines if a campaign is part of a group.\n * @param {SettingsModel} settings - The settings model containing group associations.\n * @param {string} campaignId - The ID of the campaign to check.\n * @param {any} [variationId=null] - The optional variation ID.\n * @returns {Object} An object containing the group ID and name if the campaign is part of a group, otherwise an empty object.\n */\nexport function getGroupDetailsIfCampaignPartOfIt(settings: SettingsModel, campaignId: any, variationId: any = null) {\n /**\n * If variationId is null, that means that campaign is testing campaign\n * If variationId is not null, that means that campaign is personalization campaign and we need to append variationId to campaignId using _\n * then check if the current campaign is part of any group\n */\n let campaignToCheck = campaignId.toString();\n // check if variationId is not null\n if (variationId !== null) {\n // if variationId is not null, then append it to the campaignId like campaignId_variationId\n campaignToCheck = `${campaignId}_${variationId}`.toString();\n }\n if (\n settings.getCampaignGroups() &&\n Object.prototype.hasOwnProperty.call(settings.getCampaignGroups(), campaignToCheck)\n ) {\n return {\n groupId: settings.getCampaignGroups()[campaignToCheck],\n groupName: settings.getGroups()[settings.getCampaignGroups()[campaignToCheck]].name,\n };\n }\n return {};\n}\n\n/**\n * Finds all groups associated with a feature specified by its key.\n * @param {SettingsModel} settings - The settings model containing all features and groups.\n * @param {string} featureKey - The key of the feature to find groups for.\n * @returns {Array} An array of groups associated with the feature.\n */\nexport function findGroupsFeaturePartOf(settings: SettingsModel, featureKey: string) {\n // Initialize an array to store all rules for the given feature to fetch campaignId and variationId later\n const ruleArray: Array = [];\n // Loop over all rules inside the feature where the feature key matches and collect all rules\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n if (ruleArray.indexOf(rule) === -1) {\n ruleArray.push(rule);\n }\n });\n }\n });\n\n // Loop over all campaigns and find the group for each campaign\n const groups: Array = [];\n ruleArray.forEach((rule) => {\n const group = getGroupDetailsIfCampaignPartOfIt(\n settings,\n rule.getCampaignId(),\n rule.getType() === CampaignTypeEnum.PERSONALIZE ? rule.getVariationId() : null,\n );\n if (group.groupId) {\n // Check if the group is already added to the groups array to avoid duplicates\n const groupIndex = groups.findIndex((grp) => grp.groupId === group.groupId);\n if (groupIndex === -1) {\n groups.push(group);\n }\n }\n });\n return groups;\n}\n\n/**\n * Retrieves campaigns by a specific group ID.\n * @param {SettingsModel} settings - The settings model containing all groups.\n * @param {any} groupId - The ID of the group.\n * @returns {Array} An array of campaigns associated with the specified group ID.\n */\nexport function getCampaignsByGroupId(settings: SettingsModel, groupId: number) {\n const group = settings.getGroups()[groupId];\n if (group) {\n return group.campaigns; // Return the campaigns associated with the group\n } else {\n return []; // Return an empty array if the group ID is not found\n }\n}\n\n/**\n * Retrieves feature keys from a list of campaign IDs.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {any} campaignIdWithVariation - An array of campaign IDs and variation IDs in format campaignId_variationId.\n * @returns {Array} An array of feature keys associated with the provided campaign IDs.\n */\nexport function getFeatureKeysFromCampaignIds(settings: SettingsModel, campaignIdWithVariation: any) {\n const featureKeys = [];\n for (const campaign of campaignIdWithVariation) {\n // split key with _ to separate campaignId and variationId\n const [campaignId, variationId] = campaign.split('_').map(Number);\n settings.getFeatures().forEach((feature) => {\n // check if feature already exists in the featureKeys array\n if (featureKeys.indexOf(feature.getKey()) !== -1) {\n return;\n }\n feature.getRules().forEach((rule) => {\n if (rule.getCampaignId() === campaignId) {\n // Check if variationId is provided and matches the rule's variationId\n if (variationId !== undefined && variationId !== null) {\n // Add feature key if variationId matches\n if (rule.getVariationId() === variationId) {\n featureKeys.push(feature.getKey());\n }\n } else {\n // Add feature key if no variationId is provided\n featureKeys.push(feature.getKey());\n }\n }\n });\n });\n }\n return featureKeys;\n}\n\n/**\n * Retrieves campaign IDs from a specific feature key.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of campaign IDs associated with the specified feature key.\n */\nexport function getCampaignIdsFromFeatureKey(settings: SettingsModel, featureKey: string) {\n const campaignIds = [];\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n campaignIds.push(rule.getCampaignId()); // Add campaign ID if feature key matches\n });\n }\n });\n return campaignIds;\n}\n\n/**\n * Assigns range values to a campaign based on its weight.\n * @param {any} data - The campaign data containing weight.\n * @param {number} currentAllocation - The current allocation value before this campaign.\n * @returns {number} The step factor calculated from the campaign's weight.\n */\nexport function assignRangeValuesMEG(data: any, currentAllocation: number) {\n const stepFactor: number = _getVariationBucketRange(data.weight);\n\n if (stepFactor) {\n data.startRangeVariation = currentAllocation + 1; // Set the start range\n data.endRangeVariation = currentAllocation + stepFactor; // Set the end range\n } else {\n data.startRangeVariation = -1; // Set invalid range if step factor is zero\n data.endRangeVariation = -1;\n }\n return stepFactor;\n}\n\n/**\n * Retrieves the rule type using a campaign ID from a specific feature.\n * @param {any} feature - The feature containing rules.\n * @param {number} campaignId - The campaign ID to find the rule type for.\n * @returns {string} The rule type if found, otherwise an empty string.\n */\nexport function getRuleTypeUsingCampaignIdFromFeature(feature: FeatureModel, campaignId: number) {\n const rule = feature.getRules().find((rule) => rule.getCampaignId() === campaignId);\n return rule ? rule.getType() : ''; // Return the rule type if found\n}\n\n/**\n * Calculates the bucket range for a variation based on its weight.\n * @param {number} variationWeight - The weight of the variation.\n * @returns {number} The calculated bucket range.\n */\nfunction _getVariationBucketRange(variationWeight: number) {\n if (!variationWeight || variationWeight === 0) {\n return 0; // Return zero if weight is invalid or zero\n }\n\n const startRange = Math.ceil(variationWeight * 100);\n\n return Math.min(startRange, Constants.MAX_TRAFFIC_VALUE); // Ensure the range does not exceed the max traffic value\n}\n\n/**\n * Handles the rollout campaign by setting start and end ranges for all variations.\n * @param {CampaignModel} campaign - The campaign to handle.\n */\nfunction _handleRolloutCampaign(campaign: CampaignModel): void {\n // Set start and end ranges for all variations in the campaign\n for (let i = 0; i < campaign.getVariations().length; i++) {\n const variation = campaign.getVariations()[i];\n const endRange = campaign.getVariations()[i].getWeight() * 100;\n\n variation.setStartRange(1);\n variation.setEndRange(endRange);\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: 1,\n endRange,\n }),\n );\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\ntype FunctionType = (val: dynamic) => void;\n\n/**\n * Checks if a value is an object excluding arrays, functions, regexes, promises, and dates.\n * @param val The value to check.\n * @returns True if the value is an object, false otherwise.\n */\nexport function isObject(\n val: T,\n): val is Record & Exclude | FunctionType | RegExp | Promise | Date> {\n // Using Object.prototype.toString to get a precise string representation of the value type\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Checks if a value is an array.\n * @param val The value to check.\n * @returns True if the value is an array, false otherwise.\n */\nexport function isArray(val: dynamic): val is Array {\n return Object.prototype.toString.call(val) === '[object Array]';\n}\n\n/**\n * Checks if a value is null.\n * @param val The value to check.\n * @returns True if the value is null, false otherwise.\n */\nexport function isNull(val: dynamic): val is null {\n return Object.prototype.toString.call(val) === '[object Null]';\n}\n\n/**\n * Checks if a value is undefined.\n * @param val The value to check.\n * @returns True if the value is undefined, false otherwise.\n */\nexport function isUndefined(val: dynamic): val is undefined {\n return Object.prototype.toString.call(val) === '[object Undefined]';\n}\n\n/**\n * Checks if a value is defined, i.e., not undefined and not null.\n * @param val The value to check.\n * @returns True if the value is defined, false otherwise.\n */\nexport function isDefined(val: T): val is NonNullable {\n return !isUndefined(val) && !isNull(val);\n}\n\n/**\n * Checks if a value is a number, including NaN.\n * @param val The value to check.\n * @returns True if the value is a number, false otherwise.\n */\nexport function isNumber(val: dynamic): val is number {\n // Note: NaN is also a number\n return Object.prototype.toString.call(val) === '[object Number]';\n}\n\n/**\n * Checks if a value is a string.\n * @param val The value to check.\n * @returns True if the value is a string, false otherwise.\n */\nexport function isString(val: dynamic): val is string {\n return Object.prototype.toString.call(val) === '[object String]';\n}\n\n/**\n * Checks if a value is a boolean.\n * @param val The value to check.\n * @returns True if the value is a boolean, false otherwise.\n */\nexport function isBoolean(val: dynamic): val is boolean {\n return Object.prototype.toString.call(val) === '[object Boolean]';\n}\n\n/**\n * Checks if a value is NaN.\n * @param val The value to check.\n * @returns True if the value is NaN, false otherwise.\n */\nexport function isNaN(val: dynamic): val is number {\n // NaN is the only JavaScript value that is treated as unequal to itself\n return val !== val;\n}\n\n/**\n * Checks if a value is a Date object.\n * @param val The value to check.\n * @returns True if the value is a Date object, false otherwise.\n */\nexport function isDate(val: dynamic): val is Date {\n return Object.prototype.toString.call(val) === '[object Date]';\n}\n\n/**\n * Checks if a value is a function.\n * @param val The value to check.\n * @returns True if the value is a function, false otherwise.\n */\nexport function isFunction(val: dynamic): val is FunctionType {\n return Object.prototype.toString.call(val) === '[object Function]';\n}\n\n/**\n * Checks if a value is a regular expression.\n * @param val The value to check.\n * @returns True if the value is a regular expression, false otherwise.\n */\nexport function isRegex(val: dynamic): val is RegExp {\n return Object.prototype.toString.call(val) === '[object RegExp]';\n}\n\n/**\n * Checks if a value is a Promise.\n * @param val The value to check.\n * @returns True if the value is a Promise, false otherwise.\n */\nexport function isPromise(val: dynamic): val is Promise {\n return Object.prototype.toString.call(val) === '[object Promise]';\n}\n\n/**\n * Determines the type of the given value using various type-checking utility functions.\n * @param val The value to determine the type of.\n * @returns A string representing the type of the value.\n */\nexport function getType(val: dynamic): string {\n // Check if the value is an Object (excluding arrays, functions, etc.)\n return isObject(val)\n ? 'Object'\n : // Check if the value is an Array\n isArray(val)\n ? 'Array'\n : // Check if the value is null\n isNull(val)\n ? 'Null'\n : // Check if the value is undefined\n isUndefined(val)\n ? 'Undefined'\n : // Check if the value is NaN (Not a Number)\n isNaN(val)\n ? 'NaN'\n : // Check if the value is a Number (including NaN)\n isNumber(val)\n ? 'Number'\n : // Check if the value is a String\n isString(val)\n ? 'String'\n : // Check if the value is a Boolean\n isBoolean(val)\n ? 'Boolean'\n : // Check if the value is a Date object\n isDate(val)\n ? 'Date'\n : // Check if the value is a Regular Expression\n isRegex(val)\n ? 'Regex'\n : // Check if the value is a Function\n isFunction(val)\n ? 'Function'\n : // Check if the value is a Promise\n isPromise(val)\n ? 'Promise'\n : // If none of the above, return 'Unknown Type'\n 'Unknown Type';\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isPromise } from '../utils/DataTypeUtil';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { StatusEnum } from '../enums/StatusEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { Constants } from '../constants';\nimport {\n assignRangeValues,\n getBucketingSeed,\n getGroupDetailsIfCampaignPartOfIt,\n scaleVariationWeights,\n} from './CampaignUtil';\nimport { cloneObject } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { evaluateGroups } from './MegUtil';\nimport { getUUID } from './UuidUtil';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\n\nexport const checkWhitelistingAndPreSeg = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise<[boolean, any]> => {\n const vwoUserId = getUUID(context.getId(), settings.getAccountId());\n const campaignId = campaign.getId();\n\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // set _vwoUserId for variation targeting variables\n context.setVariationTargetingVariables(\n Object.assign({}, context.getVariationTargetingVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { variationTargetingVariables: context.getVariationTargetingVariables() }); // for integration\n\n // check if the campaign satisfies the whitelisting\n if (campaign.getIsForcedVariationEnabled()) {\n const whitelistedVariation = await _checkCampaignWhitelisting(campaign, context);\n if (whitelistedVariation && Object.keys(whitelistedVariation).length > 0) {\n return [true, whitelistedVariation];\n }\n } else {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey: campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n }\n }\n // userlist segment is also available for campaign pre segmentation\n context.setCustomVariables(\n Object.assign({}, context.getCustomVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { customVariables: context.getCustomVariables() }); // for integeration\n\n // Check if RUle being evaluated is part of Mutually Exclusive Group\n const { groupId } = getGroupDetailsIfCampaignPartOfIt(\n settings,\n campaign.getId(),\n campaign.getType() === CampaignTypeEnum.PERSONALIZE ? campaign.getVariations()[0].getId() : null,\n );\n // Check if group is already evaluated and we have eligible winner campaigns\n const groupWinnerCampaignId = megGroupWinnerCampaigns?.get(groupId);\n if (groupWinnerCampaignId) {\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId) {\n return [true, null];\n }\n } else if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId + '_' + campaign.getVariations()[0].getId()) {\n return [true, null];\n }\n }\n // as group is already evaluated, no need to check again, return false directly\n return [false, null];\n } else {\n // check in storage if the group is already evaluated for the user\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n storageService,\n );\n if (storedData && storedData.experimentKey && storedData.experimentId) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n if (storedData.experimentId === campaignId) {\n // return the campaign if the called campaignId matches\n if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (storedData.experimentVariationId === campaign.getVariations()[0].getId()) {\n // if personalise then check if the reqeusted variation is the winner\n return [true, null];\n } else {\n // if requested variation is not the winner then set the winner campaign in the map and return\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n return [false, null];\n }\n } else {\n return [true, null];\n }\n }\n if (storedData.experimentVariationId != -1) {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n } else {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId);\n }\n return [false, null];\n }\n }\n\n // If Whitelisting is skipped/failed and campaign not part of any MEG Groups\n // Check campaign's pre-segmentation\n const isPreSegmentationPassed = await new CampaignDecisionService().getPreSegmentationDecision(campaign, context);\n\n if (isPreSegmentationPassed && groupId) {\n const winnerCampaign = await evaluateGroups(\n settings,\n feature,\n groupId,\n evaluatedFeatureMap,\n context,\n storageService,\n );\n\n if (winnerCampaign && winnerCampaign.id === campaignId) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n return [true, null];\n } else {\n // if personalise then check if the reqeusted variation is the winner\n if (winnerCampaign.variations[0].id === campaign.getVariations()[0].getId()) {\n return [true, null];\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n return [false, null];\n }\n }\n } else if (winnerCampaign) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id);\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n }\n return [false, null];\n }\n megGroupWinnerCampaigns.set(groupId, -1);\n return [false, null];\n }\n\n return [isPreSegmentationPassed, null];\n};\n\nexport const evaluateTrafficAndGetVariation = (\n settings: SettingsModel,\n campaign: CampaignModel,\n userId: string | number,\n): VariationModel => {\n const variation = new CampaignDecisionService().getVariationAlloted(userId, settings.getAccountId(), campaign);\n if (!variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: 'did not get any variation',\n }),\n );\n\n return null;\n }\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: `got variation:${variation.getKey()}`,\n }),\n );\n\n return variation;\n};\n\n/******************\n * PRIVATE METHODS\n ******************/\n\n/**\n * Check for whitelisting\n * @param campaign Campaign object\n * @param userId User ID\n * @param variationTargetingVariables Variation targeting variables\n * @returns\n */\nconst _checkCampaignWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n // check if the campaign satisfies the whitelisting\n const whitelistingResult = await _evaluateWhitelisting(campaign, context);\n const status = whitelistingResult ? StatusEnum.PASSED : StatusEnum.FAILED;\n const variationString = whitelistingResult ? whitelistingResult.variation.key : '';\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status,\n variationString,\n }),\n );\n\n return whitelistingResult;\n};\n\nconst _evaluateWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n const targetedVariations = [];\n const promises: Promise[] = [];\n\n let whitelistedVariation;\n\n campaign.getVariations().forEach((variation) => {\n if (isObject(variation.getSegments()) && !Object.keys(variation.getSegments()).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n variation: variation.getKey() ? `for variation: ${variation.getKey()}` : '',\n }),\n );\n\n return;\n }\n // check for segmentation and evaluate\n if (isObject(variation.getSegments())) {\n let SegmentEvaluatorResult = SegmentationManager.Instance.validateSegmentation(\n variation.getSegments(),\n context.getVariationTargetingVariables(),\n );\n SegmentEvaluatorResult = isPromise(SegmentEvaluatorResult)\n ? SegmentEvaluatorResult\n : Promise.resolve(SegmentEvaluatorResult);\n SegmentEvaluatorResult.then((evaluationResult) => {\n if (evaluationResult) {\n targetedVariations.push(cloneObject(variation));\n }\n });\n\n promises.push(SegmentEvaluatorResult);\n }\n });\n\n // Wait for all promises to resolve\n await Promise.all(promises);\n\n if (targetedVariations.length > 1) {\n scaleVariationWeights(targetedVariations);\n for (let i = 0, currentAllocation = 0, stepFactor = 0; i < targetedVariations.length; i++) {\n stepFactor = assignRangeValues(targetedVariations[i], currentAllocation);\n currentAllocation += stepFactor;\n }\n whitelistedVariation = new CampaignDecisionService().getVariation(\n targetedVariations,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), campaign, null)),\n );\n } else {\n whitelistedVariation = targetedVariations[0];\n }\n\n if (whitelistedVariation) {\n return {\n variation: whitelistedVariation,\n variationName: whitelistedVariation.name,\n variationId: whitelistedVariation.id,\n };\n }\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { dynamic } from '../types/Common';\nimport { isString } from './DataTypeUtil';\n\n/**\n * Clones an object deeply.\n * @param {dynamic} obj - The object to clone.\n * @returns {any} The cloned object.\n */\nexport function cloneObject(obj: dynamic): any {\n if (!obj) {\n // Return the original object if it is null or undefined\n return obj;\n }\n // Use JSON stringify and parse method to perform a deep clone\n const clonedObj = JSON.parse(JSON.stringify(obj));\n return clonedObj;\n}\n\n/**\n * Gets the current Unix timestamp in seconds.\n * @returns {number} The current Unix timestamp.\n */\nexport function getCurrentUnixTimestamp(): number {\n // Convert the current date to Unix timestamp in seconds\n return Math.ceil(+new Date() / 1000);\n}\n\n/**\n * Gets the current Unix timestamp in milliseconds.\n * @returns {number} The current Unix timestamp in milliseconds.\n */\nexport function getCurrentUnixTimestampInMillis(): number {\n // Convert the current date to Unix timestamp in milliseconds\n return +new Date();\n}\n\n/**\n * Generates a random number between 0 and 1.\n * @returns {number} A random number.\n */\nexport function getRandomNumber(): number {\n // Use Math.random to generate a random number\n return Math.random();\n}\n\n/**\n * Retrieves specific rules based on the type from a feature.\n * @param {FeatureModel} feature - The key of the feature.\n * @param {CampaignTypeEnum | null} type - The type of the rules to retrieve.\n * @returns {Array} An array of rules that match the type.\n */\nexport function getSpecificRulesBasedOnType(feature: FeatureModel, type: CampaignTypeEnum = null) {\n // Return an empty array if no linked campaigns are found\n if (feature && !feature?.getRulesLinkedCampaign()) {\n return [];\n }\n // Filter the rules by type if a type is specified and is a string\n if (feature && feature.getRulesLinkedCampaign() && type && isString(type)) {\n return feature.getRulesLinkedCampaign().filter((rule) => {\n const ruleModel = new CampaignModel().modelFromDictionary(rule);\n return ruleModel.getType() === type;\n });\n }\n // Return all linked campaigns if no type is specified\n return feature.getRulesLinkedCampaign();\n}\n\n/**\n * Retrieves all AB and Personalize rules from a feature.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of AB and Personalize rules.\n */\nexport function getAllExperimentRules(feature: FeatureModel) {\n // Retrieve the feature by its key\n // Filter the rules to include only AB and Personalize types\n return (\n feature\n ?.getRulesLinkedCampaign()\n .filter((rule) => rule.getType() === CampaignTypeEnum.AB || rule.getType() === CampaignTypeEnum.PERSONALIZE) || []\n );\n}\n\n/**\n * Retrieves a feature by its key from the settings.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature to find.\n * @returns {any} The feature if found, otherwise undefined.\n */\nexport function getFeatureFromKey(settings: SettingsModel, featureKey: string) {\n // Find the feature by its key\n return settings?.getFeatures()?.find((feature) => feature.getKey() === featureKey);\n}\n\n/**\n * Checks if an event exists within any feature's metrics.\n * @param {string} eventName - The name of the event to check.\n * @param {any} settings - The settings containing features.\n * @returns {boolean} True if the event exists, otherwise false.\n */\nexport function doesEventBelongToAnyFeature(eventName: string, settings: SettingsModel): boolean {\n // Use the `some` method to check if any feature contains the event in its metrics\n return settings\n .getFeatures()\n .some((feature) => feature.getMetrics().some((metric) => metric.getIdentifier() === eventName));\n}\n\n/**\n * Adds linked campaigns to each feature in the settings based on rules.\n * @param {any} settings - The settings file to modify.\n */\nexport function addLinkedCampaignsToSettings(settings: SettingsModel): void {\n // Create maps for quick access to campaigns and variations\n const campaignMap = new Map(\n settings.getCampaigns().map((campaign) => [campaign.getId(), campaign]),\n );\n\n // Loop over all features\n for (const feature of settings.getFeatures()) {\n const rulesLinkedCampaign = feature\n .getRules()\n .map((rule) => {\n const campaign: CampaignModel = campaignMap.get(rule.getCampaignId());\n if (!campaign) return null;\n\n // Create a linked campaign object with the rule and campaign\n const linkedCampaign: any = { key: campaign.getKey(), ...campaign, ruleKey: rule.getRuleKey() };\n // If a variationId is specified, find and add the variation\n if (rule.getVariationId()) {\n const variation = campaign.getVariations().find((v) => v.getId() === rule.getVariationId());\n if (variation) {\n linkedCampaign.variations = [variation];\n }\n }\n\n return linkedCampaign;\n })\n .filter((campaign) => campaign !== null); // Filter out any null entries\n\n const rulesLinkedCampaignModel = rulesLinkedCampaign.map((campaign) => {\n const campaignModel = new CampaignModel();\n campaignModel.modelFromDictionary(campaign);\n return campaignModel;\n });\n // Assign the linked campaigns to the feature\n feature.setRulesLinkedCampaign(rulesLinkedCampaignModel);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { Deferred } from './PromiseUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Asynchronously retrieves data from a web service using the specified query parameters and endpoint.\n * @param queryParams - The parameters to be used in the query string of the request.\n * @param endpoint - The endpoint URL to which the request is sent.\n * @returns A promise that resolves to the response data or false if an error occurs.\n */\nexport async function getFromGatewayService(queryParams: any, endpoint: any): Promise {\n // Create a new deferred object to manage promise resolution\n const deferredObject = new Deferred();\n // Singleton instance of the network manager\n const networkInstance = NetworkManager.Instance;\n\n // Check if the base URL is not set correctly\n if (!SettingsService.Instance.isGatewayServiceProvided) {\n // Log an informational message about the invalid URL\n LogManager.Instance.error(ErrorLogMessagesEnum.GATEWAY_URL_ERROR);\n // Resolve the promise with false indicating an error or invalid state\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n\n try {\n // Create a new request model instance with the provided parameters\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n queryParams,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n // Perform the network GET request\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n // Resolve the deferred object with the data from the response\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n // Reject the deferred object with the error response\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n // Resolve the promise with false as fallback\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n}\n\n/**\n * Encodes the query parameters to ensure they are URL-safe.\n * @param queryParams The query parameters to be encoded.\n * @returns An object containing the encoded query parameters.\n */\nexport function getQueryParams(queryParams: Record): Record {\n const encodedParams: Record = {};\n\n for (const [key, value] of Object.entries(queryParams)) {\n // Encode the parameter value to ensure it is URL-safe\n const encodedValue = encodeURIComponent(String(value));\n // Add the encoded parameter to the result object\n encodedParams[key] = encodedValue;\n }\n\n return encodedParams;\n}\n\n/**\n * Adds isGatewayServiceRequired flag to each feature in the settings based on pre segmentation.\n * @param {any} settings - The settings file to modify.\n */\nexport function addIsGatewayServiceRequiredFlag(settings: SettingsModel): void {\n // \\b(? 0) {\n feature.setIsGatewayServiceRequired(true);\n break;\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { getEventsBaseProperties, getTrackUserPayloadData, sendPostApiRequest } from './NetworkUtil';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\n\n/**\n * Creates and sends an impression for a variation shown event.\n * This function constructs the necessary properties and payload for the event\n * and uses the NetworkUtil to send a POST API request.\n *\n * @param {SettingsModel} settings - The settings model containing configuration.\n * @param {number} campaignId - The ID of the campaign.\n * @param {number} variationId - The ID of the variation shown to the user.\n * @param {ContextModel} context - The user context model containing user-specific data.\n */\nexport const createAndSendImpressionForVariationShown = async (\n settings: SettingsModel,\n campaignId: number,\n variationId: number,\n context: ContextModel,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_VARIATION_SHOWN,\n encodeURIComponent(context.getUserAgent()), // Encode user agent to ensure URL safety\n context.getIpAddress(),\n );\n\n // Construct payload data for tracking the user\n const payload = getTrackUserPayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_VARIATION_SHOWN,\n campaignId,\n variationId,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed properties and payload as a POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from '../utils/DataTypeUtil';\n\nconst nargs = /\\{([0-9a-zA-Z_]+)\\}/g;\n\n/**\n * Constructs a message by replacing placeholders in a template with corresponding values from a data object.\n *\n * @param {string} template - The message template containing placeholders in the format `{key}`.\n * @param {Record} data - An object containing keys and values used to replace the placeholders in the template.\n * @returns {string} The constructed message with all placeholders replaced by their corresponding values from the data object.\n */\nexport function buildMessage(template: string, data: Record = {}): string {\n try {\n return template.replace(nargs, (match, key, index) => {\n // Check for escaped placeholders\n if (template[index - 1] === '{' && template[index + match.length] === '}') {\n return key;\n }\n\n // Retrieve the value from the data object\n const value = data[key];\n\n // If the key does not exist or the value is null/undefined, return an empty string\n if (value === undefined || value === null) {\n return '';\n }\n\n // If the value is a function, evaluate it\n return isFunction(value) ? value() : value;\n });\n } catch (err) {\n return template; // Return the original template in case of an error\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport {\n getBucketingSeed,\n getCampaignIdsFromFeatureKey,\n getCampaignsByGroupId,\n getFeatureKeysFromCampaignIds,\n getVariationFromCampaignKey,\n setCampaignAllocation,\n} from './CampaignUtil';\nimport { isObject, isUndefined } from './DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from './DecisionUtil';\nimport { cloneObject, getFeatureFromKey, getSpecificRulesBasedOnType } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\n\n/**\n * Evaluates groups for a given feature and group ID.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param groupId - The ID of the group.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to the evaluation result.\n */\nexport const evaluateGroups = async (\n settings: SettingsModel,\n feature: FeatureModel,\n groupId: number,\n evaluatedFeatureMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const featureToSkip = [];\n const campaignMap: Map = new Map();\n // get all feature keys and all campaignIds from the groupId\n const { featureKeys, groupCampaignIds } = getFeatureKeysFromGroup(settings, groupId);\n for (const featureKey of featureKeys) {\n const feature = getFeatureFromKey(settings, featureKey);\n // check if the feature is already evaluated\n if (featureToSkip.includes(featureKey)) {\n continue;\n }\n // evaluate the feature rollout rules\n const isRolloutRulePassed = await _isRolloutRuleForFeaturePassed(\n settings,\n feature,\n evaluatedFeatureMap,\n featureToSkip,\n storageService,\n context,\n );\n if (isRolloutRulePassed) {\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRulesLinkedCampaign().forEach((rule) => {\n if (\n groupCampaignIds.includes(rule.getId().toString()) ||\n groupCampaignIds.includes(`${rule.getId()}_${rule.getVariations()[0].getId()}`.toString())\n ) {\n if (!campaignMap.has(featureKey)) {\n campaignMap.set(featureKey, []);\n }\n // check if the campaign is already present in the campaignMap for the feature\n if (campaignMap.get(featureKey).findIndex((item) => item.ruleKey === rule.getRuleKey()) === -1) {\n campaignMap.get(featureKey).push(rule);\n }\n }\n });\n }\n });\n }\n }\n const { eligibleCampaigns, eligibleCampaignsWithStorage } = await _getEligbleCampaigns(\n settings,\n campaignMap,\n context,\n storageService,\n );\n\n return await _findWinnerCampaignAmongEligibleCampaigns(\n settings,\n feature.getKey(),\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n groupId,\n context,\n storageService,\n );\n};\n\n/**\n * Retrieves feature keys associated with a group based on the group ID.\n *\n * @param settings - The settings model.\n * @param groupId - The ID of the group.\n * @returns An object containing feature keys and group campaign IDs.\n */\nexport function getFeatureKeysFromGroup(settings: SettingsModel, groupId: number) {\n const groupCampaignIds = getCampaignsByGroupId(settings, groupId);\n const featureKeys = getFeatureKeysFromCampaignIds(settings, groupCampaignIds);\n\n return { featureKeys, groupCampaignIds };\n}\n\n/*******************************\n * PRIVATE methods - MegUtil\n ******************************/\n\n/**\n * Evaluates the feature rollout rules for a given feature.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param featureToSkip - An array of features to skip during evaluation.\n * @param storageService - The storage service.\n * @param context - The context model.\n * @returns A promise that resolves to true if the feature passes the rollout rules, false otherwise.\n */\nconst _isRolloutRuleForFeaturePassed = async (\n settings: SettingsModel,\n feature: FeatureModel,\n evaluatedFeatureMap: Map,\n featureToSkip: any[],\n storageService: IStorageService,\n context: ContextModel,\n): Promise => {\n if (evaluatedFeatureMap.has(feature.getKey()) && 'rolloutId' in evaluatedFeatureMap.get(feature.getKey())) {\n return true;\n }\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT);\n if (rollOutRules.length > 0) {\n let ruleToTestForTraffic = null;\n for (const rule of rollOutRules) {\n const { preSegmentationResult } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n {},\n );\n if (preSegmentationResult) {\n ruleToTestForTraffic = rule;\n break;\n }\n continue;\n }\n if (ruleToTestForTraffic !== null) {\n const campaign = new CampaignModel().modelFromDictionary(ruleToTestForTraffic);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n if (isObject(variation) && Object.keys(variation).length > 0) {\n evaluatedFeatureMap.set(feature.getKey(), {\n rolloutId: ruleToTestForTraffic.id,\n rolloutKey: ruleToTestForTraffic.key,\n rolloutVariationId: ruleToTestForTraffic.variations[0].id,\n });\n return true;\n }\n }\n // no rollout rule passed\n featureToSkip.push(feature.getKey());\n return false;\n }\n // no rollout rule, evaluate experiments\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS, {\n featureKey: feature.getKey(),\n }),\n );\n return true;\n};\n\n/**\n * Retrieves eligible campaigns based on the provided campaign map and context.\n *\n * @param settings - The settings model.\n * @param campaignMap - A map containing feature keys and corresponding campaigns.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to an object containing eligible campaigns, campaigns with storage, and ineligible campaigns.\n */\nconst _getEligbleCampaigns = async (\n settings: SettingsModel,\n campaignMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const eligibleCampaigns = [];\n const eligibleCampaignsWithStorage = [];\n const inEligibleCampaigns = [];\n const campaignMapArray = Array.from<[string, CampaignModel[]]>(campaignMap);\n\n // Iterate over the campaign map to determine eligible campaigns\n for (const [featureKey, campaigns] of campaignMapArray) {\n for (const campaign of campaigns) {\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if campaign is stored in storage\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey && storedData.experimentKey === campaign.getKey()) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n\n if (eligibleCampaignsWithStorage.findIndex((item) => item.key === campaign.getKey()) === -1) {\n eligibleCampaignsWithStorage.push(campaign);\n }\n continue;\n }\n }\n }\n\n // Check if user is eligible for the campaign\n if (\n (await new CampaignDecisionService().getPreSegmentationDecision(\n new CampaignModel().modelFromDictionary(campaign),\n context,\n )) &&\n new CampaignDecisionService().isUserPartOfCampaign(context.getId(), campaign)\n ) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_ELIGIBLE, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n\n eligibleCampaigns.push(campaign);\n continue;\n }\n\n inEligibleCampaigns.push(campaign);\n }\n }\n\n return Promise.resolve({\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n inEligibleCampaigns,\n });\n};\n\n/**\n * Evaluates the eligible campaigns and determines the winner campaign based on the provided settings, feature key, eligible campaigns, eligible campaigns with storage, group ID, and context.\n *\n * @param settings - The settings model.\n * @param featureKey - The key of the feature.\n * @param eligibleCampaigns - An array of eligible campaigns.\n * @param eligibleCampaignsWithStorage - An array of eligible campaigns with storage.\n * @param groupId - The ID of the group.\n * @param context - The context model.\n * @returns A promise that resolves to the winner campaign.\n */\nconst _findWinnerCampaignAmongEligibleCampaigns = async (\n settings: SettingsModel,\n featureKey: string,\n eligibleCampaigns: any[],\n eligibleCampaignsWithStorage: any[],\n groupId: number,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n // getCampaignIds from featureKey\n let winnerCampaign = null;\n const campaignIds = getCampaignIdsFromFeatureKey(settings, featureKey);\n // get the winner from each group and store it in winnerFromEachGroup\n const megAlgoNumber = !isUndefined(settings?.getGroups()[groupId]?.et)\n ? settings.getGroups()[groupId].et\n : Constants.RANDOM_ALGO;\n\n // if eligibleCampaignsWithStorage has only one campaign, then that campaign is the winner\n if (eligibleCampaignsWithStorage.length === 1) {\n winnerCampaign = eligibleCampaignsWithStorage[0];\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaignsWithStorage[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaignsWithStorage[0].getKey()\n : eligibleCampaignsWithStorage[0].getName() + '_' + eligibleCampaignsWithStorage[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaignsWithStorage.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is random, then find the winner using random algo\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaignsWithStorage.length > 1) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is not random, then find the winner using advanced algo\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n\n if (eligibleCampaignsWithStorage.length === 0) {\n if (eligibleCampaigns.length === 1) {\n winnerCampaign = eligibleCampaigns[0];\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaigns[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaigns[0].getKey()\n : eligibleCampaigns[0].getName() + '_' + eligibleCampaigns[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaigns.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaigns.length > 1) {\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n }\n return winnerCampaign;\n};\n\n/**\n * Normalizes the weights of shortlisted campaigns and determines the winning campaign using random allocation.\n *\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _normalizeWeightsAndFindWinningCampaign = (\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n): any => {\n // Normalize the weights of all the shortlisted campaigns\n shortlistedCampaigns.forEach((campaign) => {\n campaign.weight = Math.round((100 / shortlistedCampaigns.length) * 10000) / 10000;\n });\n\n // make shortlistedCampaigns as array of VariationModel\n shortlistedCampaigns = shortlistedCampaigns.map((campaign) => new VariationModel().modelFromDictionary(campaign));\n // re-distribute the traffic for each camapign\n setCampaignAllocation(shortlistedCampaigns);\n const winnerCampaign = new CampaignDecisionService().getVariation(\n shortlistedCampaigns,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.getType() === CampaignTypeEnum.AB\n ? winnerCampaign.getKey()\n : winnerCampaign.getKey() + '_' + winnerCampaign.getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: 'using random algorithm',\n }),\n );\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.getId(),\n experimentKey: winnerCampaign.getKey(),\n experimentVariationId:\n winnerCampaign.getType() === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.getVariations()[0].getId() : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.getId())) {\n return winnerCampaign;\n }\n }\n return null;\n};\n\n/**\n * Advanced algorithm to find the winning campaign based on priority order and weighted random distribution.\n *\n * @param settings - The settings model.\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _getCampaignUsingAdvancedAlgo = (\n settings: SettingsModel,\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n) => {\n let winnerCampaign = null;\n let found = false; // flag to check whether winnerCampaign has been found or not and helps to break from the outer loop\n const priorityOrder = !isUndefined(settings.getGroups()[groupId].p) ? settings.getGroups()[groupId].p : {};\n const wt = !isUndefined(settings.getGroups()[groupId].wt) ? settings.getGroups()[groupId].wt : {};\n\n for (let i = 0; i < priorityOrder.length; i++) {\n for (let j = 0; j < shortlistedCampaigns.length; j++) {\n if (shortlistedCampaigns[j].id == priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n } else if (shortlistedCampaigns[j].id + '_' + shortlistedCampaigns[j].variations[0].id === priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n }\n }\n if (found === true) break;\n }\n\n // If winnerCampaign not found through Priority, then go for weighted Random distribution and for that,\n // Store the list of campaigns (participatingCampaigns) out of shortlistedCampaigns and their corresponding weights present in weightage distribution array (wt)\n if (winnerCampaign === null) {\n let participatingCampaignList = [];\n // iterate over shortlisted campaigns and add weights from the weight array\n for (let i = 0; i < shortlistedCampaigns.length; i++) {\n const campaignId = shortlistedCampaigns[i].id;\n if (!isUndefined(wt[campaignId])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId];\n participatingCampaignList.push(clonedCampaign);\n } else if (!isUndefined(wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id];\n participatingCampaignList.push(clonedCampaign);\n }\n }\n /* Finding winner campaign using weighted Distibution :\n 1. Re-distribute the traffic by assigning range values for each camapign in particaptingCampaignList\n 2. Calculate bucket value for the given userId and groupId\n 3. Get the winnerCampaign by checking the Start and End Bucket Allocations of each campaign\n */\n\n // make participatingCampaignList as array of VariationModel\n participatingCampaignList = participatingCampaignList.map((campaign) =>\n new VariationModel().modelFromDictionary(campaign),\n );\n setCampaignAllocation(participatingCampaignList);\n winnerCampaign = new CampaignDecisionService().getVariation(\n participatingCampaignList,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n }\n // WinnerCampaign should not be null, in case when winnerCampaign hasn't been found through PriorityOrder and\n // also shortlistedCampaigns and wt array does not have a single campaign id in common\n if (winnerCampaign) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.type === CampaignTypeEnum.AB\n ? winnerCampaign.key\n : winnerCampaign.key + '_' + winnerCampaign.ruleKey,\n groupId,\n userId: context.getId(),\n algo: 'using advanced algorithm',\n }),\n );\n } else {\n // TODO -- Log the error message\n // LogManager.Instance.info(\n // buildMessage(InfoLogMessagesEnum.MEG_NO_WINNER_CAMPAIGN, {\n // groupId,\n // userId: context.getId(),\n // }),\n // );\n LogManager.Instance.info(`No winner campaign found for MEG group: ${groupId}`);\n }\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.id,\n experimentKey: winnerCampaign.key,\n experimentVariationId:\n winnerCampaign.type === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.variations[0].id : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.id)) {\n return winnerCampaign;\n }\n }\n return null;\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getCurrentUnixTimestamp, getCurrentUnixTimestampInMillis, getRandomNumber } from './FunctionUtil';\nimport { getUUID } from './UuidUtil';\n\nimport { Constants } from '../constants';\nimport { HeadersEnum } from '../enums/HeadersEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { UrlEnum } from '../enums/UrlEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { dynamic } from '../types/Common';\nimport { isObject } from './DataTypeUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Constructs base properties for bulk operations.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The base properties including session ID and UUID.\n */\nexport function getBasePropertiesForBulk(accountId: string, userId: string): Record {\n const path: Record = {\n sId: getCurrentUnixTimestamp(), // Session ID based on current Unix timestamp\n u: getUUID(userId, accountId), // UUID generated based on user and account ID\n };\n return path;\n}\n\n/**\n * Constructs the settings path with API key and account ID.\n * @param {string} sdkKey - The API key.\n * @param {any} accountId - The account identifier.\n * @returns {Record} - The settings path including API key, random number, and account ID.\n */\nexport function getSettingsPath(sdkKey: string, accountId: string | number): Record {\n const path: Record = {\n i: `${sdkKey}`, // Inject API key\n r: Math.random(), // Random number for cache busting\n a: accountId, // Account ID\n };\n return path;\n}\n\n/**\n * Constructs the tracking path for an event.\n * @param {string} event - The event type.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The tracking path for the event.\n */\nexport function getTrackEventPath(event: string, accountId: string, userId: string): Record {\n const path: Record = {\n event_type: event, // Type of the event\n account_id: accountId, // Account ID\n uId: userId, // User ID\n u: getUUID(userId, accountId), // UUID generated for the user\n sdk: Constants.SDK_NAME, // SDK name constant\n 'sdk-v': Constants.SDK_VERSION, // SDK version\n random: getRandomNumber(), // Random number for uniqueness\n ap: Constants.PLATFORM, // Application platform\n sId: getCurrentUnixTimestamp(), // Session ID\n ed: JSON.stringify({ p: 'server' }), // Additional encoded data\n };\n\n return path;\n}\n\n/**\n * Constructs query parameters for event batching.\n * @param {string} accountId - The account identifier.\n * @returns {Record} - The query parameters for event batching.\n */\nexport function getEventBatchingQueryParams(accountId: string): Record {\n const path: Record = {\n a: accountId, // Account ID\n sd: Constants.SDK_NAME, // SDK name\n sv: Constants.SDK_VERSION, // SDK version\n };\n\n return path;\n}\n\n/**\n * Builds generic properties for different tracking calls required by VWO servers.\n * @param {Object} configObj\n * @param {String} eventName\n * @returns properties\n */\nexport function getEventsBaseProperties(\n setting: SettingsModel,\n eventName: string,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const sdkKey = setting.getSdkkey();\n\n const properties = Object.assign({\n en: eventName,\n a: setting.getAccountId(),\n env: sdkKey,\n eTime: getCurrentUnixTimestampInMillis(),\n random: getRandomNumber(),\n p: 'FS',\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n });\n\n properties.url = Constants.HTTPS_PROTOCOL + UrlUtil.getBaseUrl() + UrlEnum.EVENTS;\n return properties;\n}\n\n/**\n * Builds generic payload required by all the different tracking calls.\n * @param {Object} settings settings file\n * @param {String} userId user id\n * @param {String} eventName event name\n * @returns properties\n */\nexport function _getEventBasePayload(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n visitorUserAgent = '',\n ipAddress = '',\n): Record {\n const uuid = getUUID(userId.toString(), settings.getAccountId());\n const sdkKey = settings.getSdkkey();\n\n const props: {\n vwo_sdkName: string;\n vwo_sdkVersion: string;\n vwo_envKey: string;\n id?: string | number;\n variation?: string | number;\n isFirst?: number;\n isCustomEvent?: boolean;\n } = {\n vwo_sdkName: Constants.SDK_NAME,\n vwo_sdkVersion: Constants.SDK_VERSION,\n vwo_envKey: sdkKey,\n };\n\n const properties = {\n d: {\n msgId: `${uuid}-${getCurrentUnixTimestampInMillis()}`,\n visId: uuid,\n sessionId: getCurrentUnixTimestamp(),\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n event: {\n props: props,\n name: eventName,\n time: getCurrentUnixTimestampInMillis(),\n },\n visitor: {\n props: {\n vwo_fs_environment: sdkKey,\n },\n },\n },\n };\n\n return properties;\n}\n\n/**\n * Builds payload to track the visitor.\n * @param {Object} configObj\n * @param {String} userId\n * @param {String} eventName\n * @param {String} campaignId\n * @param {Number} variationId\n * @returns track-user payload\n */\nexport function getTrackUserPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n campaignId: number,\n variationId: number,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.id = campaignId;\n properties.d.event.props.variation = variationId;\n properties.d.event.props.isFirst = 1;\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n accountId: settings.getAccountId(),\n userId,\n campaignId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for tracking goals with custom event properties.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} eventProperties - Custom properties for the event.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getTrackGoalPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n eventProperties: Record,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props.variation = 1; // Temporary value for variation\n properties.d.event.props.id = 1; // Temporary value for ID\n\n // Add custom event properties if provided\n if (eventProperties && isObject(eventProperties) && Object.keys(eventProperties).length > 0) {\n for (const prop in eventProperties) {\n properties.d.event.props[prop] = eventProperties[prop];\n }\n }\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for syncing visitor attributes.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} attributeKey - Key of the attribute to sync.\n * @param {any} attributeValue - Value of the attribute.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getAttributePayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n attributeKey: string,\n attributeValue: dynamic,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props[Constants.VWO_FS_ENVIRONMENT] = settings.getSdkkey(); // Set environment key\n properties.d.visitor.props[attributeKey] = attributeValue; // Set attribute value\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Sends a POST API request with the specified properties and payload.\n * @param {any} properties - Properties for the request.\n * @param {any} payload - Payload for the request.\n */\nexport async function sendPostApiRequest(properties: any, payload: any): Promise {\n NetworkManager.Instance.attachClient();\n\n const headers: Record = {};\n\n const userAgent = payload.d.visitor_ua; // Extract user agent from payload\n const ipAddress = payload.d.visitor_ip; // Extract IP address from payload\n\n // Set headers if available\n if (userAgent) headers[HeadersEnum.USER_AGENT] = userAgent;\n if (ipAddress) headers[HeadersEnum.IP] = ipAddress;\n\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.POST,\n UrlEnum.EVENTS,\n properties,\n payload,\n headers,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n await NetworkManager.Instance.post(request).catch((err: ResponseModel) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n });\n}\n\n/**\n * Sends a GET API request to the specified endpoint with the given properties.\n * @param {any} properties - Properties for the request.\n * @param {any} endpoint - Endpoint for the GET request.\n * @returns {Promise} - The response from the GET request.\n */\nexport async function sendGetApiRequest(properties: any, endpoint: any): Promise {\n NetworkManager.Instance.attachClient();\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n properties,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n try {\n const response: ResponseModel = await NetworkManager.Instance.get(request);\n return response; // Return the response model\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.GET,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n return null;\n }\n}\n\n// Flag to determine if the SDK should wait for a network response.\nlet shouldWaitForTrackingCalls = false;\n\n/**\n * Checks if the SDK should wait for a network response.\n * @returns {boolean} - True if the SDK should wait for a network response, false otherwise.\n */\nexport function getShouldWaitForTrackingCalls(): boolean {\n return shouldWaitForTrackingCalls;\n}\n\n/**\n * Sets the value to determine if the SDK should wait for a network response.\n * @param value - The value to set.\n */\nexport function setShouldWaitForTrackingCalls(value: boolean): void {\n shouldWaitForTrackingCalls = value;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\n/**\n * Creates a Deferred object with properties for promise, resolve, and reject.\n * This allows manual control over the resolution and rejection of a promise.\n * @returns {Deferred} The Deferred object with promise, resolve, and reject methods.\n */\nexport function Deferred(): void {\n // Create a new Promise and attach resolve and reject methods to the Deferred object\n this.promise = new Promise((resolve: dynamic, reject: dynamic) => {\n this.resolve = resolve; // Method to resolve the promise\n this.reject = reject; // Method to reject the promise\n });\n\n return this; // Return the Deferred object with attached methods\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from './DataTypeUtil';\nimport { checkWhitelistingAndPreSeg } from './DecisionUtil';\nimport { getShouldWaitForTrackingCalls } from './NetworkUtil';\nimport { createAndSendImpressionForVariationShown } from './ImpressionUtil';\n\n/**\n * Evaluates the rules for a given campaign and feature based on the provided context.\n * This function checks for whitelisting and pre-segmentation conditions, and if applicable,\n * sends an impression for the variation shown.\n *\n * @param {SettingsModel} settings - The settings configuration for the evaluation.\n * @param {FeatureModel} feature - The feature being evaluated.\n * @param {CampaignModel} campaign - The campaign associated with the feature.\n * @param {ContextModel} context - The user context for evaluation.\n * @param {Map} evaluatedFeatureMap - A map of evaluated features.\n * @param {Map} megGroupWinnerCampaigns - A map of MEG group winner campaigns.\n * @param {StorageService} storageService - The storage service for persistence.\n * @param {any} decision - The decision object that will be updated based on the evaluation.\n * @returns {Promise<[boolean, any]>} A promise that resolves to a tuple containing the result of the pre-segmentation\n * and the whitelisted object, if any.\n */\nexport const evaluateRule = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise> => {\n // Perform whitelisting and pre-segmentation checks\n const [preSegmentationResult, whitelistedObject] = await checkWhitelistingAndPreSeg(\n settings,\n feature,\n campaign,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n // If pre-segmentation is successful and a whitelisted object exists, proceed to send an impression\n if (preSegmentationResult && isObject(whitelistedObject) && Object.keys(whitelistedObject).length > 0) {\n // Update the decision object with campaign and variation details\n Object.assign(decision, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n\n // Send an impression for the variation shown\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n campaign.getId(),\n whitelistedObject.variation.id,\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), whitelistedObject.variation.id, context);\n }\n }\n\n // Return the results of the evaluation\n return { preSegmentationResult, whitelistedObject, updatedDecision: decision };\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { setVariationAllocation } from './CampaignUtil';\nimport { addLinkedCampaignsToSettings } from './FunctionUtil';\nimport { addIsGatewayServiceRequiredFlag } from './GatewayServiceUtil';\n\nexport function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) {\n vwoClientInstance.settings = new SettingsModel(settings);\n vwoClientInstance.originalSettings = settings;\n // Optimize loop by avoiding multiple calls to `getCampaigns()`\n const campaigns = vwoClientInstance.settings.getCampaigns();\n campaigns.forEach((campaign, index) => {\n setVariationAllocation(campaign);\n campaigns[index] = campaign;\n });\n addLinkedCampaignsToSettings(vwoClientInstance.settings);\n addIsGatewayServiceRequiredFlag(vwoClientInstance.settings);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsService } from '../services/SettingsService';\nimport { isString } from './DataTypeUtil';\n\ninterface IUrlUtil {\n collectionPrefix?: string;\n init({ collectionPrefix }?: { collectionPrefix?: string }): IUrlUtil;\n getBaseUrl(): string;\n}\n\nexport const UrlUtil: IUrlUtil = {\n /**\n * Initializes the UrlUtil with optional collectionPrefix and gatewayServiceUrl.\n * If provided, these values are set after validation.\n * @param {string} [collectionPrefix] - Optional prefix for URL collections.\n * @returns {IUrlUtil} The instance of UrlUtil with updated properties.\n */\n init: ({ collectionPrefix }: { collectionPrefix?: string } = {}) => {\n // Set collectionPrefix if it is a valid string\n if (collectionPrefix && isString(collectionPrefix)) {\n UrlUtil.collectionPrefix = collectionPrefix;\n }\n\n return UrlUtil;\n },\n\n /**\n * Retrieves the base URL.\n * If gatewayServiceUrl is set, it returns that; otherwise, it constructs the URL using baseUrl and collectionPrefix.\n * @returns {string} The base URL.\n */\n getBaseUrl: () => {\n const baseUrl: string = SettingsService.Instance.hostname;\n\n if (SettingsService.Instance.isGatewayServiceProvided) {\n return baseUrl;\n }\n\n // Construct URL with collectionPrefix if it exists\n if (UrlUtil.collectionPrefix) {\n return `${baseUrl}/${UrlUtil.collectionPrefix}`;\n }\n\n // Return the default baseUrl if no specific URL components are set\n return baseUrl;\n },\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SEED_URL } from '../constants/Url';\nimport { v4 as uuidv4 } from 'uuid';\nimport { v5 as uuidv5 } from 'uuid';\n\n/**\n * Generates a random UUID based on an API key.\n * @param sdkKey The API key used to generate a namespace for the UUID.\n * @returns A random UUID string.\n */\nexport function getRandomUUID(sdkKey: string): string {\n // Generate a namespace based on the API key using DNS namespace\n const namespace = uuidv5(sdkKey, uuidv5.DNS);\n // Generate a random UUID using the namespace derived from the API key\n const randomUUID = uuidv5(uuidv4(), namespace);\n\n return randomUUID;\n}\n\n/**\n * Generates a UUID for a user based on their userId and accountId.\n * @param userId The user's ID.\n * @param accountId The account ID associated with the user.\n * @returns A UUID string formatted without dashes and in uppercase.\n */\nexport function getUUID(userId: string, accountId: string): string {\n const VWO_NAMESPACE = uuidv5(SEED_URL, uuidv5.URL);\n // Convert userId and accountId to string to ensure proper type\n userId = String(userId);\n accountId = String(accountId);\n // Generate a namespace UUID based on the accountId\n const userIdNamespace = generateUUID(accountId, VWO_NAMESPACE);\n // Generate a UUID based on the userId and the previously generated namespace\n const uuidForUserIdAccountId = generateUUID(userId, userIdNamespace);\n\n // Remove all dashes from the UUID and convert it to uppercase\n const desiredUuid = uuidForUserIdAccountId?.replace(/-/gi, '').toUpperCase();\n\n return desiredUuid;\n}\n\n/**\n * Helper function to generate a UUID v5 based on a name and a namespace.\n * @param name The name from which to generate the UUID.\n * @param namespace The namespace used to generate the UUID.\n * @returns A UUID string or undefined if inputs are invalid.\n */\nexport function generateUUID(name: string, namespace: string) {\n // Check for valid input to prevent errors\n if (!name || !namespace) {\n return;\n }\n\n // Generate and return the UUID v5\n return uuidv5(name, namespace);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\n\nconst noop = () => {};\n\nexport function sendGetCall(options) {\n sendRequest(HttpMethodEnum.GET, options);\n}\n\nexport function sendPostCall(options) {\n sendRequest(HttpMethodEnum.POST, options);\n}\n\nfunction sendRequest(method, options) {\n const { networkOptions, successCallback = noop, errorCallback = noop } = options;\n\n let url = `${networkOptions.scheme}://${networkOptions.hostname}${networkOptions.path}`;\n if (networkOptions.port) {\n url = `${networkOptions.scheme}://${networkOptions.hostname}:${networkOptions.port}${networkOptions.path}`;\n }\n const body = networkOptions.body;\n const customHeaders = networkOptions.headers || {};\n const timeout = networkOptions.timeout;\n\n const xhr = new XMLHttpRequest();\n\n if (timeout) {\n xhr.timeout = timeout;\n }\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n const response = xhr.responseText;\n\n if (method === HttpMethodEnum.GET) {\n const parsedResponse = JSON.parse(response);\n successCallback(parsedResponse);\n } else {\n successCallback(response);\n }\n } else {\n errorCallback(xhr.statusText);\n }\n };\n\n // Set up a callback function that is called if the request fails\n xhr.onerror = function () {\n // An error occurred during the transaction\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `${xhr.statusText}, status: ${xhr.status}`,\n }),\n );\n errorCallback(xhr.statusText);\n };\n\n // Set up a callback function that is called if the request times out\n if (timeout) {\n xhr.ontimeout = function () {\n // The request timed out\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `Request timed out`,\n }),\n );\n };\n }\n\n xhr.open(method, url, true);\n\n for (const headerName in customHeaders) {\n if (headerName in customHeaders) {\n // Skip the Content-Type header\n // Request header field content-type is not allowed by Access-Control-Allow-Headers\n if (headerName !== 'Content-Type' && headerName !== 'Content-Length') {\n xhr.setRequestHeader(headerName, customHeaders[headerName]);\n }\n }\n }\n\n if (method === HttpMethodEnum.POST) {\n xhr.send(JSON.stringify(body));\n } else if (method === HttpMethodEnum.GET) {\n xhr.send();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function get() {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function get() {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function get() {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function get() {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function get() {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function get() {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function get() {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function get() {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function get() {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar _default = {\n randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\n\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = {\n debugMessages: require('./src/debug-messages.json'),\n infoMessages: require('./src/info-messages.json'),\n warnMessages: require('./src/warn-messages.json'),\n errorMessages: require('./src/error-messages.json'),\n traceMessages: require('./src/trace-messages.json')\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexports.Struct = Struct;\nexports.StructError = StructError;\nexports.any = any;\nexports.array = array;\nexports.assert = assert;\nexports.assign = assign;\nexports.boolean = boolean;\nexports.coerce = coerce;\nexports.create = create;\nexports.date = date;\nexports.defaulted = defaulted;\nexports.define = define;\nexports.deprecated = deprecated;\nexports.dynamic = dynamic;\nexports.empty = empty;\nexports.enums = enums;\nexports.func = func;\nexports.instance = instance;\nexports.integer = integer;\nexports.intersection = intersection;\nexports.is = is;\nexports.lazy = lazy;\nexports.literal = literal;\nexports.map = map;\nexports.mask = mask;\nexports.max = max;\nexports.min = min;\nexports.never = never;\nexports.nullable = nullable;\nexports.number = number;\nexports.object = object;\nexports.omit = omit;\nexports.optional = optional;\nexports.partial = partial;\nexports.pattern = pattern;\nexports.pick = pick;\nexports.record = record;\nexports.refine = refine;\nexports.regexp = regexp;\nexports.set = set;\nexports.size = size;\nexports.string = string;\nexports.struct = struct;\nexports.trimmed = trimmed;\nexports.tuple = tuple;\nexports.type = type;\nexports.union = union;\nexports.unknown = unknown;\nexports.validate = validate;\n//# sourceMappingURL=index.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LogLevelEnum } from './packages/logger/enums/LogLevelEnum';\nimport { Connector } from './packages/storage/Connector';\n\nexport { LogLevelEnum, Connector as StorageConnector };\nexport { init, onInit } from './VWO';\n"],"names":["root","factory","exports","module","define","amd","this","createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","options","VWO","setInstance","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","getSettings","then","settings","build","_global","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","platform","PlatformEnum","CLIENT","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","resolve","err","API_THROW_ERROR","apiName","info","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","networkInstance","NetworkManager","Instance","attachClient","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","UrlUtil","init","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","get","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","experimentVariationId","experimentKey","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","Object","assign","undefined","setContextualData","FEATURE_NOT_FOUND","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","rolloutRulesToEvaluate","rule","evaluateRule","preSegmentationResult","updatedDecision","push","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","execute","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","variablesForEvaluatedFlag","variables","value","createImpressionForAttribute","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","BASE_URL","packageFile","name","version","Constants","SDK_NAME","SDK_VERSION","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","forEach","VariationModel","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","FeatureModel","identifier","t","getIdentifier","getVariationId","getStatus","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","f","c","cG","g","sK","a","v","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","SettingsModel","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","generateBucketValue","hashValue","maxValue","multiplier","multipliedValue","Math","pow","floor","getBucketValueForUser","hashKey","Hasher","calculateBucketValue","generateHashValue","DecisionMaker","AnsiColorEnum","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","LogLevelColorInfoEnum","upperCaseLevel","toUpperCase","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","LogMessageBuilder","Logger","config","requestId","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","LogLevelNumberEnum","shouldLog","transportLevel","configLevel","formattedMessage","isFunction","consoleLog","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","NetworkBrowserClient","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","getBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","prototype","hasOwnProperty","call","setQuery","RequestHandler","NetworkClient","GlobalRequestModel","RequestModel","setConfig","response","errorResponse","post","url","query","body","headers","timeout","setBaseUrl","getDevelopmentMode","method","path","scheme","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","split","hostname","agent","postBody","Buffer","byteLength","charAt","substring","setStatusCode","statusCode","getData","getStatusCode","getError","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","getKeyValue","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","Array","isArray","FEATURE_ID","featureIdObject","featureIdValue","parseInt","checkInUserStorage","result","checkUserAgentParser","locationMap","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","valuesMatch","checkValuePresent","expectedMap","actualMap","index","toLowerCase","actualValue","startsWith","endsWith","wildcardPattern","slice","RegExp","replace","test","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","res","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","regex","processedOperandValue","parseFloat","processedTagValue","indexOf","obj","Connector","connector","getConnector","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","bucketValue","checkInRange","bucketUserToVariation","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","CampaignDecisionService","callback","integrations","isCallBackFunction","HooksService","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","assignRangeValues","currentAllocation","stepFactor","_getVariationBucketRange","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupId","groupName","assignRangeValuesMEG","variationWeight","ceil","min","VARIATION_RANGE_ALLOCATION","_handleRolloutCampaign","totalWeight","reduce","acc","ruleArray","group","findIndex","grp","campaignIdWithVariation","featureKeys","map","Number","campaignIds","isNaN","isDate","isRegex","isPromise","checkWhitelistingAndPreSeg","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","Promise","evaluationResult","all","scaleVariationWeights","getBucketingSeed","variationName","parse","random","filter","rulesLinkedCampaignModel","linkedCampaign","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","pattern","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","getFeatureKeysFromGroup","groupCampaignIds","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","featureToSkip","_isRolloutRuleForFeaturePassed","has","item","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","MEG_CAMPAIGN_ELIGIBLE","getCampaignIdsFromFeatureKey","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","setCampaignAllocation","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","_getEventBasePayload","visitorUserAgent","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","getCurrentUnixTimestampInMillis","visId","sessionId","getCurrentUnixTimestamp","visitor_ua","visitor_ip","event","time","visitor","vwo_fs_environment","sId","u","r","event_type","account_id","uId","sdk","getRandomNumber","ap","ed","sd","sv","setting","en","env","eTime","EVENTS","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","vwoClientInstance","setVariationAllocation","addLinkedCampaignsToSettings","addIsGatewayServiceRequiredFlag","baseUrl","generateUUID","namespace","DNS","VWO_NAMESPACE","userIdNamespace","uuidForUserIdAccountId","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","headerName","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","setRequestHeader","send","defineProperty","enumerable","_nil","default","_parse","_stringify","_v","_v2","_v3","_v4","_validate","_version","_interopRequireDefault","__esModule","getOutputLength","inputLength8","safeAdd","x","y","lsw","md5cmn","q","b","num","cnt","md5ff","md5gg","md5hh","md5ii","unescape","Uint8Array","charCodeAt","input","output","length32","hexTab","hex","md5ToHexEncodedArray","len","olda","oldb","oldc","oldd","wordsToMd5","length8","Uint32Array","bytesToWords","_default","randomUUID","crypto","bind","arr","getRandomValues","rnds8","z","ROTL","K","H","N","M","W","e","T","unsafeStringify","byteToHex","offset","_rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","buf","node","clockseq","seedBytes","rng","msecs","now","nsecs","dt","tl","tmh","_md","hashfunc","_namespace","stringToBytes","_native","rnds","_sha","_regex","warnMessages","traceMessages","StructError","failure","failures","cached","rest","super","join","_cached","isPlainObject","getPrototypeOf","print","toFailure","struct","branch","refinement","toFailures","Symbol","iterator","run","coerce","mask","ctx","coercer","schema","valid","validator","ts","Set","add","refiner","Struct","assert","create","is","tuples","tuple","done","next","shiftIterator","never","knowns","Never","unknowns","delete","unknown","condition","refine","any","Element","Structs","schemas","getTime","defaulted","fallback","strict","ret","changed","deprecated","dynamic","fn","empty","expected","size","enums","values","description","func","Class","integer","isInteger","intersection","S","lazy","literal","constant","Key","Value","max","threshold","exclusive","nullable","omit","subschema","partial","regexp","source","pick","record","of","trimmed","Elements","first","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","onInit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"vwo-fme-javascript-sdk.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAE1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IAEQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GAEe,iBAAZC,QACdA,QAAgB,OAAID,IAGpBD,EAAa,OAAIC,GAClB,CAbD,CAaGK,MAAM,I,uBCbR,WACC,MAEMC,EAAgBC,IAAQ,IAAIC,aAAcC,OAAOF,GAiEvD,SAASG,EAAa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C,EAAeH,EAAyBE,GAC5C,QAAqBr3B,IAAjBs3B,EACH,OAAOA,EAAa/kC,QAGrB,IAAIC,EAAS2kC,EAAyBE,GAAY,CAGjD9kC,QAAS,CAAC,GAOX,OAHAglC,EAAoBF,GAAUjkB,KAAK5gB,EAAOD,QAASC,EAAQA,EAAOD,QAAS6kC,GAGpE5kC,EAAOD,OACf,C,oJCNA,cAGS,4EAHA,EAAAid,YAAY,IACrB,cAEoC,gFAF3B,EAAAkO,SAAS,IAGlB,cAAS,sEAAA7iB,IAAI,IAAE,wEAAA28B,MAAM,G","sources":["webpack://vwoSdk/webpack/universalModuleDefinition","webpack://vwoSdk/./node_modules/murmurhash/murmurhash.js","webpack://vwoSdk/./lib/VWO.ts","webpack://vwoSdk/./lib/VWOBuilder.ts","webpack://vwoSdk/./lib/VWOClient.ts","webpack://vwoSdk/./lib/api/GetFlag.ts","webpack://vwoSdk/./lib/api/SetAttribute.ts","webpack://vwoSdk/./lib/api/TrackEvent.ts","webpack://vwoSdk/./lib/constants/Url.ts","webpack://vwoSdk/./lib/constants/index.ts","webpack://vwoSdk/./lib/decorators/StorageDecorator.ts","webpack://vwoSdk/./lib/enums/ApiEnum.ts","webpack://vwoSdk/./lib/enums/CampaignTypeEnum.ts","webpack://vwoSdk/./lib/enums/EventEnum.ts","webpack://vwoSdk/./lib/enums/HeadersEnum.ts","webpack://vwoSdk/./lib/enums/HttpMethodEnum.ts","webpack://vwoSdk/./lib/enums/PlatformEnum.ts","webpack://vwoSdk/./lib/enums/StatusEnum.ts","webpack://vwoSdk/./lib/enums/StorageEnum.ts","webpack://vwoSdk/./lib/enums/UrlEnum.ts","webpack://vwoSdk/./lib/enums/log-messages/index.ts","webpack://vwoSdk/./lib/models/campaign/CampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/FeatureModel.ts","webpack://vwoSdk/./lib/models/campaign/ImpactCampaignModel.ts","webpack://vwoSdk/./lib/models/campaign/MetricModel.ts","webpack://vwoSdk/./lib/models/campaign/RuleModel.ts","webpack://vwoSdk/./lib/models/campaign/VariableModel.ts","webpack://vwoSdk/./lib/models/campaign/VariationModel.ts","webpack://vwoSdk/./lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwoSdk/./lib/models/settings/SettingsModel.ts","webpack://vwoSdk/./lib/models/user/ContextModel.ts","webpack://vwoSdk/./lib/models/user/ContextVWOModel.ts","webpack://vwoSdk/./lib/packages/decision-maker/index.ts","webpack://vwoSdk/./lib/packages/logger/LogMessageBuilder.ts","webpack://vwoSdk/./lib/packages/logger/Logger.ts","webpack://vwoSdk/./lib/packages/logger/core/LogManager.ts","webpack://vwoSdk/./lib/packages/logger/core/TransportManager.ts","webpack://vwoSdk/./lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwoSdk/./lib/packages/logger/index.ts","webpack://vwoSdk/./lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwoSdk/./lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwoSdk/./lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwoSdk/./lib/packages/network-layer/index.ts","webpack://vwoSdk/./lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwoSdk/./lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/RequestModel.ts","webpack://vwoSdk/./lib/packages/network-layer/models/ResponseModel.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/index.ts","webpack://vwoSdk/./lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwoSdk/./lib/packages/storage/Connector.ts","webpack://vwoSdk/./lib/packages/storage/Storage.ts","webpack://vwoSdk/./lib/packages/storage/index.ts","webpack://vwoSdk/./lib/services/CampaignDecisionService.ts","webpack://vwoSdk/./lib/services/HooksService.ts","webpack://vwoSdk/./lib/services/SettingsService.ts","webpack://vwoSdk/./lib/services/StorageService.ts","webpack://vwoSdk/./lib/utils/CampaignUtil.ts","webpack://vwoSdk/./lib/utils/DataTypeUtil.ts","webpack://vwoSdk/./lib/utils/DecisionUtil.ts","webpack://vwoSdk/./lib/utils/FunctionUtil.ts","webpack://vwoSdk/./lib/utils/GatewayServiceUtil.ts","webpack://vwoSdk/./lib/utils/ImpressionUtil.ts","webpack://vwoSdk/./lib/utils/LogMessageUtil.ts","webpack://vwoSdk/./lib/utils/MegUtil.ts","webpack://vwoSdk/./lib/utils/NetworkUtil.ts","webpack://vwoSdk/./lib/utils/PromiseUtil.ts","webpack://vwoSdk/./lib/utils/RuleEvaluationUtil.ts","webpack://vwoSdk/./lib/utils/SettingsUtil.ts","webpack://vwoSdk/./lib/utils/UrlUtil.ts","webpack://vwoSdk/./lib/utils/UuidUtil.ts","webpack://vwoSdk/./lib/utils/XMLUtil.ts","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/index.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/md5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/native.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/nil.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/parse.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/regex.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/rng.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v1.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v3.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v35.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v4.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/v5.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/validate.js","webpack://vwoSdk/./node_modules/uuid/dist/commonjs-browser/version.js","webpack://vwoSdk/./node_modules/vwo-fme-sdk-log-messages/index.js","webpack://vwoSdk/./node_modules/superstruct/lib/index.cjs","webpack://vwoSdk/webpack/bootstrap","webpack://vwoSdk/./lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\t// CommonJS2\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\t// AMD\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\t// CommonJS\n\telse if(typeof exports === 'object')\n\t\texports[\"vwoSdk\"] = factory();\n\t// Root\n\telse\n\t\troot[\"vwoSdk\"] = factory();\n})(this, () => {\nreturn ","(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VWOBuilder } from './VWOBuilder';\nimport { IVWOClient } from './VWOClient';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { dynamic } from './types/Common';\nimport { isObject, isString } from './utils/DataTypeUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { InfoLogMessagesEnum, ErrorLogMessagesEnum } from './enums/log-messages';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { PlatformEnum } from './enums/PlatformEnum';\n\nexport class VWO {\n private static vwoBuilder: VWOBuilder;\n private static instance: dynamic;\n\n /**\n * Constructor for the VWO class.\n * Initializes a new instance of VWO with the provided options.\n * @param {Record} options - Configuration options for the VWO instance.\n * @returns The instance of VWO.\n */\n constructor(options: IVWOOptions) {\n return VWO.setInstance(options);\n }\n\n /**\n * Sets the singleton instance of VWO.\n * Configures and builds the VWO instance using the provided options.\n * @param {Record} options - Configuration options for setting up VWO.\n * @returns A Promise resolving to the configured VWO instance.\n */\n private static setInstance(options: IVWOOptions): Promise {\n const optionsVWOBuilder: any = options?.vwoBuilder;\n this.vwoBuilder = optionsVWOBuilder || new VWOBuilder(options);\n\n this.instance = this.vwoBuilder\n .setLogger() // Sets up logging for debugging and monitoring.\n .setSettingsService() // Sets the settings service for configuration management.\n .setStorage() // Configures storage for data persistence.\n .setNetworkManager() // Configures network management for API communication.\n .setSegmentation() // Sets up segmentation for targeted functionality.\n // .initBatching() // Initializes batching for bulk data processing.\n .initPolling(); // Starts polling mechanism for regular updates.\n // .setAnalyticsCallback() // Sets up analytics callback for data analysis.\n\n if (options?.settings) {\n return Promise.resolve(this.vwoBuilder.build(options.settings));\n }\n\n return this.vwoBuilder.getSettings().then((settings: Record) => {\n return this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings.\n });\n }\n\n /**\n * Gets the singleton instance of VWO.\n * @returns The singleton instance of VWO.\n */\n static get Instance(): dynamic {\n return this.instance;\n }\n}\n\nlet _global: Record = {};\n/**\n * Initializes a new instance of VWO with the provided options.\n * @param options Configuration options for the VWO instance.\n * @property {string} sdkKey - The SDK key for the VWO account.\n * @property {string} accountId - The account ID for the VWO account.\n * @property {GatewayServiceModel} gatewayService - The gateway service configuration.\n * @property {StorageService} storage - The storage configuration.\n * @returns\n */\n\nexport async function init(options: IVWOOptions): Promise {\n const apiName = 'init';\n const date = new Date().toISOString();\n\n try {\n if (!isObject(options)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ERROR, {\n date,\n });\n console.error(msg); // Ensures options is an object.\n }\n\n if (!options?.sdkKey || !isString(options?.sdkKey)) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_SDK_KEY_ERROR, {\n date,\n });\n console.error(msg); // Validates sdkKey presence and type.\n }\n\n if (!options.accountId) {\n const msg = buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_ACCOUNT_ID_ERROR, {\n date,\n });\n console.error(msg); // Validates accountId presence and type.\n }\n\n if (typeof process.env === 'undefined') {\n options.platform = PlatformEnum.CLIENT;\n } else {\n options.platform = PlatformEnum.SERVER;\n }\n\n const instance: any = new VWO(options); // Creates a new VWO instance with the validated options.\n\n _global = {\n vwoInitDeferred: new Deferred(),\n isSettingsFetched: false,\n instance: null,\n };\n\n return instance.then((_vwoInstance) => {\n _global.isSettingsFetched = true;\n _global.instance = _vwoInstance;\n _global.vwoInitDeferred.resolve(_vwoInstance);\n\n return _vwoInstance;\n });\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n\nexport async function onInit() {\n const apiName = 'onInit';\n\n try {\n _global.vwoInitDeferred = new Deferred();\n const date = new Date().toISOString();\n\n // If settings are already fetched, resolve the promise\n if (_global.isSettingsFetched) {\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_ALREADY_RESOLVED, {\n date,\n apiName,\n });\n\n console.info(msg);\n _global.vwoInitDeferred.resolve(_global.instance);\n } else {\n // wait for five seconds, else reject the promise\n setTimeout(() => {\n if (_global.isSettingsFetched) {\n return;\n }\n\n const msg = buildMessage(InfoLogMessagesEnum.ON_INIT_SETTINGS_FAILED, {\n date,\n });\n\n console.error(msg);\n _global.vwoInitDeferred.reject(new Error('VWO settings could not be fetched'));\n }, 5000);\n }\n\n return _global.vwoInitDeferred.promise;\n } catch (err) {\n const msg = buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n });\n\n console.info(`[INFO]: VWO-SDK ${new Date().toISOString()} ${msg}`);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from './types/Common';\n\nimport { ILogManager, LogManager } from './packages/logger';\nimport { NetworkManager } from './packages/network-layer';\nimport { SegmentationManager } from './packages/segmentation-evaluator';\n\nimport { Storage } from './packages/storage';\n\nimport { IVWOClient, VWOClient } from './VWOClient';\nimport { SettingsModel } from './models/settings/SettingsModel';\nimport { SettingsService } from './services/SettingsService';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { isNumber } from './utils/DataTypeUtil';\nimport { cloneObject } from './utils/FunctionUtil';\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { getRandomUUID } from './utils/UuidUtil';\n\nexport interface IVWOBuilder {\n settings: Record; // Holds the configuration settings for the VWO client\n storage: Storage; // Interface for storage management\n logManager: ILogManager; // Manages logging across the VWO SDK\n isSettingsFetchInProgress: boolean; // Flag to check if settings fetch is in progress\n vwoInstance: IVWOClient;\n\n build(settings: Record): IVWOClient; // Builds and returns a new VWOClient instance\n\n fetchSettings(): Promise>; // Asynchronously fetches settings from the server\n setSettingsService(): this; // Sets up the settings manager with provided options\n getSettings(force: boolean): Promise>; // Fetches settings, optionally forcing a refresh\n setStorage(): this; // Sets up the storage connector based on provided options\n setNetworkManager(): this; // Configures the network manager with client and mode\n // initBatching(): this; // Initializes event batching with provided configuration\n // setAnalyticsCallback(): this; // Configures the analytics callback based on provided options\n initPolling(): this; // Sets up polling for settings at a specified interval\n setLogger(): this; // Sets up the logger with specified options\n setSegmentation(): this; // Configures the segmentation evaluator with provided options\n}\n\nexport class VWOBuilder implements IVWOBuilder {\n readonly sdkKey: string;\n readonly options: IVWOOptions;\n\n private settingFileManager: SettingsService;\n\n settings: Record;\n storage: Storage;\n logManager: ILogManager;\n originalSettings: dynamic;\n isSettingsFetchInProgress: boolean;\n vwoInstance: IVWOClient;\n\n constructor(options: IVWOOptions) {\n this.options = options;\n }\n\n /**\n * Sets the network manager with the provided client and development mode options.\n * @returns {this} The instance of this builder.\n */\n setNetworkManager(): this {\n const networkInstance = NetworkManager.Instance;\n // Attach the network client from options\n networkInstance.attachClient(this.options?.network?.client);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Network Layer`,\n }),\n );\n // Set the development mode based on options\n networkInstance.getConfig().setDevelopmentMode(this.options?.isDevelopmentMode);\n return this;\n }\n\n /**\n * Sets the segmentation evaluator with the provided segmentation options.\n * @returns {this} The instance of this builder.\n */\n setSegmentation(): this {\n SegmentationManager.Instance.attachEvaluator(this.options?.segmentation);\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Segmentation Evaluator`,\n }),\n );\n return this;\n }\n\n /**\n * Fetches settings asynchronously, ensuring no parallel fetches.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the fetched settings.\n */\n fetchSettings(force?: boolean): Promise> {\n const deferredObject = new Deferred();\n\n // Check if a fetch operation is already in progress\n if (!this.isSettingsFetchInProgress) {\n this.isSettingsFetchInProgress = true;\n this.settingFileManager.getSettings(force).then((settings: Record) => {\n // if force is false, update original settings, if true the request is from polling and no need to update original settings\n if (!force) {\n this.originalSettings = settings;\n }\n\n this.isSettingsFetchInProgress = false;\n deferredObject.resolve(settings);\n });\n\n return deferredObject.promise;\n } else {\n // Avoid parallel fetches by recursively calling fetchSettings\n return this.fetchSettings(force);\n }\n }\n\n /**\n * Gets the settings, fetching them if not cached or if forced.\n * @param {boolean} [force=false] - Force fetch ignoring cache.\n * @returns {Promise} A promise that resolves to the settings.\n */\n getSettings(force?: boolean): Promise> {\n const deferredObject = new Deferred();\n\n try {\n // Use cached settings if available and not forced to fetch\n if (!force && this.settings) {\n LogManager.Instance.info('Using already fetched and cached settings');\n deferredObject.resolve(this.settings);\n } else {\n // Fetch settings if not cached or forced\n this.fetchSettings(force).then((settings: Record) => {\n deferredObject.resolve(settings);\n });\n }\n } catch (err) {\n LogManager.Instance.error('Failed to fetch settings. Error: ' + err);\n deferredObject.resolve({});\n }\n return deferredObject.promise;\n }\n\n /**\n * Sets the storage connector based on the provided storage options.\n * @returns {this} The instance of this builder.\n */\n setStorage(): this {\n if (this.options.storage) {\n // Attach the storage connector from options\n this.storage = Storage.Instance.attachConnector(this.options.storage);\n } else {\n // Set storage to null if no storage options provided\n this.storage = null;\n }\n\n return this;\n }\n\n /**\n * Sets the settings manager with the provided options.\n * @returns {this} The instance of this builder.\n */\n setSettingsService(): this {\n this.settingFileManager = new SettingsService(this.options);\n\n return this;\n }\n\n /**\n * Sets the logger with the provided logger options.\n * @returns {this} The instance of this builder.\n */\n setLogger(): this {\n this.logManager = new LogManager(this.options.logger || {});\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: `Logger`,\n }),\n );\n return this;\n }\n\n /**\n * Sets the analytics callback with the provided analytics options.\n * @returns {this} The instance of this builder.\n */\n /* setAnalyticsCallback(): this {\n if (!isObject(this.options.analyticsEvent)) {\n // TODO: add logging here\n return this;\n }\n\n if (!isFunction(this.options.analyticsEvent.eventCallback)) {\n // TODO: add logging here\n return this;\n }\n\n if (\n this.options.analyticsEvent.isBatchingSupported &&\n !isBoolean(this.options.analyticsEvent.isBatchingSupported)\n ) {\n // TODO:- add logging here\n return this;\n }\n\n // AnalyticsEvent.Instance.attachCallback(\n // this.options.analyticsEvent.eventCallback,\n // this.options.analyticsEvent.isBatchingSupported\n // );\n return this;\n } */\n\n /**\n * Generates a random user ID based on the provided API key.\n * @returns {string} The generated random user ID.\n */\n getRandomUserId(): string {\n const apiName = 'getRandomUserId';\n try {\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n return getRandomUUID(this.options.sdkKey);\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n\n /**\n * Initializes the batching with the provided batch events options.\n * @returns {this} The instance of this builder.\n */\n /* initBatching(): this {\n if (!isObject(this.options.batchEvents)) {\n // TODO:- add logging here\n return this;\n }\n\n if (\n isObject(this.options.batchEvents) &&\n (!(\n (isNumber(this.options.batchEvents.eventsPerRequest) &&\n this.options.batchEvents.eventsPerRequest > 0 &&\n this.options.batchEvents.eventsPerRequest <= Constants.MAX_EVENTS_PER_REQUEST) ||\n (isNumber(this.options.batchEvents.requestTimeInterval) && this.options.batchEvents.requestTimeInterval >= 1)\n ) ||\n !isFunction(this.options.batchEvents.flushCallback))\n ) {\n LogManager.Instance.error('Invalid batchEvents config');\n // throw new Error('Invalid batchEvents config');\n return this;\n }\n\n // BatchEventsQueue.Instance.setBatchConfig(this.options.batchEvents, this.options.sdkKey); // TODO\n\n return this;\n } */\n\n /**\n * Initializes the polling with the provided poll interval.\n * @returns {this} The instance of this builder.\n */\n initPolling(): this {\n if (!this.options.pollInterval) {\n return this;\n }\n\n if (this.options.pollInterval && !isNumber(this.options.pollInterval)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n if (this.options.pollInterval && this.options.pollInterval < 1000) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.INIT_OPTIONS_INVALID, {\n key: 'pollInterval',\n correctType: 'number',\n }),\n );\n return this;\n }\n\n this.checkAndPoll();\n\n return this;\n }\n\n /**\n * Builds a new VWOClient instance with the provided settings.\n * @param {SettingsModel} settings - The settings for the VWOClient.\n * @returns {VWOClient} The new VWOClient instance.\n */\n build(settings: Record): IVWOClient {\n this.vwoInstance = new VWOClient(settings, this.options);\n\n return this.vwoInstance;\n }\n\n /**\n * Checks and polls for settings updates at the provided interval.\n */\n checkAndPoll(): void {\n const pollingInterval = this.options.pollInterval;\n\n setInterval(() => {\n this.getSettings(true)\n .then((latestSettings: SettingsModel) => {\n const lastSettings = JSON.stringify(this.originalSettings);\n const stringifiedLatestSettings = JSON.stringify(latestSettings);\n if (stringifiedLatestSettings !== lastSettings) {\n this.originalSettings = latestSettings;\n const clonedSettings = cloneObject(latestSettings);\n\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_SET_SETTINGS);\n setSettingsAndAddCampaignsToRules(clonedSettings, this.vwoInstance);\n } else {\n LogManager.Instance.info(InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS);\n }\n })\n .catch(() => {\n LogManager.Instance.error(ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED);\n });\n }, pollingInterval);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from './packages/logger';\nimport { Storage } from './packages/storage';\n\nimport { FlagApi } from './api/GetFlag';\nimport { SetAttributeApi } from './api/SetAttribute';\nimport { TrackApi } from './api/TrackEvent';\n\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from './enums/log-messages';\nimport { SettingsModel } from './models/settings/SettingsModel';\n\nimport { dynamic } from './types/Common';\n// import { BatchEventsQueue } from './services/batchEventsQueue';\n\nimport { SettingsSchema } from './models/schemas/SettingsSchemaValidation';\nimport { ContextModel } from './models/user/ContextModel';\nimport HooksService from './services/HooksService';\nimport { UrlUtil } from './utils/UrlUtil';\n\nimport { getType, isBoolean, isNumber, isObject, isString } from './utils/DataTypeUtil';\n\nimport { buildMessage } from './utils/LogMessageUtil';\nimport { Deferred } from './utils/PromiseUtil';\n\nimport { IVWOOptions } from './models/VWOOptionsModel';\nimport { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil';\nimport { setShouldWaitForTrackingCalls } from './utils/NetworkUtil';\n\nexport interface IVWOClient {\n readonly options?: IVWOOptions;\n settings: SettingsModel;\n originalSettings: Record;\n\n getFlag(featureKey: string, context: Record): Record;\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record,\n ): Promise>;\n setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise;\n}\n\nexport class VWOClient implements IVWOClient {\n settings: SettingsModel;\n originalSettings: Record;\n storage: Storage;\n\n constructor(settings: Record, options: IVWOOptions) {\n this.options = options;\n\n setSettingsAndAddCampaignsToRules(settings, this);\n\n UrlUtil.init({\n collectionPrefix: this.settings.getCollectionPrefix(),\n });\n\n setShouldWaitForTrackingCalls(this.options.shouldWaitForTrackingCalls || false);\n\n LogManager.Instance.info(InfoLogMessagesEnum.CLIENT_INITIALIZED);\n return this;\n }\n options?: IVWOOptions;\n /**\n * Retrieves the value of a feature flag for a given feature key and context.\n * This method validates the feature key and context, ensures the settings are valid, and then uses the FlagApi to get the flag value.\n *\n * @param {string} featureKey - The key of the feature to retrieve.\n * @param {ContextModel} context - The context in which the feature flag is being retrieved, must include a valid user ID.\n * @returns {Promise>} - A promise that resolves to the feature flag value.\n */\n getFlag(featureKey: string, context: Record): Record {\n const apiName = 'getFlag';\n const deferredObject = new Deferred();\n const errorReturnSchema = {\n isEnabled: (): boolean => false,\n getVariables: (): Array> => [],\n getVariable: (_key: string, defaultValue: any): dynamic => defaultValue,\n };\n\n try {\n const hooksService = new HooksService(this.options);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate featureKey is a string\n if (!isString(featureKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'featureKey',\n type: getType(featureKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: featureKey should be a string');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n new FlagApi()\n .get(featureKey, this.settings, contextModel, hooksService)\n .then((data: any) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve(errorReturnSchema);\n });\n } catch (err) {\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve(errorReturnSchema);\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Tracks an event with specified properties and context.\n * This method validates the types of the inputs and ensures the settings and user context are valid before proceeding.\n *\n * @param {string} eventName - The name of the event to track.\n * @param {ContextModel} context - The context in which the event is being tracked, must include a valid user ID.\n * @param {Record} eventProperties - The properties associated with the event.\n * @returns {Promise>} - A promise that resolves to the result of the tracking operation.\n */\n trackEvent(\n eventName: string,\n context: Record,\n eventProperties: Record = {},\n ): Promise> {\n const apiName = 'trackEvent';\n const deferredObject = new Deferred();\n\n try {\n const hooksService = new HooksService(this.options);\n\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate eventName is a string\n if (!isString(eventName)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventName',\n type: getType(eventName),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: Event-name should be a string');\n }\n\n // Validate eventProperties is an object\n if (!isObject(eventProperties)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'eventProperties',\n type: getType(eventProperties),\n correctType: 'object',\n }),\n );\n\n throw new TypeError('TypeError: eventProperties should be an object');\n }\n\n // Validate settings are loaded and valid\n if (!new SettingsSchema().isSettingsValid(this.originalSettings)) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_SETTING_INVALID);\n throw new Error('TypeError: Invalid Settings');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with tracking the event\n new TrackApi()\n .track(this.settings, eventName, contextModel, eventProperties, hooksService)\n .then((data) => {\n deferredObject.resolve(data);\n })\n .catch(() => {\n deferredObject.resolve({ [eventName]: false });\n });\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n\n deferredObject.resolve({ [eventName]: false });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Sets an attribute for a user in the context provided.\n * This method validates the types of the inputs before proceeding with the API call.\n *\n * @param {string} attributeKey - The key of the attribute to set.\n * @param {string} attributeValue - The value of the attribute to set.\n * @param {ContextModel} context - The context in which the attribute should be set, must include a valid user ID.\n */\n async setAttribute(\n attributeKey: string,\n attributeValue: boolean | string | number,\n context: Record,\n ): Promise {\n const apiName = 'setAttribute';\n\n try {\n // Log the API call\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.API_CALLED, {\n apiName,\n }),\n );\n\n // Validate attributeKey is a string\n if (!isString(attributeKey)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeKey',\n type: getType(attributeKey),\n correctType: 'string',\n }),\n );\n\n throw new TypeError('TypeError: attributeKey should be a string');\n }\n // Validate attributeValue is a string\n if (!isString(attributeValue) && !isNumber(attributeValue) && !isBoolean(attributeValue)) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.API_INVALID_PARAM, {\n apiName,\n key: 'attributeValue',\n type: getType(attributeValue),\n correctType: 'boolean | string | number',\n }),\n );\n\n throw new TypeError('TypeError: attributeValue should be a string');\n }\n\n // Validate user ID is present in context\n if (!context || !context.id) {\n LogManager.Instance.error(ErrorLogMessagesEnum.API_CONTEXT_INVALID);\n throw new TypeError('TypeError: Invalid context');\n }\n\n const contextModel = new ContextModel().modelFromDictionary(context);\n\n // Proceed with setting the attribute if validation is successful\n await new SetAttributeApi().setAttribute(this.settings, attributeKey, attributeValue, contextModel);\n } catch (err) {\n // Log any errors encountered during the operation\n LogManager.Instance.info(\n buildMessage(ErrorLogMessagesEnum.API_THROW_ERROR, {\n apiName,\n err,\n }),\n );\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { VariableModel } from '../models/campaign/VariableModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport IHooksService from '../services/HooksService';\nimport { StorageService } from '../services/StorageService';\nimport { getVariationFromCampaignKey } from '../utils/CampaignUtil';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from '../utils/DecisionUtil';\nimport { getAllExperimentRules, getFeatureFromKey, getSpecificRulesBasedOnType } from '../utils/FunctionUtil';\nimport { createAndSendImpressionForVariationShown } from '../utils/ImpressionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport { getShouldWaitForTrackingCalls } from '../utils/NetworkUtil';\n\ninterface IGetFlag {\n get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise;\n}\n\nexport class FlagApi implements IGetFlag {\n async get(\n featureKey: string,\n settings: SettingsModel,\n context: ContextModel,\n hooksService: IHooksService,\n ): Promise {\n let isEnabled = false;\n let rolloutVariationToReturn = null;\n let experimentVariationToReturn = null;\n let shouldCheckForExperimentsRules = false;\n\n const passedRulesInformation = {}; // for storing and integration callback\n const deferredObject = new Deferred();\n const evaluatedFeatureMap: Map = new Map();\n\n // get feature object from feature key\n const feature = getFeatureFromKey(settings, featureKey);\n const decision = {\n featureName: feature?.getName(),\n featureId: feature?.getId(),\n featureKey: feature?.getKey(),\n userId: context?.getId(),\n api: ApiEnum.GET_FLAG,\n };\n\n const storageService = new StorageService();\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'experiment',\n experimentKey: storedData.experimentKey,\n }),\n );\n deferredObject.resolve({\n isEnabled: () => true,\n getVariables: () => variation?.getVariables(),\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) =>\n variation\n ?.getVariables()\n .find((variable) => new VariableModel().modelFromDictionary(variable).getKey() === key)\n ?.getValue() || defaultValue,\n });\n\n return deferredObject.promise;\n }\n }\n } else if (storedData?.rolloutKey && storedData?.rolloutId) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.rolloutKey,\n storedData.rolloutVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.STORED_VARIATION_FOUND, {\n variationKey: variation.getKey(),\n userId: context.getId(),\n experimentType: 'rollout',\n experimentKey: storedData.rolloutKey,\n }),\n );\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED, {\n userId: context.getId(),\n }),\n );\n\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n const featureInfo = {\n rolloutId: storedData.rolloutId,\n rolloutKey: storedData.rolloutKey,\n rolloutVariationId: storedData.rolloutVariationId,\n };\n evaluatedFeatureMap.set(featureKey, featureInfo);\n Object.assign(passedRulesInformation, featureInfo);\n }\n }\n\n if (!isObject(feature) || feature === undefined) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.FEATURE_NOT_FOUND, {\n featureKey,\n }),\n );\n\n deferredObject.reject({});\n\n return deferredObject.promise;\n }\n\n // TODO: remove await from here, need not wait for gateway service at the time of calling getFlag\n await SegmentationManager.Instance.setContextualData(settings, feature, context);\n\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT); // get all rollout rules\n\n if (rollOutRules.length > 0 && !isEnabled) {\n const rolloutRulesToEvaluate = [];\n\n for (const rule of rollOutRules) {\n const { preSegmentationResult, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n // if pre segment passed, then break the loop and check the traffic allocation\n rolloutRulesToEvaluate.push(rule);\n\n evaluatedFeatureMap.set(featureKey, {\n rolloutId: rule.getId(),\n rolloutKey: rule.getKey(),\n rolloutVariationId: rule.getVariations()[0]?.getId(),\n });\n\n break;\n }\n\n continue; // if rule does not satisfy, then check for other ROLLOUT rules\n }\n\n if (rolloutRulesToEvaluate.length > 0) {\n const passedRolloutCampaign = new CampaignModel().modelFromDictionary(rolloutRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, passedRolloutCampaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n shouldCheckForExperimentsRules = true;\n rolloutVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(passedRolloutCampaign, variation, passedRulesInformation, decision);\n\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n passedRolloutCampaign.getId(),\n variation.getId(),\n context,\n );\n }\n }\n }\n } else if (rollOutRules.length === 0) {\n LogManager.Instance.debug(DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT);\n shouldCheckForExperimentsRules = true;\n }\n\n if (shouldCheckForExperimentsRules) {\n const experimentRulesToEvaluate = [];\n\n // if rollout rule is passed, get all ab and Personalize rules\n const experimentRules = getAllExperimentRules(feature);\n const megGroupWinnerCampaigns: Map = new Map();\n\n for (const rule of experimentRules) {\n const { preSegmentationResult, whitelistedObject, updatedDecision } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n Object.assign(decision, updatedDecision);\n\n if (preSegmentationResult) {\n if (whitelistedObject === null) {\n // whitelistedObject will be null if pre segment passed but whitelisting failed\n experimentRulesToEvaluate.push(rule);\n } else {\n isEnabled = true;\n experimentVariationToReturn = whitelistedObject.variation;\n Object.assign(passedRulesInformation, {\n experimentId: rule.getId(),\n experimentKey: rule.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n }\n\n break;\n }\n continue;\n }\n\n if (experimentRulesToEvaluate.length > 0) {\n const campaign = new CampaignModel().modelFromDictionary(experimentRulesToEvaluate[0]);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n\n if (isObject(variation) && Object.keys(variation).length > 0) {\n isEnabled = true;\n experimentVariationToReturn = variation;\n\n _updateIntegrationsDecisionObject(campaign, variation, passedRulesInformation, decision);\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), variation.getId(), context);\n }\n }\n }\n }\n\n // If flag is enabled, store it in data\n if (isEnabled) {\n // set storage data\n new StorageDecorator().setDataInStorage(\n {\n featureKey,\n context,\n ...passedRulesInformation,\n },\n storageService,\n );\n }\n\n // call integration callback, if defined\n hooksService.set(decision);\n hooksService.execute(hooksService.get());\n\n // Send data for Impact Campaign, if defined\n if (feature.getImpactCampaign()?.getCampaignId()) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.IMPACT_ANALYSIS, {\n userId: context.getId(),\n featureKey,\n status: isEnabled ? 'enabled' : 'disabled',\n }),\n );\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(\n settings,\n feature.getImpactCampaign()?.getCampaignId(),\n isEnabled ? 2 : 1, // 2 is for Variation(flag enabled), 1 is for Control(flag disabled)\n context,\n );\n }\n }\n\n const variablesForEvaluatedFlag =\n experimentVariationToReturn?.variables ?? rolloutVariationToReturn?.variables ?? [];\n\n deferredObject.resolve({\n isEnabled: () => isEnabled,\n getVariables: () => variablesForEvaluatedFlag,\n getVariable: (\n key: string,\n defaultValue: string, // loop over all variables object and return the value where key is equal to given key else return given default value\n ) => {\n const variable = variablesForEvaluatedFlag.find((variable) => variable.key === key);\n\n return variable?.value ?? defaultValue;\n },\n });\n\n return deferredObject.promise;\n }\n}\n\n// Not PRIVATE methods but helper methods. If need be, move them to some util file to be reused by other API(s)\n\nfunction _updateIntegrationsDecisionObject(\n campaign: CampaignModel,\n variation: VariationModel,\n passedRulesInformation: any,\n decision: any,\n): void {\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT) {\n Object.assign(passedRulesInformation, {\n rolloutId: campaign.getId(),\n rolloutKey: campaign.getKey(),\n rolloutVariationId: variation.getId(),\n });\n } else {\n Object.assign(passedRulesInformation, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: variation.getId(),\n });\n }\n Object.assign(decision, passedRulesInformation);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\nimport {\n getEventsBaseProperties,\n getAttributePayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\nimport { SettingsModel } from '../models/settings/SettingsModel';\n\ninterface ISetAttribute {\n /**\n * Sets an attribute for a user.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise;\n}\n\nexport class SetAttributeApi implements ISetAttribute {\n /**\n * Implementation of setAttribute to create an impression for a user attribute.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute to set.\n * @param attributeValue The value of the attribute.\n * @param context Context containing user information.\n */\n async setAttribute(\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n ): Promise {\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n } else {\n createImpressionForAttribute(settings, attributeKey, attributeValue, context);\n }\n }\n}\n\n/**\n * Creates an impression for a user attribute and sends it to the server.\n * @param settings Configuration settings.\n * @param attributeKey The key of the attribute.\n * @param attributeValue The value of the attribute.\n * @param user User details.\n */\nconst createImpressionForAttribute = async (\n settings: SettingsModel,\n attributeKey: string,\n attributeValue: any,\n context: ContextModel,\n) => {\n // Retrieve base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_SYNC_VISITOR_PROP,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Construct payload data for the attribute\n const payload = getAttributePayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_SYNC_VISITOR_PROP,\n attributeKey,\n attributeValue,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed payload via POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApiEnum } from '../enums/ApiEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { LogManager } from '../packages/logger';\nimport IHooksService from '../services/HooksService';\nimport { dynamic } from '../types/Common';\nimport { doesEventBelongToAnyFeature } from '../utils/FunctionUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport {\n getEventsBaseProperties,\n getTrackGoalPayloadData,\n sendPostApiRequest,\n getShouldWaitForTrackingCalls,\n} from '../utils/NetworkUtil';\n\ninterface ITrack {\n /**\n * Tracks an event with given properties and context.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param context Contextual information like user details.\n * @param eventProperties Properties associated with the event.\n * @param hooksService Manager for handling hooks and callbacks.\n * @returns A promise that resolves to a record indicating the success or failure of the event tracking.\n */\n track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: Record,\n hooksService: IHooksService,\n ): Promise>;\n}\n\nexport class TrackApi implements ITrack {\n /**\n * Implementation of the track method to handle event tracking.\n * Checks if the event exists, creates an impression, and executes hooks.\n */\n async track(\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n hooksService: IHooksService,\n ): Promise> {\n if (doesEventBelongToAnyFeature(eventName, settings)) {\n // Create an impression for the track event\n if (getShouldWaitForTrackingCalls()) {\n await createImpressionForTrack(settings, eventName, context, eventProperties);\n } else {\n createImpressionForTrack(settings, eventName, context, eventProperties);\n }\n // Set and execute integration callback for the track event\n hooksService.set({ eventName: eventName, api: ApiEnum.TRACK });\n hooksService.execute(hooksService.get());\n\n return { [eventName]: true };\n }\n // Log an error if the event does not exist\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.EVENT_NOT_FOUND, {\n eventName,\n }),\n );\n\n return { [eventName]: false };\n }\n}\n\n/**\n * Creates an impression for a track event and sends it via a POST API request.\n * @param settings Configuration settings for the tracking.\n * @param eventName Name of the event to track.\n * @param user User details.\n * @param eventProperties Properties associated with the event.\n */\nconst createImpressionForTrack = async (\n settings: SettingsModel,\n eventName: string,\n context: ContextModel,\n eventProperties: any,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n eventName,\n encodeURIComponent(context.getUserAgent()),\n context.getIpAddress(),\n );\n // Prepare the payload for the track goal\n const payload = getTrackGoalPayloadData(\n settings,\n context.getId(),\n eventName,\n eventProperties,\n context?.getUserAgent(),\n context?.getIpAddress(),\n );\n // Send the prepared payload via POST API request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const HTTP = 'http';\nexport const HTTPS = 'https';\n\nexport const SEED_URL = 'https://vwo.com';\nexport const HTTP_PROTOCOL = `${HTTP}://`;\nexport const HTTPS_PROTOCOL = `${HTTPS}://`;\nexport const BASE_URL = 'dev.visualwebsiteoptimizer.com';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* global SDK_VERSION */\nimport { PlatformEnum } from '../enums/PlatformEnum';\nimport { SEED_URL, HTTP_PROTOCOL, HTTPS_PROTOCOL } from './Url';\n\nlet packageFile;\nlet platform;\n\n// For client-side SDK, to keep the build size low\n// avoid adding the whole package file in the bundle\nif (typeof process.env === 'undefined') {\n packageFile = {\n name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build\n // @ts-expect-error This will be relaved by webpack at the time of build for browser\n version: SDK_VERSION, // will be replaced by webpack for browser build\n };\n\n platform = PlatformEnum.CLIENT;\n} else {\n packageFile = require('../../package.json');\n platform = PlatformEnum.SERVER;\n}\n\nexport const Constants = {\n SDK_NAME: packageFile.name,\n SDK_VERSION: packageFile.version,\n\n PLATFORM: platform,\n\n MAX_TRAFFIC_PERCENT: 100,\n MAX_TRAFFIC_VALUE: 10000,\n STATUS_RUNNING: 'RUNNING',\n\n SEED_VALUE: 1,\n MAX_EVENTS_PER_REQUEST: 5000,\n DEFAULT_REQUEST_TIME_INTERVAL: 600, // 10 * 60(secs) = 600 secs i.e. 10 minutes\n DEFAULT_EVENTS_PER_REQUEST: 100,\n\n SEED_URL,\n HTTP_PROTOCOL,\n HTTPS_PROTOCOL,\n\n SETTINGS: 'settings',\n SETTINGS_EXPIRY: 10000000,\n SETTINGS_TIMEOUT: 50000,\n\n HOST_NAME: 'dev.visualwebsiteoptimizer.com',\n SETTINTS_ENDPOINT: '/server-side/v2-settings',\n LOCATION_ENDPOINT: '/getLocation',\n\n VWO_FS_ENVIRONMENT: 'vwo_fs_environment',\n\n RANDOM_ALGO: 1,\n\n API_VERSION: '1',\n\n VWO_META_MEG_KEY: '_vwo_meta_meg_',\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogManager } from '../packages/logger';\n\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { IStorageService } from '../services/StorageService';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\ninterface IStorageDecorator {\n /**\n * Sets data in storage.\n * @param data The data to be stored.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to a VariationModel.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise;\n\n /**\n * Retrieves a feature from storage.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n getFeatureFromStorage(featureKey: FeatureModel, context: ContextModel, storageService: IStorageService): Promise;\n}\n\nexport class StorageDecorator implements IStorageDecorator {\n /**\n * Asynchronously retrieves a feature from storage based on the feature key and user.\n * @param featureKey The key of the feature to retrieve.\n * @param user The user object.\n * @param storageService The storage service instance.\n * @returns A promise that resolves to the retrieved feature or relevant status.\n */\n async getFeatureFromStorage(featureKey: any, context: ContextModel, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n storageService.getDataInStorage(featureKey, context).then((campaignMap: Record | StorageEnum) => {\n switch (campaignMap) {\n case StorageEnum.STORAGE_UNDEFINED:\n deferredObject.resolve(null); // No storage defined\n break;\n case StorageEnum.NO_DATA_FOUND:\n deferredObject.resolve(null); // No data found in storage\n break;\n case StorageEnum.INCORRECT_DATA:\n deferredObject.resolve(StorageEnum.INCORRECT_DATA); // Incorrect data found\n break;\n case StorageEnum.CAMPAIGN_PAUSED:\n deferredObject.resolve(null); // Campaign is paused\n break;\n case StorageEnum.VARIATION_NOT_FOUND:\n deferredObject.resolve(StorageEnum.VARIATION_NOT_FOUND); // No variation found\n break;\n case StorageEnum.WHITELISTED_VARIATION:\n deferredObject.resolve(null); // Whitelisted variation, handle accordingly\n break;\n default:\n deferredObject.resolve(campaignMap); // Valid data found, resolve with it\n }\n });\n\n return deferredObject.promise;\n }\n\n /**\n * Sets data in storage based on the provided data object.\n * @param data The data to be stored, including feature key and user details.\n * @param storageService The storage service instance.\n * @returns A promise that resolves when the data is successfully stored.\n */\n setDataInStorage(data: Record, storageService: IStorageService): Promise {\n const deferredObject = new Deferred();\n const {\n featureKey,\n context,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n } = data;\n\n if (!featureKey) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'featureKey',\n }),\n );\n\n deferredObject.reject(); // Reject promise if feature key is invalid\n return;\n }\n if (!context.id) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Context or Context.id',\n }),\n );\n\n deferredObject.reject(); // Reject promise if user ID is invalid\n return;\n }\n if (rolloutKey && !experimentKey && !rolloutVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(rolloutKey, experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if rollout variation is invalid\n return;\n }\n if (experimentKey && !experimentVariationId) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORING_DATA_ERROR, {\n key: 'Variation:(experimentKey or rolloutVariationId)',\n }),\n );\n\n deferredObject.reject(); // Reject promise if experiment variation is invalid\n return;\n }\n\n storageService.setDataInStorage({\n featureKey,\n userId: context.id,\n rolloutId,\n rolloutKey,\n rolloutVariationId,\n experimentId,\n experimentKey,\n experimentVariationId,\n });\n\n deferredObject.resolve(); // Resolve promise when data is successfully set\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum ApiEnum {\n GET_FLAG = 'getFlag',\n TRACK = 'track',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum CampaignTypeEnum {\n ROLLOUT = 'FLAG_ROLLOUT',\n AB = 'FLAG_TESTING',\n PERSONALIZE = 'FLAG_PERSONALIZE',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum EventEnum {\n VWO_VARIATION_SHOWN = 'vwo_variationShown',\n VWO_SYNC_VISITOR_PROP = 'vwo_syncVisitorProp',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HeadersEnum {\n USER_AGENT = 'X-Device-User-Agent',\n IP = 'VWO-X-Forwarded-For',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum HttpMethodEnum {\n GET = 'GET',\n POST = 'POST',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum PlatformEnum {\n CLIENT = 'client',\n SERVER = 'server',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StatusEnum {\n PASSED = 'passed',\n FAILED = 'failed',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum StorageEnum {\n STORAGE_UNDEFINED,\n INCORRECT_DATA,\n NO_DATA_FOUND,\n CAMPAIGN_PAUSED,\n VARIATION_NOT_FOUND,\n WHITELISTED_VARIATION,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum UrlEnum {\n BASE_URL = 'dev.visualwebsiteoptimizer.com',\n SETTINGS_URL = '/server-side/settings',\n // WEBHOOK_SETTINGS_URL = '/server-side/pull',\n // BATCH_EVENTS = '/server-side/batch-events',\n EVENTS = '/events/t',\n ATTRIBUTE_CHECK = '/check-attribute',\n GET_USER_DATA = '/get-user-details',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as messages from 'vwo-fme-sdk-log-messages';\n\nconst DebugLogMessagesEnum = messages.debugMessages;\nconst InfoLogMessagesEnum = messages.infoMessages;\nconst ErrorLogMessagesEnum = messages.errorMessages;\n\nexport { DebugLogMessagesEnum, InfoLogMessagesEnum, ErrorLogMessagesEnum };\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { MetricModel } from './MetricModel';\nimport { VariableModel } from './VariableModel';\nimport { VariationModel } from './VariationModel';\n\nexport class CampaignModel {\n private id: number;\n private segments: Record;\n private percentTraffic: number;\n private isUserListEnabled: boolean;\n private key: string;\n private type: string;\n private name: string;\n private isForcedVariationEnabled: boolean;\n private variations: Array = [];\n private metrics: Array = [];\n private variables: Array = [];\n private variationId: number;\n private campaignId: number;\n private ruleKey: string;\n\n copy(campaignModel: CampaignModel): void {\n this.metrics = campaignModel.metrics;\n this.variations = campaignModel.variations;\n this.variables = campaignModel.variables;\n this.processCampaignKeys(campaignModel);\n }\n\n modelFromDictionary(campaign: CampaignModel): this {\n this.processCampaignProperties(campaign);\n this.processCampaignKeys(campaign);\n return this;\n }\n\n processCampaignProperties(campaign: CampaignModel): void {\n if (campaign.variables) {\n // campaign.var ||\n if (\n // (campaign.var && campaign.var.constructor === {}.constructor) ||\n campaign.variables.constructor === {}.constructor\n ) {\n this.variables = [];\n } else {\n const variableList: Array = campaign.variables; // campaign.var ||\n variableList.forEach((variable: any) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (campaign.variations) {\n // campaign.v ||\n if (\n // (campaign.v && campaign.v.constructor === {}.constructor) ||\n campaign.variations.constructor === {}.constructor\n ) {\n this.variations = [];\n } else {\n const variationList: Array = campaign.variations; // campaign.v ||\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n if (campaign.metrics) {\n // campaign.m ||\n if (campaign.metrics && campaign.metrics.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricsList: Array = campaign.metrics || [];\n metricsList.forEach((metric: any) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n }\n }\n\n processCampaignKeys(campaign: CampaignModel): void {\n this.id = campaign.id;\n this.percentTraffic = campaign.percentTraffic; // campaign.pT ||\n this.name = campaign.name; // campaign.n ||\n this.variationId = campaign.variationId; // campaign.vId ||\n this.campaignId = campaign.campaignId; // campaign.cId ||\n this.ruleKey = campaign.ruleKey; // campaign.rK ||\n this.isForcedVariationEnabled = campaign.isForcedVariationEnabled; // campaign.iFVE ||\n this.isUserListEnabled = campaign.isUserListEnabled; // campaign.iULE ||\n this.segments = campaign.segments;\n this.key = campaign.key; // campaign.k ||\n // this.priority = campaign.pr || campaign.priority;\n this.type = campaign.type; // campaign.t ||\n }\n\n getId(): number {\n return this.id;\n }\n\n getName(): string {\n return this.name;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getTraffic(): number {\n return this.percentTraffic;\n }\n\n getType(): string {\n return this.type;\n }\n\n getIsForcedVariationEnabled(): boolean {\n return this.isForcedVariationEnabled;\n }\n\n getIsUserListEnabled(): boolean {\n return this.isUserListEnabled;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from './CampaignModel';\nimport { ImpactCapmaignModel } from './ImpactCampaignModel';\nimport { MetricModel } from './MetricModel';\nimport { RuleModel } from './RuleModel';\n\nexport class FeatureModel {\n private m: Array = [];\n private metrics: Array = [];\n private id: number;\n private key: string;\n private name: string;\n private type: string;\n private rules: Array = [];\n private impactCampaign: ImpactCapmaignModel = null;\n\n private rulesLinkedCampaign: Array = [];\n private isGatewayServiceRequired: boolean = false;\n\n modelFromDictionary(feature: FeatureModel): this {\n this.id = feature.id;\n this.key = feature.key;\n this.name = feature.name;\n this.type = feature.type;\n if (feature?.isGatewayServiceRequired) {\n this.isGatewayServiceRequired = feature.isGatewayServiceRequired;\n }\n if (feature.impactCampaign) {\n this.impactCampaign = new ImpactCapmaignModel().modelFromDictionary(feature.impactCampaign);\n }\n\n if ((feature.m && feature.m.constructor === {}.constructor) || feature.metrics?.constructor === {}.constructor) {\n this.metrics = [];\n } else {\n const metricList: Array = feature.m || feature.metrics;\n metricList?.forEach((metric) => {\n this.metrics.push(new MetricModel().modelFromDictionary(metric));\n });\n }\n\n if (feature?.rules?.constructor === {}.constructor) {\n this.rules = [];\n } else {\n const ruleList: Array = feature.rules;\n ruleList?.forEach((rule) => {\n this.rules.push(new RuleModel().modelFromDictionary(rule));\n });\n }\n\n if (feature?.rulesLinkedCampaign && feature.rulesLinkedCampaign?.constructor !== {}.constructor) {\n const linkedCampaignList: Array = feature.rulesLinkedCampaign;\n this.rulesLinkedCampaign = linkedCampaignList;\n }\n\n return this;\n }\n\n getName(): string {\n return this.name;\n }\n\n getType(): string {\n return this.type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRules(): Array {\n return this.rules;\n }\n\n getImpactCampaign(): ImpactCapmaignModel {\n return this.impactCampaign;\n }\n\n getRulesLinkedCampaign(): Array {\n return this.rulesLinkedCampaign;\n }\n\n setRulesLinkedCampaign(rulesLinkedCampaign: Array): void {\n this.rulesLinkedCampaign = rulesLinkedCampaign;\n }\n\n getMetrics(): Array {\n return this.metrics;\n }\n\n getIsGatewayServiceRequired(): boolean {\n return this.isGatewayServiceRequired;\n }\n\n setIsGatewayServiceRequired(isGatewayServiceRequired: boolean): void {\n this.isGatewayServiceRequired = isGatewayServiceRequired;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ImpactCapmaignModel {\n private campaignId: number;\n private type: string;\n\n modelFromDictionary(impactCampaign: ImpactCapmaignModel): this {\n this.type = impactCampaign.type;\n this.campaignId = impactCampaign.campaignId;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class MetricModel {\n private key: string;\n private identifier: string;\n\n private i: number;\n private id: number;\n\n private t: string;\n private type: string;\n\n modelFromDictionary(metric: MetricModel): this {\n this.identifier = metric.identifier || metric.key;\n this.id = metric.i || metric.id;\n this.type = metric.t || metric.type;\n return this;\n }\n\n getId(): number {\n return this.id;\n }\n\n getIdentifier(): string {\n return this.identifier;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class RuleModel {\n private status: boolean;\n private variationId: number;\n private campaignId: number;\n private type: string;\n private ruleKey: string;\n\n modelFromDictionary(rule: RuleModel): this {\n this.type = rule.type;\n this.status = rule.status;\n this.variationId = rule.variationId;\n this.campaignId = rule.campaignId;\n this.ruleKey = rule.ruleKey;\n return this;\n }\n\n getCampaignId(): number {\n return this.campaignId;\n }\n\n getVariationId(): number {\n return this.variationId;\n }\n\n getStatus(): boolean {\n return this.status;\n }\n\n getType(): string {\n return this.type;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport class VariableModel {\n private val: dynamic;\n private value: dynamic;\n\n private type: string;\n\n private k: string;\n private key: string;\n\n private i: number;\n private id: number;\n\n modelFromDictionary(variable: VariableModel): this {\n this.value = variable.val || variable.value;\n this.type = variable.type;\n this.key = variable.k || variable.key;\n this.id = variable.i || variable.id;\n\n return this;\n }\n\n setValue(value: dynamic): void {\n this.value = value;\n }\n\n setKey(key: string): void {\n this.key = key;\n }\n\n setType(type: string): void {\n this.type = type;\n }\n\n getId(): number {\n return this.id;\n }\n\n getValue(): dynamic {\n return this.value;\n }\n\n getType(): string {\n return this.type;\n }\n\n getKey(): string {\n return this.key;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { VariableModel } from './VariableModel';\n\nexport class VariationModel {\n private i: number;\n private id: number;\n private type: string;\n\n private n: string;\n private key: string;\n private name: string;\n private ruleKey: string;\n\n private w: number;\n private weight: number;\n\n private startRangeVariation: number;\n private endRangeVariation: number;\n private variables: Array = [];\n private variations: Array = [];\n\n private seg: Record;\n private segments: Record;\n\n modelFromDictionary(variation: VariationModel): this {\n this.id = variation.i || variation.id;\n this.key = variation.n || variation.key || variation.name;\n this.weight = variation.w || variation.weight;\n this.ruleKey = variation.ruleKey;\n this.type = variation.type;\n this.setStartRange(variation.startRangeVariation);\n this.setEndRange(variation.endRangeVariation);\n if (variation.seg || variation.segments) {\n this.segments = variation.seg || variation.segments;\n }\n\n if (variation.variables) {\n if (variation.variables.constructor === {}.constructor) {\n this.variables = [];\n } else {\n const variableList: Array = variation.variables;\n variableList.forEach((variable) => {\n this.variables.push(new VariableModel().modelFromDictionary(variable));\n });\n }\n }\n\n if (variation.variations) {\n if (variation.variations.constructor === {}.constructor) {\n this.variations = [];\n } else {\n const variationList: Array = variation.variations;\n variationList.forEach((variation: any) => {\n this.variations.push(new VariationModel().modelFromDictionary(variation));\n });\n }\n }\n\n return this;\n }\n\n setStartRange(startRange: number): void {\n this.startRangeVariation = startRange;\n }\n\n setEndRange(endRange: number): void {\n this.endRangeVariation = endRange;\n }\n\n setWeight(weight: number): void {\n this.weight = weight;\n }\n\n getId(): number {\n return this.id;\n }\n\n getKey(): string {\n return this.key;\n }\n\n getRuleKey(): string {\n return this.ruleKey;\n }\n\n getWeight(): number {\n return this.weight;\n }\n\n getSegments(): Record {\n return this.segments;\n }\n\n getStartRangeVariation(): number {\n return this.startRangeVariation;\n }\n\n getEndRangeVariation(): number {\n return this.endRangeVariation;\n }\n\n getVariables(): Array {\n return this.variables;\n }\n\n getVariations(): Array {\n return this.variations;\n }\n\n getType(): string {\n return this.type;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Struct, array, boolean, number, object, optional, string, union, validate } from 'superstruct';\nimport { dynamic } from '../../types/Common';\nimport { SettingsModel } from '../settings/SettingsModel';\n\nexport class SettingsSchema {\n private campaignMetricSchema: Struct;\n private variableObjectSchema: Struct;\n private campaignVariationSchema: Struct;\n private campaignObjectSchema: Struct;\n private settingsSchema: Struct;\n private featureSchema: Struct;\n private ruleSchema: Struct;\n\n constructor() {\n this.initializeSchemas();\n }\n\n private initializeSchemas(): void {\n this.campaignMetricSchema = object({\n id: union([number(), string()]),\n type: string(),\n identifier: string(),\n mca: optional(union([number(), string()])),\n hasProps: optional(boolean()),\n revenueProp: optional(string()),\n });\n\n this.variableObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n value: union([number(), string(), boolean(), object()]),\n });\n\n this.campaignVariationSchema = object({\n id: union([number(), string()]),\n name: string(),\n weight: union([number(), string()]),\n segments: optional(object()),\n variables: optional(array(this.variableObjectSchema)),\n startRangeVariation: optional(number()),\n endRangeVariation: optional(number()),\n });\n\n this.campaignObjectSchema = object({\n id: union([number(), string()]),\n type: string(),\n key: string(),\n percentTraffic: optional(number()),\n status: string(),\n variations: array(this.campaignVariationSchema),\n segments: object(),\n isForcedVariationEnabled: optional(boolean()),\n isAlwaysCheckSegment: optional(boolean()),\n name: string(),\n });\n\n this.ruleSchema = object({\n type: string(),\n ruleKey: string(),\n campaignId: number(),\n variationId: optional(number()),\n });\n\n this.featureSchema = object({\n id: union([number(), string()]),\n key: string(),\n status: string(),\n name: string(),\n type: string(),\n metrics: array(this.campaignMetricSchema),\n impactCampaign: optional(object()),\n rules: optional(array(this.ruleSchema)),\n variables: optional(array(this.variableObjectSchema)),\n });\n\n this.settingsSchema = object({\n sdkKey: optional(string()),\n version: union([number(), string()]),\n accountId: union([number(), string()]),\n features: optional(array(this.featureSchema)),\n campaigns: array(this.campaignObjectSchema),\n groups: optional(object()),\n campaignGroups: optional(object()),\n collectionPrefix: optional(string()),\n });\n }\n\n isSettingsValid(settings: any | SettingsModel): boolean {\n if (!settings) {\n return false;\n }\n\n const [error] = validate(settings, this.settingsSchema);\n return !error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../campaign/CampaignModel';\nimport { FeatureModel } from '../campaign/FeatureModel';\n\nexport class SettingsModel {\n private sK?: string;\n private sdkKey: string;\n\n private f?: Array = [];\n private features: Array = [];\n\n private c?: Array = [];\n private campaigns: Array = [];\n\n private campaignGroups?: Record = {};\n private cG?: Record = {};\n\n private groups?: Record = {};\n private g?: Record = {};\n\n private a?: string;\n private accountId: string;\n\n private v?: number;\n private version: number;\n private collectionPrefix?: string;\n\n constructor(settings: SettingsModel) {\n this.sdkKey = settings.sK || settings.sdkKey;\n this.accountId = settings.a || settings.accountId;\n this.version = settings.v || settings.version;\n this.collectionPrefix = settings.collectionPrefix;\n\n if (\n (settings.f && settings.f.constructor !== {}.constructor) ||\n (settings.features && settings.features.constructor !== {}.constructor)\n ) {\n const featureList: Array = settings.f || settings.features;\n featureList.forEach((feature) => {\n this.features.push(new FeatureModel().modelFromDictionary(feature));\n });\n }\n\n if (\n (settings.c && settings.c.constructor !== {}.constructor) ||\n (settings.campaigns && settings.campaigns.constructor !== {}.constructor)\n ) {\n const campaignList: Array = settings.c || settings.campaigns;\n campaignList.forEach((campaign) => {\n this.campaigns.push(new CampaignModel().modelFromDictionary(campaign));\n });\n }\n\n if (settings.cG || settings.campaignGroups) {\n this.campaignGroups = settings.cG || settings.campaignGroups;\n }\n\n if (settings.g || settings.groups) {\n this.groups = settings.g || settings.groups;\n }\n\n return this;\n }\n getFeatures(): Array {\n return this.features;\n }\n\n getCampaigns(): Array {\n return this.campaigns;\n }\n\n getSdkkey(): string {\n return this.sdkKey;\n }\n\n getAccountId(): string {\n return this.accountId;\n }\n\n getVersion(): number {\n return this.version;\n }\n\n getCollectionPrefix(): string {\n return this.collectionPrefix;\n }\n\n getCampaignGroups(): Record {\n return this.campaignGroups;\n }\n\n getGroups(): Record {\n return this.groups;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { ContextVWOModel } from './ContextVWOModel';\n\nexport class ContextModel {\n private id: string | number;\n private userAgent?: string;\n private ipAddress?: string;\n private customVariables?: Record;\n private variationTargetingVariables?: Record;\n private _vwo?: ContextVWOModel;\n\n modelFromDictionary(context: Record): this {\n this.id = context.id;\n this.userAgent = context.userAgent;\n this.ipAddress = context.ipAddress;\n if (context?.customVariables) {\n this.customVariables = context.customVariables;\n }\n if (context?.variationTargetingVariables) {\n this.variationTargetingVariables = context.variationTargetingVariables;\n }\n if (context?._vwo) {\n this._vwo = new ContextVWOModel().modelFromDictionary(context._vwo);\n }\n return this;\n }\n\n getId(): string {\n return this.id?.toString();\n }\n\n getUserAgent(): string {\n return this.userAgent;\n }\n\n getIpAddress(): string {\n return this.ipAddress;\n }\n\n getCustomVariables(): Record {\n return this.customVariables;\n }\n\n setCustomVariables(customVariables: Record): void {\n this.customVariables = customVariables;\n }\n\n getVariationTargetingVariables(): Record {\n return this.variationTargetingVariables;\n }\n\n setVariationTargetingVariables(variationTargetingVariables: Record): void {\n this.variationTargetingVariables = variationTargetingVariables;\n }\n\n getVwo(): ContextVWOModel {\n return this._vwo;\n }\n\n setVwo(_vwo: ContextVWOModel): void {\n this._vwo = _vwo;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ContextVWOModel {\n private location: Record;\n private userAgent: Record;\n\n modelFromDictionary(context: Record): this {\n if (context?.location) {\n this.location = context.location;\n }\n\n if (context?.userAgent) {\n this.userAgent = context.userAgent;\n }\n return this;\n }\n\n getLocation(): Record {\n return this.location;\n }\n\n getUaInfo(): Record {\n return this.userAgent;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Hasher from 'murmurhash';\n\nconst SEED_VALUE = 1; // Seed value for the hash function\nexport class DecisionMaker {\n /**\n * Generates a bucket value based on the hash value, maximum value, and an optional multiplier.\n *\n * @param {number} hashValue - The hash value used for calculation\n * @param {number} maxValue - The maximum value for bucket scaling\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @returns {number} - The calculated bucket value\n */\n generateBucketValue(hashValue: number, maxValue: number, multiplier = 1): number {\n // Calculate the ratio based on the hash value\n const ratio = hashValue / Math.pow(2, 32);\n // Calculate the multiplied value\n const multipliedValue = (maxValue * ratio + 1) * multiplier;\n // Round down to get the final value\n const value = Math.floor(multipliedValue);\n\n return value;\n }\n\n /**\n * Gets the bucket value for a user based on the hash key and maximum value.\n *\n * @param {string} hashKey - The hash key for the user\n * @param {number} [maxValue=100] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value for the user\n */\n getBucketValueForUser(hashKey: string, maxValue = 100): number {\n const hashValue = Hasher.v3(hashKey, SEED_VALUE); // Calculate the hash value\n const bucketValue = this.generateBucketValue(hashValue, maxValue); // Calculate the bucket value\n\n return bucketValue; // Return the calculated bucket value\n }\n\n /**\n * Calculates the bucket value for a given string with optional multiplier and maximum value.\n *\n * @param {string} str - The input string to calculate the bucket value for\n * @param {number} [multiplier=1] - Optional multiplier to adjust the value\n * @param {number} [maxValue=10000] - The maximum value for bucket scaling\n * @returns {number} - The calculated bucket value\n */\n calculateBucketValue(str: string, multiplier = 1, maxValue = 10000): number {\n const hashValue = this.generateHashValue(str); // Generate the hash value for the input string\n\n return this.generateBucketValue(hashValue, maxValue, multiplier); // Generate and return the bucket value\n }\n\n /**\n * Generates the hash value for a given hash key using murmurHash v3.\n *\n * @param {string} hashKey - The hash key for which the hash value is generated\n * @returns {number} - The generated hash value\n */\n generateHashValue(hashKey: string): number {\n return Hasher.v3(hashKey, SEED_VALUE); // Return the hash value generated using murmurHash\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\nimport { LogLevelEnum } from './enums/LogLevelEnum';\n\nconst AnsiColorEnum = {\n BOLD: '\\x1b[1m',\n CYAN: '\\x1b[36m',\n GREEN: '\\x1b[32m',\n LIGHTBLUE: '\\x1b[94m',\n RED: '\\x1b[31m',\n RESET: '\\x1b[0m',\n WHITE: '\\x1b[30m',\n YELLOW: '\\x1b[33m',\n};\n/**\n * Interface defining the structure for a log message builder.\n */\ninterface ILogMessageBuilder {\n loggerConfig: Record; // Configuration for the logger\n transportConfig: Record; // Configuration for the transport mechanism\n prefix: string; // Prefix to be added to each log message\n dateTimeFormat: dynamic; // Function or format for date and time in log messages\n\n formatMessage(level: string, message: string): string; // Method to format a log message\n getFormattedLevel(level: string): string; // Method to format the log level\n getFormattedDateTime(): string; // Method to get formatted date and time\n}\n\n/**\n * Implements the ILogMessageBuilder interface to provide a concrete log message builder.\n */\nexport class LogMessageBuilder implements ILogMessageBuilder {\n loggerConfig: Record;\n transportConfig: Record;\n prefix: string;\n dateTimeFormat: any;\n\n /**\n * Constructs a new LogMessageBuilder instance.\n * @param {Record} loggerConfig - Configuration for the logger.\n * @param {Record} transportConfig - Configuration for the transport mechanism.\n */\n constructor(loggerConfig: Record, transportConfig: Record) {\n this.loggerConfig = loggerConfig;\n this.transportConfig = transportConfig;\n\n // Set the prefix, defaulting to an empty string if not provided.\n this.prefix = this.transportConfig.prefix || this.loggerConfig.prefix || '';\n // Set the date and time format, defaulting to the logger's format if the transport's format is not provided.\n this.dateTimeFormat = this.transportConfig.dateTimeFormat || this.loggerConfig.dateTimeFormat;\n }\n\n /**\n * Formats a log message combining level, prefix, date/time, and the actual message.\n * @param {string} level - The log level.\n * @param {string} message - The message to log.\n * @returns {string} The formatted log message.\n */\n formatMessage(level: string, message: string): string {\n return `[${this.getFormattedLevel(level)}]: ${this.getFormattedPrefix(this.prefix)} ${this.getFormattedDateTime()} ${message}`;\n }\n\n getFormattedPrefix(prefix: string): string {\n if (this.loggerConfig.isAnsiColorEnabled) {\n return `${AnsiColorEnum.BOLD}${AnsiColorEnum.GREEN}${prefix}${AnsiColorEnum.RESET}`;\n }\n\n return `${prefix}`;\n }\n\n /**\n * Returns the formatted log level with appropriate coloring based on the log level.\n * @param {string} level - The log level.\n * @returns {string} The formatted log level.\n */\n getFormattedLevel(level: string): string {\n const upperCaseLevel = level.toUpperCase();\n let LogLevelColorInfoEnum;\n\n if (this.loggerConfig.isAnsiColorEnabled) {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.WHITE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.DEBUG]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.LIGHTBLUE}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.INFO]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.CYAN}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.WARN]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.YELLOW}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n [LogLevelEnum.ERROR]: `${AnsiColorEnum.BOLD}${AnsiColorEnum.RED}${upperCaseLevel}${AnsiColorEnum.RESET}`,\n };\n } else {\n LogLevelColorInfoEnum = {\n [LogLevelEnum.TRACE]: upperCaseLevel,\n [LogLevelEnum.DEBUG]: upperCaseLevel,\n [LogLevelEnum.INFO]: upperCaseLevel,\n [LogLevelEnum.WARN]: upperCaseLevel,\n [LogLevelEnum.ERROR]: upperCaseLevel,\n };\n }\n\n return LogLevelColorInfoEnum[level];\n }\n\n /**\n * Retrieves the current date and time formatted according to the specified format.\n * @returns {string} The formatted date and time.\n */\n getFormattedDateTime(): string {\n return this.dateTimeFormat();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Abstract class representing a logger.\n * This class provides the structure for logging mechanisms and should be extended by specific logger implementations.\n */\nexport abstract class Logger {\n /**\n * Logs a message at the trace level.\n * @param {string} message - The message to log.\n */\n abstract trace(message: string): void;\n\n /**\n * Logs a message at the debug level.\n * @param {string} message - The message to log.\n */\n abstract debug(message: string): void;\n\n /**\n * Logs a message at the info level.\n * @param {string} message - The message to log.\n */\n abstract info(message: string): void;\n\n /**\n * Logs a message at the warn level.\n * @param {string} message - The message to log.\n */\n abstract warn(message: string): void;\n\n /**\n * Logs a message at the error level.\n * @param {string} message - The message to log.\n */\n abstract error(message: string): void;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { v4 as uuidv4 } from 'uuid';\nimport { dynamic } from '../../../types/Common';\n\nimport { Logger } from '../Logger';\nimport { ConsoleTransport } from '../transports/ConsoleTransport';\nimport { LogTransportManager } from './TransportManager';\n\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\n\n/**\n * Interface defining the structure and methods for LogManager.\n */\nexport interface ILogManager {\n transportManager?: LogTransportManager;\n config?: Record;\n name?: string;\n requestId?: string;\n level: string;\n prefix?: string;\n dateTimeFormat?: () => string;\n\n transport?: Record;\n transports?: Array>;\n\n addTransport?(transportObject: Record): void;\n addTransports?(transportsList: Array>): void;\n}\n\n/**\n * LogManager class provides logging functionality with support for multiple transports.\n * It is designed as a singleton to ensure a single instance throughout the application.\n */\nexport class LogManager extends Logger implements ILogManager {\n private static instance: LogManager; // Singleton instance of LogManager\n transportManager: LogTransportManager;\n config: Record;\n name = 'VWO Logger'; // Default logger name\n requestId = uuidv4(); // Unique request ID generated for each instance\n level = LogLevelEnum.ERROR; // Default logging level\n prefix = 'VWO-SDK'; // Default prefix for log messages\n public dateTimeFormat(): string {\n return new Date().toISOString(); // Default date-time format for log messages\n }\n transport: Record;\n transports: Array>;\n\n /**\n * Constructor for LogManager.\n * @param {Record} config - Configuration object for LogManager.\n */\n constructor(config?: Record) {\n super();\n\n this.config = config;\n\n if (config.isAlwaysNewInstance || !LogManager.instance) {\n LogManager.instance = this;\n\n // Initialize configuration with defaults or provided values\n this.config.name = config.name || this.name;\n this.config.requestId = config.requestId || this.requestId;\n this.config.level = config.level || this.level;\n this.config.prefix = config.prefix || this.prefix;\n this.config.dateTimeFormat = config.dateTimeFormat || this.dateTimeFormat;\n\n this.transportManager = new LogTransportManager(this.config);\n\n this.handleTransports();\n }\n\n return LogManager.instance;\n }\n\n /**\n * Provides access to the singleton instance of LogManager.\n * @returns {LogManager} The singleton instance.\n */\n static get Instance(): LogManager {\n return LogManager.instance;\n }\n\n /**\n * Handles the initialization and setup of transports based on configuration.\n */\n handleTransports(): void {\n const transports = this.config.transports;\n\n if (transports?.length) {\n this.addTransports(this.config.transports);\n } else if (this.config.transport && isObject(this.config.transport)) {\n this.addTransport(this.config.transport);\n } else {\n // if (this.config.defaultTransport)\n // Add default ConsoleTransport if no other transport is specified\n this.addTransport(\n new ConsoleTransport({\n level: this.config.level,\n }),\n );\n }\n }\n\n /**\n * Adds a single transport to the LogManager.\n * @param {Record} transport - The transport object to add.\n */\n addTransport(transport: Record): void {\n this.transportManager.addTransport(transport);\n }\n\n /**\n * Adds multiple transports to the LogManager.\n * @param {Array>} transports - The list of transport objects to add.\n */\n addTransports(transports: Record): void {\n for (let i = 0; i < transports.length; i++) {\n this.addTransport(transports[i]);\n }\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log at trace level.\n */\n trace(message: string): void {\n this.transportManager.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log at debug level.\n */\n debug(message: string): void {\n this.transportManager.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log at info level.\n */\n info(message: string): void {\n this.transportManager.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log at warn level.\n */\n warn(message: string): void {\n this.transportManager.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log at error level.\n */\n error(message: string): void {\n this.transportManager.log(LogLevelEnum.ERROR, message);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dynamic } from '../../../types/Common';\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { LogMessageBuilder } from '../LogMessageBuilder';\nimport { Logger } from '../Logger';\nimport { isFunction } from '../../../utils/DataTypeUtil';\n\nenum LogLevelNumberEnum {\n TRACE = 0,\n DEBUG = 1,\n INFO = 2,\n WARN = 3,\n ERROR = 4,\n}\n\ninterface IlogTransport extends Logger {\n transports: Array>;\n config: Record;\n\n // Determines if a message should be logged based on the transport and configuration levels\n shouldLog(transportLevel: string, configLevel: string): boolean;\n // Logs a message at a specified level\n log(level: string, message: string): void;\n}\n\n/**\n * Manages logging transports and delegates logging messages to them based on configuration.\n * Implements the IlogTransport interface.\n */\nexport class LogTransportManager implements IlogTransport {\n transports: Array>;\n config: Record;\n\n /**\n * Initializes the manager with a configuration object.\n * @param {Record} config - Configuration settings for the log manager.\n */\n constructor(config: Record) {\n this.transports = [];\n this.config = config;\n }\n\n /**\n * Adds a new transport to the manager.\n * @param {Record} transport - The transport object to be added.\n */\n addTransport(transport: Record): void {\n this.transports.push(transport);\n }\n\n /**\n * Determines if the log should be processed based on the transport and configuration levels.\n * @param {string} transportLevel - The log level set for the transport.\n * @param {string} configLevel - The log level set in the configuration.\n * @returns {boolean} - Returns true if the log level is appropriate for logging, false otherwise.\n */\n shouldLog(transportLevel: string, configLevel: string): boolean {\n // Default to the most specific level available\n // transportLevel = transportLevel || configLevel || this.config.level;\n\n const targetLevel = LogLevelNumberEnum[transportLevel.toUpperCase()];\n const desiredLevel = LogLevelNumberEnum[(configLevel || this.config.level).toUpperCase()];\n\n return targetLevel >= desiredLevel;\n }\n\n /**\n * Logs a message at TRACE level.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.log(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a message at DEBUG level.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.log(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs a message at INFO level.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.log(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a message at WARN level.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.log(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs a message at ERROR level.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.log(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Delegates the logging of messages to the appropriate transports.\n * @param {string} level - The level at which to log the message.\n * @param {string} message - The message to log.\n */\n log(level: string, message: string): void {\n for (let i = 0; i < this.transports.length; i++) {\n const logMessageBuilder = new LogMessageBuilder(this.config, this.transports[i]);\n const formattedMessage = logMessageBuilder.formatMessage(level, message);\n if (this.shouldLog(level, this.transports[i].level)) {\n if (this.transports[i].log && isFunction(this.transports[i].log)) {\n // Use custom log handler if available\n this.transports[i].log(level, message);\n } else {\n // Otherwise, use the default log method\n this.transports[i][level](formattedMessage);\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum LogLevelEnum {\n TRACE = 'trace',\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { LogManager, ILogManager } from './core/LogManager';\nexport { LogLevelEnum } from './enums/LogLevelEnum';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogLevelEnum } from '../enums/LogLevelEnum';\nimport { Logger } from '../Logger';\n\n/**\n * ConsoleTransport class implements the Logger interface to provide logging functionality.\n * It outputs logs to the console based on the log level set in the configuration.\n */\nexport class ConsoleTransport implements Logger {\n config: Record; // Configuration object for the logger\n level: string; // Current log level\n\n /**\n * Constructor initializes the ConsoleTransport with a configuration object.\n * @param {Record} config - Configuration settings for the logger, including 'level'.\n */\n constructor(config: Record = {}) {\n this.config = config; // Store the configuration\n this.level = this.config.level; // Set the logging level from the configuration\n }\n\n /**\n * Logs a trace message.\n * @param {string} message - The message to log.\n */\n trace(message: string): void {\n this.consoleLog(LogLevelEnum.TRACE, message);\n }\n\n /**\n * Logs a debug message.\n * @param {string} message - The message to log.\n */\n debug(message: string): void {\n this.consoleLog(LogLevelEnum.DEBUG, message);\n }\n\n /**\n * Logs an informational message.\n * @param {string} message - The message to log.\n */\n info(message: string): void {\n this.consoleLog(LogLevelEnum.INFO, message);\n }\n\n /**\n * Logs a warning message.\n * @param {string} message - The message to log.\n */\n warn(message: string): void {\n this.consoleLog(LogLevelEnum.WARN, message);\n }\n\n /**\n * Logs an error message.\n * @param {string} message - The message to log.\n */\n error(message: string): void {\n this.consoleLog(LogLevelEnum.ERROR, message);\n }\n\n /**\n * Generic log function that logs messages to the console based on the log level.\n * @param {string} level - The log level under which the message should be logged.\n * @param {string} message - The message to log.\n */\n consoleLog(level: string, message: string): void {\n console[level](message); // Use console's logging function dynamically based on the level\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { sendGetCall, sendPostCall } from '../../../utils/XMLUtil';\nimport { dynamic } from '../../../types/Common';\nimport { Deferred } from '../../../utils/PromiseUtil';\n\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\nimport { NetworkClientInterface } from './NetworkClientInterface';\n\n/**\n * Implements the NetworkClientInterface to handle network requests.\n */\nexport class NetworkBrowserClient implements NetworkClientInterface {\n /**\n * Performs a GET request using the provided RequestModel.\n * @param {RequestModel} requestModel - The model containing request options.\n * @returns {Promise} A promise that resolves to a ResponseModel.\n */\n GET(requestModel: RequestModel): Promise {\n const deferred = new Deferred();\n\n // Extract network options from the request model.\n const networkOptions: Record = requestModel.getOptions();\n const responseModel = new ResponseModel();\n\n sendGetCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /*try {\n fetch(url)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n return deferred.promise;\n }\n\n /**\n * Performs a POST request using the provided RequestModel.\n * @param {RequestModel} request - The model containing request options.\n * @returns {Promise} A promise that resolves or rejects with a ResponseModel.\n */\n POST(request: RequestModel): Promise {\n const deferred = new Deferred();\n const networkOptions: Record = request.getOptions();\n const responseModel = new ResponseModel();\n\n sendPostCall({\n networkOptions,\n successCallback: (data: dynamic) => {\n responseModel.setData(data);\n deferred.resolve(responseModel);\n },\n errorCallback: (error: dynamic) => {\n responseModel.setError(error);\n deferred.reject(responseModel);\n },\n });\n\n /* try {\n const options: any = Object.assign(\n {},\n { method: HttpMethodEnum.POST },\n { body: networkOptions.body },\n { headers: networkOptions.headers }\n );\n\n fetch(url, options)\n .then(res => {\n // Some endpoints return empty strings as the response body; treat\n // as raw text and handle potential JSON parsing errors below\n return res.text().then(text => {\n let jsonData = {};\n try {\n jsonData = JSON.parse(text);\n } catch (err) {\n console.info(\n `VWO-SDK - [INFO]: VWO didn't send JSON response which is expected: ${err}`\n );\n }\n\n if (res.status === 200) {\n responseModel.setData(jsonData);\n deferred.resolve(responseModel);\n } else {\n let error = `VWO-SDK - [ERROR]: Request failed for fetching account settings. Got Status Code: ${\n res.status\n }`;\n\n responseModel.setError(error);\n deferred.reject(responseModel);\n }\n });\n })\n .catch(err => {\n responseModel.setError(err);\n deferred.reject(responseModel);\n });\n } catch (err) {\n responseModel.setError(err);\n deferred.reject(responseModel);\n } */\n\n return deferred.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\n\n/**\n * A class responsible for creating and modifying request models based on a global configuration.\n */\nexport class RequestHandler {\n /**\n * Creates a new request by merging properties from a base request and a configuration model.\n * If both the request URL and the base URL from the configuration are missing, it returns null.\n * Otherwise, it merges the properties from the configuration into the request if they are not already set.\n *\n * @param {RequestModel} request - The initial request model.\n * @param {GlobalRequestModel} config - The global request configuration model.\n * @returns {RequestModel} The merged request model or null if both URLs are missing.\n */\n createRequest(request: RequestModel, config: GlobalRequestModel): RequestModel {\n // Check if both the request URL and the configuration base URL are missing\n if (\n (config.getBaseUrl() === null || config.getBaseUrl() === undefined) &&\n (request.getUrl() === null || request.getUrl() === undefined)\n ) {\n return null; // Return null if no URL is specified\n }\n // Set the request URL, defaulting to the configuration base URL if not set\n request.setUrl(request.getUrl() || config.getBaseUrl());\n // Set the request timeout, defaulting to the configuration timeout if not set\n request.setTimeout(request.getTimeout() || config.getTimeout());\n // Set the request body, defaulting to the configuration body if not set\n request.setBody(request.getBody() || config.getBody());\n // Set the request headers, defaulting to the configuration headers if not set\n request.setHeaders(request.getHeaders() || config.getHeaders());\n // Initialize request query parameters, defaulting to an empty object if not set\n const requestQueryParams: Record = request.getQuery() || {};\n // Initialize configuration query parameters, defaulting to an empty object if not set\n const configQueryParams: Record = config.getQuery() || {};\n\n // Merge configuration query parameters into the request query parameters if they don't exist\n for (const queryKey in configQueryParams) {\n if (!Object.prototype.hasOwnProperty.call(requestQueryParams, queryKey)) {\n requestQueryParams[queryKey] = configQueryParams[queryKey];\n }\n }\n // Set the merged query parameters back to the request\n request.setQuery(requestQueryParams);\n return request; // Return the modified request\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet NetworkClient;\n\nif ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkBrowserClient').NetworkBrowserClient;\n} else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n NetworkClient = require('./client/NetworkClient').NetworkClient;\n}\n\nexport { NetworkClient };\nexport { NetworkClientInterface } from './client/NetworkClientInterface';\nexport { NetworkManager } from './manager/NetworkManager';\nexport { GlobalRequestModel } from './models/GlobalRequestModel';\nexport { RequestModel } from './models/RequestModel';\nexport { ResponseModel } from './models/ResponseModel';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Deferred } from '../../../utils/PromiseUtil';\nimport { NetworkClientInterface } from '../client/NetworkClientInterface';\nimport { RequestHandler } from '../handlers/RequestHandler';\nimport { GlobalRequestModel } from '../models/GlobalRequestModel';\nimport { RequestModel } from '../models/RequestModel';\nimport { ResponseModel } from '../models/ResponseModel';\n\nexport class NetworkManager {\n private config: GlobalRequestModel; // Holds the global configuration for network requests\n private client: NetworkClientInterface; // Interface for the network client handling the actual HTTP requests\n private static instance: NetworkManager; // Singleton instance of NetworkManager\n\n /**\n * Attaches a network client to the manager, or uses a default if none provided.\n * @param {NetworkClientInterface} client - The client to attach, optional.\n */\n attachClient(client?: NetworkClientInterface): void {\n if ((typeof process.env as any) === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkBrowserClient } = require('../client/NetworkBrowserClient');\n\n this.client = client || new NetworkBrowserClient(); // Use provided client or default to NetworkClient\n } else {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { NetworkClient } = require('../client/NetworkClient');\n\n this.client = client || new NetworkClient(); // Use provided client or default to NetworkClient\n }\n\n this.config = new GlobalRequestModel(null, null, null, null); // Initialize with default config\n }\n\n /**\n * Singleton accessor for the NetworkManager instance.\n * @returns {NetworkManager} The singleton instance.\n */\n static get Instance(): NetworkManager {\n this.instance = this.instance || new NetworkManager(); // Create instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Sets the global configuration for network requests.\n * @param {GlobalRequestModel} config - The configuration to set.\n */\n setConfig(config: GlobalRequestModel): void {\n this.config = config; // Set the global request configuration\n }\n\n /**\n * Retrieves the current global configuration.\n * @returns {GlobalRequestModel} The current configuration.\n */\n getConfig(): GlobalRequestModel {\n return this.config; // Return the global request configuration\n }\n\n /**\n * Creates a network request model by merging specific request data with global config.\n * @param {RequestModel} request - The specific request data.\n * @returns {RequestModel} The merged request model.\n */\n createRequest(request: RequestModel): RequestModel {\n const options: RequestModel = new RequestHandler().createRequest(request, this.config); // Merge and create request\n return options;\n }\n\n /**\n * Performs a GET request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n get(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .GET(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((errorResponse: ResponseModel) => {\n deferred.reject(errorResponse); // Reject with the error response\n });\n }\n\n return deferred.promise; // Return the promise\n }\n\n /**\n * Performs a POST request using the provided request model.\n * @param {RequestModel} request - The request model.\n * @returns {Promise} A promise that resolves to the response model.\n */\n post(request: RequestModel): Promise {\n const deferred = new Deferred(); // Create a new deferred promise\n\n const networkOptions: RequestModel = this.createRequest(request); // Create network request options\n if (!networkOptions.getUrl()) {\n deferred.reject(new Error('no url found')); // Reject if no URL is found\n } else {\n this.client\n .POST(networkOptions)\n .then((response: ResponseModel) => {\n deferred.resolve(response); // Resolve with the response\n })\n .catch((error: ResponseModel) => {\n deferred.reject(error); // Reject with the error\n });\n }\n\n return deferred.promise; // Return the promise\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents a model for global HTTP requests configuration.\n * This class encapsulates all necessary details such as URL, query parameters, body, headers,\n * timeout settings, and development mode flag.\n */\nexport class GlobalRequestModel {\n private url: string; // Base URL of the HTTP request\n private timeout = 3000; // Default timeout for the HTTP request in milliseconds\n private query: Record; // Query parameters for the HTTP request\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n private isDevelopmentMode: boolean; // Flag to indicate if the request is in development mode\n\n /**\n * Constructs an instance of the GlobalRequestModel.\n * @param url The base URL of the HTTP request.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n */\n constructor(\n url: string,\n query: Record,\n body: Record,\n headers: Record,\n ) {\n this.url = url;\n this.query = query;\n this.body = body;\n this.headers = headers;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setBaseUrl(url: string): void {\n this.url = url;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getBaseUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the development mode status for the request.\n * @param isDevelopmentMode Boolean flag indicating if the request is in development mode.\n */\n setDevelopmentMode(isDevelopmentMode: boolean): void {\n this.isDevelopmentMode = isDevelopmentMode;\n }\n\n /**\n * Retrieves the development mode status of the request.\n * @returns Boolean indicating if the request is in development mode.\n */\n getDevelopmentMode(): boolean {\n return this.isDevelopmentMode;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../../../enums/HttpMethodEnum';\nimport { dynamic } from '../../../types/Common';\nimport { HTTPS } from '../../../constants/Url';\n\n/**\n * Represents a model for HTTP requests.\n * This class encapsulates all necessary details such as URL, method, path, query parameters, body, headers,\n * scheme, port, and timeout settings.\n */\nexport class RequestModel {\n private url: string; // Base URL of the HTTP request\n private method: string; // HTTP method (GET, POST, etc.)\n private scheme: string; // Protocol scheme (http, https)\n private port: number; // Port number\n private path: string; // Path of the URL\n private query: Record; // Query parameters\n private timeout: number; // Timeout for the HTTP request in milliseconds\n private body: Record; // Body of the HTTP request\n private headers: Record; // HTTP headers\n\n /**\n * Constructs an instance of the RequestModel.\n * @param url The base URL of the HTTP request.\n * @param method HTTP method, default is 'GET'.\n * @param path URL path.\n * @param query Query parameters as a record of key-value pairs.\n * @param body Body of the request as a record of key-value pairs.\n * @param headers HTTP headers as a record of key-value pairs.\n * @param scheme Protocol scheme, default is 'http'.\n * @param port Port number, default is 80.\n */\n constructor(\n url: string,\n method: string = HttpMethodEnum.GET,\n path: string,\n query: Record,\n body: Record,\n headers: Record,\n scheme: string = HTTPS,\n port: number,\n ) {\n this.url = url;\n this.method = method;\n this.path = path;\n this.query = query;\n this.body = body;\n this.headers = headers;\n this.scheme = scheme;\n this.port = port;\n }\n\n /**\n * Retrieves the HTTP method.\n * @returns The HTTP method as a string.\n */\n getMethod(): string {\n return this.method;\n }\n\n /**\n * Sets the HTTP method.\n * @param method The HTTP method to set.\n */\n setMethod(method: string): void {\n this.method = method;\n }\n\n /**\n * Retrieves the body of the HTTP request.\n * @returns A record of key-value pairs representing the body content.\n */\n getBody(): Record {\n return this.body;\n }\n\n /**\n * Sets the body of the HTTP request.\n * @param body A record of key-value pairs representing the body content.\n */\n setBody(body: Record): void {\n this.body = body;\n }\n\n /**\n * Sets the query parameters for the HTTP request.\n * @param query A record of key-value pairs representing the query parameters.\n */\n setQuery(query: Record): void {\n this.query = query;\n }\n\n /**\n * Retrieves the query parameters of the HTTP request.\n * @returns A record of key-value pairs representing the query parameters.\n */\n getQuery(): Record {\n return this.query;\n }\n\n /**\n * Sets the HTTP headers for the request.\n * @param headers A record of key-value pairs representing the HTTP headers.\n */\n setHeaders(headers: Record): this {\n this.headers = headers;\n return this;\n }\n\n /**\n * Retrieves the HTTP headers of the request.\n * @returns A record of key-value pairs representing the HTTP headers.\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Sets the timeout duration for the HTTP request.\n * @param timeout Timeout in milliseconds.\n */\n setTimeout(timeout: number): this {\n this.timeout = timeout;\n return this;\n }\n\n /**\n * Retrieves the timeout duration of the HTTP request.\n * @returns Timeout in milliseconds.\n */\n getTimeout(): number {\n return this.timeout;\n }\n\n /**\n * Retrieves the base URL of the HTTP request.\n * @returns The base URL as a string.\n */\n getUrl(): string {\n return this.url;\n }\n\n /**\n * Sets the base URL of the HTTP request.\n * @param url The base URL as a string.\n */\n setUrl(url: string): this {\n this.url = url;\n return this;\n }\n\n /**\n * Retrieves the scheme of the HTTP request.\n * @returns The scheme as a string.\n */\n getScheme(): string {\n return this.scheme;\n }\n\n /**\n * Sets the scheme of the HTTP request.\n * @param scheme The scheme to set (http or https).\n */\n setScheme(scheme: string): this {\n this.scheme = scheme;\n return this;\n }\n\n /**\n * Retrieves the port number of the HTTP request.\n * @returns The port number as an integer.\n */\n getPort(): number {\n return this.port;\n }\n\n /**\n * Sets the port number for the HTTP request.\n * @param port The port number to set.\n */\n setPort(port: number): this {\n this.port = port;\n return this;\n }\n\n /**\n * Retrieves the path of the HTTP request.\n * @returns The path as a string.\n */\n getPath(): string {\n return this.path;\n }\n\n /**\n * Sets the path of the HTTP request.\n * @param path The path to set.\n */\n setPath(path: string): this {\n this.path = path;\n return this;\n }\n\n /**\n * Constructs the options for the HTTP request based on the current state of the model.\n * This method is used to prepare the request options for execution.\n * @returns A record containing all relevant options for the HTTP request.\n */\n getOptions(): Record {\n let queryParams = '';\n for (const key in this.query) {\n const queryString = `${key}=${this.query[key]}&`;\n queryParams += queryString;\n }\n\n const [hostname, collectionPrefix] = this.url.split('/');\n const options: Record = {\n hostname, // if url is example.com/as01, hostname will be example.com\n agent: false,\n };\n\n if (this.scheme) {\n options.scheme = this.scheme;\n }\n if (this.port) {\n options.port = this.port;\n }\n if (this.headers) {\n options.headers = this.headers;\n }\n\n if (this.method) {\n options.method = this.method;\n }\n\n if (this.body) {\n const postBody = JSON.stringify(this.body);\n options.headers = options.headers || {};\n options.headers['Content-Type'] = 'application/json';\n\n if (typeof Buffer === 'undefined') {\n options.headers['Content-Length'] = new TextEncoder().encode(postBody).length;\n } else {\n options.headers['Content-Length'] = Buffer.byteLength(postBody);\n }\n options.body = this.body;\n }\n\n if (this.path) {\n if (queryParams !== '') {\n options.path = this.path + '?' + queryParams || '';\n } else {\n options.path = this.path;\n }\n }\n\n if (collectionPrefix) {\n options.path = `/${collectionPrefix}` + options.path;\n }\n if (this.timeout) {\n options.timeout = this.timeout;\n }\n if (options.path.charAt(options.path.length - 1) === '&') {\n options.path = options.path.substring(0, options.path.length - 1);\n }\n\n return options;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../../types/Common';\n\n/**\n * Represents the response model for network operations.\n * This class encapsulates details about the HTTP response including status code, headers, data, and errors.\n */\nexport class ResponseModel {\n private statusCode: number; // HTTP status code of the response\n private error: dynamic; // Error object if the request failed\n private headers: Record; // Headers received in the response\n private data: dynamic; // Data payload of the response\n\n /**\n * Sets the status code of the response.\n * @param {number} statusCode - The HTTP status code\n */\n setStatusCode(statusCode: number): void {\n this.statusCode = statusCode;\n }\n\n /**\n * Sets the headers of the response.\n * @param {Record} headers - The headers of the response\n */\n setHeaders(headers: Record): void {\n this.headers = headers;\n }\n\n /**\n * Sets the data of the response.\n * @param {dynamic} data - The data payload of the response\n */\n setData(data: dynamic): void {\n this.data = data;\n }\n\n /**\n * Sets the error object of the response.\n * @param {dynamic} error - The error object if the request failed\n */\n setError(error: dynamic): void {\n this.error = error;\n }\n\n /**\n * Retrieves the headers of the response.\n * @returns {Record} The headers of the response\n */\n getHeaders(): Record {\n return this.headers;\n }\n\n /**\n * Retrieves the data payload of the response.\n * @returns {dynamic} The data payload of the response\n */\n getData(): dynamic {\n return this.data;\n }\n\n /**\n * Retrieves the status code of the response.\n * @returns {number} The HTTP status code\n */\n getStatusCode(): number {\n return this.statusCode;\n }\n\n /**\n * Retrieves the error object of the response.\n * @returns {dynamic} The error object if the request failed\n */\n getError(): dynamic {\n return this.error;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SegmentEvaluator } from '../evaluators/SegmentEvaluator';\nimport { dynamic } from '../../../types/Common';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { getFromGatewayService, getQueryParams } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\nimport { ContextVWOModel } from '../../../models/user/ContextVWOModel';\nimport { SettingsService } from '../../../services/SettingsService';\nimport { isUndefined } from '../../../utils/DataTypeUtil';\n\nexport class SegmentationManager {\n private static instance: SegmentationManager; // Singleton instance of SegmentationManager\n evaluator: SegmentEvaluator; // Holds the instance of SegmentEvaluator\n\n /**\n * Singleton pattern implementation for getting the instance of SegmentationManager.\n * @returns {SegmentationManager} The singleton instance.\n */\n static get Instance(): SegmentationManager {\n this.instance = this.instance || new SegmentationManager(); // Create new instance if it doesn't exist\n return this.instance;\n }\n\n /**\n * Attaches an evaluator to the manager, or creates a new one if none is provided.\n * @param {SegmentEvaluator} evaluator - Optional evaluator to attach.\n */\n attachEvaluator(evaluator?: SegmentEvaluator): void {\n this.evaluator = evaluator || new SegmentEvaluator(); // Use provided evaluator or create new one\n }\n\n /**\n * Sets the contextual data for the segmentation process.\n * @param {any} settings - The settings data.\n * @param {any} feature - The feature data including segmentation needs.\n * @param {any} context - The context data for the evaluation.\n */\n async setContextualData(settings: SettingsModel, feature: FeatureModel, context: ContextModel) {\n this.attachEvaluator(); // Ensure a fresh evaluator instance\n this.evaluator.settings = settings; // Set settings in evaluator\n this.evaluator.context = context; // Set context in evaluator\n this.evaluator.feature = feature; // Set feature in evaluator\n\n // if both user agent and ip is null then we should not get data from gateway service\n if (context?.getUserAgent() === null && context?.getIpAddress() === null) {\n return;\n }\n\n if (feature.getIsGatewayServiceRequired() === true) {\n if (\n SettingsService.Instance.isGatewayServiceProvided &&\n (isUndefined(context.getVwo()) || context.getVwo() === null)\n ) {\n const queryParams = {};\n if (context?.getUserAgent()) {\n queryParams['userAgent'] = context.getUserAgent();\n }\n\n if (context?.getIpAddress()) {\n queryParams['ipAddress'] = context.getIpAddress();\n }\n try {\n const params = getQueryParams(queryParams);\n const _vwo = await getFromGatewayService(params, UrlEnum.GET_USER_DATA);\n context.setVwo(new ContextVWOModel().modelFromDictionary(_vwo));\n } catch (err) {\n LogManager.Instance.error(`Error in setting contextual data for segmentation. Got error: ${err.error}`);\n }\n }\n }\n }\n\n /**\n * Validates the segmentation against provided DSL and properties.\n * @param {Record} dsl - The segmentation DSL.\n * @param {Record} properties - The properties to validate against.\n * @param {SettingsModel} settings - The settings model.\n * @param {any} context - Optional context.\n * @returns {Promise} True if segmentation is valid, otherwise false.\n */\n async validateSegmentation(dsl: Record, properties: Record): Promise {\n return await this.evaluator.isSegmentationValid(dsl, properties); // Delegate to evaluator's method\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandRegexEnum {\n LOWER = '^lower',\n LOWER_MATCH = '^lower\\\\((.*)\\\\)',\n WILDCARD = '^wildcard',\n WILDCARD_MATCH = '^wildcard\\\\((.*)\\\\)',\n REGEX = '^regex',\n REGEX_MATCH = '^regex\\\\((.*)\\\\)',\n STARTING_STAR = '^\\\\*',\n ENDING_STAR = '\\\\*$',\n GREATER_THAN_MATCH = '^gt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n GREATER_THAN_EQUAL_TO_MATCH = '^gte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_MATCH = '^lt\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n LESS_THAN_EQUAL_TO_MATCH = '^lte\\\\((\\\\d+\\\\.?\\\\d*|\\\\.\\\\d+)\\\\)',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperandValueEnum {\n LOWER_VALUE = 1,\n STARTING_ENDING_STAR_VALUE = 2,\n STARTING_STAR_VALUE = 3,\n ENDING_STAR_VALUE = 4,\n REGEX_VALUE = 5,\n EQUAL_VALUE = 6,\n GREATER_THAN_VALUE = 7,\n GREATER_THAN_EQUAL_TO_VALUE = 8,\n LESS_THAN_VALUE = 9,\n LESS_THAN_EQUAL_TO_VALUE = 10,\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SegmentOperatorValueEnum {\n AND = 'and',\n NOT = 'not',\n OR = 'or',\n CUSTOM_VARIABLE = 'custom_variable',\n USER = 'user',\n COUNTRY = 'country',\n REGION = 'region',\n CITY = 'city',\n OPERATING_SYSTEM = 'os',\n DEVICE_TYPE = 'device_type',\n DEVICE = 'device',\n BROWSER_AGENT = 'browser_string',\n UA = 'ua',\n FEATURE_ID = 'featureId',\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageDecorator } from '../../../decorators/StorageDecorator';\nimport { SettingsModel } from '../../../models/settings/SettingsModel';\nimport { LogManager } from '../../logger';\nimport { StorageService } from '../../../services/StorageService';\nimport { dynamic } from '../../../types/Common';\nimport { isObject } from '../../../utils/DataTypeUtil';\nimport { SegmentOperatorValueEnum } from '../enums/SegmentOperatorValueEnum';\nimport { Segmentation } from '../Segmentation';\nimport { getKeyValue } from '../utils/SegmentUtil';\nimport { SegmentOperandEvaluator } from './SegmentOperandEvaluator';\nimport { ContextModel } from '../../../models/user/ContextModel';\nimport { FeatureModel } from '../../../models/campaign/FeatureModel';\n\nexport class SegmentEvaluator implements Segmentation {\n context: ContextModel;\n settings: SettingsModel;\n feature: FeatureModel;\n\n /**\n * Validates if the segmentation defined in the DSL is applicable based on the provided properties.\n * @param dsl The domain-specific language defining the segmentation rules.\n * @param properties The properties against which the DSL rules are evaluated.\n * @returns A Promise resolving to a boolean indicating if the segmentation is valid.\n */\n async isSegmentationValid(dsl: Record, properties: Record): Promise {\n const { key, value } = getKeyValue(dsl);\n const operator = key;\n const subDsl = value;\n\n // Evaluate based on the type of segmentation operator\n switch (operator) {\n case SegmentOperatorValueEnum.NOT:\n return !(await this.isSegmentationValid(subDsl, properties));\n case SegmentOperatorValueEnum.AND:\n return await this.every(subDsl, properties);\n case SegmentOperatorValueEnum.OR:\n return await this.some(subDsl, properties);\n case SegmentOperatorValueEnum.CUSTOM_VARIABLE:\n return await new SegmentOperandEvaluator().evaluateCustomVariableDSL(subDsl, properties);\n case SegmentOperatorValueEnum.USER:\n return new SegmentOperandEvaluator().evaluateUserDSL(subDsl, properties);\n case SegmentOperatorValueEnum.UA:\n return new SegmentOperandEvaluator().evaluateUserAgentDSL(subDsl, this.context);\n default:\n return false;\n }\n }\n\n /**\n * Evaluates if any of the DSL nodes are valid using the OR logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if any of the nodes are valid.\n */\n async some(dslNodes: Array>, customVariables: Record): Promise {\n const uaParserMap: Record = {};\n let keyCount: number = 0; // Initialize count of keys encountered\n let isUaParser = false;\n\n for (const dsl of dslNodes) {\n for (const key in dsl) {\n // Check for user agent related keys\n if (\n key === SegmentOperatorValueEnum.OPERATING_SYSTEM ||\n key === SegmentOperatorValueEnum.BROWSER_AGENT ||\n key === SegmentOperatorValueEnum.DEVICE_TYPE ||\n key === SegmentOperatorValueEnum.DEVICE\n ) {\n isUaParser = true;\n const value = dsl[key];\n\n if (!uaParserMap[key]) {\n uaParserMap[key] = [];\n }\n\n // Ensure value is treated as an array of strings\n const valuesArray = Array.isArray(value) ? value : [value];\n valuesArray.forEach((val: dynamic) => {\n if (typeof val === 'string') {\n uaParserMap[key].push(val);\n }\n });\n\n keyCount++; // Increment count of keys encountered\n }\n\n // Check for feature toggle based on feature ID\n if (key === SegmentOperatorValueEnum.FEATURE_ID) {\n const featureIdObject = dsl[key] as Record;\n const featureIdKey: string = Object.keys(featureIdObject)[0];\n const featureIdValue: string = featureIdObject[featureIdKey];\n\n if (featureIdValue === 'on' || featureIdValue === 'off') {\n const features = this.settings.getFeatures();\n const feature = features.find((feature) => feature.getId() === parseInt(featureIdKey));\n\n if (feature) {\n const featureKey = feature.getKey();\n const result = await this.checkInUserStorage(this.settings, featureKey, this.context);\n // if the result is false, then we need to return true as feature is not present in the user storage\n if (featureIdValue === 'off') {\n return !result;\n }\n return result;\n } else {\n LogManager.Instance.error('Feature not found with featureIdKey: ' + featureIdKey);\n return null; // Handle the case when feature is not found\n }\n }\n }\n }\n\n // Check if the count of keys encountered is equal to dslNodes.length\n if (isUaParser && keyCount === dslNodes.length) {\n try {\n const uaParserResult = await this.checkUserAgentParser(uaParserMap);\n return uaParserResult;\n } catch (err) {\n LogManager.Instance.error('Failed to validate User Agent. Erro: ' + err);\n }\n }\n\n // Recursively check each DSL node\n if (await this.isSegmentationValid(dsl, customVariables)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates all DSL nodes using the AND logic.\n * @param dslNodes Array of DSL nodes to evaluate.\n * @param customVariables Custom variables provided for evaluation.\n * @returns A Promise resolving to a boolean indicating if all nodes are valid.\n */\n async every(dslNodes: Array>, customVariables: Record): Promise {\n const locationMap: Record = {};\n for (const dsl of dslNodes) {\n // Check if the DSL node contains location-related keys\n if (\n SegmentOperatorValueEnum.COUNTRY in dsl ||\n SegmentOperatorValueEnum.REGION in dsl ||\n SegmentOperatorValueEnum.CITY in dsl\n ) {\n this.addLocationValuesToMap(dsl, locationMap);\n // Check if the number of location keys matches the number of DSL nodes\n if (Object.keys(locationMap).length === dslNodes.length) {\n const segmentResult = await this.checkLocationPreSegmentation(locationMap);\n return segmentResult;\n }\n continue;\n }\n const res = await this.isSegmentationValid(dsl, customVariables);\n if (!res) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Adds location values from a DSL node to a map.\n * @param dsl DSL node containing location data.\n * @param locationMap Map to store location data.\n */\n addLocationValuesToMap(dsl: Record, locationMap: Record): void {\n // Add country, region, and city information to the location map if present\n if (SegmentOperatorValueEnum.COUNTRY in dsl) {\n locationMap[SegmentOperatorValueEnum.COUNTRY] = dsl[SegmentOperatorValueEnum.COUNTRY];\n }\n if (SegmentOperatorValueEnum.REGION in dsl) {\n locationMap[SegmentOperatorValueEnum.REGION] = dsl[SegmentOperatorValueEnum.REGION];\n }\n if (SegmentOperatorValueEnum.CITY in dsl) {\n locationMap[SegmentOperatorValueEnum.CITY] = dsl[SegmentOperatorValueEnum.CITY];\n }\n }\n\n /**\n * Checks if the user's location matches the expected location criteria.\n * @param locationMap Map of expected location values.\n * @returns A Promise resolving to a boolean indicating if the location matches.\n */\n async checkLocationPreSegmentation(locationMap: Record): Promise {\n // Ensure user's IP address is available\n if (this.context?.getIpAddress() === undefined) {\n LogManager.Instance.error('To evaluate location pre Segment, please pass ipAddress in context object');\n return false;\n }\n // Check if location data is available and matches the expected values\n if (\n !this.context?.getVwo()?.getLocation() ||\n this.context?.getVwo()?.getLocation() === undefined ||\n this.context?.getVwo()?.getLocation() === null\n ) {\n return false;\n }\n return this.valuesMatch(locationMap, this.context?.getVwo()?.getLocation());\n }\n\n /**\n * Checks if the user's device information matches the expected criteria.\n * @param uaParserMap Map of expected user agent values.\n * @returns A Promise resolving to a boolean indicating if the user agent matches.\n */\n async checkUserAgentParser(uaParserMap: Record): Promise {\n // Ensure user's user agent is available\n if (!this.context?.getUserAgent() || this.context?.getUserAgent() === undefined) {\n LogManager.Instance.error('To evaluate user agent related segments, please pass userAgent in context object');\n return false;\n }\n // Check if user agent data is available and matches the expected values\n if (!this.context?.getVwo()?.getUaInfo() || this.context?.getVwo()?.getUaInfo() === undefined) {\n return false;\n }\n\n return this.checkValuePresent(uaParserMap, this.context?.getVwo()?.getUaInfo());\n }\n\n /**\n * Checks if the feature is enabled for the user by querying the storage.\n * @param settings The settings model containing configuration.\n * @param featureKey The key of the feature to check.\n * @param user The user object to check against.\n * @returns A Promise resolving to a boolean indicating if the feature is enabled for the user.\n */\n async checkInUserStorage(settings: SettingsModel, featureKey: string, context: ContextModel): Promise {\n const storageService = new StorageService();\n // Retrieve feature data from storage\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if the stored data is an object and not empty\n if (isObject(storedData) && Object.keys(storedData).length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Checks if the actual values match the expected values specified in the map.\n * @param expectedMap A map of expected values for different keys.\n * @param actualMap A map of actual values to compare against.\n * @returns A Promise resolving to a boolean indicating if all actual values match the expected values.\n */\n async checkValuePresent(expectedMap: Record, actualMap: Record): Promise {\n for (const key in actualMap) {\n if (Object.prototype.hasOwnProperty.call(expectedMap, key)) {\n const expectedValues = expectedMap[key];\n // convert expected values to lowercase\n expectedValues.forEach((value, index) => {\n expectedValues[index] = value.toLowerCase();\n });\n const actualValue = actualMap[key];\n\n // Handle wildcard patterns for all keys\n for (const val of expectedValues) {\n // Check if the value is a wildcard pattern and matches the actual value using regex\n if (val.startsWith('wildcard(') && val.endsWith(')')) {\n // Extract pattern from wildcard string\n const wildcardPattern = val.slice(9, -1);\n // Convert wildcard pattern to regex and check if it matches the actual value\n const regex = new RegExp(wildcardPattern.replace(/\\*/g, '.*'), 'i'); // Convert wildcard pattern to regex, 'i' for case-insensitive\n // Check if the actual value matches the regex pattern for the key\n if (regex.test(actualValue)) {\n // match found, return true as we only need to check if any of the expected values match the actual value\n return true;\n }\n }\n }\n\n // this will be checked for all cases where wildcard is not present\n if (expectedValues.includes(actualValue?.toLowerCase())) {\n return true; // Direct value match found, return true\n }\n }\n }\n return false; // No matches found\n }\n\n /**\n * Compares expected location values with user's location to determine a match.\n * @param expectedLocationMap A map of expected location values.\n * @param userLocation The user's actual location.\n * @returns A boolean indicating if the user's location matches the expected values.\n */\n async valuesMatch(expectedLocationMap, userLocation) {\n for (const [key, value] of Object.entries(expectedLocationMap)) {\n if (key in userLocation) {\n const normalizedValue1 = this.normalizeValue(value);\n const normalizedValue2 = this.normalizeValue(userLocation[key]);\n if (normalizedValue1 !== normalizedValue2) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true; // If all values match, return true\n }\n\n /**\n * Normalizes a value to a consistent format for comparison.\n * @param value The value to normalize.\n * @returns The normalized value.\n */\n normalizeValue(value) {\n if (value === null || value === undefined) {\n return null;\n }\n // Remove quotes and trim whitespace\n return value.toString().replace(/^\"|\"$/g, '').trim();\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getKeyValue, matchWithRegex } from '../utils/SegmentUtil';\nimport { SegmentOperandValueEnum } from '../enums/SegmentOperandValueEnum';\nimport { SegmentOperandRegexEnum } from '../enums/SegmentOperandRegexEnum';\nimport { isBoolean } from '../../../utils/DataTypeUtil';\nimport { dynamic } from '../../../types/Common';\nimport { getFromGatewayService } from '../../../utils/GatewayServiceUtil';\nimport { UrlEnum } from '../../../enums/UrlEnum';\nimport { LogManager } from '../../logger';\nimport { ContextModel } from '../../../models/user/ContextModel';\n\n/**\n * SegmentOperandEvaluator class provides methods to evaluate different types of DSL (Domain Specific Language)\n * expressions based on the segment conditions defined for custom variables, user IDs, and user agents.\n */\nexport class SegmentOperandEvaluator {\n /**\n * Evaluates a custom variable DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the custom variable.\n * @param {Record} properties - The properties object containing the actual values to be matched against.\n * @returns {Promise} - A promise that resolves to a boolean indicating if the DSL condition is met.\n */\n async evaluateCustomVariableDSL(\n dslOperandValue: Record,\n properties: Record,\n ): Promise {\n // Extract key and value from the DSL operand\n const { key, value } = getKeyValue(dslOperandValue);\n const operandKey = key;\n const operand = value;\n\n // Check if the property exists\n if (!Object.prototype.hasOwnProperty.call(properties, operandKey)) {\n return false;\n }\n\n // Handle 'inlist' operand\n if (operand.includes('inlist')) {\n const listIdRegex = /inlist\\(([^)]+)\\)/;\n const match = operand.match(listIdRegex);\n if (!match || match.length < 2) {\n LogManager.Instance.error(\"Invalid 'inList' operand format\");\n return false;\n }\n\n // Process the tag value and prepare query parameters\n const tagValue = properties[operandKey];\n const attributeValue = this.preProcessTagValue(tagValue);\n const listId = match[1];\n const queryParamsObj = {\n attribute: attributeValue,\n listId: listId,\n };\n\n // Make a web service call to check the attribute against the list\n try {\n const res = await getFromGatewayService(queryParamsObj, UrlEnum.ATTRIBUTE_CHECK);\n if (!res || res === undefined || res === 'false' || res.status === 0) {\n return false;\n }\n return res;\n } catch (error) {\n LogManager.Instance.error('Error while fetching data: ' + error);\n return false;\n }\n } else {\n // Process other types of operands\n let tagValue = properties[operandKey];\n tagValue = this.preProcessTagValue(tagValue);\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue;\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n }\n\n /**\n * Evaluates a user DSL expression to check if a user ID is in a specified list.\n * @param {Record} dslOperandValue - The DSL expression containing user IDs.\n * @param {Record} properties - The properties object containing the actual user ID to check.\n * @returns {boolean} - True if the user ID is in the list, otherwise false.\n */\n evaluateUserDSL(dslOperandValue: Record, properties: Record): boolean {\n const users = dslOperandValue.split(',');\n for (let i = 0; i < users.length; i++) {\n if (users[i].trim() == properties._vwoUserId) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Evaluates a user agent DSL expression.\n * @param {Record} dslOperandValue - The DSL expression for the user agent.\n * @param {any} context - The context object containing the user agent string.\n * @returns {boolean} - True if the user agent matches the DSL condition, otherwise false.\n */\n evaluateUserAgentDSL(dslOperandValue: Record, context: ContextModel): boolean {\n const operand = dslOperandValue;\n if (!context.getUserAgent() || context.getUserAgent() === undefined) {\n LogManager.Instance.info('To Evaluate UserAgent segmentation, please provide userAgent in context');\n return false;\n }\n let tagValue = decodeURIComponent(context.getUserAgent());\n const { operandType, operandValue } = this.preProcessOperandValue(operand);\n const processedValues = this.processValues(operandValue, tagValue);\n tagValue = processedValues.tagValue as string; // Fix: Type assertion to ensure tagValue is of type string\n return this.extractResult(operandType, processedValues.operandValue, tagValue);\n }\n\n /**\n * Pre-processes the tag value to ensure it is in the correct format for evaluation.\n * @param {any} tagValue - The value to be processed.\n * @returns {string | boolean} - The processed tag value, either as a string or a boolean.\n */\n preProcessTagValue(tagValue: any): string | boolean {\n // Default to empty string if undefined\n if (tagValue === undefined) {\n tagValue = '';\n }\n // Convert boolean values to boolean type\n if (isBoolean(tagValue)) {\n tagValue = tagValue ? true : false;\n }\n // Convert all non-null values to string\n if (tagValue !== null) {\n tagValue = tagValue.toString();\n }\n return tagValue;\n }\n\n /**\n * Pre-processes the operand value to determine its type and extract the value based on regex matches.\n * @param {any} operand - The operand to be processed.\n * @returns {Record} - An object containing the operand type and value.\n */\n preProcessOperandValue(operand: any): Record {\n let operandType: SegmentOperandValueEnum;\n let operandValue: dynamic;\n // Determine the type of operand and extract value based on regex patterns\n if (matchWithRegex(operand, SegmentOperandRegexEnum.LOWER_MATCH)) {\n operandType = SegmentOperandValueEnum.LOWER_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LOWER_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.WILDCARD_MATCH)) {\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.WILDCARD_MATCH);\n const startingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.STARTING_STAR);\n const endingStar = matchWithRegex(operandValue, SegmentOperandRegexEnum.ENDING_STAR);\n // Determine specific wildcard type\n if (startingStar && endingStar) {\n operandType = SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE;\n } else if (startingStar) {\n operandType = SegmentOperandValueEnum.STARTING_STAR_VALUE;\n } else if (endingStar) {\n operandType = SegmentOperandValueEnum.ENDING_STAR_VALUE;\n }\n // Remove wildcard characters from the operand value\n operandValue = operandValue\n .replace(new RegExp(SegmentOperandRegexEnum.STARTING_STAR), '')\n .replace(new RegExp(SegmentOperandRegexEnum.ENDING_STAR), '');\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.REGEX_MATCH)) {\n operandType = SegmentOperandValueEnum.REGEX_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.REGEX_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.GREATER_THAN_EQUAL_TO_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_MATCH);\n } else if (matchWithRegex(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH)) {\n operandType = SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE;\n operandValue = this.extractOperandValue(operand, SegmentOperandRegexEnum.LESS_THAN_EQUAL_TO_MATCH);\n } else {\n operandType = SegmentOperandValueEnum.EQUAL_VALUE;\n operandValue = operand;\n }\n return {\n operandType,\n operandValue,\n };\n }\n\n /**\n * Extracts the operand value from a string based on a specified regex pattern.\n * @param {any} operand - The operand string to extract from.\n * @param {string} regex - The regex pattern to use for extraction.\n * @returns {string} - The extracted value.\n */\n extractOperandValue(operand: any, regex: string): string {\n // Match operand with regex and return the first capturing group\n return matchWithRegex(operand, regex) && matchWithRegex(operand, regex)[1];\n }\n\n /**\n * Processes numeric values from operand and tag values, converting them to strings.\n * @param {any} operandValue - The operand value to process.\n * @param {any} tagValue - The tag value to process.\n * @returns {Record} - An object containing the processed operand and tag values as strings.\n */\n processValues(operandValue: any, tagValue: any): Record {\n // Convert operand and tag values to floats\n const processedOperandValue = parseFloat(operandValue);\n const processedTagValue = parseFloat(tagValue);\n // Return original values if conversion fails\n if (!processedOperandValue || !processedTagValue) {\n return {\n operandValue: operandValue,\n tagValue: tagValue,\n };\n }\n // now we have surity that both are numbers\n // now we can convert them independently to int type if they\n // are int rather than floats\n // if (processedOperandValue === Math.floor(processedOperandValue)) {\n // processedOperandValue = parseInt(processedOperandValue, 10);\n // }\n // if (processedTagValue === Math.floor(processedTagValue)) {\n // processedTagValue = parseInt(processedTagValue, 10);\n // }\n // Convert numeric values back to strings\n return {\n operandValue: processedOperandValue.toString(),\n tagValue: processedTagValue.toString(),\n };\n }\n\n /**\n * Extracts the result of the evaluation based on the operand type and values.\n * @param {SegmentOperandValueEnum} operandType - The type of the operand.\n * @param {any} operandValue - The value of the operand.\n * @param {any} tagValue - The value of the tag to compare against.\n * @returns {boolean} - The result of the evaluation.\n */\n extractResult(operandType: SegmentOperandValueEnum, operandValue: any, tagValue: any): boolean {\n let result: boolean;\n\n switch (operandType) {\n case SegmentOperandValueEnum.LOWER_VALUE:\n // Check if both values are equal, ignoring case\n if (tagValue !== null) {\n result = operandValue.toLowerCase() === tagValue.toLowerCase();\n }\n break;\n case SegmentOperandValueEnum.STARTING_ENDING_STAR_VALUE:\n // Check if the tagValue contains the operandValue\n if (tagValue !== null) {\n result = tagValue.indexOf(operandValue) > -1;\n }\n break;\n case SegmentOperandValueEnum.STARTING_STAR_VALUE:\n // Check if the tagValue ends with the operandValue\n if (tagValue !== null) {\n result = tagValue.endsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.ENDING_STAR_VALUE:\n // Check if the tagValue starts with the operandValue\n if (tagValue !== null) {\n result = tagValue.startsWith(operandValue);\n }\n break;\n case SegmentOperandValueEnum.REGEX_VALUE:\n // Evaluate the tagValue against the regex pattern of operandValue\n try {\n const pattern = new RegExp(operandValue, 'g');\n result = !!pattern.test(tagValue);\n } catch (err) {\n result = false;\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) < parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.GREATER_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) <= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) > parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n case SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:\n if (tagValue !== null) {\n try {\n result = parseFloat(operandValue) >= parseFloat(tagValue);\n } catch (err) {\n result = false;\n }\n }\n break;\n default:\n // Check if the tagValue is exactly equal to the operandValue\n result = tagValue === operandValue;\n }\n\n return result;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { SegmentationManager } from './core/SegmentationManger';\nexport { SegmentEvaluator } from './evaluators/SegmentEvaluator';\nexport { Segmentation } from './Segmentation';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isObject } from '../../../utils/DataTypeUtil';\n\n/**\n * Extracts the first key-value pair from the provided object.\n * @param {Record} obj - The object from which to extract the key-value pair.\n * @returns {Record | undefined} An object containing the first key and value, or undefined if input is not an object.\n */\nexport function getKeyValue(obj: Record): Record | undefined {\n // Check if the input is a valid object using isObject utility function\n if (!isObject(obj)) {\n return;\n }\n\n // Extract the first key from the object\n const key = Object.keys(obj)[0];\n // Retrieve the value associated with the first key\n const value = obj[key];\n // Return an object containing the key and value\n return {\n key,\n value,\n };\n}\n\n/**\n * Matches a string against a regular expression and returns the match result.\n * @param {string} string - The string to match against the regex.\n * @param {string} regex - The regex pattern as a string.\n * @returns {RegExpMatchArray | null} The results of the regex match, or null if an error occurs.\n */\nexport function matchWithRegex(string: string, regex: string): RegExpMatchArray | null {\n try {\n // Attempt to match the string with the regex\n return string.match(new RegExp(regex));\n } catch (err) {\n // Return null if an error occurs during regex matching\n return null;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../../types/Common';\n\nexport abstract class Connector {\n // abstract connect(_config: Record): this;\n\n abstract set(_key: string, _data: dynamic): void | Promise;\n\n abstract get(_key: string): this | Promise;\n\n // abstract getAll(): Record | Promise>>;\n\n // abstract getKeys(): string[] | Promise;\n\n // abstract has(_key: string): boolean | Promise;\n\n // abstract hasData(): boolean | Promise;\n\n // abstract update(_key: string, _data: dynamic, ttl: number): Promise;\n\n // abstract remove(_key: string): this | Promise;\n\n // abstract clear(): this | Promise;\n\n // abstract close(): this; // TODO: stop\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Connector } from './Connector';\n\n// TODO: move to file\n// enum ConnectorEnum {\n// MEMORY = 'memory',\n// REDIS = 'redis'\n// }\n\nexport class Storage {\n public static instance: Storage;\n public connector: Connector | Record; // RedisConnector |\n // public storageType: dynamic;\n\n public attachConnector(connector: any): any {\n if (connector?.prototype?.constructor?.toString()?.trim()?.substring(0, 5) === 'class') {\n this.connector = new connector();\n } else {\n this.connector = connector;\n }\n\n return this.connector;\n }\n\n public static get Instance(): Storage {\n this.instance = this.instance || new Storage();\n\n return this.instance;\n }\n\n public getConnector(): any {\n return this.connector;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { Storage } from './Storage';\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\n\nimport { Constants } from '../constants';\nimport { VariationModel } from '../models/campaign/VariationModel';\n\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { DebugLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\n\ninterface ICampaignDecisionService {\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean;\n getVariation(variations: Array, bucketValue: number): VariationModel;\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel;\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise;\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel;\n}\n\nexport class CampaignDecisionService implements ICampaignDecisionService {\n /**\n * Calculate if this user should become part of the campaign or not\n *\n * @param {String} userId the unique ID assigned to a user\n * @param {Object} campaign fot getting the value of traffic allotted to the campaign\n *\n * @return {Boolean} if User is a part of Campaign or not\n */\n isUserPartOfCampaign(userId: any, campaign: CampaignModel): boolean {\n // if (!ValidateUtil.isValidValue(userId) || !campaign) {\n // return false;\n // }\n\n if (!campaign || !userId) {\n return false;\n }\n let trafficAllocation;\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n trafficAllocation = campaign.getVariations()[0].getWeight();\n } else {\n trafficAllocation = campaign.getTraffic();\n }\n const valueAssignedToUser = new DecisionMaker().getBucketValueForUser(`${campaign.getId()}_${userId}`);\n const isUserPart = valueAssignedToUser !== 0 && valueAssignedToUser <= trafficAllocation;\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_PART_OF_CAMPAIGN, {\n userId,\n notPart: isUserPart ? '' : 'not',\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return isUserPart;\n }\n\n /**\n * Returns the Variation by checking the Start and End Bucket Allocations of each Variation\n *\n * @param {Object} campaign which contains the variations\n * @param {Number} bucketValue the bucket Value of the user\n *\n * @return {Object|null} variation data allotted to the user or null if not\n */\n getVariation(variations: Array, bucketValue: number): VariationModel {\n for (let i = 0; i < variations.length; i++) {\n const variation = variations[i];\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n return null;\n }\n\n checkInRange(variation: VariationModel, bucketValue: number): VariationModel {\n if (bucketValue >= variation.getStartRangeVariation() && bucketValue <= variation.getEndRangeVariation()) {\n return variation;\n }\n }\n\n /**\n * Validates the User ID and generates Variation into which the User is bucketed in.\n *\n * @param {String} userId the unique ID assigned to User\n * @param {Object} campaign the Campaign of which User is a part of\n *\n * @return {Object|null} variation data into which user is bucketed in or null if not\n */\n bucketUserToVariation(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n let multiplier;\n\n if (!campaign || !userId) {\n return null;\n }\n\n if (campaign.getTraffic()) {\n multiplier = 1;\n }\n\n const percentTraffic = campaign.getTraffic();\n const hashValue = new DecisionMaker().generateHashValue(`${campaign.getId()}_${accountId}_${userId}`);\n const bucketValue = new DecisionMaker().generateBucketValue(hashValue, Constants.MAX_TRAFFIC_VALUE, multiplier);\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION, {\n userId,\n campaignKey: campaign.getKey(),\n percentTraffic,\n bucketValue,\n hashValue,\n }),\n );\n\n return this.getVariation(campaign.getVariations(), bucketValue);\n }\n\n async getPreSegmentationDecision(campaign: CampaignModel, context: ContextModel): Promise {\n // validate segmentation\n const campaignType = campaign.getType();\n let segments = {};\n\n if (campaignType === CampaignTypeEnum.ROLLOUT || campaignType === CampaignTypeEnum.PERSONALIZE) {\n segments = campaign.getVariations()[0].getSegments();\n } else if (campaignType === CampaignTypeEnum.AB) {\n segments = campaign.getSegments();\n }\n if (isObject(segments) && !Object.keys(segments).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_SKIP, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n }),\n );\n\n return true;\n } else {\n const preSegmentationResult = await SegmentationManager.Instance.validateSegmentation(\n segments,\n context.getCustomVariables(),\n );\n\n if (!preSegmentationResult) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'failed',\n }),\n );\n\n return false;\n }\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.SEGMENTATION_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status: 'passed',\n }),\n );\n\n return true;\n }\n }\n\n getVariationAlloted(userId: any, accountId: any, campaign: CampaignModel): VariationModel {\n const isUserPart = this.isUserPartOfCampaign(userId, campaign);\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (isUserPart) {\n return campaign.getVariations()[0];\n } else {\n return null;\n }\n } else {\n if (isUserPart) {\n return this.bucketUserToVariation(userId, accountId, campaign);\n } else {\n return null;\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOOptions } from '../models/VWOOptionsModel';\nimport { isFunction } from '../utils/DataTypeUtil';\n\nexport interface IHooksService {\n execute(properties: Record): void;\n set(properties: Record): void;\n get(): Record;\n}\nclass HooksService implements IHooksService {\n private callback: ((properties: Record) => void) | undefined;\n private isCallBackFunction: boolean;\n private decision: Record;\n\n constructor(options: IVWOOptions) {\n this.callback = options.integrations?.callback;\n this.isCallBackFunction = isFunction(this.callback);\n this.decision = {};\n }\n\n /**\n * Executes the callback\n * @param {Record} properties Properties from the callback\n */\n execute(properties: Record): void {\n if (this.isCallBackFunction) {\n this.callback(properties);\n }\n }\n\n /**\n * Sets properties to the decision object\n * @param {Record} properties Properties to set\n */\n set(properties: Record): void {\n if (this.isCallBackFunction) {\n this.decision = properties;\n }\n }\n\n /**\n * Retrieves the decision object\n * @returns {Record} The decision object\n */\n get(): Record {\n return this.decision;\n }\n}\n\nexport default HooksService;\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\n\nimport { Deferred } from '../utils/PromiseUtil';\n\nimport { Constants } from '../constants';\nimport { HTTPS_PROTOCOL, HTTP_PROTOCOL } from '../constants/Url';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsSchema } from '../models/schemas/SettingsSchemaValidation';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { getSettingsPath } from '../utils/NetworkUtil';\n\ninterface ISettingsService {\n sdkKey: string;\n\n getSettings(forceFetch: boolean): Promise>;\n\n fetchSettings(): Promise>;\n}\n\nexport class SettingsService implements ISettingsService {\n sdkKey: string;\n accountId: number;\n expiry: number;\n networkTimeout: number;\n hostname: string;\n port: number;\n protocol: string;\n isGatewayServiceProvided: boolean = false;\n private static instance: SettingsService;\n\n constructor(options: Record) {\n this.sdkKey = options.sdkKey;\n this.accountId = options.accountId;\n this.expiry = options?.settings?.expiry || Constants.SETTINGS_EXPIRY;\n this.networkTimeout = options?.settings?.timeout || Constants.SETTINGS_TIMEOUT;\n\n if (options?.gatewayService?.url) {\n let parsedUrl;\n this.isGatewayServiceProvided = true;\n if (\n options.gatewayService.url.startsWith(HTTP_PROTOCOL) ||\n options.gatewayService.url.startsWith(HTTPS_PROTOCOL)\n ) {\n parsedUrl = new URL(`${options.gatewayService.url}`);\n } else if (options.gatewayService?.protocol) {\n parsedUrl = new URL(`${options.gatewayService.protocol}://${options.gatewayService.url}`);\n } else {\n parsedUrl = new URL(`${HTTPS_PROTOCOL}${options.gatewayService.url}`);\n }\n this.hostname = parsedUrl.hostname;\n this.protocol = parsedUrl.protocol.replace(':', '');\n if (parsedUrl.port) {\n this.port = parseInt(parsedUrl.port);\n } else if (options.gatewayService?.port) {\n this.port = options.gatewayService.port;\n }\n } else {\n this.hostname = Constants.HOST_NAME;\n }\n\n // if (this.expiry > 0) {\n // this.setSettingsExpiry();\n // }\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.SERVICE_INITIALIZED, {\n service: 'Settings Manager',\n }),\n );\n SettingsService.instance = this;\n }\n\n static get Instance(): SettingsService {\n return SettingsService.instance;\n }\n\n private setSettingsExpiry() {\n const settingsTimeout = setTimeout(() => {\n this.fetchSettingsAndCacheInStorage().then(() => {\n clearTimeout(settingsTimeout);\n // again set the timer\n // NOTE: setInterval could be used but it will not consider the time required to fetch settings\n // This breaks the timer rythm and also sends more call than required\n this.setSettingsExpiry();\n });\n }, this.expiry);\n }\n\n private fetchSettingsAndCacheInStorage() {\n const deferredObject = new Deferred();\n // const storageConnector = Storage.Instance.getConnector();\n\n this.fetchSettings()\n .then(async (res) => {\n // LogManager.Instance.info('Settings fetched successfully');\n\n // const method = update ? 'update' : 'set';\n\n // storageConnector[method](Constants.SETTINGS, res).then(() => {\n // LogManager.Instance.info('Settings persisted in cache: memory');\n // deferredObject.resolve(res);\n // });\n deferredObject.resolve(res);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.resolve(null);\n });\n\n return deferredObject.promise;\n }\n\n fetchSettings(): Promise> {\n const deferredObject = new Deferred();\n\n if (!this.sdkKey || !this.accountId) {\n deferredObject.reject(new Error('sdkKey is required for fetching account settings. Aborting!'));\n }\n\n const networkInstance = NetworkManager.Instance;\n const options: Record = getSettingsPath(this.sdkKey, this.accountId);\n\n options.platform = Constants.PLATFORM;\n options['api-version'] = Constants.API_VERSION;\n\n if (!networkInstance.getConfig().getDevelopmentMode()) {\n options.s = 'prod';\n }\n\n try {\n const request: RequestModel = new RequestModel(\n this.hostname,\n HttpMethodEnum.GET,\n Constants.SETTINTS_ENDPOINT,\n options,\n null,\n null,\n this.protocol,\n this.port,\n );\n request.setTimeout(this.networkTimeout);\n\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.SETTINGS_FETCH_ERROR, {\n err: JSON.stringify(err),\n }),\n );\n\n deferredObject.reject(err);\n return deferredObject.promise;\n }\n }\n\n getSettings(forceFetch = false): Promise> {\n const deferredObject = new Deferred();\n\n if (forceFetch) {\n this.fetchSettingsAndCacheInStorage().then((settings: Record) => {\n deferredObject.resolve(settings);\n });\n } else {\n // const storageConnector = Storage.Instance.getConnector();\n\n // if (storageConnector) {\n // storageConnector\n // .get(Constants.SETTINGS)\n // .then((storedSettings: dynamic) => {\n // if (!isObject(storedSettings)) {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n // if (isSettingsValid) {\n // deferredObject.resolve(fetchedSettings);\n // } else {\n // deferredObject.reject(new Error('Settings are not valid. Failed schema validation.'));\n // }\n // });\n // } else {\n // deferredObject.resolve(storedSettings);\n // }\n // })\n // .catch(() => {\n // this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => {\n // deferredObject.resolve(fetchedSettings);\n // });\n // });\n // } else {\n this.fetchSettingsAndCacheInStorage().then((fetchedSettings: Record) => {\n const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings);\n if (isSettingsValid) {\n LogManager.Instance.info(InfoLogMessagesEnum.SETTINGS_FETCH_SUCCESS);\n\n deferredObject.resolve(fetchedSettings);\n } else {\n LogManager.Instance.error(ErrorLogMessagesEnum.SETTINGS_SCHEMA_INVALID);\n\n deferredObject.resolve({});\n }\n });\n // }\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StorageEnum } from '../enums/StorageEnum';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { Storage } from '../packages/storage';\nimport { dynamic } from '../types/Common';\n\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { LogManager } from '../packages/logger';\nimport { isNull, isUndefined } from '../utils/DataTypeUtil';\nimport { buildMessage } from '../utils/LogMessageUtil';\nimport { Deferred } from '../utils/PromiseUtil';\n\nexport interface IStorageService {\n getDataInStorage(featureKey: any, context: ContextModel): Promise>;\n setDataInStorage(data: Record): Promise;\n}\nexport class StorageService implements IStorageService {\n private storageData: Record = {};\n\n /**\n * Retrieves data from storage based on the feature key and user ID.\n * @param featureKey The key to identify the feature data.\n * @param user The user object containing at least an ID.\n * @returns A promise that resolves to the data retrieved or an error/storage status enum.\n */\n async getDataInStorage(featureKey: any, context: ContextModel): Promise> {\n const deferredObject = new Deferred();\n const storageInstance = Storage.Instance.getConnector();\n\n // Check if the storage instance is available\n if (isNull(storageInstance) || isUndefined(storageInstance)) {\n deferredObject.resolve(StorageEnum.STORAGE_UNDEFINED);\n } else {\n storageInstance\n .get(featureKey, context.getId())\n .then((data: Record) => {\n deferredObject.resolve(data);\n })\n .catch((err) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.STORED_DATA_ERROR, {\n err,\n }),\n );\n\n deferredObject.resolve(StorageEnum.NO_DATA_FOUND);\n });\n }\n\n return deferredObject.promise;\n }\n\n /**\n * Stores data in the storage.\n * @param data The data to be stored as a record.\n * @returns A promise that resolves to true if data is successfully stored, otherwise false.\n */\n async setDataInStorage(data: Record): Promise {\n const deferredObject = new Deferred();\n\n const storageInstance = Storage.Instance.getConnector();\n // Check if the storage instance is available\n if (storageInstance === null || storageInstance === undefined) {\n deferredObject.resolve(false);\n } else {\n storageInstance\n .set(data)\n .then(() => {\n deferredObject.resolve(true);\n })\n .catch(() => {\n deferredObject.resolve(false);\n });\n }\n\n return deferredObject.promise;\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { RuleModel } from '../models/campaign/RuleModel';\n/**\n * Sets the variation allocation for a given campaign based on its type.\n * If the campaign type is ROLLOUT or PERSONALIZE, it handles the campaign using `_handleRolloutCampaign`.\n * Otherwise, it assigns range values to each variation in the campaign.\n * @param {CampaignModel} campaign - The campaign for which to set the variation allocation.\n */\nexport function setVariationAllocation(campaign: CampaignModel): void {\n // Check if the campaign type is ROLLOUT or PERSONALIZE\n if (campaign.getType() === CampaignTypeEnum.ROLLOUT || campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n _handleRolloutCampaign(campaign);\n } else {\n let currentAllocation = 0;\n // Iterate over each variation in the campaign\n campaign.getVariations().forEach((variation) => {\n // Assign range values to the variation and update the current allocation\n const stepFactor = assignRangeValues(variation, currentAllocation);\n currentAllocation += stepFactor;\n // Log the range allocation for debugging\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: variation.getStartRangeVariation(),\n endRange: variation.getEndRangeVariation(),\n }),\n );\n });\n }\n}\n\n/**\n * Assigns start and end range values to a variation based on its weight.\n * @param {VariationModel} data - The variation model to assign range values.\n * @param {number} currentAllocation - The current allocation value before this variation.\n * @returns {number} The step factor calculated from the variation's weight.\n */\nexport function assignRangeValues(data: VariationModel, currentAllocation: number) {\n // Calculate the bucket range based on the variation's weight\n const stepFactor: number = _getVariationBucketRange(data.getWeight());\n\n // Set the start and end range of the variation\n if (stepFactor) {\n data.setStartRange(currentAllocation + 1);\n data.setEndRange(currentAllocation + stepFactor);\n } else {\n data.setStartRange(-1);\n data.setEndRange(-1);\n }\n return stepFactor;\n}\n\n/**\n * Scales the weights of variations to sum up to 100%.\n * @param {any[]} variations - The list of variations to scale.\n */\nexport function scaleVariationWeights(variations: any) {\n // Calculate the total weight of all variations\n const totalWeight = variations.reduce((acc, variation) => {\n return acc + variation.weight;\n }, 0);\n // If total weight is zero, assign equal weight to each variation\n if (!totalWeight) {\n const equalWeight = 100 / variations.length;\n variations.forEach((variation) => (variation.weight = equalWeight));\n } else {\n // Scale each variation's weight to make the total 100%\n variations.forEach((variation) => (variation.weight = (variation.weight / totalWeight) * 100));\n }\n}\n\n/**\n * Generates a bucketing seed based on user ID, campaign, and optional group ID.\n * @param {string} userId - The user ID.\n * @param {any} campaign - The campaign object.\n * @param {string} [groupId] - The optional group ID.\n * @returns {string} The bucketing seed.\n */\nexport function getBucketingSeed(userId: string, campaign: CampaignModel, groupId: number) {\n // Return a seed combining group ID and user ID if group ID is provided\n if (groupId) {\n return `${groupId}_${userId}`;\n }\n // Return a seed combining campaign ID and user ID otherwise\n return `${campaign.getId()}_${userId}`;\n}\n\n/**\n * Retrieves a variation by its ID within a specific campaign identified by its key.\n * @param {SettingsModel} settings - The settings model containing all campaigns.\n * @param {string} campaignKey - The key of the campaign.\n * @param {string} variationId - The ID of the variation to retrieve.\n * @returns {VariationModel | null} The found variation model or null if not found.\n */\nexport function getVariationFromCampaignKey(settings: SettingsModel, campaignKey: string, variationId: number) {\n // Find the campaign by its key\n const campaign: CampaignModel = settings.getCampaigns().find((campaign: CampaignModel) => {\n return campaign.getKey() === campaignKey;\n });\n\n if (campaign) {\n // Find the variation by its ID within the found campaign\n const variation: VariationModel = campaign.getVariations().find((variation: VariationModel) => {\n return variation.getId() === variationId;\n });\n\n if (variation) {\n // Return a new instance of VariationModel based on the found variation\n return new VariationModel().modelFromDictionary(variation);\n }\n }\n return null;\n}\n\n/**\n * Sets the allocation ranges for a list of campaigns.\n * @param {CampaignModel[]} campaigns - The list of campaigns to set allocations for.\n */\nexport function setCampaignAllocation(campaigns: any[]) {\n let stepFactor = 0;\n for (let i = 0, currentAllocation = 0; i < campaigns.length; i++) {\n const campaign = campaigns[i];\n\n // Assign range values to each campaign and update the current allocation\n stepFactor = assignRangeValuesMEG(campaign, currentAllocation);\n currentAllocation += stepFactor;\n }\n}\n\n/**\n * Determines if a campaign is part of a group.\n * @param {SettingsModel} settings - The settings model containing group associations.\n * @param {string} campaignId - The ID of the campaign to check.\n * @param {any} [variationId=null] - The optional variation ID.\n * @returns {Object} An object containing the group ID and name if the campaign is part of a group, otherwise an empty object.\n */\nexport function getGroupDetailsIfCampaignPartOfIt(settings: SettingsModel, campaignId: any, variationId: any = null) {\n /**\n * If variationId is null, that means that campaign is testing campaign\n * If variationId is not null, that means that campaign is personalization campaign and we need to append variationId to campaignId using _\n * then check if the current campaign is part of any group\n */\n let campaignToCheck = campaignId.toString();\n // check if variationId is not null\n if (variationId !== null) {\n // if variationId is not null, then append it to the campaignId like campaignId_variationId\n campaignToCheck = `${campaignId}_${variationId}`.toString();\n }\n if (\n settings.getCampaignGroups() &&\n Object.prototype.hasOwnProperty.call(settings.getCampaignGroups(), campaignToCheck)\n ) {\n return {\n groupId: settings.getCampaignGroups()[campaignToCheck],\n groupName: settings.getGroups()[settings.getCampaignGroups()[campaignToCheck]].name,\n };\n }\n return {};\n}\n\n/**\n * Finds all groups associated with a feature specified by its key.\n * @param {SettingsModel} settings - The settings model containing all features and groups.\n * @param {string} featureKey - The key of the feature to find groups for.\n * @returns {Array} An array of groups associated with the feature.\n */\nexport function findGroupsFeaturePartOf(settings: SettingsModel, featureKey: string) {\n // Initialize an array to store all rules for the given feature to fetch campaignId and variationId later\n const ruleArray: Array = [];\n // Loop over all rules inside the feature where the feature key matches and collect all rules\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n if (ruleArray.indexOf(rule) === -1) {\n ruleArray.push(rule);\n }\n });\n }\n });\n\n // Loop over all campaigns and find the group for each campaign\n const groups: Array = [];\n ruleArray.forEach((rule) => {\n const group = getGroupDetailsIfCampaignPartOfIt(\n settings,\n rule.getCampaignId(),\n rule.getType() === CampaignTypeEnum.PERSONALIZE ? rule.getVariationId() : null,\n );\n if (group.groupId) {\n // Check if the group is already added to the groups array to avoid duplicates\n const groupIndex = groups.findIndex((grp) => grp.groupId === group.groupId);\n if (groupIndex === -1) {\n groups.push(group);\n }\n }\n });\n return groups;\n}\n\n/**\n * Retrieves campaigns by a specific group ID.\n * @param {SettingsModel} settings - The settings model containing all groups.\n * @param {any} groupId - The ID of the group.\n * @returns {Array} An array of campaigns associated with the specified group ID.\n */\nexport function getCampaignsByGroupId(settings: SettingsModel, groupId: number) {\n const group = settings.getGroups()[groupId];\n if (group) {\n return group.campaigns; // Return the campaigns associated with the group\n } else {\n return []; // Return an empty array if the group ID is not found\n }\n}\n\n/**\n * Retrieves feature keys from a list of campaign IDs.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {any} campaignIdWithVariation - An array of campaign IDs and variation IDs in format campaignId_variationId.\n * @returns {Array} An array of feature keys associated with the provided campaign IDs.\n */\nexport function getFeatureKeysFromCampaignIds(settings: SettingsModel, campaignIdWithVariation: any) {\n const featureKeys = [];\n for (const campaign of campaignIdWithVariation) {\n // split key with _ to separate campaignId and variationId\n const [campaignId, variationId] = campaign.split('_').map(Number);\n settings.getFeatures().forEach((feature) => {\n // check if feature already exists in the featureKeys array\n if (featureKeys.indexOf(feature.getKey()) !== -1) {\n return;\n }\n feature.getRules().forEach((rule) => {\n if (rule.getCampaignId() === campaignId) {\n // Check if variationId is provided and matches the rule's variationId\n if (variationId !== undefined && variationId !== null) {\n // Add feature key if variationId matches\n if (rule.getVariationId() === variationId) {\n featureKeys.push(feature.getKey());\n }\n } else {\n // Add feature key if no variationId is provided\n featureKeys.push(feature.getKey());\n }\n }\n });\n });\n }\n return featureKeys;\n}\n\n/**\n * Retrieves campaign IDs from a specific feature key.\n * @param {SettingsModel} settings - The settings model containing all features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of campaign IDs associated with the specified feature key.\n */\nexport function getCampaignIdsFromFeatureKey(settings: SettingsModel, featureKey: string) {\n const campaignIds = [];\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRules().forEach((rule) => {\n campaignIds.push(rule.getCampaignId()); // Add campaign ID if feature key matches\n });\n }\n });\n return campaignIds;\n}\n\n/**\n * Assigns range values to a campaign based on its weight.\n * @param {any} data - The campaign data containing weight.\n * @param {number} currentAllocation - The current allocation value before this campaign.\n * @returns {number} The step factor calculated from the campaign's weight.\n */\nexport function assignRangeValuesMEG(data: any, currentAllocation: number) {\n const stepFactor: number = _getVariationBucketRange(data.weight);\n\n if (stepFactor) {\n data.startRangeVariation = currentAllocation + 1; // Set the start range\n data.endRangeVariation = currentAllocation + stepFactor; // Set the end range\n } else {\n data.startRangeVariation = -1; // Set invalid range if step factor is zero\n data.endRangeVariation = -1;\n }\n return stepFactor;\n}\n\n/**\n * Retrieves the rule type using a campaign ID from a specific feature.\n * @param {any} feature - The feature containing rules.\n * @param {number} campaignId - The campaign ID to find the rule type for.\n * @returns {string} The rule type if found, otherwise an empty string.\n */\nexport function getRuleTypeUsingCampaignIdFromFeature(feature: FeatureModel, campaignId: number) {\n const rule = feature.getRules().find((rule) => rule.getCampaignId() === campaignId);\n return rule ? rule.getType() : ''; // Return the rule type if found\n}\n\n/**\n * Calculates the bucket range for a variation based on its weight.\n * @param {number} variationWeight - The weight of the variation.\n * @returns {number} The calculated bucket range.\n */\nfunction _getVariationBucketRange(variationWeight: number) {\n if (!variationWeight || variationWeight === 0) {\n return 0; // Return zero if weight is invalid or zero\n }\n\n const startRange = Math.ceil(variationWeight * 100);\n\n return Math.min(startRange, Constants.MAX_TRAFFIC_VALUE); // Ensure the range does not exceed the max traffic value\n}\n\n/**\n * Handles the rollout campaign by setting start and end ranges for all variations.\n * @param {CampaignModel} campaign - The campaign to handle.\n */\nfunction _handleRolloutCampaign(campaign: CampaignModel): void {\n // Set start and end ranges for all variations in the campaign\n for (let i = 0; i < campaign.getVariations().length; i++) {\n const variation = campaign.getVariations()[i];\n const endRange = campaign.getVariations()[i].getWeight() * 100;\n\n variation.setStartRange(1);\n variation.setEndRange(endRange);\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.VARIATION_RANGE_ALLOCATION, {\n variationKey: variation.getKey(),\n campaignKey: campaign.getKey(),\n variationWeight: variation.getWeight(),\n startRange: 1,\n endRange,\n }),\n );\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\ntype FunctionType = (val: dynamic) => void;\n\n/**\n * Checks if a value is an object excluding arrays, functions, regexes, promises, and dates.\n * @param val The value to check.\n * @returns True if the value is an object, false otherwise.\n */\nexport function isObject(\n val: T,\n): val is Record & Exclude | FunctionType | RegExp | Promise | Date> {\n // Using Object.prototype.toString to get a precise string representation of the value type\n return Object.prototype.toString.call(val) === '[object Object]';\n}\n\n/**\n * Checks if a value is an array.\n * @param val The value to check.\n * @returns True if the value is an array, false otherwise.\n */\nexport function isArray(val: dynamic): val is Array {\n return Object.prototype.toString.call(val) === '[object Array]';\n}\n\n/**\n * Checks if a value is null.\n * @param val The value to check.\n * @returns True if the value is null, false otherwise.\n */\nexport function isNull(val: dynamic): val is null {\n return Object.prototype.toString.call(val) === '[object Null]';\n}\n\n/**\n * Checks if a value is undefined.\n * @param val The value to check.\n * @returns True if the value is undefined, false otherwise.\n */\nexport function isUndefined(val: dynamic): val is undefined {\n return Object.prototype.toString.call(val) === '[object Undefined]';\n}\n\n/**\n * Checks if a value is defined, i.e., not undefined and not null.\n * @param val The value to check.\n * @returns True if the value is defined, false otherwise.\n */\nexport function isDefined(val: T): val is NonNullable {\n return !isUndefined(val) && !isNull(val);\n}\n\n/**\n * Checks if a value is a number, including NaN.\n * @param val The value to check.\n * @returns True if the value is a number, false otherwise.\n */\nexport function isNumber(val: dynamic): val is number {\n // Note: NaN is also a number\n return Object.prototype.toString.call(val) === '[object Number]';\n}\n\n/**\n * Checks if a value is a string.\n * @param val The value to check.\n * @returns True if the value is a string, false otherwise.\n */\nexport function isString(val: dynamic): val is string {\n return Object.prototype.toString.call(val) === '[object String]';\n}\n\n/**\n * Checks if a value is a boolean.\n * @param val The value to check.\n * @returns True if the value is a boolean, false otherwise.\n */\nexport function isBoolean(val: dynamic): val is boolean {\n return Object.prototype.toString.call(val) === '[object Boolean]';\n}\n\n/**\n * Checks if a value is NaN.\n * @param val The value to check.\n * @returns True if the value is NaN, false otherwise.\n */\nexport function isNaN(val: dynamic): val is number {\n // NaN is the only JavaScript value that is treated as unequal to itself\n return val !== val;\n}\n\n/**\n * Checks if a value is a Date object.\n * @param val The value to check.\n * @returns True if the value is a Date object, false otherwise.\n */\nexport function isDate(val: dynamic): val is Date {\n return Object.prototype.toString.call(val) === '[object Date]';\n}\n\n/**\n * Checks if a value is a function.\n * @param val The value to check.\n * @returns True if the value is a function, false otherwise.\n */\nexport function isFunction(val: dynamic): val is FunctionType {\n return Object.prototype.toString.call(val) === '[object Function]';\n}\n\n/**\n * Checks if a value is a regular expression.\n * @param val The value to check.\n * @returns True if the value is a regular expression, false otherwise.\n */\nexport function isRegex(val: dynamic): val is RegExp {\n return Object.prototype.toString.call(val) === '[object RegExp]';\n}\n\n/**\n * Checks if a value is a Promise.\n * @param val The value to check.\n * @returns True if the value is a Promise, false otherwise.\n */\nexport function isPromise(val: dynamic): val is Promise {\n return Object.prototype.toString.call(val) === '[object Promise]';\n}\n\n/**\n * Determines the type of the given value using various type-checking utility functions.\n * @param val The value to determine the type of.\n * @returns A string representing the type of the value.\n */\nexport function getType(val: dynamic): string {\n // Check if the value is an Object (excluding arrays, functions, etc.)\n return isObject(val)\n ? 'Object'\n : // Check if the value is an Array\n isArray(val)\n ? 'Array'\n : // Check if the value is null\n isNull(val)\n ? 'Null'\n : // Check if the value is undefined\n isUndefined(val)\n ? 'Undefined'\n : // Check if the value is NaN (Not a Number)\n isNaN(val)\n ? 'NaN'\n : // Check if the value is a Number (including NaN)\n isNumber(val)\n ? 'Number'\n : // Check if the value is a String\n isString(val)\n ? 'String'\n : // Check if the value is a Boolean\n isBoolean(val)\n ? 'Boolean'\n : // Check if the value is a Date object\n isDate(val)\n ? 'Date'\n : // Check if the value is a Regular Expression\n isRegex(val)\n ? 'Regex'\n : // Check if the value is a Function\n isFunction(val)\n ? 'Function'\n : // Check if the value is a Promise\n isPromise(val)\n ? 'Promise'\n : // If none of the above, return 'Unknown Type'\n 'Unknown Type';\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isPromise } from '../utils/DataTypeUtil';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { StatusEnum } from '../enums/StatusEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { SegmentationManager } from '../packages/segmentation-evaluator';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from '../utils/DataTypeUtil';\nimport { Constants } from '../constants';\nimport {\n assignRangeValues,\n getBucketingSeed,\n getGroupDetailsIfCampaignPartOfIt,\n scaleVariationWeights,\n} from './CampaignUtil';\nimport { cloneObject } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { evaluateGroups } from './MegUtil';\nimport { getUUID } from './UuidUtil';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\n\nexport const checkWhitelistingAndPreSeg = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise<[boolean, any]> => {\n const vwoUserId = getUUID(context.getId(), settings.getAccountId());\n const campaignId = campaign.getId();\n\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // set _vwoUserId for variation targeting variables\n context.setVariationTargetingVariables(\n Object.assign({}, context.getVariationTargetingVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { variationTargetingVariables: context.getVariationTargetingVariables() }); // for integration\n\n // check if the campaign satisfies the whitelisting\n if (campaign.getIsForcedVariationEnabled()) {\n const whitelistedVariation = await _checkCampaignWhitelisting(campaign, context);\n if (whitelistedVariation && Object.keys(whitelistedVariation).length > 0) {\n return [true, whitelistedVariation];\n }\n } else {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey: campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n }\n }\n // userlist segment is also available for campaign pre segmentation\n context.setCustomVariables(\n Object.assign({}, context.getCustomVariables(), {\n _vwoUserId: campaign.getIsUserListEnabled() ? vwoUserId : context.getId(),\n }),\n );\n\n Object.assign(decision, { customVariables: context.getCustomVariables() }); // for integeration\n\n // Check if RUle being evaluated is part of Mutually Exclusive Group\n const { groupId } = getGroupDetailsIfCampaignPartOfIt(\n settings,\n campaign.getId(),\n campaign.getType() === CampaignTypeEnum.PERSONALIZE ? campaign.getVariations()[0].getId() : null,\n );\n // Check if group is already evaluated and we have eligible winner campaigns\n const groupWinnerCampaignId = megGroupWinnerCampaigns?.get(groupId);\n if (groupWinnerCampaignId) {\n if (campaign.getType() === CampaignTypeEnum.AB) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId) {\n return [true, null];\n }\n } else if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n // check if the campaign is the winner of the group\n if (groupWinnerCampaignId === campaignId + '_' + campaign.getVariations()[0].getId()) {\n return [true, null];\n }\n }\n // as group is already evaluated, no need to check again, return false directly\n return [false, null];\n } else {\n // check in storage if the group is already evaluated for the user\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n storageService,\n );\n if (storedData && storedData.experimentKey && storedData.experimentId) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n if (storedData.experimentId === campaignId) {\n // return the campaign if the called campaignId matches\n if (campaign.getType() === CampaignTypeEnum.PERSONALIZE) {\n if (storedData.experimentVariationId === campaign.getVariations()[0].getId()) {\n // if personalise then check if the reqeusted variation is the winner\n return [true, null];\n } else {\n // if requested variation is not the winner then set the winner campaign in the map and return\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n return [false, null];\n }\n } else {\n return [true, null];\n }\n }\n if (storedData.experimentVariationId != -1) {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId + '_' + storedData.experimentVariationId);\n } else {\n megGroupWinnerCampaigns.set(groupId, storedData.experimentId);\n }\n return [false, null];\n }\n }\n\n // If Whitelisting is skipped/failed and campaign not part of any MEG Groups\n // Check campaign's pre-segmentation\n const isPreSegmentationPassed = await new CampaignDecisionService().getPreSegmentationDecision(campaign, context);\n\n if (isPreSegmentationPassed && groupId) {\n const winnerCampaign = await evaluateGroups(\n settings,\n feature,\n groupId,\n evaluatedFeatureMap,\n context,\n storageService,\n );\n\n if (winnerCampaign && winnerCampaign.id === campaignId) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n return [true, null];\n } else {\n // if personalise then check if the reqeusted variation is the winner\n if (winnerCampaign.variations[0].id === campaign.getVariations()[0].getId()) {\n return [true, null];\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n return [false, null];\n }\n }\n } else if (winnerCampaign) {\n if (winnerCampaign.type === CampaignTypeEnum.AB) {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id);\n } else {\n megGroupWinnerCampaigns.set(groupId, winnerCampaign.id + '_' + winnerCampaign.variations[0].id);\n }\n return [false, null];\n }\n megGroupWinnerCampaigns.set(groupId, -1);\n return [false, null];\n }\n\n return [isPreSegmentationPassed, null];\n};\n\nexport const evaluateTrafficAndGetVariation = (\n settings: SettingsModel,\n campaign: CampaignModel,\n userId: string | number,\n): VariationModel => {\n const variation = new CampaignDecisionService().getVariationAlloted(userId, settings.getAccountId(), campaign);\n if (!variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: 'did not get any variation',\n }),\n );\n\n return null;\n }\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId,\n status: `got variation:${variation.getKey()}`,\n }),\n );\n\n return variation;\n};\n\n/******************\n * PRIVATE METHODS\n ******************/\n\n/**\n * Check for whitelisting\n * @param campaign Campaign object\n * @param userId User ID\n * @param variationTargetingVariables Variation targeting variables\n * @returns\n */\nconst _checkCampaignWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n // check if the campaign satisfies the whitelisting\n const whitelistingResult = await _evaluateWhitelisting(campaign, context);\n const status = whitelistingResult ? StatusEnum.PASSED : StatusEnum.FAILED;\n const variationString = whitelistingResult ? whitelistingResult.variation.key : '';\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_STATUS, {\n userId: context.getId(),\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n status,\n variationString,\n }),\n );\n\n return whitelistingResult;\n};\n\nconst _evaluateWhitelisting = async (campaign: CampaignModel, context: ContextModel): Promise => {\n const targetedVariations = [];\n const promises: Promise[] = [];\n\n let whitelistedVariation;\n\n campaign.getVariations().forEach((variation) => {\n if (isObject(variation.getSegments()) && !Object.keys(variation.getSegments()).length) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.WHITELISTING_SKIP, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n variation: variation.getKey() ? `for variation: ${variation.getKey()}` : '',\n }),\n );\n\n return;\n }\n // check for segmentation and evaluate\n if (isObject(variation.getSegments())) {\n let SegmentEvaluatorResult = SegmentationManager.Instance.validateSegmentation(\n variation.getSegments(),\n context.getVariationTargetingVariables(),\n );\n SegmentEvaluatorResult = isPromise(SegmentEvaluatorResult)\n ? SegmentEvaluatorResult\n : Promise.resolve(SegmentEvaluatorResult);\n SegmentEvaluatorResult.then((evaluationResult) => {\n if (evaluationResult) {\n targetedVariations.push(cloneObject(variation));\n }\n });\n\n promises.push(SegmentEvaluatorResult);\n }\n });\n\n // Wait for all promises to resolve\n await Promise.all(promises);\n\n if (targetedVariations.length > 1) {\n scaleVariationWeights(targetedVariations);\n for (let i = 0, currentAllocation = 0, stepFactor = 0; i < targetedVariations.length; i++) {\n stepFactor = assignRangeValues(targetedVariations[i], currentAllocation);\n currentAllocation += stepFactor;\n }\n whitelistedVariation = new CampaignDecisionService().getVariation(\n targetedVariations,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), campaign, null)),\n );\n } else {\n whitelistedVariation = targetedVariations[0];\n }\n\n if (whitelistedVariation) {\n return {\n variation: whitelistedVariation,\n variationName: whitelistedVariation.name,\n variationId: whitelistedVariation.id,\n };\n }\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { dynamic } from '../types/Common';\nimport { isString } from './DataTypeUtil';\n\n/**\n * Clones an object deeply.\n * @param {dynamic} obj - The object to clone.\n * @returns {any} The cloned object.\n */\nexport function cloneObject(obj: dynamic): any {\n if (!obj) {\n // Return the original object if it is null or undefined\n return obj;\n }\n // Use JSON stringify and parse method to perform a deep clone\n const clonedObj = JSON.parse(JSON.stringify(obj));\n return clonedObj;\n}\n\n/**\n * Gets the current Unix timestamp in seconds.\n * @returns {number} The current Unix timestamp.\n */\nexport function getCurrentUnixTimestamp(): number {\n // Convert the current date to Unix timestamp in seconds\n return Math.ceil(+new Date() / 1000);\n}\n\n/**\n * Gets the current Unix timestamp in milliseconds.\n * @returns {number} The current Unix timestamp in milliseconds.\n */\nexport function getCurrentUnixTimestampInMillis(): number {\n // Convert the current date to Unix timestamp in milliseconds\n return +new Date();\n}\n\n/**\n * Generates a random number between 0 and 1.\n * @returns {number} A random number.\n */\nexport function getRandomNumber(): number {\n // Use Math.random to generate a random number\n return Math.random();\n}\n\n/**\n * Retrieves specific rules based on the type from a feature.\n * @param {FeatureModel} feature - The key of the feature.\n * @param {CampaignTypeEnum | null} type - The type of the rules to retrieve.\n * @returns {Array} An array of rules that match the type.\n */\nexport function getSpecificRulesBasedOnType(feature: FeatureModel, type: CampaignTypeEnum = null) {\n // Return an empty array if no linked campaigns are found\n if (feature && !feature?.getRulesLinkedCampaign()) {\n return [];\n }\n // Filter the rules by type if a type is specified and is a string\n if (feature && feature.getRulesLinkedCampaign() && type && isString(type)) {\n return feature.getRulesLinkedCampaign().filter((rule) => {\n const ruleModel = new CampaignModel().modelFromDictionary(rule);\n return ruleModel.getType() === type;\n });\n }\n // Return all linked campaigns if no type is specified\n return feature.getRulesLinkedCampaign();\n}\n\n/**\n * Retrieves all AB and Personalize rules from a feature.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature.\n * @returns {Array} An array of AB and Personalize rules.\n */\nexport function getAllExperimentRules(feature: FeatureModel) {\n // Retrieve the feature by its key\n // Filter the rules to include only AB and Personalize types\n return (\n feature\n ?.getRulesLinkedCampaign()\n .filter((rule) => rule.getType() === CampaignTypeEnum.AB || rule.getType() === CampaignTypeEnum.PERSONALIZE) || []\n );\n}\n\n/**\n * Retrieves a feature by its key from the settings.\n * @param {any} settings - The settings containing features.\n * @param {string} featureKey - The key of the feature to find.\n * @returns {any} The feature if found, otherwise undefined.\n */\nexport function getFeatureFromKey(settings: SettingsModel, featureKey: string) {\n // Find the feature by its key\n return settings?.getFeatures()?.find((feature) => feature.getKey() === featureKey);\n}\n\n/**\n * Checks if an event exists within any feature's metrics.\n * @param {string} eventName - The name of the event to check.\n * @param {any} settings - The settings containing features.\n * @returns {boolean} True if the event exists, otherwise false.\n */\nexport function doesEventBelongToAnyFeature(eventName: string, settings: SettingsModel): boolean {\n // Use the `some` method to check if any feature contains the event in its metrics\n return settings\n .getFeatures()\n .some((feature) => feature.getMetrics().some((metric) => metric.getIdentifier() === eventName));\n}\n\n/**\n * Adds linked campaigns to each feature in the settings based on rules.\n * @param {any} settings - The settings file to modify.\n */\nexport function addLinkedCampaignsToSettings(settings: SettingsModel): void {\n // Create maps for quick access to campaigns and variations\n const campaignMap = new Map(\n settings.getCampaigns().map((campaign) => [campaign.getId(), campaign]),\n );\n\n // Loop over all features\n for (const feature of settings.getFeatures()) {\n const rulesLinkedCampaign = feature\n .getRules()\n .map((rule) => {\n const campaign: CampaignModel = campaignMap.get(rule.getCampaignId());\n if (!campaign) return null;\n\n // Create a linked campaign object with the rule and campaign\n const linkedCampaign: any = { key: campaign.getKey(), ...campaign, ruleKey: rule.getRuleKey() };\n // If a variationId is specified, find and add the variation\n if (rule.getVariationId()) {\n const variation = campaign.getVariations().find((v) => v.getId() === rule.getVariationId());\n if (variation) {\n linkedCampaign.variations = [variation];\n }\n }\n\n return linkedCampaign;\n })\n .filter((campaign) => campaign !== null); // Filter out any null entries\n\n const rulesLinkedCampaignModel = rulesLinkedCampaign.map((campaign) => {\n const campaignModel = new CampaignModel();\n campaignModel.modelFromDictionary(campaign);\n return campaignModel;\n });\n // Assign the linked campaigns to the feature\n feature.setRulesLinkedCampaign(rulesLinkedCampaignModel);\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { Deferred } from './PromiseUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Asynchronously retrieves data from a web service using the specified query parameters and endpoint.\n * @param queryParams - The parameters to be used in the query string of the request.\n * @param endpoint - The endpoint URL to which the request is sent.\n * @returns A promise that resolves to the response data or false if an error occurs.\n */\nexport async function getFromGatewayService(queryParams: any, endpoint: any): Promise {\n // Create a new deferred object to manage promise resolution\n const deferredObject = new Deferred();\n // Singleton instance of the network manager\n const networkInstance = NetworkManager.Instance;\n\n // Check if the base URL is not set correctly\n if (!SettingsService.Instance.isGatewayServiceProvided) {\n // Log an informational message about the invalid URL\n LogManager.Instance.error(ErrorLogMessagesEnum.GATEWAY_URL_ERROR);\n // Resolve the promise with false indicating an error or invalid state\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n\n try {\n // Create a new request model instance with the provided parameters\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n queryParams,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n // Perform the network GET request\n networkInstance\n .get(request)\n .then((response: ResponseModel) => {\n // Resolve the deferred object with the data from the response\n deferredObject.resolve(response.getData());\n })\n .catch((err: ResponseModel) => {\n // Reject the deferred object with the error response\n deferredObject.reject(err);\n });\n\n return deferredObject.promise;\n } catch (err) {\n // Resolve the promise with false as fallback\n deferredObject.resolve(false);\n return deferredObject.promise;\n }\n}\n\n/**\n * Encodes the query parameters to ensure they are URL-safe.\n * @param queryParams The query parameters to be encoded.\n * @returns An object containing the encoded query parameters.\n */\nexport function getQueryParams(queryParams: Record): Record {\n const encodedParams: Record = {};\n\n for (const [key, value] of Object.entries(queryParams)) {\n // Encode the parameter value to ensure it is URL-safe\n const encodedValue = encodeURIComponent(String(value));\n // Add the encoded parameter to the result object\n encodedParams[key] = encodedValue;\n }\n\n return encodedParams;\n}\n\n/**\n * Adds isGatewayServiceRequired flag to each feature in the settings based on pre segmentation.\n * @param {any} settings - The settings file to modify.\n */\nexport function addIsGatewayServiceRequiredFlag(settings: SettingsModel): void {\n // \\b(? 0) {\n feature.setIsGatewayServiceRequired(true);\n break;\n }\n }\n }\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { getEventsBaseProperties, getTrackUserPayloadData, sendPostApiRequest } from './NetworkUtil';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { EventEnum } from '../enums/EventEnum';\n\n/**\n * Creates and sends an impression for a variation shown event.\n * This function constructs the necessary properties and payload for the event\n * and uses the NetworkUtil to send a POST API request.\n *\n * @param {SettingsModel} settings - The settings model containing configuration.\n * @param {number} campaignId - The ID of the campaign.\n * @param {number} variationId - The ID of the variation shown to the user.\n * @param {ContextModel} context - The user context model containing user-specific data.\n */\nexport const createAndSendImpressionForVariationShown = async (\n settings: SettingsModel,\n campaignId: number,\n variationId: number,\n context: ContextModel,\n) => {\n // Get base properties for the event\n const properties = getEventsBaseProperties(\n settings,\n EventEnum.VWO_VARIATION_SHOWN,\n encodeURIComponent(context.getUserAgent()), // Encode user agent to ensure URL safety\n context.getIpAddress(),\n );\n\n // Construct payload data for tracking the user\n const payload = getTrackUserPayloadData(\n settings,\n context.getId(),\n EventEnum.VWO_VARIATION_SHOWN,\n campaignId,\n variationId,\n context.getUserAgent(),\n context.getIpAddress(),\n );\n\n // Send the constructed properties and payload as a POST request\n await sendPostApiRequest(properties, payload);\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from '../utils/DataTypeUtil';\n\nconst nargs = /\\{([0-9a-zA-Z_]+)\\}/g;\n\n/**\n * Constructs a message by replacing placeholders in a template with corresponding values from a data object.\n *\n * @param {string} template - The message template containing placeholders in the format `{key}`.\n * @param {Record} data - An object containing keys and values used to replace the placeholders in the template.\n * @returns {string} The constructed message with all placeholders replaced by their corresponding values from the data object.\n */\nexport function buildMessage(template: string, data: Record = {}): string {\n try {\n return template.replace(nargs, (match, key, index) => {\n // Check for escaped placeholders\n if (template[index - 1] === '{' && template[index + match.length] === '}') {\n return key;\n }\n\n // Retrieve the value from the data object\n const value = data[key];\n\n // If the key does not exist or the value is null/undefined, return an empty string\n if (value === undefined || value === null) {\n return '';\n }\n\n // If the value is a function, evaluate it\n return isFunction(value) ? value() : value;\n });\n } catch (err) {\n return template; // Return the original template in case of an error\n }\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Constants } from '../constants';\nimport { StorageDecorator } from '../decorators/StorageDecorator';\nimport { CampaignTypeEnum } from '../enums/CampaignTypeEnum';\nimport { InfoLogMessagesEnum } from '../enums/log-messages';\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { VariationModel } from '../models/campaign/VariationModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { DecisionMaker } from '../packages/decision-maker';\nimport { LogManager } from '../packages/logger';\nimport { CampaignDecisionService } from '../services/CampaignDecisionService';\nimport { IStorageService } from '../services/StorageService';\nimport { evaluateRule } from '../utils/RuleEvaluationUtil';\nimport {\n getBucketingSeed,\n getCampaignIdsFromFeatureKey,\n getCampaignsByGroupId,\n getFeatureKeysFromCampaignIds,\n getVariationFromCampaignKey,\n setCampaignAllocation,\n} from './CampaignUtil';\nimport { isObject, isUndefined } from './DataTypeUtil';\nimport { evaluateTrafficAndGetVariation } from './DecisionUtil';\nimport { cloneObject, getFeatureFromKey, getSpecificRulesBasedOnType } from './FunctionUtil';\nimport { buildMessage } from './LogMessageUtil';\n\n/**\n * Evaluates groups for a given feature and group ID.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param groupId - The ID of the group.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to the evaluation result.\n */\nexport const evaluateGroups = async (\n settings: SettingsModel,\n feature: FeatureModel,\n groupId: number,\n evaluatedFeatureMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const featureToSkip = [];\n const campaignMap: Map = new Map();\n // get all feature keys and all campaignIds from the groupId\n const { featureKeys, groupCampaignIds } = getFeatureKeysFromGroup(settings, groupId);\n for (const featureKey of featureKeys) {\n const feature = getFeatureFromKey(settings, featureKey);\n // check if the feature is already evaluated\n if (featureToSkip.includes(featureKey)) {\n continue;\n }\n // evaluate the feature rollout rules\n const isRolloutRulePassed = await _isRolloutRuleForFeaturePassed(\n settings,\n feature,\n evaluatedFeatureMap,\n featureToSkip,\n storageService,\n context,\n );\n if (isRolloutRulePassed) {\n settings.getFeatures().forEach((feature) => {\n if (feature.getKey() === featureKey) {\n feature.getRulesLinkedCampaign().forEach((rule) => {\n if (\n groupCampaignIds.includes(rule.getId().toString()) ||\n groupCampaignIds.includes(`${rule.getId()}_${rule.getVariations()[0].getId()}`.toString())\n ) {\n if (!campaignMap.has(featureKey)) {\n campaignMap.set(featureKey, []);\n }\n // check if the campaign is already present in the campaignMap for the feature\n if (campaignMap.get(featureKey).findIndex((item) => item.ruleKey === rule.getRuleKey()) === -1) {\n campaignMap.get(featureKey).push(rule);\n }\n }\n });\n }\n });\n }\n }\n const { eligibleCampaigns, eligibleCampaignsWithStorage } = await _getEligbleCampaigns(\n settings,\n campaignMap,\n context,\n storageService,\n );\n\n return await _findWinnerCampaignAmongEligibleCampaigns(\n settings,\n feature.getKey(),\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n groupId,\n context,\n storageService,\n );\n};\n\n/**\n * Retrieves feature keys associated with a group based on the group ID.\n *\n * @param settings - The settings model.\n * @param groupId - The ID of the group.\n * @returns An object containing feature keys and group campaign IDs.\n */\nexport function getFeatureKeysFromGroup(settings: SettingsModel, groupId: number) {\n const groupCampaignIds = getCampaignsByGroupId(settings, groupId);\n const featureKeys = getFeatureKeysFromCampaignIds(settings, groupCampaignIds);\n\n return { featureKeys, groupCampaignIds };\n}\n\n/*******************************\n * PRIVATE methods - MegUtil\n ******************************/\n\n/**\n * Evaluates the feature rollout rules for a given feature.\n *\n * @param settings - The settings model.\n * @param feature - The feature model to evaluate.\n * @param evaluatedFeatureMap - A map containing evaluated features.\n * @param featureToSkip - An array of features to skip during evaluation.\n * @param storageService - The storage service.\n * @param context - The context model.\n * @returns A promise that resolves to true if the feature passes the rollout rules, false otherwise.\n */\nconst _isRolloutRuleForFeaturePassed = async (\n settings: SettingsModel,\n feature: FeatureModel,\n evaluatedFeatureMap: Map,\n featureToSkip: any[],\n storageService: IStorageService,\n context: ContextModel,\n): Promise => {\n if (evaluatedFeatureMap.has(feature.getKey()) && 'rolloutId' in evaluatedFeatureMap.get(feature.getKey())) {\n return true;\n }\n const rollOutRules = getSpecificRulesBasedOnType(feature, CampaignTypeEnum.ROLLOUT);\n if (rollOutRules.length > 0) {\n let ruleToTestForTraffic = null;\n for (const rule of rollOutRules) {\n const { preSegmentationResult } = await evaluateRule(\n settings,\n feature,\n rule,\n context,\n evaluatedFeatureMap,\n null,\n storageService,\n {},\n );\n if (preSegmentationResult) {\n ruleToTestForTraffic = rule;\n break;\n }\n continue;\n }\n if (ruleToTestForTraffic !== null) {\n const campaign = new CampaignModel().modelFromDictionary(ruleToTestForTraffic);\n const variation = evaluateTrafficAndGetVariation(settings, campaign, context.getId());\n if (isObject(variation) && Object.keys(variation).length > 0) {\n evaluatedFeatureMap.set(feature.getKey(), {\n rolloutId: ruleToTestForTraffic.id,\n rolloutKey: ruleToTestForTraffic.key,\n rolloutVariationId: ruleToTestForTraffic.variations[0].id,\n });\n return true;\n }\n }\n // no rollout rule passed\n featureToSkip.push(feature.getKey());\n return false;\n }\n // no rollout rule, evaluate experiments\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS, {\n featureKey: feature.getKey(),\n }),\n );\n return true;\n};\n\n/**\n * Retrieves eligible campaigns based on the provided campaign map and context.\n *\n * @param settings - The settings model.\n * @param campaignMap - A map containing feature keys and corresponding campaigns.\n * @param context - The context model.\n * @param storageService - The storage service.\n * @returns A promise that resolves to an object containing eligible campaigns, campaigns with storage, and ineligible campaigns.\n */\nconst _getEligbleCampaigns = async (\n settings: SettingsModel,\n campaignMap: Map,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n const eligibleCampaigns = [];\n const eligibleCampaignsWithStorage = [];\n const inEligibleCampaigns = [];\n const campaignMapArray = Array.from<[string, CampaignModel[]]>(campaignMap);\n\n // Iterate over the campaign map to determine eligible campaigns\n for (const [featureKey, campaigns] of campaignMapArray) {\n for (const campaign of campaigns) {\n const storedData: Record = await new StorageDecorator().getFeatureFromStorage(\n featureKey,\n context,\n storageService,\n );\n\n // Check if campaign is stored in storage\n if (storedData?.experimentVariationId) {\n if (storedData.experimentKey && storedData.experimentKey === campaign.getKey()) {\n const variation: VariationModel = getVariationFromCampaignKey(\n settings,\n storedData.experimentKey,\n storedData.experimentVariationId,\n );\n if (variation) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE, {\n campaignKey: storedData.experimentKey,\n userId: context.getId(),\n }),\n );\n\n if (eligibleCampaignsWithStorage.findIndex((item) => item.key === campaign.getKey()) === -1) {\n eligibleCampaignsWithStorage.push(campaign);\n }\n continue;\n }\n }\n }\n\n // Check if user is eligible for the campaign\n if (\n (await new CampaignDecisionService().getPreSegmentationDecision(\n new CampaignModel().modelFromDictionary(campaign),\n context,\n )) &&\n new CampaignDecisionService().isUserPartOfCampaign(context.getId(), campaign)\n ) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_CAMPAIGN_ELIGIBLE, {\n campaignKey:\n campaign.getType() === CampaignTypeEnum.AB\n ? campaign.getKey()\n : campaign.getName() + '_' + campaign.getRuleKey(),\n userId: context.getId(),\n }),\n );\n\n eligibleCampaigns.push(campaign);\n continue;\n }\n\n inEligibleCampaigns.push(campaign);\n }\n }\n\n return Promise.resolve({\n eligibleCampaigns,\n eligibleCampaignsWithStorage,\n inEligibleCampaigns,\n });\n};\n\n/**\n * Evaluates the eligible campaigns and determines the winner campaign based on the provided settings, feature key, eligible campaigns, eligible campaigns with storage, group ID, and context.\n *\n * @param settings - The settings model.\n * @param featureKey - The key of the feature.\n * @param eligibleCampaigns - An array of eligible campaigns.\n * @param eligibleCampaignsWithStorage - An array of eligible campaigns with storage.\n * @param groupId - The ID of the group.\n * @param context - The context model.\n * @returns A promise that resolves to the winner campaign.\n */\nconst _findWinnerCampaignAmongEligibleCampaigns = async (\n settings: SettingsModel,\n featureKey: string,\n eligibleCampaigns: any[],\n eligibleCampaignsWithStorage: any[],\n groupId: number,\n context: ContextModel,\n storageService: IStorageService,\n): Promise => {\n // getCampaignIds from featureKey\n let winnerCampaign = null;\n const campaignIds = getCampaignIdsFromFeatureKey(settings, featureKey);\n // get the winner from each group and store it in winnerFromEachGroup\n const megAlgoNumber = !isUndefined(settings?.getGroups()[groupId]?.et)\n ? settings.getGroups()[groupId].et\n : Constants.RANDOM_ALGO;\n\n // if eligibleCampaignsWithStorage has only one campaign, then that campaign is the winner\n if (eligibleCampaignsWithStorage.length === 1) {\n winnerCampaign = eligibleCampaignsWithStorage[0];\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaignsWithStorage[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaignsWithStorage[0].getKey()\n : eligibleCampaignsWithStorage[0].getName() + '_' + eligibleCampaignsWithStorage[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaignsWithStorage.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is random, then find the winner using random algo\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaignsWithStorage.length > 1) {\n // if eligibleCampaignsWithStorage has more than one campaign and algo is not random, then find the winner using advanced algo\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaignsWithStorage,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n\n if (eligibleCampaignsWithStorage.length === 0) {\n if (eligibleCampaigns.length === 1) {\n winnerCampaign = eligibleCampaigns[0];\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n eligibleCampaigns[0].getType() === CampaignTypeEnum.AB\n ? eligibleCampaigns[0].getKey()\n : eligibleCampaigns[0].getName() + '_' + eligibleCampaigns[0].getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: '',\n }),\n );\n } else if (eligibleCampaigns.length > 1 && megAlgoNumber === Constants.RANDOM_ALGO) {\n winnerCampaign = _normalizeWeightsAndFindWinningCampaign(\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n } else if (eligibleCampaigns.length > 1) {\n winnerCampaign = _getCampaignUsingAdvancedAlgo(\n settings,\n eligibleCampaigns,\n context,\n campaignIds,\n groupId,\n storageService,\n );\n }\n }\n return winnerCampaign;\n};\n\n/**\n * Normalizes the weights of shortlisted campaigns and determines the winning campaign using random allocation.\n *\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _normalizeWeightsAndFindWinningCampaign = (\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n): any => {\n // Normalize the weights of all the shortlisted campaigns\n shortlistedCampaigns.forEach((campaign) => {\n campaign.weight = Math.round((100 / shortlistedCampaigns.length) * 10000) / 10000;\n });\n\n // make shortlistedCampaigns as array of VariationModel\n shortlistedCampaigns = shortlistedCampaigns.map((campaign) => new VariationModel().modelFromDictionary(campaign));\n // re-distribute the traffic for each camapign\n setCampaignAllocation(shortlistedCampaigns);\n const winnerCampaign = new CampaignDecisionService().getVariation(\n shortlistedCampaigns,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.getType() === CampaignTypeEnum.AB\n ? winnerCampaign.getKey()\n : winnerCampaign.getKey() + '_' + winnerCampaign.getRuleKey(),\n groupId,\n userId: context.getId(),\n algo: 'using random algorithm',\n }),\n );\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.getId(),\n experimentKey: winnerCampaign.getKey(),\n experimentVariationId:\n winnerCampaign.getType() === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.getVariations()[0].getId() : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.getId())) {\n return winnerCampaign;\n }\n }\n return null;\n};\n\n/**\n * Advanced algorithm to find the winning campaign based on priority order and weighted random distribution.\n *\n * @param settings - The settings model.\n * @param shortlistedCampaigns - An array of shortlisted campaigns.\n * @param context - The context model.\n * @param calledCampaignIds - An array of campaign IDs that have been called.\n * @param groupId - The ID of the group.\n * @returns The winning campaign or null if none is found.\n */\nconst _getCampaignUsingAdvancedAlgo = (\n settings: SettingsModel,\n shortlistedCampaigns: any[],\n context: ContextModel,\n calledCampaignIds: any[],\n groupId: number,\n storageService: IStorageService,\n) => {\n let winnerCampaign = null;\n let found = false; // flag to check whether winnerCampaign has been found or not and helps to break from the outer loop\n const priorityOrder = !isUndefined(settings.getGroups()[groupId].p) ? settings.getGroups()[groupId].p : {};\n const wt = !isUndefined(settings.getGroups()[groupId].wt) ? settings.getGroups()[groupId].wt : {};\n\n for (let i = 0; i < priorityOrder.length; i++) {\n for (let j = 0; j < shortlistedCampaigns.length; j++) {\n if (shortlistedCampaigns[j].id == priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n } else if (shortlistedCampaigns[j].id + '_' + shortlistedCampaigns[j].variations[0].id === priorityOrder[i]) {\n winnerCampaign = cloneObject(shortlistedCampaigns[j]);\n found = true;\n break;\n }\n }\n if (found === true) break;\n }\n\n // If winnerCampaign not found through Priority, then go for weighted Random distribution and for that,\n // Store the list of campaigns (participatingCampaigns) out of shortlistedCampaigns and their corresponding weights present in weightage distribution array (wt)\n if (winnerCampaign === null) {\n let participatingCampaignList = [];\n // iterate over shortlisted campaigns and add weights from the weight array\n for (let i = 0; i < shortlistedCampaigns.length; i++) {\n const campaignId = shortlistedCampaigns[i].id;\n if (!isUndefined(wt[campaignId])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId];\n participatingCampaignList.push(clonedCampaign);\n } else if (!isUndefined(wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id])) {\n const clonedCampaign = cloneObject(shortlistedCampaigns[i]);\n clonedCampaign.weight = wt[campaignId + '_' + shortlistedCampaigns[i].variations[0].id];\n participatingCampaignList.push(clonedCampaign);\n }\n }\n /* Finding winner campaign using weighted Distibution :\n 1. Re-distribute the traffic by assigning range values for each camapign in particaptingCampaignList\n 2. Calculate bucket value for the given userId and groupId\n 3. Get the winnerCampaign by checking the Start and End Bucket Allocations of each campaign\n */\n\n // make participatingCampaignList as array of VariationModel\n participatingCampaignList = participatingCampaignList.map((campaign) =>\n new VariationModel().modelFromDictionary(campaign),\n );\n setCampaignAllocation(participatingCampaignList);\n winnerCampaign = new CampaignDecisionService().getVariation(\n participatingCampaignList,\n new DecisionMaker().calculateBucketValue(getBucketingSeed(context.getId(), undefined, groupId)),\n );\n }\n // WinnerCampaign should not be null, in case when winnerCampaign hasn't been found through PriorityOrder and\n // also shortlistedCampaigns and wt array does not have a single campaign id in common\n if (winnerCampaign) {\n LogManager.Instance.info(\n buildMessage(InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN, {\n campaignKey:\n winnerCampaign.type === CampaignTypeEnum.AB\n ? winnerCampaign.key\n : winnerCampaign.key + '_' + winnerCampaign.ruleKey,\n groupId,\n userId: context.getId(),\n algo: 'using advanced algorithm',\n }),\n );\n } else {\n // TODO -- Log the error message\n // LogManager.Instance.info(\n // buildMessage(InfoLogMessagesEnum.MEG_NO_WINNER_CAMPAIGN, {\n // groupId,\n // userId: context.getId(),\n // }),\n // );\n LogManager.Instance.info(`No winner campaign found for MEG group: ${groupId}`);\n }\n\n if (winnerCampaign) {\n new StorageDecorator().setDataInStorage(\n {\n featureKey: `${Constants.VWO_META_MEG_KEY}${groupId}`,\n context,\n experimentId: winnerCampaign.id,\n experimentKey: winnerCampaign.key,\n experimentVariationId:\n winnerCampaign.type === CampaignTypeEnum.PERSONALIZE ? winnerCampaign.variations[0].id : -1,\n },\n storageService,\n );\n if (calledCampaignIds.includes(winnerCampaign.id)) {\n return winnerCampaign;\n }\n }\n return null;\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getCurrentUnixTimestamp, getCurrentUnixTimestampInMillis, getRandomNumber } from './FunctionUtil';\nimport { getUUID } from './UuidUtil';\n\nimport { Constants } from '../constants';\nimport { HeadersEnum } from '../enums/HeadersEnum';\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { UrlEnum } from '../enums/UrlEnum';\nimport { DebugLogMessagesEnum, ErrorLogMessagesEnum } from '../enums/log-messages';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { LogManager } from '../packages/logger';\nimport { NetworkManager, RequestModel, ResponseModel } from '../packages/network-layer';\nimport { SettingsService } from '../services/SettingsService';\nimport { dynamic } from '../types/Common';\nimport { isObject } from './DataTypeUtil';\nimport { buildMessage } from './LogMessageUtil';\nimport { UrlUtil } from './UrlUtil';\n\n/**\n * Constructs base properties for bulk operations.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The base properties including session ID and UUID.\n */\nexport function getBasePropertiesForBulk(accountId: string, userId: string): Record {\n const path: Record = {\n sId: getCurrentUnixTimestamp(), // Session ID based on current Unix timestamp\n u: getUUID(userId, accountId), // UUID generated based on user and account ID\n };\n return path;\n}\n\n/**\n * Constructs the settings path with API key and account ID.\n * @param {string} sdkKey - The API key.\n * @param {any} accountId - The account identifier.\n * @returns {Record} - The settings path including API key, random number, and account ID.\n */\nexport function getSettingsPath(sdkKey: string, accountId: string | number): Record {\n const path: Record = {\n i: `${sdkKey}`, // Inject API key\n r: Math.random(), // Random number for cache busting\n a: accountId, // Account ID\n };\n return path;\n}\n\n/**\n * Constructs the tracking path for an event.\n * @param {string} event - The event type.\n * @param {string} accountId - The account identifier.\n * @param {string} userId - The user identifier.\n * @returns {Record} - The tracking path for the event.\n */\nexport function getTrackEventPath(event: string, accountId: string, userId: string): Record {\n const path: Record = {\n event_type: event, // Type of the event\n account_id: accountId, // Account ID\n uId: userId, // User ID\n u: getUUID(userId, accountId), // UUID generated for the user\n sdk: Constants.SDK_NAME, // SDK name constant\n 'sdk-v': Constants.SDK_VERSION, // SDK version\n random: getRandomNumber(), // Random number for uniqueness\n ap: Constants.PLATFORM, // Application platform\n sId: getCurrentUnixTimestamp(), // Session ID\n ed: JSON.stringify({ p: 'server' }), // Additional encoded data\n };\n\n return path;\n}\n\n/**\n * Constructs query parameters for event batching.\n * @param {string} accountId - The account identifier.\n * @returns {Record} - The query parameters for event batching.\n */\nexport function getEventBatchingQueryParams(accountId: string): Record {\n const path: Record = {\n a: accountId, // Account ID\n sd: Constants.SDK_NAME, // SDK name\n sv: Constants.SDK_VERSION, // SDK version\n };\n\n return path;\n}\n\n/**\n * Builds generic properties for different tracking calls required by VWO servers.\n * @param {Object} configObj\n * @param {String} eventName\n * @returns properties\n */\nexport function getEventsBaseProperties(\n setting: SettingsModel,\n eventName: string,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const sdkKey = setting.getSdkkey();\n\n const properties = Object.assign({\n en: eventName,\n a: setting.getAccountId(),\n env: sdkKey,\n eTime: getCurrentUnixTimestampInMillis(),\n random: getRandomNumber(),\n p: 'FS',\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n });\n\n properties.url = Constants.HTTPS_PROTOCOL + UrlUtil.getBaseUrl() + UrlEnum.EVENTS;\n return properties;\n}\n\n/**\n * Builds generic payload required by all the different tracking calls.\n * @param {Object} settings settings file\n * @param {String} userId user id\n * @param {String} eventName event name\n * @returns properties\n */\nexport function _getEventBasePayload(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n visitorUserAgent = '',\n ipAddress = '',\n): Record {\n const uuid = getUUID(userId.toString(), settings.getAccountId());\n const sdkKey = settings.getSdkkey();\n\n const props: {\n vwo_sdkName: string;\n vwo_sdkVersion: string;\n vwo_envKey: string;\n id?: string | number;\n variation?: string | number;\n isFirst?: number;\n isCustomEvent?: boolean;\n } = {\n vwo_sdkName: Constants.SDK_NAME,\n vwo_sdkVersion: Constants.SDK_VERSION,\n vwo_envKey: sdkKey,\n };\n\n const properties = {\n d: {\n msgId: `${uuid}-${getCurrentUnixTimestampInMillis()}`,\n visId: uuid,\n sessionId: getCurrentUnixTimestamp(),\n visitor_ua: visitorUserAgent,\n visitor_ip: ipAddress,\n event: {\n props: props,\n name: eventName,\n time: getCurrentUnixTimestampInMillis(),\n },\n visitor: {\n props: {\n vwo_fs_environment: sdkKey,\n },\n },\n },\n };\n\n return properties;\n}\n\n/**\n * Builds payload to track the visitor.\n * @param {Object} configObj\n * @param {String} userId\n * @param {String} eventName\n * @param {String} campaignId\n * @param {Number} variationId\n * @returns track-user payload\n */\nexport function getTrackUserPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n campaignId: number,\n variationId: number,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.id = campaignId;\n properties.d.event.props.variation = variationId;\n properties.d.event.props.isFirst = 1;\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n accountId: settings.getAccountId(),\n userId,\n campaignId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for tracking goals with custom event properties.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} eventProperties - Custom properties for the event.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getTrackGoalPayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n eventProperties: Record,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props.variation = 1; // Temporary value for variation\n properties.d.event.props.id = 1; // Temporary value for ID\n\n // Add custom event properties if provided\n if (eventProperties && isObject(eventProperties) && Object.keys(eventProperties).length > 0) {\n for (const prop in eventProperties) {\n properties.d.event.props[prop] = eventProperties[prop];\n }\n }\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Constructs the payload data for syncing visitor attributes.\n * @param {any} settings - Configuration settings.\n * @param {any} userId - User identifier.\n * @param {string} eventName - Name of the event.\n * @param {any} attributeKey - Key of the attribute to sync.\n * @param {any} attributeValue - Value of the attribute.\n * @param {string} [visitorUserAgent=''] - Visitor's user agent.\n * @param {string} [ipAddress=''] - Visitor's IP address.\n * @returns {any} - The constructed payload data.\n */\nexport function getAttributePayloadData(\n settings: SettingsModel,\n userId: string | number,\n eventName: string,\n attributeKey: string,\n attributeValue: dynamic,\n visitorUserAgent: string = '',\n ipAddress: string = '',\n): Record {\n const properties = _getEventBasePayload(settings, userId, eventName, visitorUserAgent, ipAddress);\n\n properties.d.event.props.isCustomEvent = true; // Mark as a custom event\n properties.d.event.props[Constants.VWO_FS_ENVIRONMENT] = settings.getSdkkey(); // Set environment key\n properties.d.visitor.props[attributeKey] = attributeValue; // Set attribute value\n\n LogManager.Instance.debug(\n buildMessage(DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER, {\n eventName,\n accountId: settings.getAccountId(),\n userId,\n }),\n );\n\n return properties;\n}\n\n/**\n * Sends a POST API request with the specified properties and payload.\n * @param {any} properties - Properties for the request.\n * @param {any} payload - Payload for the request.\n */\nexport async function sendPostApiRequest(properties: any, payload: any): Promise {\n NetworkManager.Instance.attachClient();\n\n const headers: Record = {};\n\n const userAgent = payload.d.visitor_ua; // Extract user agent from payload\n const ipAddress = payload.d.visitor_ip; // Extract IP address from payload\n\n // Set headers if available\n if (userAgent) headers[HeadersEnum.USER_AGENT] = userAgent;\n if (ipAddress) headers[HeadersEnum.IP] = ipAddress;\n\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.POST,\n UrlEnum.EVENTS,\n properties,\n payload,\n headers,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n\n await NetworkManager.Instance.post(request).catch((err: ResponseModel) => {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n });\n}\n\n/**\n * Sends a GET API request to the specified endpoint with the given properties.\n * @param {any} properties - Properties for the request.\n * @param {any} endpoint - Endpoint for the GET request.\n * @returns {Promise} - The response from the GET request.\n */\nexport async function sendGetApiRequest(properties: any, endpoint: any): Promise {\n NetworkManager.Instance.attachClient();\n const request: RequestModel = new RequestModel(\n UrlUtil.getBaseUrl(),\n HttpMethodEnum.GET,\n endpoint,\n properties,\n null,\n null,\n SettingsService.Instance.protocol,\n SettingsService.Instance.port,\n );\n try {\n const response: ResponseModel = await NetworkManager.Instance.get(request);\n return response; // Return the response model\n } catch (err) {\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.GET,\n err: isObject(err) ? JSON.stringify(err) : err,\n }),\n );\n return null;\n }\n}\n\n// Flag to determine if the SDK should wait for a network response.\nlet shouldWaitForTrackingCalls = false;\n\n/**\n * Checks if the SDK should wait for a network response.\n * @returns {boolean} - True if the SDK should wait for a network response, false otherwise.\n */\nexport function getShouldWaitForTrackingCalls(): boolean {\n return shouldWaitForTrackingCalls;\n}\n\n/**\n * Sets the value to determine if the SDK should wait for a network response.\n * @param value - The value to set.\n */\nexport function setShouldWaitForTrackingCalls(value: boolean): void {\n shouldWaitForTrackingCalls = value;\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { dynamic } from '../types/Common';\n\n/**\n * Creates a Deferred object with properties for promise, resolve, and reject.\n * This allows manual control over the resolution and rejection of a promise.\n * @returns {Deferred} The Deferred object with promise, resolve, and reject methods.\n */\nexport function Deferred(): void {\n // Create a new Promise and attach resolve and reject methods to the Deferred object\n this.promise = new Promise((resolve: dynamic, reject: dynamic) => {\n this.resolve = resolve; // Method to resolve the promise\n this.reject = reject; // Method to reject the promise\n });\n\n return this; // Return the Deferred object with attached methods\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CampaignModel } from '../models/campaign/CampaignModel';\nimport { FeatureModel } from '../models/campaign/FeatureModel';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { ContextModel } from '../models/user/ContextModel';\nimport { IStorageService } from '../services/StorageService';\nimport { isObject } from './DataTypeUtil';\nimport { checkWhitelistingAndPreSeg } from './DecisionUtil';\nimport { getShouldWaitForTrackingCalls } from './NetworkUtil';\nimport { createAndSendImpressionForVariationShown } from './ImpressionUtil';\n\n/**\n * Evaluates the rules for a given campaign and feature based on the provided context.\n * This function checks for whitelisting and pre-segmentation conditions, and if applicable,\n * sends an impression for the variation shown.\n *\n * @param {SettingsModel} settings - The settings configuration for the evaluation.\n * @param {FeatureModel} feature - The feature being evaluated.\n * @param {CampaignModel} campaign - The campaign associated with the feature.\n * @param {ContextModel} context - The user context for evaluation.\n * @param {Map} evaluatedFeatureMap - A map of evaluated features.\n * @param {Map} megGroupWinnerCampaigns - A map of MEG group winner campaigns.\n * @param {StorageService} storageService - The storage service for persistence.\n * @param {any} decision - The decision object that will be updated based on the evaluation.\n * @returns {Promise<[boolean, any]>} A promise that resolves to a tuple containing the result of the pre-segmentation\n * and the whitelisted object, if any.\n */\nexport const evaluateRule = async (\n settings: SettingsModel,\n feature: FeatureModel,\n campaign: CampaignModel,\n context: ContextModel,\n evaluatedFeatureMap: Map,\n megGroupWinnerCampaigns: Map,\n storageService: IStorageService,\n decision: any,\n): Promise> => {\n // Perform whitelisting and pre-segmentation checks\n const [preSegmentationResult, whitelistedObject] = await checkWhitelistingAndPreSeg(\n settings,\n feature,\n campaign,\n context,\n evaluatedFeatureMap,\n megGroupWinnerCampaigns,\n storageService,\n decision,\n );\n\n // If pre-segmentation is successful and a whitelisted object exists, proceed to send an impression\n if (preSegmentationResult && isObject(whitelistedObject) && Object.keys(whitelistedObject).length > 0) {\n // Update the decision object with campaign and variation details\n Object.assign(decision, {\n experimentId: campaign.getId(),\n experimentKey: campaign.getKey(),\n experimentVariationId: whitelistedObject.variationId,\n });\n\n // Send an impression for the variation shown\n if (getShouldWaitForTrackingCalls()) {\n await createAndSendImpressionForVariationShown(\n settings,\n campaign.getId(),\n whitelistedObject.variation.id,\n context,\n );\n } else {\n createAndSendImpressionForVariationShown(settings, campaign.getId(), whitelistedObject.variation.id, context);\n }\n }\n\n // Return the results of the evaluation\n return { preSegmentationResult, whitelistedObject, updatedDecision: decision };\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IVWOClient } from './../VWOClient';\nimport { SettingsModel } from '../models/settings/SettingsModel';\nimport { setVariationAllocation } from './CampaignUtil';\nimport { addLinkedCampaignsToSettings } from './FunctionUtil';\nimport { addIsGatewayServiceRequiredFlag } from './GatewayServiceUtil';\n\n/**\n * Sets settings and adds campaigns to rules\n * @param settings settings\n * @param vwoClientInstance VWOClient instance\n */\nexport function setSettingsAndAddCampaignsToRules(settings: any, vwoClientInstance: IVWOClient) {\n // create settings model and set it to vwoClientInstance\n vwoClientInstance.settings = new SettingsModel(settings);\n vwoClientInstance.originalSettings = settings;\n // Optimize loop by avoiding multiple calls to `getCampaigns()`\n const campaigns = vwoClientInstance.settings.getCampaigns();\n campaigns.forEach((campaign, index) => {\n setVariationAllocation(campaign);\n campaigns[index] = campaign;\n });\n addLinkedCampaignsToSettings(vwoClientInstance.settings);\n addIsGatewayServiceRequiredFlag(vwoClientInstance.settings);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SettingsService } from '../services/SettingsService';\nimport { isString } from './DataTypeUtil';\n\ninterface IUrlUtil {\n collectionPrefix?: string;\n init({ collectionPrefix }?: { collectionPrefix?: string }): IUrlUtil;\n getBaseUrl(): string;\n}\n\nexport const UrlUtil: IUrlUtil = {\n /**\n * Initializes the UrlUtil with optional collectionPrefix and gatewayServiceUrl.\n * If provided, these values are set after validation.\n * @param {string} [collectionPrefix] - Optional prefix for URL collections.\n * @returns {IUrlUtil} The instance of UrlUtil with updated properties.\n */\n init: ({ collectionPrefix }: { collectionPrefix?: string } = {}) => {\n // Set collectionPrefix if it is a valid string\n if (collectionPrefix && isString(collectionPrefix)) {\n UrlUtil.collectionPrefix = collectionPrefix;\n }\n\n return UrlUtil;\n },\n\n /**\n * Retrieves the base URL.\n * If gatewayServiceUrl is set, it returns that; otherwise, it constructs the URL using baseUrl and collectionPrefix.\n * @returns {string} The base URL.\n */\n getBaseUrl: () => {\n const baseUrl: string = SettingsService.Instance.hostname;\n\n if (SettingsService.Instance.isGatewayServiceProvided) {\n return baseUrl;\n }\n\n // Construct URL with collectionPrefix if it exists\n if (UrlUtil.collectionPrefix) {\n return `${baseUrl}/${UrlUtil.collectionPrefix}`;\n }\n\n // Return the default baseUrl if no specific URL components are set\n return baseUrl;\n },\n};\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SEED_URL } from '../constants/Url';\nimport { v4 as uuidv4 } from 'uuid';\nimport { v5 as uuidv5 } from 'uuid';\n\n/**\n * Generates a random UUID based on an API key.\n * @param sdkKey The API key used to generate a namespace for the UUID.\n * @returns A random UUID string.\n */\nexport function getRandomUUID(sdkKey: string): string {\n // Generate a namespace based on the API key using DNS namespace\n const namespace = uuidv5(sdkKey, uuidv5.DNS);\n // Generate a random UUID using the namespace derived from the API key\n const randomUUID = uuidv5(uuidv4(), namespace);\n\n return randomUUID;\n}\n\n/**\n * Generates a UUID for a user based on their userId and accountId.\n * @param userId The user's ID.\n * @param accountId The account ID associated with the user.\n * @returns A UUID string formatted without dashes and in uppercase.\n */\nexport function getUUID(userId: string, accountId: string): string {\n const VWO_NAMESPACE = uuidv5(SEED_URL, uuidv5.URL);\n // Convert userId and accountId to string to ensure proper type\n userId = String(userId);\n accountId = String(accountId);\n // Generate a namespace UUID based on the accountId\n const userIdNamespace = generateUUID(accountId, VWO_NAMESPACE);\n // Generate a UUID based on the userId and the previously generated namespace\n const uuidForUserIdAccountId = generateUUID(userId, userIdNamespace);\n\n // Remove all dashes from the UUID and convert it to uppercase\n const desiredUuid = uuidForUserIdAccountId?.replace(/-/gi, '').toUpperCase();\n\n return desiredUuid;\n}\n\n/**\n * Helper function to generate a UUID v5 based on a name and a namespace.\n * @param name The name from which to generate the UUID.\n * @param namespace The namespace used to generate the UUID.\n * @returns A UUID string or undefined if inputs are invalid.\n */\nexport function generateUUID(name: string, namespace: string) {\n // Check for valid input to prevent errors\n if (!name || !namespace) {\n return;\n }\n\n // Generate and return the UUID v5\n return uuidv5(name, namespace);\n}\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { HttpMethodEnum } from '../enums/HttpMethodEnum';\nimport { LogManager } from '../packages/logger';\nimport { buildMessage } from './LogMessageUtil';\nimport { ErrorLogMessagesEnum } from '../enums/log-messages';\n\nconst noop = () => {};\n\nexport function sendGetCall(options) {\n sendRequest(HttpMethodEnum.GET, options);\n}\n\nexport function sendPostCall(options) {\n sendRequest(HttpMethodEnum.POST, options);\n}\n\nfunction sendRequest(method, options) {\n const { networkOptions, successCallback = noop, errorCallback = noop } = options;\n\n let url = `${networkOptions.scheme}://${networkOptions.hostname}${networkOptions.path}`;\n if (networkOptions.port) {\n url = `${networkOptions.scheme}://${networkOptions.hostname}:${networkOptions.port}${networkOptions.path}`;\n }\n const body = networkOptions.body;\n const customHeaders = networkOptions.headers || {};\n const timeout = networkOptions.timeout;\n\n const xhr = new XMLHttpRequest();\n\n if (timeout) {\n xhr.timeout = timeout;\n }\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n const response = xhr.responseText;\n\n if (method === HttpMethodEnum.GET) {\n const parsedResponse = JSON.parse(response);\n successCallback(parsedResponse);\n } else {\n successCallback(response);\n }\n } else {\n errorCallback(xhr.statusText);\n }\n };\n\n // Set up a callback function that is called if the request fails\n xhr.onerror = function () {\n // An error occurred during the transaction\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `${xhr.statusText}, status: ${xhr.status}`,\n }),\n );\n errorCallback(xhr.statusText);\n };\n\n // Set up a callback function that is called if the request times out\n if (timeout) {\n xhr.ontimeout = function () {\n // The request timed out\n LogManager.Instance.error(\n buildMessage(ErrorLogMessagesEnum.NETWORK_CALL_FAILED, {\n method: HttpMethodEnum.POST,\n err: `Request timed out`,\n }),\n );\n };\n }\n\n xhr.open(method, url, true);\n\n for (const headerName in customHeaders) {\n if (headerName in customHeaders) {\n // Skip the Content-Type header\n // Request header field content-type is not allowed by Access-Control-Allow-Headers\n if (headerName !== 'Content-Type' && headerName !== 'Content-Length') {\n xhr.setRequestHeader(headerName, customHeaders[headerName]);\n }\n }\n }\n\n if (method === HttpMethodEnum.POST) {\n xhr.send(JSON.stringify(body));\n } else if (method === HttpMethodEnum.GET) {\n xhr.send();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function get() {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function get() {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function get() {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function get() {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function get() {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function get() {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function get() {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function get() {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function get() {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nvar _default = {\n randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\n\nfunction rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = {\n debugMessages: require('./src/debug-messages.json'),\n infoMessages: require('./src/info-messages.json'),\n warnMessages: require('./src/warn-messages.json'),\n errorMessages: require('./src/error-messages.json'),\n traceMessages: require('./src/trace-messages.json')\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexports.Struct = Struct;\nexports.StructError = StructError;\nexports.any = any;\nexports.array = array;\nexports.assert = assert;\nexports.assign = assign;\nexports.boolean = boolean;\nexports.coerce = coerce;\nexports.create = create;\nexports.date = date;\nexports.defaulted = defaulted;\nexports.define = define;\nexports.deprecated = deprecated;\nexports.dynamic = dynamic;\nexports.empty = empty;\nexports.enums = enums;\nexports.func = func;\nexports.instance = instance;\nexports.integer = integer;\nexports.intersection = intersection;\nexports.is = is;\nexports.lazy = lazy;\nexports.literal = literal;\nexports.map = map;\nexports.mask = mask;\nexports.max = max;\nexports.min = min;\nexports.never = never;\nexports.nullable = nullable;\nexports.number = number;\nexports.object = object;\nexports.omit = omit;\nexports.optional = optional;\nexports.partial = partial;\nexports.pattern = pattern;\nexports.pick = pick;\nexports.record = record;\nexports.refine = refine;\nexports.regexp = regexp;\nexports.set = set;\nexports.size = size;\nexports.string = string;\nexports.struct = struct;\nexports.trimmed = trimmed;\nexports.tuple = tuple;\nexports.type = type;\nexports.union = union;\nexports.unknown = unknown;\nexports.validate = validate;\n//# sourceMappingURL=index.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Copyright 2024 Wingify Software Pvt. Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LogLevelEnum } from './packages/logger/enums/LogLevelEnum';\nimport { Connector } from './packages/storage/Connector';\n\nexport { LogLevelEnum, Connector as StorageConnector };\nexport { init, onInit } from './VWO';\n"],"names":["root","factory","exports","module","define","amd","this","createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","options","VWO","setInstance","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","settings","Promise","resolve","build","getSettings","then","_global","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","platform","PlatformEnum","CLIENT","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","err","API_THROW_ERROR","apiName","info","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","networkInstance","NetworkManager","Instance","attachClient","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","UrlUtil","init","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","get","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","experimentVariationId","experimentKey","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","Object","assign","undefined","setContextualData","FEATURE_NOT_FOUND","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","rolloutRulesToEvaluate","rule","evaluateRule","preSegmentationResult","updatedDecision","push","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","execute","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","variablesForEvaluatedFlag","variables","value","createImpressionForAttribute","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","BASE_URL","packageFile","name","version","Constants","SDK_NAME","SDK_VERSION","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","forEach","VariationModel","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","FeatureModel","identifier","t","getIdentifier","getVariationId","getStatus","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","f","c","cG","g","sK","a","v","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","SettingsModel","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","generateBucketValue","hashValue","maxValue","multiplier","multipliedValue","Math","pow","floor","getBucketValueForUser","hashKey","Hasher","calculateBucketValue","generateHashValue","DecisionMaker","AnsiColorEnum","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","LogLevelColorInfoEnum","upperCaseLevel","toUpperCase","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","LogMessageBuilder","Logger","config","requestId","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","LogLevelNumberEnum","shouldLog","transportLevel","configLevel","formattedMessage","isFunction","consoleLog","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","NetworkBrowserClient","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","getBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","prototype","hasOwnProperty","call","setQuery","RequestHandler","NetworkClient","GlobalRequestModel","RequestModel","setConfig","response","errorResponse","post","url","query","body","headers","timeout","setBaseUrl","getDevelopmentMode","method","path","scheme","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","split","hostname","agent","postBody","Buffer","byteLength","charAt","substring","setStatusCode","statusCode","getData","getStatusCode","getError","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","getKeyValue","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","Array","isArray","FEATURE_ID","featureIdObject","featureIdValue","parseInt","checkInUserStorage","result","checkUserAgentParser","locationMap","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","valuesMatch","checkValuePresent","expectedMap","actualMap","index","toLowerCase","actualValue","startsWith","endsWith","wildcardPattern","slice","RegExp","replace","test","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","res","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","regex","processedOperandValue","parseFloat","processedTagValue","indexOf","obj","Connector","connector","getConnector","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","bucketValue","checkInRange","bucketUserToVariation","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","CampaignDecisionService","callback","integrations","isCallBackFunction","HooksService","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","assignRangeValues","currentAllocation","stepFactor","_getVariationBucketRange","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupId","groupName","assignRangeValuesMEG","variationWeight","ceil","min","VARIATION_RANGE_ALLOCATION","_handleRolloutCampaign","totalWeight","reduce","acc","ruleArray","group","findIndex","grp","campaignIdWithVariation","featureKeys","map","Number","campaignIds","isNaN","isDate","isRegex","isPromise","checkWhitelistingAndPreSeg","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","evaluationResult","all","scaleVariationWeights","getBucketingSeed","variationName","parse","random","filter","rulesLinkedCampaignModel","linkedCampaign","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","pattern","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","getFeatureKeysFromGroup","groupCampaignIds","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","featureToSkip","_isRolloutRuleForFeaturePassed","has","item","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","MEG_CAMPAIGN_ELIGIBLE","getCampaignIdsFromFeatureKey","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","setCampaignAllocation","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","_getEventBasePayload","visitorUserAgent","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","getCurrentUnixTimestampInMillis","visId","sessionId","getCurrentUnixTimestamp","visitor_ua","visitor_ip","event","time","visitor","vwo_fs_environment","sId","u","r","event_type","account_id","uId","sdk","getRandomNumber","ap","ed","sd","sv","setting","en","env","eTime","EVENTS","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","vwoClientInstance","setVariationAllocation","addLinkedCampaignsToSettings","addIsGatewayServiceRequiredFlag","baseUrl","generateUUID","namespace","DNS","VWO_NAMESPACE","userIdNamespace","uuidForUserIdAccountId","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","headerName","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","setRequestHeader","send","defineProperty","enumerable","_nil","default","_parse","_stringify","_v","_v2","_v3","_v4","_validate","_version","_interopRequireDefault","__esModule","getOutputLength","inputLength8","safeAdd","x","y","lsw","md5cmn","q","b","num","cnt","md5ff","md5gg","md5hh","md5ii","unescape","Uint8Array","charCodeAt","input","output","length32","hexTab","hex","md5ToHexEncodedArray","len","olda","oldb","oldc","oldd","wordsToMd5","length8","Uint32Array","bytesToWords","_default","randomUUID","crypto","bind","arr","getRandomValues","rnds8","z","ROTL","K","H","N","M","W","e","T","unsafeStringify","byteToHex","offset","_rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","buf","node","clockseq","seedBytes","rng","msecs","now","nsecs","dt","tl","tmh","_md","hashfunc","_namespace","stringToBytes","_native","rnds","_sha","_regex","warnMessages","traceMessages","StructError","failure","failures","cached","rest","super","join","_cached","isPlainObject","getPrototypeOf","print","toFailure","struct","branch","refinement","toFailures","Symbol","iterator","run","coerce","mask","ctx","coercer","schema","valid","validator","ts","Set","add","refiner","Struct","assert","create","is","tuples","tuple","done","next","shiftIterator","never","knowns","Never","unknowns","delete","unknown","condition","refine","any","Element","Structs","schemas","getTime","defaulted","fallback","strict","ret","changed","deprecated","dynamic","fn","empty","expected","size","enums","values","description","func","Class","integer","isInteger","intersection","S","lazy","literal","constant","Key","Value","max","threshold","exclusive","nullable","omit","subschema","partial","regexp","source","pick","record","of","trimmed","Elements","first","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","onInit"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/package.json b/dist/package.json index 130d7b9..a8f72a0 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "vwo-fme-node-sdk", - "version": "1.7.0", + "version": "1.8.0", "description": "VWO Node/JavaScript SDK for Feature Management and Experimentation", "main": "dist/server-unpacked/index.js", "browser": "dist/client/vwo-fme-javascript-sdk", diff --git a/dist/server-unpacked/VWO.js b/dist/server-unpacked/VWO.js index b7f1113..50dcb82 100644 --- a/dist/server-unpacked/VWO.js +++ b/dist/server-unpacked/VWO.js @@ -87,6 +87,9 @@ var VWO = /** @class */ (function () { // .initBatching() // Initializes batching for bulk data processing. .initPolling(); // Starts polling mechanism for regular updates. // .setAnalyticsCallback() // Sets up analytics callback for data analysis. + if (options === null || options === void 0 ? void 0 : options.settings) { + return Promise.resolve(this.vwoBuilder.build(options.settings)); + } return this.vwoBuilder.getSettings().then(function (settings) { return _this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings. }); diff --git a/dist/server-unpacked/VWO.js.map b/dist/server-unpacked/VWO.js.map index c265de0..571eca2 100644 --- a/dist/server-unpacked/VWO.js.map +++ b/dist/server-unpacked/VWO.js.map @@ -1 +1 @@ -{"version":3,"file":"VWO.js","sourceRoot":"","sources":["../../lib/VWO.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2CAA0C;AAK1C,qDAA0D;AAC1D,mDAA+C;AAE/C,qDAAiF;AACjF,yDAAsD;AACtD,qDAAoD;AAEpD;IAIE;;;;;OAKG;IACH,aAAY,OAAoB;QAC9B,OAAO,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACY,eAAW,GAA1B,UAA2B,OAAoB;QAA/C,iBAiBC;QAhBC,IAAM,iBAAiB,GAAQ,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC;QACnD,IAAI,CAAC,UAAU,GAAG,iBAAiB,IAAI,IAAI,uBAAU,CAAC,OAAO,CAAC,CAAC;QAE/D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU;aAC5B,SAAS,EAAE,CAAC,gDAAgD;aAC5D,kBAAkB,EAAE,CAAC,0DAA0D;aAC/E,UAAU,EAAE,CAAC,2CAA2C;aACxD,iBAAiB,EAAE,CAAC,uDAAuD;aAC3E,eAAe,EAAE,CAAC,mDAAmD;YACtE,2EAA2E;aAC1E,WAAW,EAAE,CAAC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,CAAC;oBAEH,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAClB,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACpD,CAAC;qBAAM,CAAC;oBACN,iDAAiD;oBACjD,UAAU,CAAC;wBACT,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;4BAC9B,OAAO;wBACT,CAAC;wBAED,IAAM,GAAG,GAAG,IAAA,6BAAY,EAAC,kCAAmB,CAAC,uBAAuB,EAAE;4BACpE,IAAI,QAAA;yBACL,CAAC,CAAC;wBAEH,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACnB,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;oBACjF,CAAC,EAAE,IAAI,CAAC,CAAC;gBACX,CAAC;gBAED,sBAAO,OAAO,CAAC,eAAe,CAAC,OAAO,EAAC;YACzC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACP,GAAG,GAAG,IAAA,6BAAY,EAAC,mCAAoB,CAAC,eAAe,EAAE;oBAC7D,OAAO,SAAA;oBACP,GAAG,KAAA;iBACJ,CAAC,CAAC;gBAEH,OAAO,CAAC,IAAI,CAAC,0BAAmB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,cAAI,GAAG,CAAE,CAAC,CAAC;YACrE,CAAC;;;;CACF;AAzCD,wBAyCC"} \ No newline at end of file diff --git a/dist/server-unpacked/VWOBuilder.js.map b/dist/server-unpacked/VWOBuilder.js.map index 5be046e..aadfddf 100644 --- a/dist/server-unpacked/VWOBuilder.js.map +++ b/dist/server-unpacked/VWOBuilder.js.map @@ -1 +1 @@ -{"version":3,"file":"VWOBuilder.js","sourceRoot":"","sources":["../../lib/VWOBuilder.ts"],"names":[],"mappings":";;;AAiBA,4CAA4D;AAC5D,0DAA0D;AAC1D,4EAAwE;AAExE,8CAA6C;AAE7C,yCAAo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AAC,cAA6B;gBAClC,IAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,KAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC3D,IAAM,yBAAyB,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;gBACjE,IAAI,yBAAyB,KAAK,YAAY,EAAE,CAAC;oBAC/C,KAAI,CAAC,gBAAgB,GAAG,cAAc,CAAC;oBACvC,IAAM,cAAc,GAAG,IAAA,0BAAW,EAAC,cAAc,CAAC,CAAC;oBAEnD,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,kCAAmB,CAAC,oBAAoB,CAAC,CAAC;oBACnE,IAAA,gDAAiC,EAAC,cAAc,EAAE,KAAI,CAAC,WAAW,CAAC,CAAC;gBACtE,CAAC;qBAAM,CAAC;oBACN,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,kCAAmB,CAAC,6BAA6B,CAAC,CAAC;gBAC9E,CAAC;YACH,CAAC,CAAC;iBACD,KAAK,CAAC;gBACL,mBAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,mCAAoB,CAAC,6BAA6B,CAAC,CAAC;YAChF,CAAC,CAAC,CAAC;QACP,CAAC,EAAE,eAAe,CAAC,CAAC;IACtB,CAAC;IACH,iBAAC;AAAD,CAAC,AA5SD,IA4SC;AA5SY,gCAAU"} \ No newline at end of file diff --git a/dist/server-unpacked/VWOClient.js.map b/dist/server-unpacked/VWOClient.js.map index 57437ca..cb1d305 100644 --- a/dist/server-unpacked/VWOClient.js.map +++ b/dist/server-unpacked/VWOClient.js.map @@ -1 +1 @@ -{"version":3,"file":"VWOClient.js","sourceRoot":"","sources":["../../lib/VWOClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,4CAA+C;AAG/C,yCAAwC;AACxC,mDAAqD;AACrD,+CAA4C;AAE5C,qDAAuG;AAIvG,kEAAkE;AAElE,sFAA2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AC;4BAC5B,mBAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,mCAAoB,CAAC,mBAAmB,CAAC,CAAC;4BACpE,MAAM,IAAI,SAAS,CAAC,4BAA4B,CAAC,CAAC;wBACpD,CAAC;wBAEK,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;wBAErE,iEAAiE;wBACjE,qBAAM,IAAI,8BAAe,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,CAAC,EAAA;;wBADnG,iEAAiE;wBACjE,SAAmG,CAAC;;;;wBAEpG,kDAAkD;wBAClD,mBAAU,CAAC,QAAQ,CAAC,IAAI,CACtB,IAAA,6BAAY,EAAC,mCAAoB,CAAC,eAAe,EAAE;4BACjD,OAAO,SAAA;4BACP,GAAG,OAAA;yBACJ,CAAC,CACH,CAAC;;;;;;KAEL;IACH,gBAAC;AAAD,CAAC,AAnQD,IAmQC;AAnQY,8BAAS"} \ No newline at end of file diff --git a/dist/server-unpacked/models/VWOOptionsModel.js b/dist/server-unpacked/models/VWOOptionsModel.js index c8a291c..320cd30 100644 --- a/dist/server-unpacked/models/VWOOptionsModel.js +++ b/dist/server-unpacked/models/VWOOptionsModel.js @@ -50,6 +50,9 @@ var VWOOptionsModel = /** @class */ (function () { if (options === null || options === void 0 ? void 0 : options.network) { this.network = options.network; } + if (options === null || options === void 0 ? void 0 : options.settings) { + this.settings = options.settings; + } return this; }; VWOOptionsModel.prototype.getAccountId = function () { @@ -82,6 +85,9 @@ var VWOOptionsModel = /** @class */ (function () { VWOOptionsModel.prototype.getVWOBuilder = function () { return this.vwoBuilder; }; + VWOOptionsModel.prototype.getSettings = function () { + return this.settings; + }; return VWOOptionsModel; }()); exports.VWOOptionsModel = VWOOptionsModel; diff --git a/dist/server-unpacked/models/VWOOptionsModel.js.map b/dist/server-unpacked/models/VWOOptionsModel.js.map index b6d8c49..8af81af 100644 --- a/dist/server-unpacked/models/VWOOptionsModel.js.map +++ b/dist/server-unpacked/models/VWOOptionsModel.js.map @@ -1 +1 @@ -{"version":3,"file":"VWOOptionsModel.js","sourceRoot":"","sources":["../../../lib/models/VWOOptionsModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAkCH;IAAA;IA0FA,CAAC;IA3EC,6CAAmB,GAAnB,UAAoB,OAAwB;QAC1C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QAErC,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B,EAAE,CAAC;YACxC,IAAI,CAAC,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC;QACvE,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EAAE,CAAC;YAC/B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACrD,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,CAAC;YACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC/C,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,EAAE,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC3C,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC/B,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,EAAE,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC3C,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,EAAE,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QAC3C,CAAC;QACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,CAAC;YACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sCAAY,GAAZ;QACE,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,mCAAS,GAAT;QACE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,8CAAoB,GAApB;QACE,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,2CAAiB,GAAjB;QACE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,2CAAiB,GAAjB;QACE,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,yCAAe,GAAf;QACE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,mCAAS,GAAT;QACE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,yCAAe,GAAf;QACE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,oCAAU,GAAV;QACE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,uCAAa,GAAb;QACE,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AA1FD,IA0FC;AA1FY,0CAAe"} \ No newline at end of file +{"version":3,"file":"VWOOptionsModel.js","sourceRoot":"","sources":["../../../lib/models/VWOOption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diff --git a/dist/server-unpacked/services/SettingsService.js.map b/dist/server-unpacked/services/SettingsService.js.map index 2db9339..5e96042 100644 --- a/dist/server-unpacked/services/SettingsService.js.map +++ b/dist/server-unpacked/services/SettingsService.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingsService.js","sourceRoot":"","sources":["../../../lib/services/SettingsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,6CAAgD;AAChD,2DAAwF;AAExF,oDAAgD;AAEhD,0CAAyC;AACzC,wCAAiE;AACjE,0DAAyD;AACzD,sDAAwG;AACxG,uFAA4E;AAE5E,0DAAuD;AACvD,oDAAuD;AAUvD;IAWE,yBAAY,OAA4B;;QAHxC,6BAAwB,GAAY,KAAK,CAAC;QAIxC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,MAAM,KAAI,qBAAS,CAAC,eAAe,CAAC;QACrE,IAAI,CAAC,cAAc,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,OAAO,KAAI,qBAAS,CAAC,gBAAgB,CAAC;QAE/E,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,GAAG,EAAE,CAAC;YACjC,IAAI,SAAS,SAAA,CAAC;YACd,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;YACrC,IACE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,mBAAa,CAAC;gBACpD,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAc,CAAC,EACrD,CAAC;gBACD,SAAS,GAAG,IAAI,GAAG,CAAC,UAAG,OAAO,CAAC,cAAc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C,CAAC;IACH,sBAAC;AAAD,CAAC,AAvMD,IAuMC;AAvMY,0CAAe"} \ No newline at end of file +{"version":3,"file":"SettingsService.js","sourceRoot":"","sources":["../../../lib/services/SettingsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,6CAAgD;AAChD,2DAAwF;AAExF,oDAAgD;AAEhD,0CAAyC;AACzC,wCAAiE;AACjE,0DAAyD;AACzD,sDAAwG;AACxG,uFAA4E;AAC5E,0DAAuD;AACvD,oDAAuD;AAUvD;IAWE,yBAAY,OAA4B;;QAHxC,6BAAwB,GAAY,KAAK,CAAC;QAIxC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,MAAM,KAAI,qBAAS,CAAC,eAAe,CAAC;QACrE,IAAI,CAAC,cAAc,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,OAAO,KAAI,qBAAS,CAAC,gBAAgB,CAAC;QAE/E,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,GAAG,EAAE,CAAC;YACjC,IAAI,SAAS,SAAA,CAAC;YACd,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;YACrC,IACE,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,mBAAa,CAAC;gBACpD,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAc,CAAC,EACrD,CAAC;gBACD,SAAS,GAAG,IAAI,GAAG,CAAC,UAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAE,CAAC,CAAC;YACvD,CAAC;iBAAM,IAAI,MAAA,OAAO,CAAC,cAAc,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a/dist/server-unpacked/utils/SettingsUtil.js b/dist/server-unpacked/utils/SettingsUtil.js index 83255f2..00074ed 100644 --- a/dist/server-unpacked/utils/SettingsUtil.js +++ b/dist/server-unpacked/utils/SettingsUtil.js @@ -1,26 +1,17 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setSettingsAndAddCampaignsToRules = void 0; -/** - * Copyright 2024 Wingify Software Pvt. Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ var SettingsModel_1 = require("../models/settings/SettingsModel"); var CampaignUtil_1 = require("./CampaignUtil"); var FunctionUtil_1 = require("./FunctionUtil"); var GatewayServiceUtil_1 = require("./GatewayServiceUtil"); +/** + * Sets settings and adds campaigns to rules + * @param settings settings + * @param vwoClientInstance VWOClient instance + */ function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) { + // create settings model and set it to vwoClientInstance vwoClientInstance.settings = new SettingsModel_1.SettingsModel(settings); vwoClientInstance.originalSettings = settings; // Optimize loop by avoiding multiple calls to `getCampaigns()` diff --git a/dist/server-unpacked/utils/SettingsUtil.js.map b/dist/server-unpacked/utils/SettingsUtil.js.map index a6257c9..9e5bce9 100644 --- a/dist/server-unpacked/utils/SettingsUtil.js.map +++ b/dist/server-unpacked/utils/SettingsUtil.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingsUtil.js","sourceRoot":"","sources":["../../../lib/utils/SettingsUtil.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,kEAAiE;AACjE,+CAAwD;AACxD,+CAA8D;AAC9D,2DAAuE;AAEvE,SAAgB,iCAAiC,CAAC,QAAQ,EAAE,iBAAiB;IA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BAAiB,CAAC,QAAQ,CAAC,CAAC;AAC9D,CAAC;AAZD,8EAYC"} \ No newline at end of file diff --git a/dist/server/vwo-fme-node-sdk.js b/dist/server/vwo-fme-node-sdk.js index 8eaa3ba..ddaf50a 100644 --- a/dist/server/vwo-fme-node-sdk.js +++ b/dist/server/vwo-fme-node-sdk.js @@ -1,5 +1,5 @@ /*! - * vwo-fme-node-sdk - v1.7.0 + * vwo-fme-node-sdk - v1.8.0 * URL - https://github.com/wingify/vwo-node-sdk * * Copyright 2024 Wingify Software Pvt. Ltd. @@ -202,6 +202,9 @@ var VWO = /** @class */function () { // .initBatching() // Initializes batching for bulk data processing. .initPolling(); // Starts polling mechanism for regular updates. // .setAnalyticsCallback() // Sets up analytics callback for data analysis. + if (options === null || options === void 0 ? void 0 : options.settings) { + return Promise.resolve(this.vwoBuilder.build(options.settings)); + } return this.vwoBuilder.getSettings().then(function (settings) { return _this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings. }); @@ -10519,26 +10522,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.setSettingsAndAddCampaignsToRules = void 0; -/** - * Copyright 2024 Wingify Software Pvt. Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ var SettingsModel_1 = __webpack_require__(/*! ../models/settings/SettingsModel */ "./dist/server-unpacked/models/settings/SettingsModel.js"); var CampaignUtil_1 = __webpack_require__(/*! ./CampaignUtil */ "./dist/server-unpacked/utils/CampaignUtil.js"); var FunctionUtil_1 = __webpack_require__(/*! ./FunctionUtil */ "./dist/server-unpacked/utils/FunctionUtil.js"); var GatewayServiceUtil_1 = __webpack_require__(/*! ./GatewayServiceUtil */ "./dist/server-unpacked/utils/GatewayServiceUtil.js"); +/** + * Sets settings and adds campaigns to rules + * @param settings settings + * @param vwoClientInstance VWOClient instance + */ function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) { + // create settings model and set it to vwoClientInstance vwoClientInstance.settings = new SettingsModel_1.SettingsModel(settings); vwoClientInstance.originalSettings = settings; // Optimize loop by avoiding multiple calls to `getCampaigns()` @@ -10875,7 +10869,7 @@ module.exports = require("https"); \***************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"vwo-fme-node-sdk","version":"1.7.0","description":"VWO Node/JavaScript SDK for Feature Management and Experimentation","main":"dist/server-unpacked/index.js","browser":"dist/client/vwo-fme-javascript-sdk","exports":{".":{"node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"default":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"./node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"./browser":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"types":"dist/types/index.d.ts","scripts":{"build":"rm -rf dist/ yarn tsc:prod && yarn build:node && yarn build:browser && prettier -w dist/types/","build:browser":"yarn build:dev-browser && yarn build:prod-browser","build:node":"yarn build:dev-node && yarn build:prod-node","build:dev-browser":"webpack --config ./webpack.browser.config.js --mode=development","build:dev-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development","build:dev-browser-watch":"webpack --config ./webpack.browser.config.js --mode=development --watch","build:dev-node-watch":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development --watch","build:dev-browser-analyze":"webpack --config ./webpack.browser.config.js --mode=development --env analyze=1","build:dev-node-analyze":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production --env analyze=1","build:prod-browser":"webpack --config ./webpack.browser.config.js --mode=production","build:prod-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production","check:license":"yarn check:versions && node -e \'require(\\"./scripts/check-license\\")\'","check:versions":"node -e \'require(\\"./scripts/check-versions\\")\'","demo":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/index.js","demo:server":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/server.js","lint":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint lib/ --fix","lint:errors-only":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint **/*.ts\' --fix --quiet","prepare":"husky","prettier":"prettier -w lib/**/*.ts *.md","test:dev":"node --inspect-brk node_modules/jest/bin/jest.js --watch --runInBand --debug --colors --errorOnDeprecated","test:prod":"jest --runInBand --colors --errorOnDeprecated","test:coverage":"jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info","tsc":"yarn check:versions && rm -rf dist/server-unpacked && cp package.json dist/ && tsc -w","tsc:prod":"yarn check:versions && rm -rf dist/server-unpacked && tsc && cp package.json dist/","typedoc":"typedoc --plugin typedoc-plugin-markdown --out ./docs lib/*.ts lib/**/*.ts lib/**/**/*.ts ","typedoc:html":"typedoc --out docs-html lib/*.ts lib/**/*.ts lib/**/**/*.ts"},"repository":{"type":"git","url":"https://github.com/wingify/vwo-fme-node-sdk"},"author":"VWO developers","license":"Apache-2.0","files":["dist/","package.json","yarn.lock","lib/**/*","LICENSE","README.md","CONTRIBUTING.md","CHANGELOG.md","NOTICE"],"dependencies":{"murmurhash":"^2.0.1","superstruct":"^0.14.x","uuid":"^9.0.1","vwo-fme-sdk-log-messages":"^0.1.2"},"devDependencies":{"@babel/core":"^7.24.5","@babel/preset-env":"^7.24.5","@babel/preset-typescript":"^7.24.1","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@eslint/js":"^9.2.0","@types/jest":"^29.5.12","@types/node":"^20.12.7","babel-jest":"^29.7.0","babel-loader":"^9.1.3","eslint":"^9.2.0","express":"^4.19.2","globals":"^15.1.0","husky":"^9.0.11","jest":"^29.7.0","lint-staged":"^15.2.2","nodemon":"^2.0.6","prettier":"^3.2.5","semver":"^7.6.0","shelljs":"^0.8.5","ts-loader":"^9.5.1","typedoc":"^0.25.13","typedoc-plugin-markdown":"^4.0.3","typescript":"^5.4.5","typescript-eslint":"^7.8.0","vwo-fme-sdk-e2e-test-settings-n-cases":"^1.3.0","webpack":"^5.91.0","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"lint-staged":{"**/*.{ts,json,md}":["prettier --write"]},"engineStrict":true,"engines":{"node":">= 8.9.0","yarn":">= 1.22.17"},"customEngines":{"nodeLint":">= 18.18.0"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"vwo-fme-node-sdk","version":"1.8.0","description":"VWO Node/JavaScript SDK for Feature Management and Experimentation","main":"dist/server-unpacked/index.js","browser":"dist/client/vwo-fme-javascript-sdk","exports":{".":{"node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"default":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"./node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"./browser":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"types":"dist/types/index.d.ts","scripts":{"build":"rm -rf dist/ yarn tsc:prod && yarn build:node && yarn build:browser && prettier -w dist/types/","build:browser":"yarn build:dev-browser && yarn build:prod-browser","build:node":"yarn build:dev-node && yarn build:prod-node","build:dev-browser":"webpack --config ./webpack.browser.config.js --mode=development","build:dev-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development","build:dev-browser-watch":"webpack --config ./webpack.browser.config.js --mode=development --watch","build:dev-node-watch":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development --watch","build:dev-browser-analyze":"webpack --config ./webpack.browser.config.js --mode=development --env analyze=1","build:dev-node-analyze":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production --env analyze=1","build:prod-browser":"webpack --config ./webpack.browser.config.js --mode=production","build:prod-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production","check:license":"yarn check:versions && node -e \'require(\\"./scripts/check-license\\")\'","check:versions":"node -e \'require(\\"./scripts/check-versions\\")\'","demo":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/index.js","demo:server":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/server.js","lint":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint lib/ --fix","lint:errors-only":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint **/*.ts\' --fix --quiet","prepare":"husky","prettier":"prettier -w lib/**/*.ts *.md","test:dev":"node --inspect-brk node_modules/jest/bin/jest.js --watch --runInBand --debug --colors --errorOnDeprecated","test:prod":"jest --runInBand --colors --errorOnDeprecated","test:coverage":"jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info","tsc":"yarn check:versions && rm -rf dist/server-unpacked && cp package.json dist/ && tsc -w","tsc:prod":"yarn check:versions && rm -rf dist/server-unpacked && tsc && cp package.json dist/","typedoc":"typedoc --plugin typedoc-plugin-markdown --out ./docs lib/*.ts lib/**/*.ts lib/**/**/*.ts ","typedoc:html":"typedoc --out docs-html lib/*.ts lib/**/*.ts lib/**/**/*.ts"},"repository":{"type":"git","url":"https://github.com/wingify/vwo-fme-node-sdk"},"author":"VWO developers","license":"Apache-2.0","files":["dist/","package.json","yarn.lock","lib/**/*","LICENSE","README.md","CONTRIBUTING.md","CHANGELOG.md","NOTICE"],"dependencies":{"murmurhash":"^2.0.1","superstruct":"^0.14.x","uuid":"^9.0.1","vwo-fme-sdk-log-messages":"^0.1.2"},"devDependencies":{"@babel/core":"^7.24.5","@babel/preset-env":"^7.24.5","@babel/preset-typescript":"^7.24.1","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@eslint/js":"^9.2.0","@types/jest":"^29.5.12","@types/node":"^20.12.7","babel-jest":"^29.7.0","babel-loader":"^9.1.3","eslint":"^9.2.0","express":"^4.19.2","globals":"^15.1.0","husky":"^9.0.11","jest":"^29.7.0","lint-staged":"^15.2.2","nodemon":"^2.0.6","prettier":"^3.2.5","semver":"^7.6.0","shelljs":"^0.8.5","ts-loader":"^9.5.1","typedoc":"^0.25.13","typedoc-plugin-markdown":"^4.0.3","typescript":"^5.4.5","typescript-eslint":"^7.8.0","vwo-fme-sdk-e2e-test-settings-n-cases":"^1.3.0","webpack":"^5.91.0","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"lint-staged":{"**/*.{ts,json,md}":["prettier --write"]},"engineStrict":true,"engines":{"node":">= 8.9.0","yarn":">= 1.22.17"},"customEngines":{"nodeLint":">= 18.18.0"}}'); /***/ }) diff --git a/dist/server/vwo-fme-node-sdk.js.map b/dist/server/vwo-fme-node-sdk.js.map index e2762aa..a49df45 100644 --- a/dist/server/vwo-fme-node-sdk.js.map +++ b/dist/server/vwo-fme-node-sdk.js.map @@ -1 +1 @@ -{"version":3,"file":"vwo-fme-node-sdk.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAACwe,IAAI,CAAC,CAAC;EAChC,CAAC,MAAM,IAAIiC,MAAM,KAAKD,gBAAA,CAAAxS,cAAc,CAACkO,GAAG,EAAE;IACxCge,GAAG,CAACW,IAAI,EAAE;EACZ;AACF;;;;;;;;;;ACxGA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;;ACtBA;;;;;;;;;;;;;;;;;;;AAgBA,IAAAjjB,cAAA,GAAA5f,mBAAA;AAGSwB,gDAAA;EAAAqiB,UAAA;EAAAniB,GAAA,WAAAA,CAAA;IAAA,OAHAke,cAAA,CAAAyB,YAAY;EAAA;AAAA;AACrB,IAAAyhB,WAAA,GAAA9iC,mBAAA;AAEoCwB,oDAAA;EAAAqiB,UAAA;EAAAniB,GAAA,WAAAA,CAAA;IAAA,OAF3BohC,WAAA,CAAA/P,SAAS;EAAA;AAAA;AAGlB,IAAAgQ,KAAA,GAAA/iC,mBAAA;AAASwB,wCAAA;EAAAqiB,UAAA;EAAAniB,GAAA,WAAAA,CAAA;IAAA,OAAAqhC,KAAA,CAAAlhC,IAAI;EAAA;AAAA;AAAEL,0CAAA;EAAAqiB,UAAA;EAAAniB,GAAA,WAAAA,CAAA;IAAA,OAAAqhC,KAAA,CAAAl/B,MAAM;EAAA;AAAA,I","sources":["webpack://vwo-fme-node-sdk/../../lib/VWO.ts","webpack://vwo-fme-node-sdk/../../lib/VWOBuilder.ts","webpack://vwo-fme-node-sdk/../../lib/VWOClient.ts","webpack://vwo-fme-node-sdk/../../../lib/api/GetFlag.ts","webpack://vwo-fme-node-sdk/../../../lib/api/SetAttribute.ts","webpack://vwo-fme-node-sdk/../../../lib/api/TrackEvent.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/Url.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/index.ts","webpack://vwo-fme-node-sdk/../../../lib/decorators/StorageDecorator.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/ApiEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/CampaignTypeEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/EventEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HeadersEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HttpMethodEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/PlatformEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StatusEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StorageEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/UrlEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/enums/log-messages/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/CampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/FeatureModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/ImpactCampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/MetricModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/RuleModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariableModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariationModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/settings/SettingsModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextVWOModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/decision-maker/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/LogMessageBuilder.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/Logger.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/core/LogManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/core/TransportManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/client/NetworkClient.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/RequestModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/ResponseModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Connector.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Storage.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/index.ts","webpack://vwo-fme-node-sdk/../../../lib/services/CampaignDecisionService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/HooksService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/SettingsService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/StorageService.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/CampaignUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DataTypeUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DecisionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/FunctionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/GatewayServiceUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/ImpressionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/LogMessageUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/MegUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/NetworkUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/PromiseUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/RuleEvaluationUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/SettingsUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UrlUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UuidUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/XMLUtil.ts","webpack://vwo-fme-node-sdk/external commonjs \"murmurhash\"","webpack://vwo-fme-node-sdk/external commonjs \"superstruct\"","webpack://vwo-fme-node-sdk/external commonjs \"uuid\"","webpack://vwo-fme-node-sdk/external commonjs \"vwo-fme-sdk-log-messages\"","webpack://vwo-fme-node-sdk/external node-commonjs \"http\"","webpack://vwo-fme-node-sdk/external node-commonjs \"https\"","webpack://vwo-fme-node-sdk/webpack/bootstrap","webpack://vwo-fme-node-sdk/../../lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"module.exports = require(\"murmurhash\");","module.exports = require(\"superstruct\");","module.exports = require(\"uuid\");","module.exports = require(\"vwo-fme-sdk-log-messages\");","module.exports = require(\"http\");","module.exports = require(\"https\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n"],"names":["VWOBuilder_1","require","DataTypeUtil_1","PromiseUtil_1","log_messages_1","LogMessageUtil_1","PlatformEnum_1","VWO","options","setInstance","_this","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","getSettings","then","settings","build","Object","defineProperty","get","exports","_global","init","apiName","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","process","env","platform","PlatformEnum","CLIENT","SERVER","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","resolve","err","API_THROW_ERROR","info","concat","onInit","date_1","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","logger_1","network_layer_1","segmentation_evaluator_1","storage_1","VWOClient_1","SettingsService_1","FunctionUtil_1","SettingsUtil_1","UuidUtil_1","prototype","networkInstance","NetworkManager","Instance","attachClient","_b","_a","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","_c","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","key","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","stringifiedLatestSettings","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","GetFlag_1","SetAttribute_1","TrackEvent_1","SettingsSchemaValidation_1","ContextModel_1","HooksService_1","UrlUtil_1","NetworkUtil_1","UrlUtil","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","default","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","sent","err_1","StorageDecorator_1","ApiEnum_1","CampaignTypeEnum_1","CampaignModel_1","VariableModel_1","StorageService_1","CampaignUtil_1","DecisionUtil_1","ImpressionUtil_1","RuleEvaluationUtil_1","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","_k","experimentVariationId","experimentKey","variation_1","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","assign","undefined","FEATURE_NOT_FOUND","setContextualData","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","length","rolloutRulesToEvaluate","rollOutRules_1","_i","rule","evaluateRule","preSegmentationResult","updatedDecision","push","_d","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","experimentRules_1","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","__assign","execute","_e","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","_f","_g","variablesForEvaluatedFlag","_j","_h","variables","value","EventEnum_1","createImpressionForAttribute","__awaiter","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","BASE_URL","Url_1","packageFile","name","version","SDK_VERSION","Constants","SDK_NAME","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","StorageEnum_1","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","MetricModel_1","VariationModel_1","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","variableList","forEach","variationList","VariationModel","metricsList","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","ImpactCampaignModel_1","RuleModel_1","FeatureModel","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","identifier","i","t","getIdentifier","getVariationId","getStatus","val","k","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","superstruct_1","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","FeatureModel_1","SettingsModel","f","c","cG","g","sK","a","v","featureList","campaignList","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","ContextVWOModel_1","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","Hasher","DecisionMaker","generateBucketValue","hashValue","maxValue","multiplier","ratio","Math","pow","multipliedValue","floor","getBucketValueForUser","hashKey","v3","bucketValue","calculateBucketValue","str","generateHashValue","LogLevelEnum_1","AnsiColorEnum","BOLD","CYAN","GREEN","LIGHTBLUE","RED","RESET","WHITE","YELLOW","LogMessageBuilder","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","upperCaseLevel","toUpperCase","LogLevelColorInfoEnum","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","Logger","uuid_1","Logger_1","ConsoleTransport_1","TransportManager_1","_super","__extends","config","call","requestId","v4","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","LogMessageBuilder_1","LogLevelNumberEnum","shouldLog","transportLevel","configLevel","targetLevel","desiredLevel","logMessageBuilder","formattedMessage","isFunction","LogManager_1","enumerable","consoleLog","XMLUtil_1","ResponseModel_1","NetworkBrowserClient","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","http","https","NetworkClient","httpClient","scheme","req","res","setStatusCode","statusCode","contentType","headers","rawData","test","resume","setEncoding","on","chunk","parsedData","parse","getStatusCode","error_1","getBody","write","body","end","RequestHandler","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","hasOwnProperty","setQuery","NetworkManager_1","GlobalRequestModel_1","GlobalRequestModel","RequestModel_1","RequestModel","RequestHandler_1","setConfig","response","errorResponse","post","url","query","timeout","setBaseUrl","getDevelopmentMode","HttpMethodEnum_1","method","path","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","queryString","split","hostname","agent","postBody","Buffer","TextEncoder","encode","byteLength","charAt","substring","getData","getError","SegmentEvaluator_1","GatewayServiceUtil_1","UrlEnum_1","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","SegmentOperatorValueEnum_1","SegmentUtil_1","SegmentOperandEvaluator_1","getKeyValue","operator","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","dslNodes_1","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","valuesArray","Array","isArray","FEATURE_ID","featureIdObject","featureIdKey_1","featureIdValue","this_1","parseInt","checkInUserStorage","result","checkUserAgentParser","uaParserResult","locationMap","dslNodes_2","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","segmentResult","valuesMatch","checkValuePresent","expectedMap","actualMap","expectedValues_2","index","toLowerCase","actualValue","expectedValues_1","startsWith","endsWith","wildcardPattern","slice","regex","RegExp","replace","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","SegmentOperandValueEnum_1","SegmentOperandRegexEnum_1","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","processedOperandValue","parseFloat","processedTagValue","indexOf","pattern","SegmentationManger_1","obj","Connector","connector","getConnector","Storage_1","decision_maker_1","constants_1","CampaignDecisionService","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","checkInRange","bucketUserToVariation","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","HooksService","callback","integrations","isCallBackFunction","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","setVariationAllocation","_handleRolloutCampaign","currentAllocation_1","stepFactor","assignRangeValues","VARIATION_RANGE_ALLOCATION","variationWeight","currentAllocation","_getVariationBucketRange","scaleVariationWeights","totalWeight","reduce","acc","equalWeight_1","getBucketingSeed","groupId","setCampaignAllocation","assignRangeValuesMEG","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupName","findGroupsFeaturePartOf","ruleArray","group","groupIndex","findIndex","grp","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","campaignIdWithVariation","featureKeys","map","Number","campaignIdWithVariation_1","getCampaignIdsFromFeatureKey","campaignIds","getRuleTypeUsingCampaignIdFromFeature","ceil","min","isDefined","isNaN","isDate","isRegex","isPromise","StatusEnum_1","CampaignDecisionService_1","DataTypeUtil_2","MegUtil_1","checkWhitelistingAndPreSeg","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","Promise","evaluationResult","all","variationName","clonedObj","getCurrentUnixTimestamp","getCurrentUnixTimestampInMillis","getRandomNumber","random","filter","ruleModel","addLinkedCampaignsToSettings","linkedCampaign","rulesLinkedCampaignModel","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","addIsGatewayServiceRequiredFlag","rules_1","jsonSegments","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","featureToSkip","getFeatureKeysFromGroup","groupCampaignIds","feature_1","_isRolloutRuleForFeaturePassed","isRolloutRulePassed","has","item","featureKeys_1","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","campaignMapArray_1","MEG_CAMPAIGN_ELIGIBLE","campaigns_1","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","HeadersEnum_1","getBasePropertiesForBulk","sId","u","r","getTrackEventPath","event","event_type","account_id","uId","sdk","ap","ed","getEventBatchingQueryParams","sd","sv","setting","visitorUserAgent","en","eTime","visitor_ua","visitor_ip","EVENTS","_getEventBasePayload","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","visId","sessionId","time","visitor","vwo_fs_environment","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","sendGetApiRequest","SettingsModel_1","vwoClientInstance","baseUrl","uuid_2","namespace","v5","DNS","randomUUID","VWO_NAMESPACE","userIdNamespace","generateUUID","uuidForUserIdAccountId","desiredUuid","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","headerName","setRequestHeader","send","Connector_1","VWO_1"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"vwo-fme-node-sdk.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeA,IAAAA,YAAA,GAAAC,mBAAA;AAIA,IAAAC,cAAA,GAAAD,mBAAA;AACA,IAAAE,aAAA,GAAAF,mBAAA;AAEA,IAAAG,cAAA,GAAAH,mBAAA;AACA,IAAAI,gBAAA,GAAAJ,mBAAA;AACA,IAAAK,cAAA,GAAAL,mBAAA;AAEA,IAAAM,GAAA;EAIE;;;;;;EAMA,SAAAA,IAAYC,OAAoB;IAC9B,OAAOD,GAAG,CAACE,WAAW,CAACD,OAAO,CAAC;EACjC;EAEA;;;;;;EAMeD,GAAA,CAAAE,WAAW,GAA1B,UAA2BD,OAAoB;IAA/C,IAAAE,KAAA;IACE,IAAMC,iBAAiB,GAAQH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEI,UAAU;IAClD,IAAI,CAACA,UAAU,GAAGD,iBAAiB,IAAI,IAAIX,YAAA,CAAAa,UAAU,CAACL,OAAO,CAAC;IAE9D,IAAI,CAACM,QAAQ,GAAG,IAAI,CAACF,UAAU,CAC5BG,SAAS,EAAE,CAAC;IAAA,CACZC,kBAAkB,EAAE,CAAC;IAAA,CACrBC,UAAU,EAAE,CAAC;IAAA,CACbC,iBAAiB,EAAE,CAAC;IAAA,CACpBC,eAAe,EAAE,CAAC;IACnB;IAAA,CACCC,WAAW,EAAE,CAAC,CAAC;IAClB;IAEA,IAAIZ,OAAO,aAA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I;EAAA;AAAA;AAAEL,0CAAA;EAAAoiB,UAAA;EAAAliB,GAAA,WAAAA,CAAA;IAAA,OAAAmhC,KAAA,CAAAj/B,MAAM;EAAA;AAAA,I","sources":["webpack://vwo-fme-node-sdk/../../lib/VWO.ts","webpack://vwo-fme-node-sdk/../../lib/VWOBuilder.ts","webpack://vwo-fme-node-sdk/../../lib/VWOClient.ts","webpack://vwo-fme-node-sdk/../../../lib/api/GetFlag.ts","webpack://vwo-fme-node-sdk/../../../lib/api/SetAttribute.ts","webpack://vwo-fme-node-sdk/../../../lib/api/TrackEvent.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/Url.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/index.ts","webpack://vwo-fme-node-sdk/../../../lib/decorators/StorageDecorator.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/ApiEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/CampaignTypeEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/EventEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HeadersEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HttpMethodEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/PlatformEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StatusEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StorageEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/UrlEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/enums/log-messages/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/CampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/FeatureModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/ImpactCampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/MetricModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/RuleModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariableModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariationModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/settings/SettingsModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextVWOModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/decision-maker/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/LogMessageBuilder.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/Logger.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/core/LogManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/core/TransportManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/client/NetworkClient.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/RequestModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/ResponseModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Connector.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Storage.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/index.ts","webpack://vwo-fme-node-sdk/../../../lib/services/CampaignDecisionService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/HooksService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/SettingsService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/StorageService.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/CampaignUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DataTypeUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DecisionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/FunctionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/GatewayServiceUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/ImpressionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/LogMessageUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/MegUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/NetworkUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/PromiseUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/RuleEvaluationUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/SettingsUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UrlUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UuidUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/XMLUtil.ts","webpack://vwo-fme-node-sdk/external commonjs \"murmurhash\"","webpack://vwo-fme-node-sdk/external commonjs \"superstruct\"","webpack://vwo-fme-node-sdk/external commonjs \"uuid\"","webpack://vwo-fme-node-sdk/external commonjs \"vwo-fme-sdk-log-messages\"","webpack://vwo-fme-node-sdk/external node-commonjs \"http\"","webpack://vwo-fme-node-sdk/external node-commonjs \"https\"","webpack://vwo-fme-node-sdk/webpack/bootstrap","webpack://vwo-fme-node-sdk/../../lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"module.exports = require(\"murmurhash\");","module.exports = require(\"superstruct\");","module.exports = require(\"uuid\");","module.exports = require(\"vwo-fme-sdk-log-messages\");","module.exports = require(\"http\");","module.exports = require(\"https\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n"],"names":["VWOBuilder_1","require","DataTypeUtil_1","PromiseUtil_1","log_messages_1","LogMessageUtil_1","PlatformEnum_1","VWO","options","setInstance","_this","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","settings","Promise","resolve","build","getSettings","then","Object","defineProperty","get","exports","_global","init","apiName","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","process","env","platform","PlatformEnum","CLIENT","SERVER","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","err","API_THROW_ERROR","info","concat","onInit","date_1","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","logger_1","network_layer_1","segmentation_evaluator_1","storage_1","VWOClient_1","SettingsService_1","FunctionUtil_1","SettingsUtil_1","UuidUtil_1","prototype","networkInstance","NetworkManager","Instance","attachClient","_b","_a","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","_c","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","key","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","stringifiedLatestSettings","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","GetFlag_1","SetAttribute_1","TrackEvent_1","SettingsSchemaValidation_1","ContextModel_1","HooksService_1","UrlUtil_1","NetworkUtil_1","UrlUtil","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","default","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","sent","err_1","StorageDecorator_1","ApiEnum_1","CampaignTypeEnum_1","CampaignModel_1","VariableModel_1","StorageService_1","CampaignUtil_1","DecisionUtil_1","ImpressionUtil_1","RuleEvaluationUtil_1","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","_k","experimentVariationId","experimentKey","variation_1","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","assign","undefined","FEATURE_NOT_FOUND","setContextualData","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","length","rolloutRulesToEvaluate","rollOutRules_1","_i","rule","evaluateRule","preSegmentationResult","updatedDecision","push","_d","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","experimentRules_1","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","__assign","execute","_e","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","_f","_g","variablesForEvaluatedFlag","_j","_h","variables","value","EventEnum_1","createImpressionForAttribute","__awaiter","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","BASE_URL","Url_1","packageFile","name","version","SDK_VERSION","Constants","SDK_NAME","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","StorageEnum_1","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","MetricModel_1","VariationModel_1","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","variableList","forEach","variationList","VariationModel","metricsList","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","ImpactCampaignModel_1","RuleModel_1","FeatureModel","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","identifier","i","t","getIdentifier","getVariationId","getStatus","val","k","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","superstruct_1","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","FeatureModel_1","SettingsModel","f","c","cG","g","sK","a","v","featureList","campaignList","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","ContextVWOModel_1","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","Hasher","DecisionMaker","generateBucketValue","hashValue","maxValue","multiplier","ratio","Math","pow","multipliedValue","floor","getBucketValueForUser","hashKey","v3","bucketValue","calculateBucketValue","str","generateHashValue","LogLevelEnum_1","AnsiColorEnum","BOLD","CYAN","GREEN","LIGHTBLUE","RED","RESET","WHITE","YELLOW","LogMessageBuilder","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","upperCaseLevel","toUpperCase","LogLevelColorInfoEnum","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","Logger","uuid_1","Logger_1","ConsoleTransport_1","TransportManager_1","_super","__extends","config","call","requestId","v4","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","LogMessageBuilder_1","LogLevelNumberEnum","shouldLog","transportLevel","configLevel","targetLevel","desiredLevel","logMessageBuilder","formattedMessage","isFunction","LogManager_1","enumerable","consoleLog","XMLUtil_1","ResponseModel_1","NetworkBrowserClient","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","http","https","NetworkClient","httpClient","scheme","req","res","setStatusCode","statusCode","contentType","headers","rawData","test","resume","setEncoding","on","chunk","parsedData","parse","getStatusCode","error_1","getBody","write","body","end","RequestHandler","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","hasOwnProperty","setQuery","NetworkManager_1","GlobalRequestModel_1","GlobalRequestModel","RequestModel_1","RequestModel","RequestHandler_1","setConfig","response","errorResponse","post","url","query","timeout","setBaseUrl","getDevelopmentMode","HttpMethodEnum_1","method","path","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","queryString","split","hostname","agent","postBody","Buffer","TextEncoder","encode","byteLength","charAt","substring","getData","getError","SegmentEvaluator_1","GatewayServiceUtil_1","UrlEnum_1","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","SegmentOperatorValueEnum_1","SegmentUtil_1","SegmentOperandEvaluator_1","getKeyValue","operator","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","dslNodes_1","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","valuesArray","Array","isArray","FEATURE_ID","featureIdObject","featureIdKey_1","featureIdValue","this_1","parseInt","checkInUserStorage","result","checkUserAgentParser","uaParserResult","locationMap","dslNodes_2","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","segmentResult","valuesMatch","checkValuePresent","expectedMap","actualMap","expectedValues_2","index","toLowerCase","actualValue","expectedValues_1","startsWith","endsWith","wildcardPattern","slice","regex","RegExp","replace","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","SegmentOperandValueEnum_1","SegmentOperandRegexEnum_1","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","processedOperandValue","parseFloat","processedTagValue","indexOf","pattern","SegmentationManger_1","obj","Connector","connector","getConnector","Storage_1","decision_maker_1","constants_1","CampaignDecisionService","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","checkInRange","bucketUserToVariation","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","HooksService","callback","integrations","isCallBackFunction","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","setVariationAllocation","_handleRolloutCampaign","currentAllocation_1","stepFactor","assignRangeValues","VARIATION_RANGE_ALLOCATION","variationWeight","currentAllocation","_getVariationBucketRange","scaleVariationWeights","totalWeight","reduce","acc","equalWeight_1","getBucketingSeed","groupId","setCampaignAllocation","assignRangeValuesMEG","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupName","findGroupsFeaturePartOf","ruleArray","group","groupIndex","findIndex","grp","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","campaignIdWithVariation","featureKeys","map","Number","campaignIdWithVariation_1","getCampaignIdsFromFeatureKey","campaignIds","getRuleTypeUsingCampaignIdFromFeature","ceil","min","isDefined","isNaN","isDate","isRegex","isPromise","StatusEnum_1","CampaignDecisionService_1","DataTypeUtil_2","MegUtil_1","checkWhitelistingAndPreSeg","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","evaluationResult","all","variationName","clonedObj","getCurrentUnixTimestamp","getCurrentUnixTimestampInMillis","getRandomNumber","random","filter","ruleModel","addLinkedCampaignsToSettings","linkedCampaign","rulesLinkedCampaignModel","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","addIsGatewayServiceRequiredFlag","rules_1","jsonSegments","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","featureToSkip","getFeatureKeysFromGroup","groupCampaignIds","feature_1","_isRolloutRuleForFeaturePassed","isRolloutRulePassed","has","item","featureKeys_1","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","campaignMapArray_1","MEG_CAMPAIGN_ELIGIBLE","campaigns_1","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","HeadersEnum_1","getBasePropertiesForBulk","sId","u","r","getTrackEventPath","event","event_type","account_id","uId","sdk","ap","ed","getEventBatchingQueryParams","sd","sv","setting","visitorUserAgent","en","eTime","visitor_ua","visitor_ip","EVENTS","_getEventBasePayload","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","visId","sessionId","time","visitor","vwo_fs_environment","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","sendGetApiRequest","SettingsModel_1","vwoClientInstance","baseUrl","uuid_2","namespace","v5","DNS","randomUUID","VWO_NAMESPACE","userIdNamespace","generateUUID","uuidForUserIdAccountId","desiredUuid","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","headerName","setRequestHeader","send","Connector_1","VWO_1"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/server/vwo-fme-node-sdk.min.js b/dist/server/vwo-fme-node-sdk.min.js index 644b14f..9f74aa4 100644 --- a/dist/server/vwo-fme-node-sdk.min.js +++ b/dist/server/vwo-fme-node-sdk.min.js @@ -1,5 +1,5 @@ /*! - * vwo-fme-node-sdk - v1.7.0 + * vwo-fme-node-sdk - v1.8.0 * URL - https://github.com/wingify/vwo-node-sdk * * Copyright 2024 Wingify Software Pvt. Ltd. @@ -22,5 +22,5 @@ * 3. uuid - ^9.0.1 * 4. vwo-fme-sdk-log-messages - ^0.1.2 */ -(()=>{"use strict";var e={9799:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.VWOBuilder=void 0;var r=n(6178),o=n(4464),i=n(4988),a=n(4059),s=n(3860),u=n(9600),c=n(2974),l=n(7173),g=n(8470),p=n(5076),d=n(5576),f=n(7788),h=n(4334),v=function(){function e(e){this.options=e}return e.prototype.setNetworkManager=function(){var e,t,n,i=o.NetworkManager.Instance;return i.attachClient(null===(t=null===(e=this.options)||void 0===e?void 0:e.network)||void 0===t?void 0:t.client),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Network Layer"})),i.getConfig().setDevelopmentMode(null===(n=this.options)||void 0===n?void 0:n.isDevelopmentMode),this},e.prototype.setSegmentation=function(){var e;return i.SegmentationManager.Instance.attachEvaluator(null===(e=this.options)||void 0===e?void 0:e.segmentation),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Segmentation Evaluator"})),this},e.prototype.fetchSettings=function(e){var t=this,n=new d.Deferred;return this.isSettingsFetchInProgress?this.fetchSettings(e):(this.isSettingsFetchInProgress=!0,this.settingFileManager.getSettings(e).then((function(r){e||(t.originalSettings=r),t.isSettingsFetchInProgress=!1,n.resolve(r)})),n.promise)},e.prototype.getSettings=function(e){var t=new d.Deferred;try{!e&&this.settings?(r.LogManager.Instance.info("Using already fetched and cached settings"),t.resolve(this.settings)):this.fetchSettings(e).then((function(e){t.resolve(e)}))}catch(e){r.LogManager.Instance.error("Failed to fetch settings. Error: "+e),t.resolve({})}return t.promise},e.prototype.setStorage=function(){return this.options.storage?this.storage=a.Storage.Instance.attachConnector(this.options.storage):this.storage=null,this},e.prototype.setSettingsService=function(){return this.settingFileManager=new u.SettingsService(this.options),this},e.prototype.setLogger=function(){return this.logManager=new r.LogManager(this.options.logger||{}),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Logger"})),this},e.prototype.getRandomUserId=function(){var e="getRandomUserId";try{return r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.API_CALLED,{apiName:e})),(0,h.getRandomUUID)(this.options.sdkKey)}catch(t){r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.API_THROW_ERROR,{apiName:e,err:t}))}},e.prototype.initPolling=function(){return this.options.pollInterval?this.options.pollInterval&&!(0,l.isNumber)(this.options.pollInterval)||this.options.pollInterval&&this.options.pollInterval<1e3?(r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.INIT_OPTIONS_INVALID,{key:"pollInterval",correctType:"number"})),this):(this.checkAndPoll(),this):this},e.prototype.build=function(e){return this.vwoInstance=new s.VWOClient(e,this.options),this.vwoInstance},e.prototype.checkAndPoll=function(){var e=this,t=this.options.pollInterval;setInterval((function(){e.getSettings(!0).then((function(t){var n=JSON.stringify(e.originalSettings);if(JSON.stringify(t)!==n){e.originalSettings=t;var o=(0,g.cloneObject)(t);r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_SET_SETTINGS),(0,f.setSettingsAndAddCampaignsToRules)(o,e.vwoInstance)}else r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS)})).catch((function(){r.LogManager.Instance.error(c.ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED)}))}),t)},e}();t.VWOBuilder=v},3860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)||o)return[3,10];j=[],F=0,G=U,i.label=3;case 3:return F0?(H=(new l.CampaignModel).modelFromDictionary(j[0]),te=(0,m.evaluateTrafficAndGetVariation)(t,H,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,R=!0,A=te,O(H,te,M,V),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,H.getId(),te.getId(),n)]:[3,8]):[3,9]):[3,9];case 7:return i.sent(),[3,9];case 8:(0,E.createAndSendImpressionForVariationShown)(t,H.getId(),te.getId(),n),i.label=9;case 9:return[3,11];case 10:0===U.length&&(p.LogManager.Instance.debug(c.DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT),R=!0),i.label=11;case 11:if(!R)return[3,18];W=[],B=(0,y.getAllExperimentRules)(N),q=new Map,Q=0,Y=B,i.label=12;case 12:return Q0?(ee=(new l.CampaignModel).modelFromDictionary(W[0]),te=(0,m.evaluateTrafficAndGetVariation)(t,ee,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,w=te,O(ee,te,M,V),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n)]:[3,17]):[3,18]):[3,18];case 16:return i.sent(),[3,18];case 17:(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n),i.label=18;case 18:return o&&(new a.StorageDecorator).setDataInStorage(r({featureKey:e,context:n},M),P),T.set(V),T.execute(T.get()),(null===(oe=N.getImpactCampaign())||void 0===oe?void 0:oe.getCampaignId())?(p.LogManager.Instance.info((0,b.buildMessage)(c.InfoLogMessagesEnum.IMPACT_ANALYSIS,{userId:n.getId(),featureKey:e,status:o?"enabled":"disabled"})),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,null===(ie=N.getImpactCampaign())||void 0===ie?void 0:ie.getCampaignId(),o?2:1,n)]:[3,20]):[3,21];case 19:return i.sent(),[3,21];case 20:(0,E.createAndSendImpressionForVariationShown)(t,null===(ae=N.getImpactCampaign())||void 0===ae?void 0:ae.getCampaignId(),o?2:1,n),i.label=21;case 21:return ne=null!==(ue=null!==(se=null==w?void 0:w.variables)&&void 0!==se?se:null==A?void 0:A.variables)&&void 0!==ue?ue:[],L.resolve({isEnabled:function(){return o},getVariables:function(){return ne},getVariable:function(e,t){var n,r=ne.find((function(t){return t.key===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:t}}),[2,L.promise]}}))}))},e}();function O(e,t,n,r){e.getType()===u.CampaignTypeEnum.ROLLOUT?Object.assign(n,{rolloutId:e.getId(),rolloutKey:e.getKey(),rolloutVariationId:t.getId()}):Object.assign(n,{experimentId:e.getId(),experimentKey:e.getKey(),experimentVariationId:t.getId()}),Object.assign(r,n)}t.FlagApi=T},5810:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_URL=t.HTTPS_PROTOCOL=t.HTTP_PROTOCOL=t.SEED_URL=t.HTTPS=t.HTTP=void 0,t.HTTP="http",t.HTTPS="https",t.SEED_URL="https://vwo.com",t.HTTP_PROTOCOL="".concat(t.HTTP,"://"),t.HTTPS_PROTOCOL="".concat(t.HTTPS,"://"),t.BASE_URL="dev.visualwebsiteoptimizer.com"},477:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=void 0;var r,o,i=n(2550),a=n(3388);void 0===process.env?(r={name:"vwo-fme-javascript-sdk",version:SDK_VERSION},o=i.PlatformEnum.CLIENT):(r=n(6089),o=i.PlatformEnum.SERVER),t.Constants={SDK_NAME:r.name,SDK_VERSION:r.version,PLATFORM:o,MAX_TRAFFIC_PERCENT:100,MAX_TRAFFIC_VALUE:1e4,STATUS_RUNNING:"RUNNING",SEED_VALUE:1,MAX_EVENTS_PER_REQUEST:5e3,DEFAULT_REQUEST_TIME_INTERVAL:600,DEFAULT_EVENTS_PER_REQUEST:100,SEED_URL:a.SEED_URL,HTTP_PROTOCOL:a.HTTP_PROTOCOL,HTTPS_PROTOCOL:a.HTTPS_PROTOCOL,SETTINGS:"settings",SETTINGS_EXPIRY:1e7,SETTINGS_TIMEOUT:5e4,HOST_NAME:"dev.visualwebsiteoptimizer.com",SETTINTS_ENDPOINT:"/server-side/v2-settings",LOCATION_ENDPOINT:"/getLocation",VWO_FS_ENVIRONMENT:"vwo_fs_environment",RANDOM_ALGO:1,API_VERSION:"1",VWO_META_MEG_KEY:"_vwo_meta_meg_"}},834:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ApiEnum=void 0,function(e){e.GET_FLAG="getFlag",e.TRACK="track"}(n||(t.ApiEnum=n={}))},6947:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignTypeEnum=void 0,function(e){e.ROLLOUT="FLAG_ROLLOUT",e.AB="FLAG_TESTING",e.PERSONALIZE="FLAG_PERSONALIZE"}(n||(t.CampaignTypeEnum=n={}))},7111:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventEnum=void 0,function(e){e.VWO_VARIATION_SHOWN="vwo_variationShown",e.VWO_SYNC_VISITOR_PROP="vwo_syncVisitorProp"}(n||(t.EventEnum=n={}))},2209:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadersEnum=void 0,function(e){e.USER_AGENT="X-Device-User-Agent",e.IP="VWO-X-Forwarded-For"}(n||(t.HeadersEnum=n={}))},5212:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpMethodEnum=void 0,function(e){e.GET="GET",e.POST="POST"}(n||(t.HttpMethodEnum=n={}))},2550:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformEnum=void 0,function(e){e.CLIENT="client",e.SERVER="server"}(n||(t.PlatformEnum=n={}))},1155:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StatusEnum=void 0,function(e){e.PASSED="passed",e.FAILED="failed"}(n||(t.StatusEnum=n={}))},1522:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StorageEnum=void 0,function(e){e[e.STORAGE_UNDEFINED=0]="STORAGE_UNDEFINED",e[e.INCORRECT_DATA=1]="INCORRECT_DATA",e[e.NO_DATA_FOUND=2]="NO_DATA_FOUND",e[e.CAMPAIGN_PAUSED=3]="CAMPAIGN_PAUSED",e[e.VARIATION_NOT_FOUND=4]="VARIATION_NOT_FOUND",e[e.WHITELISTED_VARIATION=5]="WHITELISTED_VARIATION"}(n||(t.StorageEnum=n={}))},2478:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UrlEnum=void 0,function(e){e.BASE_URL="dev.visualwebsiteoptimizer.com",e.SETTINGS_URL="/server-side/settings",e.EVENTS="/events/t",e.ATTRIBUTE_CHECK="/check-attribute",e.GET_USER_DATA="/get-user-details"}(n||(t.UrlEnum=n={}))},2974:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLogMessagesEnum=t.InfoLogMessagesEnum=t.DebugLogMessagesEnum=void 0;var r=n(6826),o=r.debugMessages;t.DebugLogMessagesEnum=o;var i=r.infoMessages;t.InfoLogMessagesEnum=i;var a=r.errorMessages;t.ErrorLogMessagesEnum=a},8198:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignModel=void 0;var r=n(976),o=n(2160),i=n(1463),a=function(){function e(){this.variations=[],this.metrics=[],this.variables=[]}return e.prototype.copy=function(e){this.metrics=e.metrics,this.variations=e.variations,this.variables=e.variables,this.processCampaignKeys(e)},e.prototype.modelFromDictionary=function(e){return this.processCampaignProperties(e),this.processCampaignKeys(e),this},e.prototype.processCampaignProperties=function(e){var t=this;e.variables&&(e.variables.constructor==={}.constructor?this.variables=[]:e.variables.forEach((function(e){t.variables.push((new o.VariableModel).modelFromDictionary(e))}))),e.variations&&(e.variations.constructor==={}.constructor?this.variations=[]:e.variations.forEach((function(e){t.variations.push((new i.VariationModel).modelFromDictionary(e))}))),e.metrics&&(e.metrics&&e.metrics.constructor==={}.constructor?this.metrics=[]:(e.metrics||[]).forEach((function(e){t.metrics.push((new r.MetricModel).modelFromDictionary(e))})))},e.prototype.processCampaignKeys=function(e){this.id=e.id,this.percentTraffic=e.percentTraffic,this.name=e.name,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this.isForcedVariationEnabled=e.isForcedVariationEnabled,this.isUserListEnabled=e.isUserListEnabled,this.segments=e.segments,this.key=e.key,this.type=e.type},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.getSegments=function(){return this.segments},e.prototype.getTraffic=function(){return this.percentTraffic},e.prototype.getType=function(){return this.type},e.prototype.getIsForcedVariationEnabled=function(){return this.isForcedVariationEnabled},e.prototype.getIsUserListEnabled=function(){return this.isUserListEnabled},e.prototype.getKey=function(){return this.key},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getVariations=function(){return this.variations},e.prototype.getVariables=function(){return this.variables},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.CampaignModel=a},9594:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureModel=void 0;var r=n(8996),o=n(976),i=n(2258),a=function(){function e(){this.m=[],this.metrics=[],this.rules=[],this.impactCampaign=null,this.rulesLinkedCampaign=[],this.isGatewayServiceRequired=!1}return e.prototype.modelFromDictionary=function(e){var t,n,a,s=this;if(this.id=e.id,this.key=e.key,this.name=e.name,this.type=e.type,(null==e?void 0:e.isGatewayServiceRequired)&&(this.isGatewayServiceRequired=e.isGatewayServiceRequired),e.impactCampaign&&(this.impactCampaign=(new r.ImpactCapmaignModel).modelFromDictionary(e.impactCampaign)),e.m&&e.m.constructor==={}.constructor||(null===(t=e.metrics)||void 0===t?void 0:t.constructor)==={}.constructor)this.metrics=[];else{var u=e.m||e.metrics;null==u||u.forEach((function(e){s.metrics.push((new o.MetricModel).modelFromDictionary(e))}))}if((null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.constructor)==={}.constructor)this.rules=[];else{var c=e.rules;null==c||c.forEach((function(e){s.rules.push((new i.RuleModel).modelFromDictionary(e))}))}if((null==e?void 0:e.rulesLinkedCampaign)&&(null===(a=e.rulesLinkedCampaign)||void 0===a?void 0:a.constructor)!=={}.constructor){var l=e.rulesLinkedCampaign;this.rulesLinkedCampaign=l}return this},e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRules=function(){return this.rules},e.prototype.getImpactCampaign=function(){return this.impactCampaign},e.prototype.getRulesLinkedCampaign=function(){return this.rulesLinkedCampaign},e.prototype.setRulesLinkedCampaign=function(e){this.rulesLinkedCampaign=e},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getIsGatewayServiceRequired=function(){return this.isGatewayServiceRequired},e.prototype.setIsGatewayServiceRequired=function(e){this.isGatewayServiceRequired=e},e}();t.FeatureModel=a},8996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImpactCapmaignModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.campaignId=e.campaignId,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getType=function(){return this.type},e}();t.ImpactCapmaignModel=n},976:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetricModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.identifier=e.identifier||e.key,this.id=e.i||e.id,this.type=e.t||e.type,this},e.prototype.getId=function(){return this.id},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getType=function(){return this.type},e}();t.MetricModel=n},2258:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.status=e.status,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getVariationId=function(){return this.variationId},e.prototype.getStatus=function(){return this.status},e.prototype.getType=function(){return this.type},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.RuleModel=n},2160:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariableModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.value=e.val||e.value,this.type=e.type,this.key=e.k||e.key,this.id=e.i||e.id,this},e.prototype.setValue=function(e){this.value=e},e.prototype.setKey=function(e){this.key=e},e.prototype.setType=function(e){this.type=e},e.prototype.getId=function(){return this.id},e.prototype.getValue=function(){return this.value},e.prototype.getType=function(){return this.type},e.prototype.getKey=function(){return this.key},e}();t.VariableModel=n},1463:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariationModel=void 0;var r=n(2160),o=function(){function e(){this.variables=[],this.variations=[]}return e.prototype.modelFromDictionary=function(t){var n=this;return this.id=t.i||t.id,this.key=t.n||t.key||t.name,this.weight=t.w||t.weight,this.ruleKey=t.ruleKey,this.type=t.type,this.setStartRange(t.startRangeVariation),this.setEndRange(t.endRangeVariation),(t.seg||t.segments)&&(this.segments=t.seg||t.segments),t.variables&&(t.variables.constructor==={}.constructor?this.variables=[]:t.variables.forEach((function(e){n.variables.push((new r.VariableModel).modelFromDictionary(e))}))),t.variations&&(t.variations.constructor==={}.constructor?this.variations=[]:t.variations.forEach((function(t){n.variations.push((new e).modelFromDictionary(t))}))),this},e.prototype.setStartRange=function(e){this.startRangeVariation=e},e.prototype.setEndRange=function(e){this.endRangeVariation=e},e.prototype.setWeight=function(e){this.weight=e},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRuleKey=function(){return this.ruleKey},e.prototype.getWeight=function(){return this.weight},e.prototype.getSegments=function(){return this.segments},e.prototype.getStartRangeVariation=function(){return this.startRangeVariation},e.prototype.getEndRangeVariation=function(){return this.endRangeVariation},e.prototype.getVariables=function(){return this.variables},e.prototype.getVariations=function(){return this.variations},e.prototype.getType=function(){return this.type},e}();t.VariationModel=o},5600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSchema=void 0;var r=n(6190),o=function(){function e(){this.initializeSchemas()}return e.prototype.initializeSchemas=function(){this.campaignMetricSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),identifier:(0,r.string)(),mca:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),hasProps:(0,r.optional)((0,r.boolean)()),revenueProp:(0,r.optional)((0,r.string)())}),this.variableObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),value:(0,r.union)([(0,r.number)(),(0,r.string)(),(0,r.boolean)(),(0,r.object)()])}),this.campaignVariationSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),name:(0,r.string)(),weight:(0,r.union)([(0,r.number)(),(0,r.string)()]),segments:(0,r.optional)((0,r.object)()),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema)),startRangeVariation:(0,r.optional)((0,r.number)()),endRangeVariation:(0,r.optional)((0,r.number)())}),this.campaignObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),percentTraffic:(0,r.optional)((0,r.number)()),status:(0,r.string)(),variations:(0,r.array)(this.campaignVariationSchema),segments:(0,r.object)(),isForcedVariationEnabled:(0,r.optional)((0,r.boolean)()),isAlwaysCheckSegment:(0,r.optional)((0,r.boolean)()),name:(0,r.string)()}),this.ruleSchema=(0,r.object)({type:(0,r.string)(),ruleKey:(0,r.string)(),campaignId:(0,r.number)(),variationId:(0,r.optional)((0,r.number)())}),this.featureSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),key:(0,r.string)(),status:(0,r.string)(),name:(0,r.string)(),type:(0,r.string)(),metrics:(0,r.array)(this.campaignMetricSchema),impactCampaign:(0,r.optional)((0,r.object)()),rules:(0,r.optional)((0,r.array)(this.ruleSchema)),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema))}),this.settingsSchema=(0,r.object)({sdkKey:(0,r.optional)((0,r.string)()),version:(0,r.union)([(0,r.number)(),(0,r.string)()]),accountId:(0,r.union)([(0,r.number)(),(0,r.string)()]),features:(0,r.optional)((0,r.array)(this.featureSchema)),campaigns:(0,r.array)(this.campaignObjectSchema),groups:(0,r.optional)((0,r.object)()),campaignGroups:(0,r.optional)((0,r.object)()),collectionPrefix:(0,r.optional)((0,r.string)())})},e.prototype.isSettingsValid=function(e){return!!e&&!(0,r.validate)(e,this.settingsSchema)[0]},e}();t.SettingsSchema=o},9540:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsModel=void 0;var r=n(8198),o=n(9594),i=function(){function e(e){var t=this;return this.f=[],this.features=[],this.c=[],this.campaigns=[],this.campaignGroups={},this.cG={},this.groups={},this.g={},this.sdkKey=e.sK||e.sdkKey,this.accountId=e.a||e.accountId,this.version=e.v||e.version,this.collectionPrefix=e.collectionPrefix,(e.f&&e.f.constructor!=={}.constructor||e.features&&e.features.constructor!=={}.constructor)&&(e.f||e.features).forEach((function(e){t.features.push((new o.FeatureModel).modelFromDictionary(e))})),(e.c&&e.c.constructor!=={}.constructor||e.campaigns&&e.campaigns.constructor!=={}.constructor)&&(e.c||e.campaigns).forEach((function(e){t.campaigns.push((new r.CampaignModel).modelFromDictionary(e))})),(e.cG||e.campaignGroups)&&(this.campaignGroups=e.cG||e.campaignGroups),(e.g||e.groups)&&(this.groups=e.g||e.groups),this}return e.prototype.getFeatures=function(){return this.features},e.prototype.getCampaigns=function(){return this.campaigns},e.prototype.getSdkkey=function(){return this.sdkKey},e.prototype.getAccountId=function(){return this.accountId},e.prototype.getVersion=function(){return this.version},e.prototype.getCollectionPrefix=function(){return this.collectionPrefix},e.prototype.getCampaignGroups=function(){return this.campaignGroups},e.prototype.getGroups=function(){return this.groups},e}();t.SettingsModel=i},8606:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextModel=void 0;var r=n(3166),o=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.id=e.id,this.userAgent=e.userAgent,this.ipAddress=e.ipAddress,(null==e?void 0:e.customVariables)&&(this.customVariables=e.customVariables),(null==e?void 0:e.variationTargetingVariables)&&(this.variationTargetingVariables=e.variationTargetingVariables),(null==e?void 0:e._vwo)&&(this._vwo=(new r.ContextVWOModel).modelFromDictionary(e._vwo)),this},e.prototype.getId=function(){var e;return null===(e=this.id)||void 0===e?void 0:e.toString()},e.prototype.getUserAgent=function(){return this.userAgent},e.prototype.getIpAddress=function(){return this.ipAddress},e.prototype.getCustomVariables=function(){return this.customVariables},e.prototype.setCustomVariables=function(e){this.customVariables=e},e.prototype.getVariationTargetingVariables=function(){return this.variationTargetingVariables},e.prototype.setVariationTargetingVariables=function(e){this.variationTargetingVariables=e},e.prototype.getVwo=function(){return this._vwo},e.prototype.setVwo=function(e){this._vwo=e},e}();t.ContextModel=o},3166:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextVWOModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return(null==e?void 0:e.location)&&(this.location=e.location),(null==e?void 0:e.userAgent)&&(this.userAgent=e.userAgent),this},e.prototype.getLocation=function(){return this.location},e.prototype.getUaInfo=function(){return this.userAgent},e}();t.ContextVWOModel=n},6365:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionMaker=void 0;var r=n(9708),o=function(){function e(){}return e.prototype.generateBucketValue=function(e,t,n){void 0===n&&(n=1);var r=(t*(e/Math.pow(2,32))+1)*n;return Math.floor(r)},e.prototype.getBucketValueForUser=function(e,t){void 0===t&&(t=100);var n=r.v3(e,1);return this.generateBucketValue(n,t)},e.prototype.calculateBucketValue=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1e4);var r=this.generateHashValue(e);return this.generateBucketValue(r,n,t)},e.prototype.generateHashValue=function(e){return r.v3(e,1)},e}();t.DecisionMaker=o},7846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogMessageBuilder=void 0;var r=n(8858),o="",i="",a=function(){function e(e,t){this.loggerConfig=e,this.transportConfig=t,this.prefix=this.transportConfig.prefix||this.loggerConfig.prefix||"",this.dateTimeFormat=this.transportConfig.dateTimeFormat||this.loggerConfig.dateTimeFormat}return e.prototype.formatMessage=function(e,t){return"[".concat(this.getFormattedLevel(e),"]: ").concat(this.getFormattedPrefix(this.prefix)," ").concat(this.getFormattedDateTime()," ").concat(t)},e.prototype.getFormattedPrefix=function(e){return this.loggerConfig.isAnsiColorEnabled?"".concat(o).concat("").concat(e).concat(i):"".concat(e)},e.prototype.getFormattedLevel=function(e){var t,n,a,s=e.toUpperCase();return this.loggerConfig.isAnsiColorEnabled?((t={})[r.LogLevelEnum.TRACE]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.DEBUG]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.INFO]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.WARN]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.ERROR]="".concat(o).concat("").concat(s).concat(i),a=t):((n={})[r.LogLevelEnum.TRACE]=s,n[r.LogLevelEnum.DEBUG]=s,n[r.LogLevelEnum.INFO]=s,n[r.LogLevelEnum.WARN]=s,n[r.LogLevelEnum.ERROR]=s,a=n),a[e]},e.prototype.getFormattedDateTime=function(){return this.dateTimeFormat()},e}();t.LogMessageBuilder=a},5224:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=function(){}},7623:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogManager=void 0;var i=n(3903),a=n(5224),s=n(8671),u=n(1202),c=n(7173),l=n(8858),g=function(e){function t(n){var r=e.call(this)||this;return r.name="VWO Logger",r.requestId=(0,i.v4)(),r.level=l.LogLevelEnum.ERROR,r.prefix="VWO-SDK",r.config=n,!n.isAlwaysNewInstance&&t.instance||(t.instance=r,r.config.name=n.name||r.name,r.config.requestId=n.requestId||r.requestId,r.config.level=n.level||r.level,r.config.prefix=n.prefix||r.prefix,r.config.dateTimeFormat=n.dateTimeFormat||r.dateTimeFormat,r.transportManager=new u.LogTransportManager(r.config),r.handleTransports()),t.instance}return o(t,e),t.prototype.dateTimeFormat=function(){return(new Date).toISOString()},Object.defineProperty(t,"Instance",{get:function(){return t.instance},enumerable:!1,configurable:!0}),t.prototype.handleTransports=function(){var e=this.config.transports;(null==e?void 0:e.length)?this.addTransports(this.config.transports):this.config.transport&&(0,c.isObject)(this.config.transport)?this.addTransport(this.config.transport):this.addTransport(new s.ConsoleTransport({level:this.config.level}))},t.prototype.addTransport=function(e){this.transportManager.addTransport(e)},t.prototype.addTransports=function(e){for(var t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.LogTransportManager=void 0;var r,o=n(8858),i=n(7846),a=n(7173);!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(r||(r={}));var s=function(){function e(e){this.transports=[],this.config=e}return e.prototype.addTransport=function(e){this.transports.push(e)},e.prototype.shouldLog=function(e,t){return r[e.toUpperCase()]>=r[(t||this.config.level).toUpperCase()]},e.prototype.trace=function(e){this.log(o.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.log(o.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.log(o.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.log(o.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.log(o.LogLevelEnum.ERROR,e)},e.prototype.log=function(e,t){for(var n=0;n{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=void 0,function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(n||(t.LogLevelEnum=n={}))},6178:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=t.LogManager=void 0;var r=n(7623);Object.defineProperty(t,"LogManager",{enumerable:!0,get:function(){return r.LogManager}});var o=n(8858);Object.defineProperty(t,"LogLevelEnum",{enumerable:!0,get:function(){return o.LogLevelEnum}})},8671:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleTransport=void 0;var r=n(8858),o=function(){function e(e){void 0===e&&(e={}),this.config=e,this.level=this.config.level}return e.prototype.trace=function(e){this.consoleLog(r.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.consoleLog(r.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.consoleLog(r.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.consoleLog(r.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.consoleLog(r.LogLevelEnum.ERROR,e)},e.prototype.consoleLog=function(e,t){console[e](t)},e}();t.ConsoleTransport=o},7005:(e,t,n)=>{t.o=void 0;var r=n(4868),o=n(5576),i=n(3647),a=function(){function e(){}return e.prototype.GET=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendGetCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e.prototype.POST=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendPostCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e}();t.o=a},6787:(e,t,n)=>{t._=void 0;var r=n(8611),o=n(5692),i=n(5576),a=n(3388),s=n(3647),u=function(){function e(){}return e.prototype.GET=function(e){var t=new i.Deferred,n=e.getOptions(),u=new s.ResponseModel;try{var c=(n.scheme===a.HTTPS?o:r).get(n,(function(e){u.setStatusCode(e.statusCode);var n,r=e.headers["content-type"],o="";/^application\/json/.test(r)||(n="Invalid content-type.\nExpected application/json but received ".concat(r)),n&&(e.resume(),u.setError(n),t.reject(u)),e.setEncoding("utf8"),e.on("data",(function(e){o+=e})),e.on("end",(function(){try{var e=JSON.parse(o);if(200!==u.getStatusCode()){var n="Request failed. Got Status Code: ".concat(u.getStatusCode()," and message: ").concat(o);return u.setError(n),void t.reject(u)}u.setData(e),t.resolve(u)}catch(e){u.setError(e),t.reject(u)}}))}));c.on("timeout",(function(){u.setError(new Error("timeout")),t.reject(u)})),c.on("error",(function(e){u.setError(e),t.reject(u)}))}catch(e){u.setError(e),t.reject(u)}return t.promise},e.prototype.POST=function(e){var t=new i.Deferred,n=e.getOptions(),u=new s.ResponseModel;try{var c=(n.scheme===a.HTTPS?o:r).request(n,(function(n){var r="";n.setEncoding("utf8"),n.on("data",(function(e){r+=e})),n.on("end",(function(){if(200===n.statusCode)u.setData(e.getBody()),t.resolve(u);else if(413===n.statusCode){var o=JSON.parse(r);u.setError(o.error),u.setData(e.getBody()),t.reject(u)}else o=JSON.parse(r),u.setError(o.message),u.setData(e.getBody()),t.reject(u)}))}));c.on("timeout",(function(){u.setError(new Error("timeout")),u.setData(e.getBody()),t.reject(u)})),c.write(JSON.stringify(n.body)),c.end()}catch(n){u.setError(n),u.setData(e.getBody()),t.reject(u)}return t.promise},e}();t._=u},9717:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestHandler=void 0;var n=function(){function e(){}return e.prototype.createRequest=function(e,t){if(!(null!==t.getBaseUrl()&&void 0!==t.getBaseUrl()||null!==e.getUrl()&&void 0!==e.getUrl()))return null;e.setUrl(e.getUrl()||t.getBaseUrl()),e.setTimeout(e.getTimeout()||t.getTimeout()),e.setBody(e.getBody()||t.getBody()),e.setHeaders(e.getHeaders()||t.getHeaders());var n=e.getQuery()||{},r=t.getQuery()||{};for(var o in r)Object.prototype.hasOwnProperty.call(n,o)||(n[o]=r[o]);return e.setQuery(n),e},e}();t.RequestHandler=n},4464:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=t.RequestModel=t.GlobalRequestModel=t.NetworkManager=t.NetworkClient=void 0,void 0===process.env?t.NetworkClient=n(7005).o:t.NetworkClient=n(6787)._;var r=n(119);Object.defineProperty(t,"NetworkManager",{enumerable:!0,get:function(){return r.NetworkManager}});var o=n(7666);Object.defineProperty(t,"GlobalRequestModel",{enumerable:!0,get:function(){return o.GlobalRequestModel}});var i=n(3725);Object.defineProperty(t,"RequestModel",{enumerable:!0,get:function(){return i.RequestModel}});var a=n(3647);Object.defineProperty(t,"ResponseModel",{enumerable:!0,get:function(){return a.ResponseModel}})},119:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkManager=void 0;var r=n(5576),o=n(9717),i=n(7666),a=function(){function e(){}return e.prototype.attachClient=function(e){if(void 0===process.env){var t=n(7005).o;this.client=e||new t}else{var r=n(6787)._;this.client=e||new r}this.config=new i.GlobalRequestModel(null,null,null,null)},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.setConfig=function(e){this.config=e},e.prototype.getConfig=function(){return this.config},e.prototype.createRequest=function(e){return(new o.RequestHandler).createRequest(e,this.config)},e.prototype.get=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.GET(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e.prototype.post=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.POST(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e}();t.NetworkManager=a},7666:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalRequestModel=void 0;var n=function(){function e(e,t,n,r){this.timeout=3e3,this.url=e,this.query=t,this.body=n,this.headers=r}return e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setBody=function(e){this.body=e},e.prototype.getBody=function(){return this.body},e.prototype.setBaseUrl=function(e){this.url=e},e.prototype.getBaseUrl=function(){return this.url},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.getTimeout=function(){return this.timeout},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.setDevelopmentMode=function(e){this.isDevelopmentMode=e},e.prototype.getDevelopmentMode=function(){return this.isDevelopmentMode},e}();t.GlobalRequestModel=n},3725:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModel=void 0;var r=n(5212),o=n(3388),i=function(){function e(e,t,n,i,a,s,u,c){void 0===t&&(t=r.HttpMethodEnum.GET),void 0===u&&(u=o.HTTPS),this.url=e,this.method=t,this.path=n,this.query=i,this.body=a,this.headers=s,this.scheme=u,this.port=c}return e.prototype.getMethod=function(){return this.method},e.prototype.setMethod=function(e){this.method=e},e.prototype.getBody=function(){return this.body},e.prototype.setBody=function(e){this.body=e},e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setHeaders=function(e){return this.headers=e,this},e.prototype.getHeaders=function(){return this.headers},e.prototype.setTimeout=function(e){return this.timeout=e,this},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){return this.url=e,this},e.prototype.getScheme=function(){return this.scheme},e.prototype.setScheme=function(e){return this.scheme=e,this},e.prototype.getPort=function(){return this.port},e.prototype.setPort=function(e){return this.port=e,this},e.prototype.getPath=function(){return this.path},e.prototype.setPath=function(e){return this.path=e,this},e.prototype.getOptions=function(){var e="";for(var t in this.query)e+="".concat(t,"=").concat(this.query[t],"&");var n=this.url.split("/"),r=n[0],o=n[1],i={hostname:r,agent:!1};if(this.scheme&&(i.scheme=this.scheme),this.port&&(i.port=this.port),this.headers&&(i.headers=this.headers),this.method&&(i.method=this.method),this.body){var a=JSON.stringify(this.body);i.headers=i.headers||{},i.headers["Content-Type"]="application/json","undefined"==typeof Buffer?i.headers["Content-Length"]=(new TextEncoder).encode(a).length:i.headers["Content-Length"]=Buffer.byteLength(a),i.body=this.body}return this.path&&(i.path=""!==e?this.path+"?"+e||"":this.path),o&&(i.path="/".concat(o)+i.path),this.timeout&&(i.timeout=this.timeout),"&"===i.path.charAt(i.path.length-1)&&(i.path=i.path.substring(0,i.path.length-1)),i},e}();t.RequestModel=i},3647:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=void 0;var n=function(){function e(){}return e.prototype.setStatusCode=function(e){this.statusCode=e},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.setData=function(e){this.data=e},e.prototype.setError=function(e){this.error=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.getData=function(){return this.data},e.prototype.getStatusCode=function(){return this.statusCode},e.prototype.getError=function(){return this.error},e}();t.ResponseModel=n},2404:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandRegexEnum=void 0,function(e){e.LOWER="^lower",e.LOWER_MATCH="^lower\\((.*)\\)",e.WILDCARD="^wildcard",e.WILDCARD_MATCH="^wildcard\\((.*)\\)",e.REGEX="^regex",e.REGEX_MATCH="^regex\\((.*)\\)",e.STARTING_STAR="^\\*",e.ENDING_STAR="\\*$",e.GREATER_THAN_MATCH="^gt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.GREATER_THAN_EQUAL_TO_MATCH="^gte\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_MATCH="^lt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_EQUAL_TO_MATCH="^lte\\((\\d+\\.?\\d*|\\.\\d+)\\)"}(n||(t.SegmentOperandRegexEnum=n={}))},9227:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandValueEnum=void 0,function(e){e[e.LOWER_VALUE=1]="LOWER_VALUE",e[e.STARTING_ENDING_STAR_VALUE=2]="STARTING_ENDING_STAR_VALUE",e[e.STARTING_STAR_VALUE=3]="STARTING_STAR_VALUE",e[e.ENDING_STAR_VALUE=4]="ENDING_STAR_VALUE",e[e.REGEX_VALUE=5]="REGEX_VALUE",e[e.EQUAL_VALUE=6]="EQUAL_VALUE",e[e.GREATER_THAN_VALUE=7]="GREATER_THAN_VALUE",e[e.GREATER_THAN_EQUAL_TO_VALUE=8]="GREATER_THAN_EQUAL_TO_VALUE",e[e.LESS_THAN_VALUE=9]="LESS_THAN_VALUE",e[e.LESS_THAN_EQUAL_TO_VALUE=10]="LESS_THAN_EQUAL_TO_VALUE"}(n||(t.SegmentOperandValueEnum=n={}))},2106:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperatorValueEnum=void 0,function(e){e.AND="and",e.NOT="not",e.OR="or",e.CUSTOM_VARIABLE="custom_variable",e.USER="user",e.COUNTRY="country",e.REGION="region",e.CITY="city",e.OPERATING_SYSTEM="os",e.DEVICE_TYPE="device_type",e.DEVICE="device",e.BROWSER_AGENT="browser_string",e.UA="ua",e.FEATURE_ID="featureId"}(n||(t.SegmentOperatorValueEnum=n={}))},7385:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,!0]:[2,!1]}}))}))},e.prototype.checkValuePresent=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){for(r in n=function(n){if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];r.forEach((function(e,t){r[t]=e.toLowerCase()}));for(var o=t[n],i=0,a=r;i0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]-1);break;case a.SegmentOperandValueEnum.STARTING_STAR_VALUE:null!==n&&(r=n.endsWith(t));break;case a.SegmentOperandValueEnum.ENDING_STAR_VALUE:null!==n&&(r=n.startsWith(t));break;case a.SegmentOperandValueEnum.REGEX_VALUE:try{r=!!new RegExp(t,"g").test(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.GREATER_THAN_VALUE:if(null!==n)try{r=parseFloat(t)parseFloat(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:if(null!==n)try{r=parseFloat(t)>=parseFloat(n)}catch(e){r=!1}break;default:r=n===t}return r},e}();t.SegmentOperandEvaluator=p},4988:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentEvaluator=t.SegmentationManager=void 0;var r=n(2404);Object.defineProperty(t,"SegmentationManager",{enumerable:!0,get:function(){return r.SegmentationManager}});var o=n(7385);Object.defineProperty(t,"SegmentEvaluator",{enumerable:!0,get:function(){return o.SegmentEvaluator}})},7131:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.matchWithRegex=t.getKeyValue=void 0;var r=n(7173);t.getKeyValue=function(e){if((0,r.isObject)(e)){var t=Object.keys(e)[0];return{key:t,value:e[t]}}},t.matchWithRegex=function(e,t){try{return e.match(new RegExp(t))}catch(e){return null}}},9376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=void 0;t.Connector=function(){}},1946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var n=function(){function e(){}return e.prototype.attachConnector=function(e){var t,n,r,o;return"class"===(null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.prototype)||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.trim())||void 0===o?void 0:o.substring(0,5))?this.connector=new e:this.connector=e,this.connector},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.getConnector=function(){return this.connector},e}();t.Storage=n},4059:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var r=n(1946);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return r.Storage}})},3991:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=r.getStartRangeVariation()&&t<=r.getEndRangeVariation())return r}return null},e.prototype.checkInRange=function(e,t){if(t>=e.getStartRangeVariation()&&t<=e.getEndRangeVariation())return e},e.prototype.bucketUserToVariation=function(e,t,n){var r;if(!n||!e)return null;n.getTraffic()&&(r=1);var o=n.getTraffic(),s=(new i.DecisionMaker).generateHashValue("".concat(n.getId(),"_").concat(t,"_").concat(e)),c=(new i.DecisionMaker).generateBucketValue(s,u.Constants.MAX_TRAFFIC_VALUE,r);return a.LogManager.Instance.debug((0,p.buildMessage)(l.DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION,{userId:e,campaignKey:n.getKey(),percentTraffic:o,bucketValue:c,hashValue:s})),this.getVariation(n.getVariations(),c)},e.prototype.getPreSegmentationDecision=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=e.getType(),r={},n===c.CampaignTypeEnum.ROLLOUT||n===c.CampaignTypeEnum.PERSONALIZE?r=e.getVariations()[0].getSegments():n===c.CampaignTypeEnum.AB&&(r=e.getSegments()),!(0,g.isObject)(r)||Object.keys(r).length?[3,1]:(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_SKIP,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey()})),[2,!0]);case 1:return[4,s.SegmentationManager.Instance.validateSegmentation(r,t.getCustomVariables())];case 2:return o.sent()?(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"passed"})),[2,!0]):(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"failed"})),[2,!1])}}))}))},e.prototype.getVariationAlloted=function(e,t,n){var r=this.isUserPartOfCampaign(e,n);return n.getType()===c.CampaignTypeEnum.ROLLOUT||n.getType()===c.CampaignTypeEnum.PERSONALIZE?r?n.getVariations()[0]:null:r?this.bucketUserToVariation(e,t,n):null},e}();t.CampaignDecisionService=d},3289:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7173),o=function(){function e(e){var t;this.callback=null===(t=e.integrations)||void 0===t?void 0:t.callback,this.isCallBackFunction=(0,r.isFunction)(this.callback),this.decision={}}return e.prototype.execute=function(e){this.isCallBackFunction&&this.callback(e)},e.prototype.set=function(e){this.isCallBackFunction&&(this.decision=e)},e.prototype.get=function(){return this.decision},e}();t.default=o},9600:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.getRuleTypeUsingCampaignIdFromFeature=t.assignRangeValuesMEG=t.getCampaignIdsFromFeatureKey=t.getFeatureKeysFromCampaignIds=t.getCampaignsByGroupId=t.findGroupsFeaturePartOf=t.getGroupDetailsIfCampaignPartOfIt=t.setCampaignAllocation=t.getVariationFromCampaignKey=t.getBucketingSeed=t.scaleVariationWeights=t.assignRangeValues=t.setVariationAllocation=void 0;var r=n(477),o=n(6947),i=n(2974),a=n(1463),s=n(6178),u=n(5076);function c(e,t){var n=p(e.getWeight());return n?(e.setStartRange(t+1),e.setEndRange(t+n)):(e.setStartRange(-1),e.setEndRange(-1)),n}function l(e,t,n){void 0===n&&(n=null);var r=t.toString();return null!==n&&(r="".concat(t,"_").concat(n).toString()),e.getCampaignGroups()&&Object.prototype.hasOwnProperty.call(e.getCampaignGroups(),r)?{groupId:e.getCampaignGroups()[r],groupName:e.getGroups()[e.getCampaignGroups()[r]].name}:{}}function g(e,t){var n=p(e.weight);return n?(e.startRangeVariation=t+1,e.endRangeVariation=t+n):(e.startRangeVariation=-1,e.endRangeVariation=-1),n}function p(e){if(!e||0===e)return 0;var t=Math.ceil(100*e);return Math.min(t,r.Constants.MAX_TRAFFIC_VALUE)}t.setVariationAllocation=function(e){if(e.getType()===o.CampaignTypeEnum.ROLLOUT||e.getType()===o.CampaignTypeEnum.PERSONALIZE)!function(e){for(var t=0;t{function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return"[object Null]"===Object.prototype.toString.call(e)}function i(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function u(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function c(e){return e!=e}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function g(e){return"[object Function]"===Object.prototype.toString.call(e)}function p(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function d(e){return"[object Promise]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.isPromise=t.isRegex=t.isFunction=t.isDate=t.isNaN=t.isBoolean=t.isString=t.isNumber=t.isDefined=t.isUndefined=t.isNull=t.isArray=t.isObject=void 0,t.isObject=n,t.isArray=r,t.isNull=o,t.isUndefined=i,t.isDefined=function(e){return!i(e)&&!o(e)},t.isNumber=a,t.isString=s,t.isBoolean=u,t.isNaN=c,t.isDate=l,t.isFunction=g,t.isRegex=p,t.isPromise=d,t.getType=function(e){return n(e)?"Object":r(e)?"Array":o(e)?"Null":i(e)?"Undefined":c(e)?"NaN":a(e)?"Number":s(e)?"String":u(e)?"Boolean":l(e)?"Date":p(e)?"Regex":g(e)?"Function":d(e)?"Promise":"Unknown Type"}},9455:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,[!0,S]]:[3,3];case 2:l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:n.getRuleKey(),userId:i.getId()})),o.label=3;case 3:if(i.setCustomVariables(Object.assign({},i.getCustomVariables(),{_vwoUserId:n.getIsUserListEnabled()?r:i.getId()})),Object.assign(d,{customVariables:i.getCustomVariables()}),_=(0,h.getGroupDetailsIfCampaignPartOfIt)(e,n.getId(),n.getType()===a.CampaignTypeEnum.PERSONALIZE?n.getVariations()[0].getId():null).groupId,!(T=null==c?void 0:c.get(_)))return[3,4];if(n.getType()===a.CampaignTypeEnum.AB){if(T===v)return[2,[!0,null]]}else if(n.getType()===a.CampaignTypeEnum.PERSONALIZE&&T===v+"_"+n.getVariations()[0].getId())return[2,[!0,null]];return[2,[!1,null]];case 4:return[4,(new b.StorageDecorator).getFeatureFromStorage("".concat(f.Constants.VWO_META_MEG_KEY).concat(_),i,g)];case 5:if((O=o.sent())&&O.experimentKey&&O.experimentId)return l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE,{campaignKey:O.experimentKey,userId:i.getId()})),O.experimentId===v?n.getType()===a.CampaignTypeEnum.PERSONALIZE?O.experimentVariationId===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(_,O.experimentId+"_"+O.experimentVariationId),[2,[!1,null]]):[2,[!0,null]]:(-1!=O.experimentVariationId?c.set(_,O.experimentId+"_"+O.experimentVariationId):c.set(_,O.experimentId),[2,[!1,null]]);o.label=6;case 6:return[4,(new p.CampaignDecisionService).getPreSegmentationDecision(n,i)];case 7:return(A=o.sent())&&_?[4,(0,y.evaluateGroups)(e,t,_,s,i,g)]:[3,9];case 8:return(w=o.sent())&&w.id===v?w.type===a.CampaignTypeEnum.AB||w.variations[0].id===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(_,w.id+"_"+w.variations[0].id),[2,[!1,null]]):w?(w.type===a.CampaignTypeEnum.AB?c.set(_,w.id):c.set(_,w.id+"_"+w.variations[0].id),[2,[!1,null]]):(c.set(_,-1),[2,[!1,null]]);case 9:return[2,[A,null]]}}))}))},t.evaluateTrafficAndGetVariation=function(e,t,n){var r=(new p.CampaignDecisionService).getVariationAlloted(n,e.getAccountId(),t);return r?(l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"got variation:".concat(r.getKey())})),r):(l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"did not get any variation"})),null)};var I=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,S(e,t)];case 1:return n=o.sent(),r=n?s.StatusEnum.PASSED:s.StatusEnum.FAILED,i=n?n.variation.key:"",l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_STATUS,{userId:t.getId(),campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:r,variationString:i})),[2,n]}}))}))},S=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,s,f,y,E;return o(this,(function(o){switch(o.label){case 0:return n=[],r=[],e.getVariations().forEach((function(o){if(!(0,d.isObject)(o.getSegments())||Object.keys(o.getSegments()).length){if((0,d.isObject)(o.getSegments())){var s=g.SegmentationManager.Instance.validateSegmentation(o.getSegments(),t.getVariationTargetingVariables());(s=(0,i.isPromise)(s)?s:Promise.resolve(s)).then((function(e){e&&n.push((0,v.cloneObject)(o))})),r.push(s)}}else l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),userId:t.getId(),variation:o.getKey()?"for variation: ".concat(o.getKey()):""}))})),[4,Promise.all(r)];case 1:if(o.sent(),n.length>1){for((0,h.scaleVariationWeights)(n),f=0,y=0,E=0;f0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0){o.setIsGatewayServiceRequired(!0);break}}}}},9284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.buildMessage=void 0;var r=n(7173),o=/\{([0-9a-zA-Z_]+)\}/g;t.buildMessage=function(e,t){void 0===t&&(t={});try{return e.replace(o,(function(n,o,i){if("{"===e[i-1]&&"}"===e[i+n.length])return o;var a=t[o];return null==a?"":(0,r.isFunction)(a)?a():a}))}catch(t){return e}}},6254:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0))return[3,5];g=null,d=0,h=r,o.label=1;case 1:return d0)?(n.set(t.getKey(),{rolloutId:g.id,rolloutKey:g.key,rolloutVariationId:g.variations[0].id}),[2,!0]):(i.push(t.getKey()),[2,!1]);case 5:return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS,{featureKey:t.getKey()})),[2,!0]}}))}))},S=function(e,t,n,i){return r(void 0,void 0,void 0,(function(){var r,l,g,f,v,m,y,b,I,S,_,T,O;return o(this,(function(A){switch(A.label){case 0:r=[],l=[],g=[],f=Array.from(t),v=0,m=f,A.label=1;case 1:if(!(v1&&f===i.Constants.RANDOM_ALGO?r=T(a,l,d,c,g):a.length>1&&(r=O(e,a,l,d,c,g)),0===a.length&&(1===n.length?(r=n[0],p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:n[0].getType()===s.CampaignTypeEnum.AB?n[0].getKey():n[0].getName()+"_"+n[0].getRuleKey(),groupId:c,userId:l.getId(),algo:""}))):n.length>1&&f===i.Constants.RANDOM_ALGO?r=T(n,l,d,c,g):n.length>1&&(r=O(e,n,l,d,c,g))),[2,r]}))}))},T=function(e,t,n,r,o){e.forEach((function(t){t.weight=Math.round(100/e.length*1e4)/1e4})),e=e.map((function(e){return(new l.VariationModel).modelFromDictionary(e)})),(0,h.setCampaignAllocation)(e);var c=(new d.CampaignDecisionService).getVariation(e,(new g.DecisionMaker).calculateBucketValue((0,h.getBucketingSeed)(t.getId(),void 0,r)));return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:c.getType()===s.CampaignTypeEnum.AB?c.getKey():c.getKey()+"_"+c.getRuleKey(),groupId:r,userId:t.getId(),algo:"using random algorithm"})),c&&((new a.StorageDecorator).setDataInStorage({featureKey:"".concat(i.Constants.VWO_META_MEG_KEY).concat(r),context:t,experimentId:c.getId(),experimentKey:c.getKey(),experimentVariationId:c.getType()===s.CampaignTypeEnum.PERSONALIZE?c.getVariations()[0].getId():-1},o),n.includes(c.getId()))?c:null},O=function(e,t,n,r,o,c){for(var f=null,m=!1,b=(0,v.isUndefined)(e.getGroups()[o].p)?{}:e.getGroups()[o].p,I=(0,v.isUndefined)(e.getGroups()[o].wt)?{}:e.getGroups()[o].wt,S=0;S0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)for(var s in r)a.d.event.props[s]=r[s];return p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),a},t.getAttributePayloadData=function(e,t,n,r,o,i,a){void 0===i&&(i=""),void 0===a&&(a="");var u=y(e,t,n,i,a);return u.d.event.props.isCustomEvent=!0,u.d.event.props[s.Constants.VWO_FS_ENVIRONMENT]=e.getSdkkey(),u.d.visitor.props[r]=o,p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),u},t.sendPostApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:return d.NetworkManager.Instance.attachClient(),n={},r=t.d.visitor_ua,i=t.d.visitor_ip,r&&(n[u.HeadersEnum.USER_AGENT]=r),i&&(n[u.HeadersEnum.IP]=i),a=new d.RequestModel(m.UrlUtil.getBaseUrl(),c.HttpMethodEnum.POST,l.UrlEnum.EVENTS,e,t,n,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),[4,d.NetworkManager.Instance.post(a).catch((function(e){p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.POST,err:(0,h.isObject)(e)?JSON.stringify(e):e}))}))];case 1:return o.sent(),[2]}}))}))},t.sendGetApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:d.NetworkManager.Instance.attachClient(),n=new d.RequestModel(m.UrlUtil.getBaseUrl(),c.HttpMethodEnum.GET,t,e,null,null,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.NetworkManager.Instance.get(n)];case 2:return[2,o.sent()];case 3:return r=o.sent(),p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.GET,err:(0,h.isObject)(r)?JSON.stringify(r):r})),[2,null];case 4:return[2]}}))}))};var E=!1;t.getShouldWaitForTrackingCalls=function(){return E},t.setShouldWaitForTrackingCalls=function(e){E=e}},5576:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){var e=this;return this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),this}},689:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?(Object.assign(d,{experimentId:n.getId(),experimentKey:n.getKey(),experimentVariationId:h.variationId}),(0,s.getShouldWaitForTrackingCalls)()?[4,(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c)]:[3,3]):[3,4];case 2:return o.sent(),[3,4];case 3:(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c),o.label=4;case 4:return[2,{preSegmentationResult:f,whitelistedObject:h,updatedDecision:d}]}}))}))}},7788:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSettingsAndAddCampaignsToRules=void 0;var r=n(9540),o=n(5479),i=n(8470),a=n(596);t.setSettingsAndAddCampaignsToRules=function(e,t){t.settings=new r.SettingsModel(e),t.originalSettings=e;var n=t.settings.getCampaigns();n.forEach((function(e,t){(0,o.setVariationAllocation)(e),n[t]=e})),(0,i.addLinkedCampaignsToSettings)(t.settings),(0,a.addIsGatewayServiceRequiredFlag)(t.settings)}},6096:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtil=void 0;var r=n(9600),o=n(7173);t.UrlUtil={init:function(e){var n=(void 0===e?{}:e).collectionPrefix;return n&&(0,o.isString)(n)&&(t.UrlUtil.collectionPrefix=n),t.UrlUtil},getBaseUrl:function(){var e=r.SettingsService.Instance.hostname;return r.SettingsService.Instance.isGatewayServiceProvided?e:t.UrlUtil.collectionPrefix?"".concat(e,"/").concat(t.UrlUtil.collectionPrefix):e}}},4334:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=t.getUUID=t.getRandomUUID=void 0;var r=n(3388),o=n(3903),i=n(3903);function a(e,t){if(e&&t)return(0,i.v5)(e,t)}t.getRandomUUID=function(e){var t=(0,i.v5)(e,i.v5.DNS);return(0,i.v5)((0,o.v4)(),t)},t.getUUID=function(e,t){var n=(0,i.v5)(r.SEED_URL,i.v5.URL);e=String(e);var o=a(t=String(t),n),s=a(e,o);return null==s?void 0:s.replace(/-/gi,"").toUpperCase()},t.generateUUID=a},4868:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sendPostCall=t.sendGetCall=void 0;var r=n(5212),o=n(6178),i=n(5076),a=n(2974),s=function(){};function u(e,t){var n=t.networkOptions,u=t.successCallback,c=void 0===u?s:u,l=t.errorCallback,g=void 0===l?s:l,p="".concat(n.scheme,"://").concat(n.hostname).concat(n.path);n.port&&(p="".concat(n.scheme,"://").concat(n.hostname,":").concat(n.port).concat(n.path));var d=n.body,f=n.headers||{},h=n.timeout,v=new XMLHttpRequest;for(var m in h&&(v.timeout=h),v.onload=function(){if(v.status>=200&&v.status<300){var t=v.responseText;if(e===r.HttpMethodEnum.GET){var n=JSON.parse(t);c(n)}else c(t)}else g(v.statusText)},v.onerror=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"".concat(v.statusText,", status: ").concat(v.status)})),g(v.statusText)},h&&(v.ontimeout=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"Request timed out"}))}),v.open(e,p,!0),f)m in f&&"Content-Type"!==m&&"Content-Length"!==m&&v.setRequestHeader(m,f[m]);e===r.HttpMethodEnum.POST?v.send(JSON.stringify(d)):e===r.HttpMethodEnum.GET&&v.send()}t.sendGetCall=function(e){u(r.HttpMethodEnum.GET,e)},t.sendPostCall=function(e){u(r.HttpMethodEnum.POST,e)}},9708:e=>{e.exports=require("murmurhash")},6190:e=>{e.exports=require("superstruct")},3903:e=>{e.exports=require("uuid")},6826:e=>{e.exports=require("vwo-fme-sdk-log-messages")},8611:e=>{e.exports=require("http")},5692:e=>{e.exports=require("https")},6089:e=>{e.exports=JSON.parse('{"name":"vwo-fme-node-sdk","version":"1.7.0","description":"VWO Node/JavaScript SDK for Feature Management and Experimentation","main":"dist/server-unpacked/index.js","browser":"dist/client/vwo-fme-javascript-sdk","exports":{".":{"node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"default":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"./node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"./browser":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"types":"dist/types/index.d.ts","scripts":{"build":"rm -rf dist/ yarn tsc:prod && yarn build:node && yarn build:browser && prettier -w dist/types/","build:browser":"yarn build:dev-browser && yarn build:prod-browser","build:node":"yarn build:dev-node && yarn build:prod-node","build:dev-browser":"webpack --config ./webpack.browser.config.js --mode=development","build:dev-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development","build:dev-browser-watch":"webpack --config ./webpack.browser.config.js --mode=development --watch","build:dev-node-watch":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development --watch","build:dev-browser-analyze":"webpack --config ./webpack.browser.config.js --mode=development --env analyze=1","build:dev-node-analyze":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production --env analyze=1","build:prod-browser":"webpack --config ./webpack.browser.config.js --mode=production","build:prod-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production","check:license":"yarn check:versions && node -e \'require(\\"./scripts/check-license\\")\'","check:versions":"node -e \'require(\\"./scripts/check-versions\\")\'","demo":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/index.js","demo:server":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/server.js","lint":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint lib/ --fix","lint:errors-only":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint **/*.ts\' --fix --quiet","prepare":"husky","prettier":"prettier -w lib/**/*.ts *.md","test:dev":"node --inspect-brk node_modules/jest/bin/jest.js --watch --runInBand --debug --colors --errorOnDeprecated","test:prod":"jest --runInBand --colors --errorOnDeprecated","test:coverage":"jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info","tsc":"yarn check:versions && rm -rf dist/server-unpacked && cp package.json dist/ && tsc -w","tsc:prod":"yarn check:versions && rm -rf dist/server-unpacked && tsc && cp package.json dist/","typedoc":"typedoc --plugin typedoc-plugin-markdown --out ./docs lib/*.ts lib/**/*.ts lib/**/**/*.ts ","typedoc:html":"typedoc --out docs-html lib/*.ts lib/**/*.ts lib/**/**/*.ts"},"repository":{"type":"git","url":"https://github.com/wingify/vwo-fme-node-sdk"},"author":"VWO developers","license":"Apache-2.0","files":["dist/","package.json","yarn.lock","lib/**/*","LICENSE","README.md","CONTRIBUTING.md","CHANGELOG.md","NOTICE"],"dependencies":{"murmurhash":"^2.0.1","superstruct":"^0.14.x","uuid":"^9.0.1","vwo-fme-sdk-log-messages":"^0.1.2"},"devDependencies":{"@babel/core":"^7.24.5","@babel/preset-env":"^7.24.5","@babel/preset-typescript":"^7.24.1","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@eslint/js":"^9.2.0","@types/jest":"^29.5.12","@types/node":"^20.12.7","babel-jest":"^29.7.0","babel-loader":"^9.1.3","eslint":"^9.2.0","express":"^4.19.2","globals":"^15.1.0","husky":"^9.0.11","jest":"^29.7.0","lint-staged":"^15.2.2","nodemon":"^2.0.6","prettier":"^3.2.5","semver":"^7.6.0","shelljs":"^0.8.5","ts-loader":"^9.5.1","typedoc":"^0.25.13","typedoc-plugin-markdown":"^4.0.3","typescript":"^5.4.5","typescript-eslint":"^7.8.0","vwo-fme-sdk-e2e-test-settings-n-cases":"^1.3.0","webpack":"^5.91.0","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"lint-staged":{"**/*.{ts,json,md}":["prettier --write"]},"engineStrict":true,"engines":{"node":">= 8.9.0","yarn":">= 1.22.17"},"customEngines":{"nodeLint":">= 18.18.0"}}')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.onInit=e.init=e.StorageConnector=e.LogLevelEnum=void 0;var t=n(8858);Object.defineProperty(e,"LogLevelEnum",{enumerable:!0,get:function(){return t.LogLevelEnum}});var o=n(9376);Object.defineProperty(e,"StorageConnector",{enumerable:!0,get:function(){return o.Connector}});var i=n(9799);Object.defineProperty(e,"init",{enumerable:!0,get:function(){return i.init}}),Object.defineProperty(e,"onInit",{enumerable:!0,get:function(){return i.onInit}})})(),module.exports=r})(); +(()=>{"use strict";var e={9799:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.VWOBuilder=void 0;var r=n(6178),o=n(4464),i=n(4988),a=n(4059),s=n(3860),u=n(9600),c=n(2974),l=n(7173),g=n(8470),p=n(5076),d=n(5576),f=n(7788),h=n(4334),v=function(){function e(e){this.options=e}return e.prototype.setNetworkManager=function(){var e,t,n,i=o.NetworkManager.Instance;return i.attachClient(null===(t=null===(e=this.options)||void 0===e?void 0:e.network)||void 0===t?void 0:t.client),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Network Layer"})),i.getConfig().setDevelopmentMode(null===(n=this.options)||void 0===n?void 0:n.isDevelopmentMode),this},e.prototype.setSegmentation=function(){var e;return i.SegmentationManager.Instance.attachEvaluator(null===(e=this.options)||void 0===e?void 0:e.segmentation),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Segmentation Evaluator"})),this},e.prototype.fetchSettings=function(e){var t=this,n=new d.Deferred;return this.isSettingsFetchInProgress?this.fetchSettings(e):(this.isSettingsFetchInProgress=!0,this.settingFileManager.getSettings(e).then((function(r){e||(t.originalSettings=r),t.isSettingsFetchInProgress=!1,n.resolve(r)})),n.promise)},e.prototype.getSettings=function(e){var t=new d.Deferred;try{!e&&this.settings?(r.LogManager.Instance.info("Using already fetched and cached settings"),t.resolve(this.settings)):this.fetchSettings(e).then((function(e){t.resolve(e)}))}catch(e){r.LogManager.Instance.error("Failed to fetch settings. Error: "+e),t.resolve({})}return t.promise},e.prototype.setStorage=function(){return this.options.storage?this.storage=a.Storage.Instance.attachConnector(this.options.storage):this.storage=null,this},e.prototype.setSettingsService=function(){return this.settingFileManager=new u.SettingsService(this.options),this},e.prototype.setLogger=function(){return this.logManager=new r.LogManager(this.options.logger||{}),r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.SERVICE_INITIALIZED,{service:"Logger"})),this},e.prototype.getRandomUserId=function(){var e="getRandomUserId";try{return r.LogManager.Instance.debug((0,p.buildMessage)(c.DebugLogMessagesEnum.API_CALLED,{apiName:e})),(0,h.getRandomUUID)(this.options.sdkKey)}catch(t){r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.API_THROW_ERROR,{apiName:e,err:t}))}},e.prototype.initPolling=function(){return this.options.pollInterval?this.options.pollInterval&&!(0,l.isNumber)(this.options.pollInterval)||this.options.pollInterval&&this.options.pollInterval<1e3?(r.LogManager.Instance.error((0,p.buildMessage)(c.ErrorLogMessagesEnum.INIT_OPTIONS_INVALID,{key:"pollInterval",correctType:"number"})),this):(this.checkAndPoll(),this):this},e.prototype.build=function(e){return this.vwoInstance=new s.VWOClient(e,this.options),this.vwoInstance},e.prototype.checkAndPoll=function(){var e=this,t=this.options.pollInterval;setInterval((function(){e.getSettings(!0).then((function(t){var n=JSON.stringify(e.originalSettings);if(JSON.stringify(t)!==n){e.originalSettings=t;var o=(0,g.cloneObject)(t);r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_SET_SETTINGS),(0,f.setSettingsAndAddCampaignsToRules)(o,e.vwoInstance)}else r.LogManager.Instance.info(c.InfoLogMessagesEnum.POLLING_NO_CHANGE_IN_SETTINGS)})).catch((function(){r.LogManager.Instance.error(c.ErrorLogMessagesEnum.POLLING_FETCH_SETTINGS_FAILED)}))}),t)},e}();t.VWOBuilder=v},3860:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)||o)return[3,10];j=[],F=0,G=U,i.label=3;case 3:return F0?(H=(new l.CampaignModel).modelFromDictionary(j[0]),te=(0,m.evaluateTrafficAndGetVariation)(t,H,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,R=!0,A=te,O(H,te,M,V),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,H.getId(),te.getId(),n)]:[3,8]):[3,9]):[3,9];case 7:return i.sent(),[3,9];case 8:(0,E.createAndSendImpressionForVariationShown)(t,H.getId(),te.getId(),n),i.label=9;case 9:return[3,11];case 10:0===U.length&&(p.LogManager.Instance.debug(c.DebugLogMessagesEnum.EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT),R=!0),i.label=11;case 11:if(!R)return[3,18];W=[],B=(0,y.getAllExperimentRules)(N),q=new Map,Q=0,Y=B,i.label=12;case 12:return Q0?(ee=(new l.CampaignModel).modelFromDictionary(W[0]),te=(0,m.evaluateTrafficAndGetVariation)(t,ee,n.getId()),(0,v.isObject)(te)&&Object.keys(te).length>0?(o=!0,w=te,O(ee,te,M,V),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n)]:[3,17]):[3,18]):[3,18];case 16:return i.sent(),[3,18];case 17:(0,E.createAndSendImpressionForVariationShown)(t,ee.getId(),te.getId(),n),i.label=18;case 18:return o&&(new a.StorageDecorator).setDataInStorage(r({featureKey:e,context:n},M),P),T.set(V),T.execute(T.get()),(null===(oe=N.getImpactCampaign())||void 0===oe?void 0:oe.getCampaignId())?(p.LogManager.Instance.info((0,b.buildMessage)(c.InfoLogMessagesEnum.IMPACT_ANALYSIS,{userId:n.getId(),featureKey:e,status:o?"enabled":"disabled"})),(0,_.getShouldWaitForTrackingCalls)()?[4,(0,E.createAndSendImpressionForVariationShown)(t,null===(ie=N.getImpactCampaign())||void 0===ie?void 0:ie.getCampaignId(),o?2:1,n)]:[3,20]):[3,21];case 19:return i.sent(),[3,21];case 20:(0,E.createAndSendImpressionForVariationShown)(t,null===(ae=N.getImpactCampaign())||void 0===ae?void 0:ae.getCampaignId(),o?2:1,n),i.label=21;case 21:return ne=null!==(ue=null!==(se=null==w?void 0:w.variables)&&void 0!==se?se:null==A?void 0:A.variables)&&void 0!==ue?ue:[],L.resolve({isEnabled:function(){return o},getVariables:function(){return ne},getVariable:function(e,t){var n,r=ne.find((function(t){return t.key===e}));return null!==(n=null==r?void 0:r.value)&&void 0!==n?n:t}}),[2,L.promise]}}))}))},e}();function O(e,t,n,r){e.getType()===u.CampaignTypeEnum.ROLLOUT?Object.assign(n,{rolloutId:e.getId(),rolloutKey:e.getKey(),rolloutVariationId:t.getId()}):Object.assign(n,{experimentId:e.getId(),experimentKey:e.getKey(),experimentVariationId:t.getId()}),Object.assign(r,n)}t.FlagApi=T},5810:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.BASE_URL=t.HTTPS_PROTOCOL=t.HTTP_PROTOCOL=t.SEED_URL=t.HTTPS=t.HTTP=void 0,t.HTTP="http",t.HTTPS="https",t.SEED_URL="https://vwo.com",t.HTTP_PROTOCOL="".concat(t.HTTP,"://"),t.HTTPS_PROTOCOL="".concat(t.HTTPS,"://"),t.BASE_URL="dev.visualwebsiteoptimizer.com"},477:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=void 0;var r,o,i=n(2550),a=n(3388);void 0===process.env?(r={name:"vwo-fme-javascript-sdk",version:SDK_VERSION},o=i.PlatformEnum.CLIENT):(r=n(6089),o=i.PlatformEnum.SERVER),t.Constants={SDK_NAME:r.name,SDK_VERSION:r.version,PLATFORM:o,MAX_TRAFFIC_PERCENT:100,MAX_TRAFFIC_VALUE:1e4,STATUS_RUNNING:"RUNNING",SEED_VALUE:1,MAX_EVENTS_PER_REQUEST:5e3,DEFAULT_REQUEST_TIME_INTERVAL:600,DEFAULT_EVENTS_PER_REQUEST:100,SEED_URL:a.SEED_URL,HTTP_PROTOCOL:a.HTTP_PROTOCOL,HTTPS_PROTOCOL:a.HTTPS_PROTOCOL,SETTINGS:"settings",SETTINGS_EXPIRY:1e7,SETTINGS_TIMEOUT:5e4,HOST_NAME:"dev.visualwebsiteoptimizer.com",SETTINTS_ENDPOINT:"/server-side/v2-settings",LOCATION_ENDPOINT:"/getLocation",VWO_FS_ENVIRONMENT:"vwo_fs_environment",RANDOM_ALGO:1,API_VERSION:"1",VWO_META_MEG_KEY:"_vwo_meta_meg_"}},834:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ApiEnum=void 0,function(e){e.GET_FLAG="getFlag",e.TRACK="track"}(n||(t.ApiEnum=n={}))},6947:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignTypeEnum=void 0,function(e){e.ROLLOUT="FLAG_ROLLOUT",e.AB="FLAG_TESTING",e.PERSONALIZE="FLAG_PERSONALIZE"}(n||(t.CampaignTypeEnum=n={}))},7111:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventEnum=void 0,function(e){e.VWO_VARIATION_SHOWN="vwo_variationShown",e.VWO_SYNC_VISITOR_PROP="vwo_syncVisitorProp"}(n||(t.EventEnum=n={}))},2209:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadersEnum=void 0,function(e){e.USER_AGENT="X-Device-User-Agent",e.IP="VWO-X-Forwarded-For"}(n||(t.HeadersEnum=n={}))},5212:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpMethodEnum=void 0,function(e){e.GET="GET",e.POST="POST"}(n||(t.HttpMethodEnum=n={}))},2550:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformEnum=void 0,function(e){e.CLIENT="client",e.SERVER="server"}(n||(t.PlatformEnum=n={}))},1155:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StatusEnum=void 0,function(e){e.PASSED="passed",e.FAILED="failed"}(n||(t.StatusEnum=n={}))},1522:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StorageEnum=void 0,function(e){e[e.STORAGE_UNDEFINED=0]="STORAGE_UNDEFINED",e[e.INCORRECT_DATA=1]="INCORRECT_DATA",e[e.NO_DATA_FOUND=2]="NO_DATA_FOUND",e[e.CAMPAIGN_PAUSED=3]="CAMPAIGN_PAUSED",e[e.VARIATION_NOT_FOUND=4]="VARIATION_NOT_FOUND",e[e.WHITELISTED_VARIATION=5]="WHITELISTED_VARIATION"}(n||(t.StorageEnum=n={}))},2478:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UrlEnum=void 0,function(e){e.BASE_URL="dev.visualwebsiteoptimizer.com",e.SETTINGS_URL="/server-side/settings",e.EVENTS="/events/t",e.ATTRIBUTE_CHECK="/check-attribute",e.GET_USER_DATA="/get-user-details"}(n||(t.UrlEnum=n={}))},2974:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLogMessagesEnum=t.InfoLogMessagesEnum=t.DebugLogMessagesEnum=void 0;var r=n(6826),o=r.debugMessages;t.DebugLogMessagesEnum=o;var i=r.infoMessages;t.InfoLogMessagesEnum=i;var a=r.errorMessages;t.ErrorLogMessagesEnum=a},8198:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CampaignModel=void 0;var r=n(976),o=n(2160),i=n(1463),a=function(){function e(){this.variations=[],this.metrics=[],this.variables=[]}return e.prototype.copy=function(e){this.metrics=e.metrics,this.variations=e.variations,this.variables=e.variables,this.processCampaignKeys(e)},e.prototype.modelFromDictionary=function(e){return this.processCampaignProperties(e),this.processCampaignKeys(e),this},e.prototype.processCampaignProperties=function(e){var t=this;e.variables&&(e.variables.constructor==={}.constructor?this.variables=[]:e.variables.forEach((function(e){t.variables.push((new o.VariableModel).modelFromDictionary(e))}))),e.variations&&(e.variations.constructor==={}.constructor?this.variations=[]:e.variations.forEach((function(e){t.variations.push((new i.VariationModel).modelFromDictionary(e))}))),e.metrics&&(e.metrics&&e.metrics.constructor==={}.constructor?this.metrics=[]:(e.metrics||[]).forEach((function(e){t.metrics.push((new r.MetricModel).modelFromDictionary(e))})))},e.prototype.processCampaignKeys=function(e){this.id=e.id,this.percentTraffic=e.percentTraffic,this.name=e.name,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this.isForcedVariationEnabled=e.isForcedVariationEnabled,this.isUserListEnabled=e.isUserListEnabled,this.segments=e.segments,this.key=e.key,this.type=e.type},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.name},e.prototype.getSegments=function(){return this.segments},e.prototype.getTraffic=function(){return this.percentTraffic},e.prototype.getType=function(){return this.type},e.prototype.getIsForcedVariationEnabled=function(){return this.isForcedVariationEnabled},e.prototype.getIsUserListEnabled=function(){return this.isUserListEnabled},e.prototype.getKey=function(){return this.key},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getVariations=function(){return this.variations},e.prototype.getVariables=function(){return this.variables},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.CampaignModel=a},9594:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureModel=void 0;var r=n(8996),o=n(976),i=n(2258),a=function(){function e(){this.m=[],this.metrics=[],this.rules=[],this.impactCampaign=null,this.rulesLinkedCampaign=[],this.isGatewayServiceRequired=!1}return e.prototype.modelFromDictionary=function(e){var t,n,a,s=this;if(this.id=e.id,this.key=e.key,this.name=e.name,this.type=e.type,(null==e?void 0:e.isGatewayServiceRequired)&&(this.isGatewayServiceRequired=e.isGatewayServiceRequired),e.impactCampaign&&(this.impactCampaign=(new r.ImpactCapmaignModel).modelFromDictionary(e.impactCampaign)),e.m&&e.m.constructor==={}.constructor||(null===(t=e.metrics)||void 0===t?void 0:t.constructor)==={}.constructor)this.metrics=[];else{var u=e.m||e.metrics;null==u||u.forEach((function(e){s.metrics.push((new o.MetricModel).modelFromDictionary(e))}))}if((null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.constructor)==={}.constructor)this.rules=[];else{var c=e.rules;null==c||c.forEach((function(e){s.rules.push((new i.RuleModel).modelFromDictionary(e))}))}if((null==e?void 0:e.rulesLinkedCampaign)&&(null===(a=e.rulesLinkedCampaign)||void 0===a?void 0:a.constructor)!=={}.constructor){var l=e.rulesLinkedCampaign;this.rulesLinkedCampaign=l}return this},e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRules=function(){return this.rules},e.prototype.getImpactCampaign=function(){return this.impactCampaign},e.prototype.getRulesLinkedCampaign=function(){return this.rulesLinkedCampaign},e.prototype.setRulesLinkedCampaign=function(e){this.rulesLinkedCampaign=e},e.prototype.getMetrics=function(){return this.metrics},e.prototype.getIsGatewayServiceRequired=function(){return this.isGatewayServiceRequired},e.prototype.setIsGatewayServiceRequired=function(e){this.isGatewayServiceRequired=e},e}();t.FeatureModel=a},8996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImpactCapmaignModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.campaignId=e.campaignId,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getType=function(){return this.type},e}();t.ImpactCapmaignModel=n},976:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetricModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.identifier=e.identifier||e.key,this.id=e.i||e.id,this.type=e.t||e.type,this},e.prototype.getId=function(){return this.id},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getType=function(){return this.type},e}();t.MetricModel=n},2258:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.type=e.type,this.status=e.status,this.variationId=e.variationId,this.campaignId=e.campaignId,this.ruleKey=e.ruleKey,this},e.prototype.getCampaignId=function(){return this.campaignId},e.prototype.getVariationId=function(){return this.variationId},e.prototype.getStatus=function(){return this.status},e.prototype.getType=function(){return this.type},e.prototype.getRuleKey=function(){return this.ruleKey},e}();t.RuleModel=n},2160:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariableModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.value=e.val||e.value,this.type=e.type,this.key=e.k||e.key,this.id=e.i||e.id,this},e.prototype.setValue=function(e){this.value=e},e.prototype.setKey=function(e){this.key=e},e.prototype.setType=function(e){this.type=e},e.prototype.getId=function(){return this.id},e.prototype.getValue=function(){return this.value},e.prototype.getType=function(){return this.type},e.prototype.getKey=function(){return this.key},e}();t.VariableModel=n},1463:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VariationModel=void 0;var r=n(2160),o=function(){function e(){this.variables=[],this.variations=[]}return e.prototype.modelFromDictionary=function(t){var n=this;return this.id=t.i||t.id,this.key=t.n||t.key||t.name,this.weight=t.w||t.weight,this.ruleKey=t.ruleKey,this.type=t.type,this.setStartRange(t.startRangeVariation),this.setEndRange(t.endRangeVariation),(t.seg||t.segments)&&(this.segments=t.seg||t.segments),t.variables&&(t.variables.constructor==={}.constructor?this.variables=[]:t.variables.forEach((function(e){n.variables.push((new r.VariableModel).modelFromDictionary(e))}))),t.variations&&(t.variations.constructor==={}.constructor?this.variations=[]:t.variations.forEach((function(t){n.variations.push((new e).modelFromDictionary(t))}))),this},e.prototype.setStartRange=function(e){this.startRangeVariation=e},e.prototype.setEndRange=function(e){this.endRangeVariation=e},e.prototype.setWeight=function(e){this.weight=e},e.prototype.getId=function(){return this.id},e.prototype.getKey=function(){return this.key},e.prototype.getRuleKey=function(){return this.ruleKey},e.prototype.getWeight=function(){return this.weight},e.prototype.getSegments=function(){return this.segments},e.prototype.getStartRangeVariation=function(){return this.startRangeVariation},e.prototype.getEndRangeVariation=function(){return this.endRangeVariation},e.prototype.getVariables=function(){return this.variables},e.prototype.getVariations=function(){return this.variations},e.prototype.getType=function(){return this.type},e}();t.VariationModel=o},5600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsSchema=void 0;var r=n(6190),o=function(){function e(){this.initializeSchemas()}return e.prototype.initializeSchemas=function(){this.campaignMetricSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),identifier:(0,r.string)(),mca:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),hasProps:(0,r.optional)((0,r.boolean)()),revenueProp:(0,r.optional)((0,r.string)())}),this.variableObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),value:(0,r.union)([(0,r.number)(),(0,r.string)(),(0,r.boolean)(),(0,r.object)()])}),this.campaignVariationSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),name:(0,r.string)(),weight:(0,r.union)([(0,r.number)(),(0,r.string)()]),segments:(0,r.optional)((0,r.object)()),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema)),startRangeVariation:(0,r.optional)((0,r.number)()),endRangeVariation:(0,r.optional)((0,r.number)())}),this.campaignObjectSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),type:(0,r.string)(),key:(0,r.string)(),percentTraffic:(0,r.optional)((0,r.number)()),status:(0,r.string)(),variations:(0,r.array)(this.campaignVariationSchema),segments:(0,r.object)(),isForcedVariationEnabled:(0,r.optional)((0,r.boolean)()),isAlwaysCheckSegment:(0,r.optional)((0,r.boolean)()),name:(0,r.string)()}),this.ruleSchema=(0,r.object)({type:(0,r.string)(),ruleKey:(0,r.string)(),campaignId:(0,r.number)(),variationId:(0,r.optional)((0,r.number)())}),this.featureSchema=(0,r.object)({id:(0,r.union)([(0,r.number)(),(0,r.string)()]),key:(0,r.string)(),status:(0,r.string)(),name:(0,r.string)(),type:(0,r.string)(),metrics:(0,r.array)(this.campaignMetricSchema),impactCampaign:(0,r.optional)((0,r.object)()),rules:(0,r.optional)((0,r.array)(this.ruleSchema)),variables:(0,r.optional)((0,r.array)(this.variableObjectSchema))}),this.settingsSchema=(0,r.object)({sdkKey:(0,r.optional)((0,r.string)()),version:(0,r.union)([(0,r.number)(),(0,r.string)()]),accountId:(0,r.union)([(0,r.number)(),(0,r.string)()]),features:(0,r.optional)((0,r.array)(this.featureSchema)),campaigns:(0,r.array)(this.campaignObjectSchema),groups:(0,r.optional)((0,r.object)()),campaignGroups:(0,r.optional)((0,r.object)()),collectionPrefix:(0,r.optional)((0,r.string)())})},e.prototype.isSettingsValid=function(e){return!!e&&!(0,r.validate)(e,this.settingsSchema)[0]},e}();t.SettingsSchema=o},9540:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsModel=void 0;var r=n(8198),o=n(9594),i=function(){function e(e){var t=this;return this.f=[],this.features=[],this.c=[],this.campaigns=[],this.campaignGroups={},this.cG={},this.groups={},this.g={},this.sdkKey=e.sK||e.sdkKey,this.accountId=e.a||e.accountId,this.version=e.v||e.version,this.collectionPrefix=e.collectionPrefix,(e.f&&e.f.constructor!=={}.constructor||e.features&&e.features.constructor!=={}.constructor)&&(e.f||e.features).forEach((function(e){t.features.push((new o.FeatureModel).modelFromDictionary(e))})),(e.c&&e.c.constructor!=={}.constructor||e.campaigns&&e.campaigns.constructor!=={}.constructor)&&(e.c||e.campaigns).forEach((function(e){t.campaigns.push((new r.CampaignModel).modelFromDictionary(e))})),(e.cG||e.campaignGroups)&&(this.campaignGroups=e.cG||e.campaignGroups),(e.g||e.groups)&&(this.groups=e.g||e.groups),this}return e.prototype.getFeatures=function(){return this.features},e.prototype.getCampaigns=function(){return this.campaigns},e.prototype.getSdkkey=function(){return this.sdkKey},e.prototype.getAccountId=function(){return this.accountId},e.prototype.getVersion=function(){return this.version},e.prototype.getCollectionPrefix=function(){return this.collectionPrefix},e.prototype.getCampaignGroups=function(){return this.campaignGroups},e.prototype.getGroups=function(){return this.groups},e}();t.SettingsModel=i},8606:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextModel=void 0;var r=n(3166),o=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return this.id=e.id,this.userAgent=e.userAgent,this.ipAddress=e.ipAddress,(null==e?void 0:e.customVariables)&&(this.customVariables=e.customVariables),(null==e?void 0:e.variationTargetingVariables)&&(this.variationTargetingVariables=e.variationTargetingVariables),(null==e?void 0:e._vwo)&&(this._vwo=(new r.ContextVWOModel).modelFromDictionary(e._vwo)),this},e.prototype.getId=function(){var e;return null===(e=this.id)||void 0===e?void 0:e.toString()},e.prototype.getUserAgent=function(){return this.userAgent},e.prototype.getIpAddress=function(){return this.ipAddress},e.prototype.getCustomVariables=function(){return this.customVariables},e.prototype.setCustomVariables=function(e){this.customVariables=e},e.prototype.getVariationTargetingVariables=function(){return this.variationTargetingVariables},e.prototype.setVariationTargetingVariables=function(e){this.variationTargetingVariables=e},e.prototype.getVwo=function(){return this._vwo},e.prototype.setVwo=function(e){this._vwo=e},e}();t.ContextModel=o},3166:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextVWOModel=void 0;var n=function(){function e(){}return e.prototype.modelFromDictionary=function(e){return(null==e?void 0:e.location)&&(this.location=e.location),(null==e?void 0:e.userAgent)&&(this.userAgent=e.userAgent),this},e.prototype.getLocation=function(){return this.location},e.prototype.getUaInfo=function(){return this.userAgent},e}();t.ContextVWOModel=n},6365:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionMaker=void 0;var r=n(9708),o=function(){function e(){}return e.prototype.generateBucketValue=function(e,t,n){void 0===n&&(n=1);var r=(t*(e/Math.pow(2,32))+1)*n;return Math.floor(r)},e.prototype.getBucketValueForUser=function(e,t){void 0===t&&(t=100);var n=r.v3(e,1);return this.generateBucketValue(n,t)},e.prototype.calculateBucketValue=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1e4);var r=this.generateHashValue(e);return this.generateBucketValue(r,n,t)},e.prototype.generateHashValue=function(e){return r.v3(e,1)},e}();t.DecisionMaker=o},7846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogMessageBuilder=void 0;var r=n(8858),o="",i="",a=function(){function e(e,t){this.loggerConfig=e,this.transportConfig=t,this.prefix=this.transportConfig.prefix||this.loggerConfig.prefix||"",this.dateTimeFormat=this.transportConfig.dateTimeFormat||this.loggerConfig.dateTimeFormat}return e.prototype.formatMessage=function(e,t){return"[".concat(this.getFormattedLevel(e),"]: ").concat(this.getFormattedPrefix(this.prefix)," ").concat(this.getFormattedDateTime()," ").concat(t)},e.prototype.getFormattedPrefix=function(e){return this.loggerConfig.isAnsiColorEnabled?"".concat(o).concat("").concat(e).concat(i):"".concat(e)},e.prototype.getFormattedLevel=function(e){var t,n,a,s=e.toUpperCase();return this.loggerConfig.isAnsiColorEnabled?((t={})[r.LogLevelEnum.TRACE]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.DEBUG]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.INFO]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.WARN]="".concat(o).concat("").concat(s).concat(i),t[r.LogLevelEnum.ERROR]="".concat(o).concat("").concat(s).concat(i),a=t):((n={})[r.LogLevelEnum.TRACE]=s,n[r.LogLevelEnum.DEBUG]=s,n[r.LogLevelEnum.INFO]=s,n[r.LogLevelEnum.WARN]=s,n[r.LogLevelEnum.ERROR]=s,a=n),a[e]},e.prototype.getFormattedDateTime=function(){return this.dateTimeFormat()},e}();t.LogMessageBuilder=a},5224:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;t.Logger=function(){}},7623:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogManager=void 0;var i=n(3903),a=n(5224),s=n(8671),u=n(1202),c=n(7173),l=n(8858),g=function(e){function t(n){var r=e.call(this)||this;return r.name="VWO Logger",r.requestId=(0,i.v4)(),r.level=l.LogLevelEnum.ERROR,r.prefix="VWO-SDK",r.config=n,!n.isAlwaysNewInstance&&t.instance||(t.instance=r,r.config.name=n.name||r.name,r.config.requestId=n.requestId||r.requestId,r.config.level=n.level||r.level,r.config.prefix=n.prefix||r.prefix,r.config.dateTimeFormat=n.dateTimeFormat||r.dateTimeFormat,r.transportManager=new u.LogTransportManager(r.config),r.handleTransports()),t.instance}return o(t,e),t.prototype.dateTimeFormat=function(){return(new Date).toISOString()},Object.defineProperty(t,"Instance",{get:function(){return t.instance},enumerable:!1,configurable:!0}),t.prototype.handleTransports=function(){var e=this.config.transports;(null==e?void 0:e.length)?this.addTransports(this.config.transports):this.config.transport&&(0,c.isObject)(this.config.transport)?this.addTransport(this.config.transport):this.addTransport(new s.ConsoleTransport({level:this.config.level}))},t.prototype.addTransport=function(e){this.transportManager.addTransport(e)},t.prototype.addTransports=function(e){for(var t=0;t{Object.defineProperty(t,"__esModule",{value:!0}),t.LogTransportManager=void 0;var r,o=n(8858),i=n(7846),a=n(7173);!function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR"}(r||(r={}));var s=function(){function e(e){this.transports=[],this.config=e}return e.prototype.addTransport=function(e){this.transports.push(e)},e.prototype.shouldLog=function(e,t){return r[e.toUpperCase()]>=r[(t||this.config.level).toUpperCase()]},e.prototype.trace=function(e){this.log(o.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.log(o.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.log(o.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.log(o.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.log(o.LogLevelEnum.ERROR,e)},e.prototype.log=function(e,t){for(var n=0;n{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=void 0,function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(n||(t.LogLevelEnum=n={}))},6178:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelEnum=t.LogManager=void 0;var r=n(7623);Object.defineProperty(t,"LogManager",{enumerable:!0,get:function(){return r.LogManager}});var o=n(8858);Object.defineProperty(t,"LogLevelEnum",{enumerable:!0,get:function(){return o.LogLevelEnum}})},8671:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleTransport=void 0;var r=n(8858),o=function(){function e(e){void 0===e&&(e={}),this.config=e,this.level=this.config.level}return e.prototype.trace=function(e){this.consoleLog(r.LogLevelEnum.TRACE,e)},e.prototype.debug=function(e){this.consoleLog(r.LogLevelEnum.DEBUG,e)},e.prototype.info=function(e){this.consoleLog(r.LogLevelEnum.INFO,e)},e.prototype.warn=function(e){this.consoleLog(r.LogLevelEnum.WARN,e)},e.prototype.error=function(e){this.consoleLog(r.LogLevelEnum.ERROR,e)},e.prototype.consoleLog=function(e,t){console[e](t)},e}();t.ConsoleTransport=o},7005:(e,t,n)=>{t.o=void 0;var r=n(4868),o=n(5576),i=n(3647),a=function(){function e(){}return e.prototype.GET=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendGetCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e.prototype.POST=function(e){var t=new o.Deferred,n=e.getOptions(),a=new i.ResponseModel;return(0,r.sendPostCall)({networkOptions:n,successCallback:function(e){a.setData(e),t.resolve(a)},errorCallback:function(e){a.setError(e),t.reject(a)}}),t.promise},e}();t.o=a},6787:(e,t,n)=>{t._=void 0;var r=n(8611),o=n(5692),i=n(5576),a=n(3388),s=n(3647),u=function(){function e(){}return e.prototype.GET=function(e){var t=new i.Deferred,n=e.getOptions(),u=new s.ResponseModel;try{var c=(n.scheme===a.HTTPS?o:r).get(n,(function(e){u.setStatusCode(e.statusCode);var n,r=e.headers["content-type"],o="";/^application\/json/.test(r)||(n="Invalid content-type.\nExpected application/json but received ".concat(r)),n&&(e.resume(),u.setError(n),t.reject(u)),e.setEncoding("utf8"),e.on("data",(function(e){o+=e})),e.on("end",(function(){try{var e=JSON.parse(o);if(200!==u.getStatusCode()){var n="Request failed. Got Status Code: ".concat(u.getStatusCode()," and message: ").concat(o);return u.setError(n),void t.reject(u)}u.setData(e),t.resolve(u)}catch(e){u.setError(e),t.reject(u)}}))}));c.on("timeout",(function(){u.setError(new Error("timeout")),t.reject(u)})),c.on("error",(function(e){u.setError(e),t.reject(u)}))}catch(e){u.setError(e),t.reject(u)}return t.promise},e.prototype.POST=function(e){var t=new i.Deferred,n=e.getOptions(),u=new s.ResponseModel;try{var c=(n.scheme===a.HTTPS?o:r).request(n,(function(n){var r="";n.setEncoding("utf8"),n.on("data",(function(e){r+=e})),n.on("end",(function(){if(200===n.statusCode)u.setData(e.getBody()),t.resolve(u);else if(413===n.statusCode){var o=JSON.parse(r);u.setError(o.error),u.setData(e.getBody()),t.reject(u)}else o=JSON.parse(r),u.setError(o.message),u.setData(e.getBody()),t.reject(u)}))}));c.on("timeout",(function(){u.setError(new Error("timeout")),u.setData(e.getBody()),t.reject(u)})),c.write(JSON.stringify(n.body)),c.end()}catch(n){u.setError(n),u.setData(e.getBody()),t.reject(u)}return t.promise},e}();t._=u},9717:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestHandler=void 0;var n=function(){function e(){}return e.prototype.createRequest=function(e,t){if(!(null!==t.getBaseUrl()&&void 0!==t.getBaseUrl()||null!==e.getUrl()&&void 0!==e.getUrl()))return null;e.setUrl(e.getUrl()||t.getBaseUrl()),e.setTimeout(e.getTimeout()||t.getTimeout()),e.setBody(e.getBody()||t.getBody()),e.setHeaders(e.getHeaders()||t.getHeaders());var n=e.getQuery()||{},r=t.getQuery()||{};for(var o in r)Object.prototype.hasOwnProperty.call(n,o)||(n[o]=r[o]);return e.setQuery(n),e},e}();t.RequestHandler=n},4464:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=t.RequestModel=t.GlobalRequestModel=t.NetworkManager=t.NetworkClient=void 0,void 0===process.env?t.NetworkClient=n(7005).o:t.NetworkClient=n(6787)._;var r=n(119);Object.defineProperty(t,"NetworkManager",{enumerable:!0,get:function(){return r.NetworkManager}});var o=n(7666);Object.defineProperty(t,"GlobalRequestModel",{enumerable:!0,get:function(){return o.GlobalRequestModel}});var i=n(3725);Object.defineProperty(t,"RequestModel",{enumerable:!0,get:function(){return i.RequestModel}});var a=n(3647);Object.defineProperty(t,"ResponseModel",{enumerable:!0,get:function(){return a.ResponseModel}})},119:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkManager=void 0;var r=n(5576),o=n(9717),i=n(7666),a=function(){function e(){}return e.prototype.attachClient=function(e){if(void 0===process.env){var t=n(7005).o;this.client=e||new t}else{var r=n(6787)._;this.client=e||new r}this.config=new i.GlobalRequestModel(null,null,null,null)},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.setConfig=function(e){this.config=e},e.prototype.getConfig=function(){return this.config},e.prototype.createRequest=function(e){return(new o.RequestHandler).createRequest(e,this.config)},e.prototype.get=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.GET(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e.prototype.post=function(e){var t=new r.Deferred,n=this.createRequest(e);return n.getUrl()?this.client.POST(n).then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)})):t.reject(new Error("no url found")),t.promise},e}();t.NetworkManager=a},7666:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalRequestModel=void 0;var n=function(){function e(e,t,n,r){this.timeout=3e3,this.url=e,this.query=t,this.body=n,this.headers=r}return e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setBody=function(e){this.body=e},e.prototype.getBody=function(){return this.body},e.prototype.setBaseUrl=function(e){this.url=e},e.prototype.getBaseUrl=function(){return this.url},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.getTimeout=function(){return this.timeout},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.setDevelopmentMode=function(e){this.isDevelopmentMode=e},e.prototype.getDevelopmentMode=function(){return this.isDevelopmentMode},e}();t.GlobalRequestModel=n},3725:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModel=void 0;var r=n(5212),o=n(3388),i=function(){function e(e,t,n,i,a,s,u,c){void 0===t&&(t=r.HttpMethodEnum.GET),void 0===u&&(u=o.HTTPS),this.url=e,this.method=t,this.path=n,this.query=i,this.body=a,this.headers=s,this.scheme=u,this.port=c}return e.prototype.getMethod=function(){return this.method},e.prototype.setMethod=function(e){this.method=e},e.prototype.getBody=function(){return this.body},e.prototype.setBody=function(e){this.body=e},e.prototype.setQuery=function(e){this.query=e},e.prototype.getQuery=function(){return this.query},e.prototype.setHeaders=function(e){return this.headers=e,this},e.prototype.getHeaders=function(){return this.headers},e.prototype.setTimeout=function(e){return this.timeout=e,this},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getUrl=function(){return this.url},e.prototype.setUrl=function(e){return this.url=e,this},e.prototype.getScheme=function(){return this.scheme},e.prototype.setScheme=function(e){return this.scheme=e,this},e.prototype.getPort=function(){return this.port},e.prototype.setPort=function(e){return this.port=e,this},e.prototype.getPath=function(){return this.path},e.prototype.setPath=function(e){return this.path=e,this},e.prototype.getOptions=function(){var e="";for(var t in this.query)e+="".concat(t,"=").concat(this.query[t],"&");var n=this.url.split("/"),r=n[0],o=n[1],i={hostname:r,agent:!1};if(this.scheme&&(i.scheme=this.scheme),this.port&&(i.port=this.port),this.headers&&(i.headers=this.headers),this.method&&(i.method=this.method),this.body){var a=JSON.stringify(this.body);i.headers=i.headers||{},i.headers["Content-Type"]="application/json","undefined"==typeof Buffer?i.headers["Content-Length"]=(new TextEncoder).encode(a).length:i.headers["Content-Length"]=Buffer.byteLength(a),i.body=this.body}return this.path&&(i.path=""!==e?this.path+"?"+e||"":this.path),o&&(i.path="/".concat(o)+i.path),this.timeout&&(i.timeout=this.timeout),"&"===i.path.charAt(i.path.length-1)&&(i.path=i.path.substring(0,i.path.length-1)),i},e}();t.RequestModel=i},3647:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseModel=void 0;var n=function(){function e(){}return e.prototype.setStatusCode=function(e){this.statusCode=e},e.prototype.setHeaders=function(e){this.headers=e},e.prototype.setData=function(e){this.data=e},e.prototype.setError=function(e){this.error=e},e.prototype.getHeaders=function(){return this.headers},e.prototype.getData=function(){return this.data},e.prototype.getStatusCode=function(){return this.statusCode},e.prototype.getError=function(){return this.error},e}();t.ResponseModel=n},2404:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandRegexEnum=void 0,function(e){e.LOWER="^lower",e.LOWER_MATCH="^lower\\((.*)\\)",e.WILDCARD="^wildcard",e.WILDCARD_MATCH="^wildcard\\((.*)\\)",e.REGEX="^regex",e.REGEX_MATCH="^regex\\((.*)\\)",e.STARTING_STAR="^\\*",e.ENDING_STAR="\\*$",e.GREATER_THAN_MATCH="^gt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.GREATER_THAN_EQUAL_TO_MATCH="^gte\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_MATCH="^lt\\((\\d+\\.?\\d*|\\.\\d+)\\)",e.LESS_THAN_EQUAL_TO_MATCH="^lte\\((\\d+\\.?\\d*|\\.\\d+)\\)"}(n||(t.SegmentOperandRegexEnum=n={}))},9227:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperandValueEnum=void 0,function(e){e[e.LOWER_VALUE=1]="LOWER_VALUE",e[e.STARTING_ENDING_STAR_VALUE=2]="STARTING_ENDING_STAR_VALUE",e[e.STARTING_STAR_VALUE=3]="STARTING_STAR_VALUE",e[e.ENDING_STAR_VALUE=4]="ENDING_STAR_VALUE",e[e.REGEX_VALUE=5]="REGEX_VALUE",e[e.EQUAL_VALUE=6]="EQUAL_VALUE",e[e.GREATER_THAN_VALUE=7]="GREATER_THAN_VALUE",e[e.GREATER_THAN_EQUAL_TO_VALUE=8]="GREATER_THAN_EQUAL_TO_VALUE",e[e.LESS_THAN_VALUE=9]="LESS_THAN_VALUE",e[e.LESS_THAN_EQUAL_TO_VALUE=10]="LESS_THAN_EQUAL_TO_VALUE"}(n||(t.SegmentOperandValueEnum=n={}))},2106:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentOperatorValueEnum=void 0,function(e){e.AND="and",e.NOT="not",e.OR="or",e.CUSTOM_VARIABLE="custom_variable",e.USER="user",e.COUNTRY="country",e.REGION="region",e.CITY="city",e.OPERATING_SYSTEM="os",e.DEVICE_TYPE="device_type",e.DEVICE="device",e.BROWSER_AGENT="browser_string",e.UA="ua",e.FEATURE_ID="featureId"}(n||(t.SegmentOperatorValueEnum=n={}))},7385:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,!0]:[2,!1]}}))}))},e.prototype.checkValuePresent=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){for(r in n=function(n){if(Object.prototype.hasOwnProperty.call(e,n)){var r=e[n];r.forEach((function(e,t){r[t]=e.toLowerCase()}));for(var o=t[n],i=0,a=r;i0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]-1);break;case a.SegmentOperandValueEnum.STARTING_STAR_VALUE:null!==n&&(r=n.endsWith(t));break;case a.SegmentOperandValueEnum.ENDING_STAR_VALUE:null!==n&&(r=n.startsWith(t));break;case a.SegmentOperandValueEnum.REGEX_VALUE:try{r=!!new RegExp(t,"g").test(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.GREATER_THAN_VALUE:if(null!==n)try{r=parseFloat(t)parseFloat(n)}catch(e){r=!1}break;case a.SegmentOperandValueEnum.LESS_THAN_EQUAL_TO_VALUE:if(null!==n)try{r=parseFloat(t)>=parseFloat(n)}catch(e){r=!1}break;default:r=n===t}return r},e}();t.SegmentOperandEvaluator=p},4988:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentEvaluator=t.SegmentationManager=void 0;var r=n(2404);Object.defineProperty(t,"SegmentationManager",{enumerable:!0,get:function(){return r.SegmentationManager}});var o=n(7385);Object.defineProperty(t,"SegmentEvaluator",{enumerable:!0,get:function(){return o.SegmentEvaluator}})},7131:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.matchWithRegex=t.getKeyValue=void 0;var r=n(7173);t.getKeyValue=function(e){if((0,r.isObject)(e)){var t=Object.keys(e)[0];return{key:t,value:e[t]}}},t.matchWithRegex=function(e,t){try{return e.match(new RegExp(t))}catch(e){return null}}},9376:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Connector=void 0;t.Connector=function(){}},1946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var n=function(){function e(){}return e.prototype.attachConnector=function(e){var t,n,r,o;return"class"===(null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.prototype)||void 0===t?void 0:t.constructor)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.trim())||void 0===o?void 0:o.substring(0,5))?this.connector=new e:this.connector=e,this.connector},Object.defineProperty(e,"Instance",{get:function(){return this.instance=this.instance||new e,this.instance},enumerable:!1,configurable:!0}),e.prototype.getConnector=function(){return this.connector},e}();t.Storage=n},4059:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var r=n(1946);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return r.Storage}})},3991:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=r.getStartRangeVariation()&&t<=r.getEndRangeVariation())return r}return null},e.prototype.checkInRange=function(e,t){if(t>=e.getStartRangeVariation()&&t<=e.getEndRangeVariation())return e},e.prototype.bucketUserToVariation=function(e,t,n){var r;if(!n||!e)return null;n.getTraffic()&&(r=1);var o=n.getTraffic(),s=(new i.DecisionMaker).generateHashValue("".concat(n.getId(),"_").concat(t,"_").concat(e)),c=(new i.DecisionMaker).generateBucketValue(s,u.Constants.MAX_TRAFFIC_VALUE,r);return a.LogManager.Instance.debug((0,p.buildMessage)(l.DebugLogMessagesEnum.USER_BUCKET_TO_VARIATION,{userId:e,campaignKey:n.getKey(),percentTraffic:o,bucketValue:c,hashValue:s})),this.getVariation(n.getVariations(),c)},e.prototype.getPreSegmentationDecision=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=e.getType(),r={},n===c.CampaignTypeEnum.ROLLOUT||n===c.CampaignTypeEnum.PERSONALIZE?r=e.getVariations()[0].getSegments():n===c.CampaignTypeEnum.AB&&(r=e.getSegments()),!(0,g.isObject)(r)||Object.keys(r).length?[3,1]:(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_SKIP,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey()})),[2,!0]);case 1:return[4,s.SegmentationManager.Instance.validateSegmentation(r,t.getCustomVariables())];case 2:return o.sent()?(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"passed"})),[2,!0]):(a.LogManager.Instance.info((0,p.buildMessage)(l.InfoLogMessagesEnum.SEGMENTATION_STATUS,{userId:t.getId(),campaignKey:e.getType()===c.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:"failed"})),[2,!1])}}))}))},e.prototype.getVariationAlloted=function(e,t,n){var r=this.isUserPartOfCampaign(e,n);return n.getType()===c.CampaignTypeEnum.ROLLOUT||n.getType()===c.CampaignTypeEnum.PERSONALIZE?r?n.getVariations()[0]:null:r?this.bucketUserToVariation(e,t,n):null},e}();t.CampaignDecisionService=d},3289:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(7173),o=function(){function e(e){var t;this.callback=null===(t=e.integrations)||void 0===t?void 0:t.callback,this.isCallBackFunction=(0,r.isFunction)(this.callback),this.decision={}}return e.prototype.execute=function(e){this.isCallBackFunction&&this.callback(e)},e.prototype.set=function(e){this.isCallBackFunction&&(this.decision=e)},e.prototype.get=function(){return this.decision},e}();t.default=o},9600:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.getRuleTypeUsingCampaignIdFromFeature=t.assignRangeValuesMEG=t.getCampaignIdsFromFeatureKey=t.getFeatureKeysFromCampaignIds=t.getCampaignsByGroupId=t.findGroupsFeaturePartOf=t.getGroupDetailsIfCampaignPartOfIt=t.setCampaignAllocation=t.getVariationFromCampaignKey=t.getBucketingSeed=t.scaleVariationWeights=t.assignRangeValues=t.setVariationAllocation=void 0;var r=n(477),o=n(6947),i=n(2974),a=n(1463),s=n(6178),u=n(5076);function c(e,t){var n=p(e.getWeight());return n?(e.setStartRange(t+1),e.setEndRange(t+n)):(e.setStartRange(-1),e.setEndRange(-1)),n}function l(e,t,n){void 0===n&&(n=null);var r=t.toString();return null!==n&&(r="".concat(t,"_").concat(n).toString()),e.getCampaignGroups()&&Object.prototype.hasOwnProperty.call(e.getCampaignGroups(),r)?{groupId:e.getCampaignGroups()[r],groupName:e.getGroups()[e.getCampaignGroups()[r]].name}:{}}function g(e,t){var n=p(e.weight);return n?(e.startRangeVariation=t+1,e.endRangeVariation=t+n):(e.startRangeVariation=-1,e.endRangeVariation=-1),n}function p(e){if(!e||0===e)return 0;var t=Math.ceil(100*e);return Math.min(t,r.Constants.MAX_TRAFFIC_VALUE)}t.setVariationAllocation=function(e){if(e.getType()===o.CampaignTypeEnum.ROLLOUT||e.getType()===o.CampaignTypeEnum.PERSONALIZE)!function(e){for(var t=0;t{function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return"[object Null]"===Object.prototype.toString.call(e)}function i(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function a(e){return"[object Number]"===Object.prototype.toString.call(e)}function s(e){return"[object String]"===Object.prototype.toString.call(e)}function u(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function c(e){return e!=e}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function g(e){return"[object Function]"===Object.prototype.toString.call(e)}function p(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function d(e){return"[object Promise]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.isPromise=t.isRegex=t.isFunction=t.isDate=t.isNaN=t.isBoolean=t.isString=t.isNumber=t.isDefined=t.isUndefined=t.isNull=t.isArray=t.isObject=void 0,t.isObject=n,t.isArray=r,t.isNull=o,t.isUndefined=i,t.isDefined=function(e){return!i(e)&&!o(e)},t.isNumber=a,t.isString=s,t.isBoolean=u,t.isNaN=c,t.isDate=l,t.isFunction=g,t.isRegex=p,t.isPromise=d,t.getType=function(e){return n(e)?"Object":r(e)?"Array":o(e)?"Null":i(e)?"Undefined":c(e)?"NaN":a(e)?"Number":s(e)?"String":u(e)?"Boolean":l(e)?"Date":p(e)?"Regex":g(e)?"Function":d(e)?"Promise":"Unknown Type"}},9455:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?[2,[!0,S]]:[3,3];case 2:l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:n.getRuleKey(),userId:i.getId()})),o.label=3;case 3:if(i.setCustomVariables(Object.assign({},i.getCustomVariables(),{_vwoUserId:n.getIsUserListEnabled()?r:i.getId()})),Object.assign(d,{customVariables:i.getCustomVariables()}),_=(0,h.getGroupDetailsIfCampaignPartOfIt)(e,n.getId(),n.getType()===a.CampaignTypeEnum.PERSONALIZE?n.getVariations()[0].getId():null).groupId,!(T=null==c?void 0:c.get(_)))return[3,4];if(n.getType()===a.CampaignTypeEnum.AB){if(T===v)return[2,[!0,null]]}else if(n.getType()===a.CampaignTypeEnum.PERSONALIZE&&T===v+"_"+n.getVariations()[0].getId())return[2,[!0,null]];return[2,[!1,null]];case 4:return[4,(new b.StorageDecorator).getFeatureFromStorage("".concat(f.Constants.VWO_META_MEG_KEY).concat(_),i,g)];case 5:if((O=o.sent())&&O.experimentKey&&O.experimentId)return l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.MEG_CAMPAIGN_FOUND_IN_STORAGE,{campaignKey:O.experimentKey,userId:i.getId()})),O.experimentId===v?n.getType()===a.CampaignTypeEnum.PERSONALIZE?O.experimentVariationId===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(_,O.experimentId+"_"+O.experimentVariationId),[2,[!1,null]]):[2,[!0,null]]:(-1!=O.experimentVariationId?c.set(_,O.experimentId+"_"+O.experimentVariationId):c.set(_,O.experimentId),[2,[!1,null]]);o.label=6;case 6:return[4,(new p.CampaignDecisionService).getPreSegmentationDecision(n,i)];case 7:return(A=o.sent())&&_?[4,(0,y.evaluateGroups)(e,t,_,s,i,g)]:[3,9];case 8:return(w=o.sent())&&w.id===v?w.type===a.CampaignTypeEnum.AB||w.variations[0].id===n.getVariations()[0].getId()?[2,[!0,null]]:(c.set(_,w.id+"_"+w.variations[0].id),[2,[!1,null]]):w?(w.type===a.CampaignTypeEnum.AB?c.set(_,w.id):c.set(_,w.id+"_"+w.variations[0].id),[2,[!1,null]]):(c.set(_,-1),[2,[!1,null]]);case 9:return[2,[A,null]]}}))}))},t.evaluateTrafficAndGetVariation=function(e,t,n){var r=(new p.CampaignDecisionService).getVariationAlloted(n,e.getAccountId(),t);return r?(l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"got variation:".concat(r.getKey())})),r):(l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.USER_CAMPAIGN_BUCKET_INFO,{campaignKey:t.getType()===a.CampaignTypeEnum.AB?t.getKey():t.getName()+"_"+t.getRuleKey(),userId:n,status:"did not get any variation"})),null)};var I=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,S(e,t)];case 1:return n=o.sent(),r=n?s.StatusEnum.PASSED:s.StatusEnum.FAILED,i=n?n.variation.key:"",l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_STATUS,{userId:t.getId(),campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),status:r,variationString:i})),[2,n]}}))}))},S=function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,s,f,y,E;return o(this,(function(o){switch(o.label){case 0:return n=[],r=[],e.getVariations().forEach((function(o){if(!(0,d.isObject)(o.getSegments())||Object.keys(o.getSegments()).length){if((0,d.isObject)(o.getSegments())){var s=g.SegmentationManager.Instance.validateSegmentation(o.getSegments(),t.getVariationTargetingVariables());(s=(0,i.isPromise)(s)?s:Promise.resolve(s)).then((function(e){e&&n.push((0,v.cloneObject)(o))})),r.push(s)}}else l.LogManager.Instance.info((0,m.buildMessage)(u.InfoLogMessagesEnum.WHITELISTING_SKIP,{campaignKey:e.getType()===a.CampaignTypeEnum.AB?e.getKey():e.getName()+"_"+e.getRuleKey(),userId:t.getId(),variation:o.getKey()?"for variation: ".concat(o.getKey()):""}))})),[4,Promise.all(r)];case 1:if(o.sent(),n.length>1){for((0,h.scaleVariationWeights)(n),f=0,y=0,E=0;f0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0){o.setIsGatewayServiceRequired(!0);break}}}}},9284:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]{Object.defineProperty(t,"__esModule",{value:!0}),t.buildMessage=void 0;var r=n(7173),o=/\{([0-9a-zA-Z_]+)\}/g;t.buildMessage=function(e,t){void 0===t&&(t={});try{return e.replace(o,(function(n,o,i){if("{"===e[i-1]&&"}"===e[i+n.length])return o;var a=t[o];return null==a?"":(0,r.isFunction)(a)?a():a}))}catch(t){return e}}},6254:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0))return[3,5];g=null,d=0,h=r,o.label=1;case 1:return d0)?(n.set(t.getKey(),{rolloutId:g.id,rolloutKey:g.key,rolloutVariationId:g.variations[0].id}),[2,!0]):(i.push(t.getKey()),[2,!1]);case 5:return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS,{featureKey:t.getKey()})),[2,!0]}}))}))},S=function(e,t,n,i){return r(void 0,void 0,void 0,(function(){var r,l,g,f,v,m,y,b,I,S,_,T,O;return o(this,(function(A){switch(A.label){case 0:r=[],l=[],g=[],f=Array.from(t),v=0,m=f,A.label=1;case 1:if(!(v1&&f===i.Constants.RANDOM_ALGO?r=T(a,l,d,c,g):a.length>1&&(r=O(e,a,l,d,c,g)),0===a.length&&(1===n.length?(r=n[0],p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:n[0].getType()===s.CampaignTypeEnum.AB?n[0].getKey():n[0].getName()+"_"+n[0].getRuleKey(),groupId:c,userId:l.getId(),algo:""}))):n.length>1&&f===i.Constants.RANDOM_ALGO?r=T(n,l,d,c,g):n.length>1&&(r=O(e,n,l,d,c,g))),[2,r]}))}))},T=function(e,t,n,r,o){e.forEach((function(t){t.weight=Math.round(100/e.length*1e4)/1e4})),e=e.map((function(e){return(new l.VariationModel).modelFromDictionary(e)})),(0,h.setCampaignAllocation)(e);var c=(new d.CampaignDecisionService).getVariation(e,(new g.DecisionMaker).calculateBucketValue((0,h.getBucketingSeed)(t.getId(),void 0,r)));return p.LogManager.Instance.info((0,E.buildMessage)(u.InfoLogMessagesEnum.MEG_WINNER_CAMPAIGN,{campaignKey:c.getType()===s.CampaignTypeEnum.AB?c.getKey():c.getKey()+"_"+c.getRuleKey(),groupId:r,userId:t.getId(),algo:"using random algorithm"})),c&&((new a.StorageDecorator).setDataInStorage({featureKey:"".concat(i.Constants.VWO_META_MEG_KEY).concat(r),context:t,experimentId:c.getId(),experimentKey:c.getKey(),experimentVariationId:c.getType()===s.CampaignTypeEnum.PERSONALIZE?c.getVariations()[0].getId():-1},o),n.includes(c.getId()))?c:null},O=function(e,t,n,r,o,c){for(var f=null,m=!1,b=(0,v.isUndefined)(e.getGroups()[o].p)?{}:e.getGroups()[o].p,I=(0,v.isUndefined)(e.getGroups()[o].wt)?{}:e.getGroups()[o].wt,S=0;S0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0)for(var s in r)a.d.event.props[s]=r[s];return p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),a},t.getAttributePayloadData=function(e,t,n,r,o,i,a){void 0===i&&(i=""),void 0===a&&(a="");var u=y(e,t,n,i,a);return u.d.event.props.isCustomEvent=!0,u.d.event.props[s.Constants.VWO_FS_ENVIRONMENT]=e.getSdkkey(),u.d.visitor.props[r]=o,p.LogManager.Instance.debug((0,v.buildMessage)(g.DebugLogMessagesEnum.IMPRESSION_FOR_TRACK_USER,{eventName:n,accountId:e.getAccountId(),userId:t})),u},t.sendPostApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:return d.NetworkManager.Instance.attachClient(),n={},r=t.d.visitor_ua,i=t.d.visitor_ip,r&&(n[u.HeadersEnum.USER_AGENT]=r),i&&(n[u.HeadersEnum.IP]=i),a=new d.RequestModel(m.UrlUtil.getBaseUrl(),c.HttpMethodEnum.POST,l.UrlEnum.EVENTS,e,t,n,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),[4,d.NetworkManager.Instance.post(a).catch((function(e){p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.POST,err:(0,h.isObject)(e)?JSON.stringify(e):e}))}))];case 1:return o.sent(),[2]}}))}))},t.sendGetApiRequest=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:d.NetworkManager.Instance.attachClient(),n=new d.RequestModel(m.UrlUtil.getBaseUrl(),c.HttpMethodEnum.GET,t,e,null,null,f.SettingsService.Instance.protocol,f.SettingsService.Instance.port),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,d.NetworkManager.Instance.get(n)];case 2:return[2,o.sent()];case 3:return r=o.sent(),p.LogManager.Instance.error((0,v.buildMessage)(g.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:c.HttpMethodEnum.GET,err:(0,h.isObject)(r)?JSON.stringify(r):r})),[2,null];case 4:return[2]}}))}))};var E=!1;t.getShouldWaitForTrackingCalls=function(){return E},t.setShouldWaitForTrackingCalls=function(e){E=e}},5576:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){var e=this;return this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),this}},689:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0?(Object.assign(d,{experimentId:n.getId(),experimentKey:n.getKey(),experimentVariationId:h.variationId}),(0,s.getShouldWaitForTrackingCalls)()?[4,(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c)]:[3,3]):[3,4];case 2:return o.sent(),[3,4];case 3:(0,u.createAndSendImpressionForVariationShown)(e,n.getId(),h.variation.id,c),o.label=4;case 4:return[2,{preSegmentationResult:f,whitelistedObject:h,updatedDecision:d}]}}))}))}},7788:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSettingsAndAddCampaignsToRules=void 0;var r=n(9540),o=n(5479),i=n(8470),a=n(596);t.setSettingsAndAddCampaignsToRules=function(e,t){t.settings=new r.SettingsModel(e),t.originalSettings=e;var n=t.settings.getCampaigns();n.forEach((function(e,t){(0,o.setVariationAllocation)(e),n[t]=e})),(0,i.addLinkedCampaignsToSettings)(t.settings),(0,a.addIsGatewayServiceRequiredFlag)(t.settings)}},6096:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtil=void 0;var r=n(9600),o=n(7173);t.UrlUtil={init:function(e){var n=(void 0===e?{}:e).collectionPrefix;return n&&(0,o.isString)(n)&&(t.UrlUtil.collectionPrefix=n),t.UrlUtil},getBaseUrl:function(){var e=r.SettingsService.Instance.hostname;return r.SettingsService.Instance.isGatewayServiceProvided?e:t.UrlUtil.collectionPrefix?"".concat(e,"/").concat(t.UrlUtil.collectionPrefix):e}}},4334:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=t.getUUID=t.getRandomUUID=void 0;var r=n(3388),o=n(3903),i=n(3903);function a(e,t){if(e&&t)return(0,i.v5)(e,t)}t.getRandomUUID=function(e){var t=(0,i.v5)(e,i.v5.DNS);return(0,i.v5)((0,o.v4)(),t)},t.getUUID=function(e,t){var n=(0,i.v5)(r.SEED_URL,i.v5.URL);e=String(e);var o=a(t=String(t),n),s=a(e,o);return null==s?void 0:s.replace(/-/gi,"").toUpperCase()},t.generateUUID=a},4868:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sendPostCall=t.sendGetCall=void 0;var r=n(5212),o=n(6178),i=n(5076),a=n(2974),s=function(){};function u(e,t){var n=t.networkOptions,u=t.successCallback,c=void 0===u?s:u,l=t.errorCallback,g=void 0===l?s:l,p="".concat(n.scheme,"://").concat(n.hostname).concat(n.path);n.port&&(p="".concat(n.scheme,"://").concat(n.hostname,":").concat(n.port).concat(n.path));var d=n.body,f=n.headers||{},h=n.timeout,v=new XMLHttpRequest;for(var m in h&&(v.timeout=h),v.onload=function(){if(v.status>=200&&v.status<300){var t=v.responseText;if(e===r.HttpMethodEnum.GET){var n=JSON.parse(t);c(n)}else c(t)}else g(v.statusText)},v.onerror=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"".concat(v.statusText,", status: ").concat(v.status)})),g(v.statusText)},h&&(v.ontimeout=function(){o.LogManager.Instance.error((0,i.buildMessage)(a.ErrorLogMessagesEnum.NETWORK_CALL_FAILED,{method:r.HttpMethodEnum.POST,err:"Request timed out"}))}),v.open(e,p,!0),f)m in f&&"Content-Type"!==m&&"Content-Length"!==m&&v.setRequestHeader(m,f[m]);e===r.HttpMethodEnum.POST?v.send(JSON.stringify(d)):e===r.HttpMethodEnum.GET&&v.send()}t.sendGetCall=function(e){u(r.HttpMethodEnum.GET,e)},t.sendPostCall=function(e){u(r.HttpMethodEnum.POST,e)}},9708:e=>{e.exports=require("murmurhash")},6190:e=>{e.exports=require("superstruct")},3903:e=>{e.exports=require("uuid")},6826:e=>{e.exports=require("vwo-fme-sdk-log-messages")},8611:e=>{e.exports=require("http")},5692:e=>{e.exports=require("https")},6089:e=>{e.exports=JSON.parse('{"name":"vwo-fme-node-sdk","version":"1.8.0","description":"VWO Node/JavaScript SDK for Feature Management and Experimentation","main":"dist/server-unpacked/index.js","browser":"dist/client/vwo-fme-javascript-sdk","exports":{".":{"node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"default":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"./node":{"types":"./dist/types/index.d.ts","import":"./dist/server-unpacked/index.js","require":"./dist/server-unpacked/index.js","default":"./dist/server-unpacked/index.js"},"./browser":{"types":"./dist/types/index.d.ts","import":"./dist/client/vwo-fme-javascript-sdk.js","require":"./dist/client/vwo-fme-javascript-sdk.min.js","default":"./dist/client/vwo-fme-javascript-sdk.min.js"}},"types":"dist/types/index.d.ts","scripts":{"build":"rm -rf dist/ yarn tsc:prod && yarn build:node && yarn build:browser && prettier -w dist/types/","build:browser":"yarn build:dev-browser && yarn build:prod-browser","build:node":"yarn build:dev-node && yarn build:prod-node","build:dev-browser":"webpack --config ./webpack.browser.config.js --mode=development","build:dev-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development","build:dev-browser-watch":"webpack --config ./webpack.browser.config.js --mode=development --watch","build:dev-node-watch":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=development --watch","build:dev-browser-analyze":"webpack --config ./webpack.browser.config.js --mode=development --env analyze=1","build:dev-node-analyze":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production --env analyze=1","build:prod-browser":"webpack --config ./webpack.browser.config.js --mode=production","build:prod-node":"yarn tsc:prod && webpack --config ./webpack.node.config.js --mode=production","check:license":"yarn check:versions && node -e \'require(\\"./scripts/check-license\\")\'","check:versions":"node -e \'require(\\"./scripts/check-versions\\")\'","demo":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/index.js","demo:server":"nodemon --inspect=0.0.0.0:9229 --legacy-watch --ignore node_modules demo/server.js","lint":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint lib/ --fix","lint:errors-only":"node -e \'require(\\"./scripts/check-versions\\")([\\"nodeLint\\"])\' && eslint **/*.ts\' --fix --quiet","prepare":"husky","prettier":"prettier -w lib/**/*.ts *.md","test:dev":"node --inspect-brk node_modules/jest/bin/jest.js --watch --runInBand --debug --colors --errorOnDeprecated","test:prod":"jest --runInBand --colors --errorOnDeprecated","test:coverage":"jest --coverage --coverageDirectory=coverage && cat ./coverage/lcov.info","tsc":"yarn check:versions && rm -rf dist/server-unpacked && cp package.json dist/ && tsc -w","tsc:prod":"yarn check:versions && rm -rf dist/server-unpacked && tsc && cp package.json dist/","typedoc":"typedoc --plugin typedoc-plugin-markdown --out ./docs lib/*.ts lib/**/*.ts lib/**/**/*.ts ","typedoc:html":"typedoc --out docs-html lib/*.ts lib/**/*.ts lib/**/**/*.ts"},"repository":{"type":"git","url":"https://github.com/wingify/vwo-fme-node-sdk"},"author":"VWO developers","license":"Apache-2.0","files":["dist/","package.json","yarn.lock","lib/**/*","LICENSE","README.md","CONTRIBUTING.md","CHANGELOG.md","NOTICE"],"dependencies":{"murmurhash":"^2.0.1","superstruct":"^0.14.x","uuid":"^9.0.1","vwo-fme-sdk-log-messages":"^0.1.2"},"devDependencies":{"@babel/core":"^7.24.5","@babel/preset-env":"^7.24.5","@babel/preset-typescript":"^7.24.1","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@eslint/js":"^9.2.0","@types/jest":"^29.5.12","@types/node":"^20.12.7","babel-jest":"^29.7.0","babel-loader":"^9.1.3","eslint":"^9.2.0","express":"^4.19.2","globals":"^15.1.0","husky":"^9.0.11","jest":"^29.7.0","lint-staged":"^15.2.2","nodemon":"^2.0.6","prettier":"^3.2.5","semver":"^7.6.0","shelljs":"^0.8.5","ts-loader":"^9.5.1","typedoc":"^0.25.13","typedoc-plugin-markdown":"^4.0.3","typescript":"^5.4.5","typescript-eslint":"^7.8.0","vwo-fme-sdk-e2e-test-settings-n-cases":"^1.3.0","webpack":"^5.91.0","webpack-bundle-analyzer":"^4.10.2","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"lint-staged":{"**/*.{ts,json,md}":["prettier --write"]},"engineStrict":true,"engines":{"node":">= 8.9.0","yarn":">= 1.22.17"},"customEngines":{"nodeLint":">= 18.18.0"}}')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.onInit=e.init=e.StorageConnector=e.LogLevelEnum=void 0;var t=n(8858);Object.defineProperty(e,"LogLevelEnum",{enumerable:!0,get:function(){return t.LogLevelEnum}});var o=n(9376);Object.defineProperty(e,"StorageConnector",{enumerable:!0,get:function(){return o.Connector}});var i=n(9799);Object.defineProperty(e,"init",{enumerable:!0,get:function(){return i.init}}),Object.defineProperty(e,"onInit",{enumerable:!0,get:function(){return i.onInit}})})(),module.exports=r})(); //# sourceMappingURL=vwo-fme-node-sdk.min.js.map \ No newline at end of file diff --git a/dist/server/vwo-fme-node-sdk.min.js.map b/dist/server/vwo-fme-node-sdk.min.js.map index bfb4546..df92285 100644 --- a/dist/server/vwo-fme-node-sdk.min.js.map +++ b/dist/server/vwo-fme-node-sdk.min.js.map @@ -1 +1 @@ -{"version":3,"file":"vwo-fme-node-sdk.min.js","mappings":"ihDAeA,IAAAA,EAAAC,EAAA,MAKAC,EAAAD,EAAA,MACAE,EAAAF,EAAA,MAEAG,EAAAH,EAAA,MACAI,EAAAJ,EAAA,MACAK,EAAAL,EAAA,MAEAM,EAAA,WAUE,SAAAA,EAAYC,GACV,OAAOD,EAAIE,YAAYD,EACzB,CAkCF,OA1BiBD,EAAAE,YAAf,SAA2BD,GAA3B,IAAAE,EAAA,KACQC,EAAyBH,aAAO,EAAPA,EAASI,WAaxC,OAZA,KAAKA,WAAaD,GAAqB,IAAIX,EAAAa,WAAWL,GAEtD,KAAKM,SAAW,KAAKF,WAClBG,YACAC,qBACAC,aACAC,oBACAC,kBAEAC,cAGI,KAAKR,WAAWS,cAAcC,MAAK,SAACC,GACzC,OAAOb,EAAKE,WAAWY,MAAMD,EAC/B,GACF,EAMAE,OAAAC,eAAWnB,EAAA,WAAQ,C,IAAnB,WACE,OAAO,KAAKO,QACd,E,gCACFP,CAAA,CA9CA,GAAaoB,EAAAA,IAAApB,EAgDb,IAAIqB,EAA+B,GAWnCD,EAAAA,KAAA,SAA2BnB,G,6EAEnBqB,GAAO,IAAIC,MAAOC,cAExB,IAoCE,OAnCK,EAAA7B,EAAA8B,UAASxB,KAC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AAA,kBAAAi2B,EAAAC,MAAM,G","sources":["webpack://vwo-fme-node-sdk/../../lib/VWO.ts","webpack://vwo-fme-node-sdk/../../lib/VWOBuilder.ts","webpack://vwo-fme-node-sdk/../../lib/VWOClient.ts","webpack://vwo-fme-node-sdk/../../../lib/api/GetFlag.ts","webpack://vwo-fme-node-sdk/../../../lib/api/SetAttribute.ts","webpack://vwo-fme-node-sdk/../../../lib/api/TrackEvent.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/Url.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/index.ts","webpack://vwo-fme-node-sdk/../../../lib/decorators/StorageDecorator.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/ApiEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/CampaignTypeEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/EventEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HeadersEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HttpMethodEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/PlatformEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StatusEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StorageEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/UrlEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/enums/log-messages/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/CampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/FeatureModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/ImpactCampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/MetricModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/RuleModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariableModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariationModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/settings/SettingsModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextVWOModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/decision-maker/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/LogMessageBuilder.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/Logger.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/core/LogManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/core/TransportManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/client/NetworkClient.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/RequestModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/models/ResponseModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Connector.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Storage.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/index.ts","webpack://vwo-fme-node-sdk/../../../lib/services/CampaignDecisionService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/HooksService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/SettingsService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/StorageService.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/CampaignUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DataTypeUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DecisionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/FunctionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/GatewayServiceUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/ImpressionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/LogMessageUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/MegUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/NetworkUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/PromiseUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/RuleEvaluationUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/SettingsUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UrlUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UuidUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/XMLUtil.ts","webpack://vwo-fme-node-sdk/external commonjs \"murmurhash\"","webpack://vwo-fme-node-sdk/external commonjs \"superstruct\"","webpack://vwo-fme-node-sdk/external commonjs \"uuid\"","webpack://vwo-fme-node-sdk/external commonjs \"vwo-fme-sdk-log-messages\"","webpack://vwo-fme-node-sdk/external node-commonjs \"http\"","webpack://vwo-fme-node-sdk/external node-commonjs \"https\"","webpack://vwo-fme-node-sdk/webpack/bootstrap","webpack://vwo-fme-node-sdk/../../lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"module.exports = require(\"murmurhash\");","module.exports = require(\"superstruct\");","module.exports = require(\"uuid\");","module.exports = require(\"vwo-fme-sdk-log-messages\");","module.exports = require(\"http\");","module.exports = require(\"https\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n"],"names":["VWOBuilder_1","require","DataTypeUtil_1","PromiseUtil_1","log_messages_1","LogMessageUtil_1","PlatformEnum_1","VWO","options","setInstance","_this","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","getSettings","then","settings","build","Object","defineProperty","exports","_global","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","process","env","platform","PlatformEnum","CLIENT","SERVER","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","resolve","err","API_THROW_ERROR","apiName","info","concat","date_1","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","logger_1","network_layer_1","segmentation_evaluator_1","storage_1","VWOClient_1","SettingsService_1","FunctionUtil_1","SettingsUtil_1","UuidUtil_1","prototype","networkInstance","NetworkManager","Instance","attachClient","_b","_a","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","_c","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","key","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","GetFlag_1","SetAttribute_1","TrackEvent_1","SettingsSchemaValidation_1","ContextModel_1","HooksService_1","UrlUtil_1","NetworkUtil_1","UrlUtil","init","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","default","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","get","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","sent","err_1","StorageDecorator_1","ApiEnum_1","CampaignTypeEnum_1","CampaignModel_1","VariableModel_1","StorageService_1","CampaignUtil_1","DecisionUtil_1","ImpressionUtil_1","RuleEvaluationUtil_1","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","_k","experimentVariationId","experimentKey","variation_1","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","assign","undefined","setContextualData","FEATURE_NOT_FOUND","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","length","rolloutRulesToEvaluate","rollOutRules_1","_i","rule","evaluateRule","preSegmentationResult","updatedDecision","push","_d","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","experimentRules_1","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","__assign","execute","_e","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","_f","_g","variablesForEvaluatedFlag","_j","_h","variables","value","EventEnum_1","createImpressionForAttribute","__awaiter","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","packageFile","Url_1","name","version","SDK_VERSION","SDK_NAME","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","StorageEnum_1","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","MetricModel_1","VariationModel_1","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","forEach","VariationModel","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","ImpactCampaignModel_1","RuleModel_1","FeatureModel","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","identifier","i","t","getIdentifier","getVariationId","getStatus","val","k","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","superstruct_1","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","FeatureModel_1","SettingsModel","f","c","cG","g","sK","a","v","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","ContextVWOModel_1","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","Hasher","DecisionMaker","generateBucketValue","hashValue","maxValue","multiplier","multipliedValue","Math","pow","floor","getBucketValueForUser","hashKey","v3","calculateBucketValue","str","generateHashValue","LogLevelEnum_1","AnsiColorEnum","LogMessageBuilder","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","LogLevelColorInfoEnum","upperCaseLevel","toUpperCase","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","uuid_1","Logger_1","ConsoleTransport_1","TransportManager_1","_super","config","call","requestId","v4","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","__extends","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","Logger","LogLevelNumberEnum","LogMessageBuilder_1","shouldLog","transportLevel","configLevel","formattedMessage","isFunction","LogManager_1","enumerable","consoleLog","XMLUtil_1","ResponseModel_1","NetworkBrowserClient","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","http","https","NetworkClient","req","scheme","res","setStatusCode","statusCode","contentType","headers","rawData","test","resume","setEncoding","on","chunk","parsedData","parse","getStatusCode","error_1","getBody","write","body","end","RequestHandler","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","hasOwnProperty","setQuery","NetworkManager_1","GlobalRequestModel_1","GlobalRequestModel","RequestModel_1","RequestModel","RequestHandler_1","setConfig","response","errorResponse","post","url","query","timeout","setBaseUrl","getDevelopmentMode","HttpMethodEnum_1","method","path","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","split","hostname","agent","postBody","Buffer","TextEncoder","encode","byteLength","charAt","substring","getData","getError","SegmentEvaluator_1","GatewayServiceUtil_1","UrlEnum_1","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","SegmentOperatorValueEnum_1","SegmentUtil_1","SegmentOperandEvaluator_1","getKeyValue","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","dslNodes_1","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","Array","isArray","FEATURE_ID","featureIdObject","featureIdKey_1","featureIdValue","this_1","parseInt","checkInUserStorage","result","checkUserAgentParser","locationMap","dslNodes_2","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","valuesMatch","checkValuePresent","expectedMap","actualMap","expectedValues_2","index","toLowerCase","actualValue","expectedValues_1","startsWith","endsWith","wildcardPattern","slice","RegExp","replace","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","SegmentOperandValueEnum_1","SegmentOperandRegexEnum_1","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","regex","processedOperandValue","parseFloat","processedTagValue","indexOf","SegmentationManger_1","obj","connector","getConnector","Storage_1","decision_maker_1","constants_1","CampaignDecisionService","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","bucketValue","checkInRange","bucketUserToVariation","Constants","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","HooksService","callback","integrations","isCallBackFunction","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","assignRangeValues","currentAllocation","stepFactor","_getVariationBucketRange","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupId","groupName","assignRangeValuesMEG","variationWeight","ceil","min","VARIATION_RANGE_ALLOCATION","_handleRolloutCampaign","currentAllocation_1","totalWeight","reduce","acc","equalWeight_1","ruleArray","group","findIndex","grp","campaignIdWithVariation","featureKeys","map","Number","campaignIdWithVariation_1","campaignIds","isNaN","isDate","isRegex","isPromise","StatusEnum_1","CampaignDecisionService_1","DataTypeUtil_2","MegUtil_1","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","Promise","evaluationResult","all","scaleVariationWeights","getBucketingSeed","variationName","random","filter","rulesLinkedCampaignModel","linkedCampaign","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","pattern","rules_1","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","getFeatureKeysFromGroup","groupCampaignIds","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","featureToSkip","feature_1","_isRolloutRuleForFeaturePassed","has","item","featureKeys_1","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","campaignMapArray_1","MEG_CAMPAIGN_ELIGIBLE","campaigns_1","getCampaignIdsFromFeatureKey","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","setCampaignAllocation","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","HeadersEnum_1","_getEventBasePayload","visitorUserAgent","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","getCurrentUnixTimestampInMillis","visId","sessionId","getCurrentUnixTimestamp","visitor_ua","visitor_ip","event","time","visitor","vwo_fs_environment","sId","u","r","event_type","account_id","uId","sdk","getRandomNumber","ap","ed","sd","sv","setting","en","eTime","EVENTS","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","checkWhitelistingAndPreSeg","SettingsModel_1","vwoClientInstance","setVariationAllocation","addLinkedCampaignsToSettings","addIsGatewayServiceRequiredFlag","baseUrl","uuid_2","generateUUID","namespace","v5","DNS","VWO_NAMESPACE","userIdNamespace","uuidForUserIdAccountId","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","headerName","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","setRequestHeader","send","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","Connector_1","Connector","VWO_1","onInit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"vwo-fme-node-sdk.min.js","mappings":"ihDAeA,IAAAA,EAAAC,EAAA,MAIAC,EAAAD,EAAA,MACAE,EAAAF,EAAA,MAEAG,EAAAH,EAAA,MACAI,EAAAJ,EAAA,MACAK,EAAAL,EAAA,MAEAM,EAAA,WAUE,SAAAA,EAAYC,GACV,OAAOD,EAAIE,YAAYD,EACzB,CAsCF,OA9BiBD,EAAAE,YAAf,SAA2BD,GAA3B,IAAAE,EAAA,KACQC,EAAyBH,aAAO,EAAPA,EAASI,WAaxC,OAZA,KAAKA,WAAaD,GAAqB,IAAIX,EAAAa,WAAWL,GAEtD,KAAKM,SAAW,KAAKF,WAClBG,YACAC,qBACAC,aACAC,oBACAC,kBAEAC,eAGCZ,aAAO,EAAPA,EAASa,UACJC,QAAQC,QAAQ,KAAKX,WAAWY,MAAMhB,EAAQa,WAGhD,KAAKT,WAAWa,cAAcC,MAAK,SAACL,GACzC,OAAOX,EAAKE,WAAWY,MAAMH,EAC/B,GACF,EAMAM,OAAAC,eAAWrB,EAAA,WAAQ,C,IAAnB,WACE,OAAO,KAAKO,QACd,E,gCACFP,CAAA,CAlDA,GAAasB,EAAAA,IAAAtB,EAoDb,IAAIuB,EAA+B,GAWnCD,EAAAA,KAAA,SAA2BrB,G,6EAEnBuB,GAAO,IAAIC,MAAOC,cAExB,IAoCE,OAnCK,EAAA/B,EAAAgC,UAAS1B,KACN2B,GAAM,EAAA9B,EAAA+B,cAAahC,EAAAiC,qBAAqBC,mBAAoB,CAChEP,KAAIA,IAENQ,QAAQC,MAAML,KAGX3B,aAAO,EAAPA,EAASiC,UAAW,EAAAvC,EAAAwC,UAASlC,aAAO,EAAPA,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+B,QAAU5B,QAAQ,a,WCAzBqgC,EAAOz+B,QAAU5B,QAAQ,c,WCAzBqgC,EAAOz+B,QAAU5B,QAAQ,O,WCAzBqgC,EAAOz+B,QAAU5B,QAAQ,2B,WCAzBqgC,EAAOz+B,QAAU5B,QAAQ,O,WCAzBqgC,EAAOz+B,QAAU5B,QAAQ,Q,+mJCCrBsgC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBxxB,IAAjByxB,EACH,OAAOA,EAAa7+B,QAGrB,IAAIy+B,EAASC,EAAyBE,GAAY,CAGjD5+B,QAAS,CAAC,GAOX,OAHA8+B,EAAoBF,GAAUzf,KAAKsf,EAAOz+B,QAASy+B,EAAQA,EAAOz+B,QAAS2+B,GAGpEF,EAAOz+B,OACf,C,iICNA,IAAAsd,EAAAlf,EAAA,MAGS0B,OAAAA,eAAAA,EAAAA,eAAAA,CAAA8gB,YAAA,EAAA3X,IAAA,kBAHAqU,EAAAiB,YAAY,IACrB,IAAAwgB,EAAA3gC,EAAA,MAEoC0B,OAAAA,eAAAA,EAAAA,mBAAAA,CAAA8gB,YAAA,EAAA3X,IAAA,kBAF3B81B,EAAAC,SAAS,IAGlB,IAAAC,EAAA7gC,EAAA,MAAS0B,OAAAA,eAAAA,EAAAA,OAAAA,CAAA8gB,YAAA,EAAA3X,IAAA,kBAAAg2B,EAAA93B,IAAI,IAAErH,OAAAA,eAAAA,EAAAA,SAAAA,CAAA8gB,YAAA,EAAA3X,IAAA,kBAAAg2B,EAAAC,MAAM,G","sources":["webpack://vwo-fme-node-sdk/../../lib/VWO.ts","webpack://vwo-fme-node-sdk/../../lib/VWOBuilder.ts","webpack://vwo-fme-node-sdk/../../lib/VWOClient.ts","webpack://vwo-fme-node-sdk/../../../lib/api/GetFlag.ts","webpack://vwo-fme-node-sdk/../../../lib/api/SetAttribute.ts","webpack://vwo-fme-node-sdk/../../../lib/api/TrackEvent.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/Url.ts","webpack://vwo-fme-node-sdk/../../../lib/constants/index.ts","webpack://vwo-fme-node-sdk/../../../lib/decorators/StorageDecorator.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/ApiEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/CampaignTypeEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/EventEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HeadersEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/HttpMethodEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/PlatformEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StatusEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/StorageEnum.ts","webpack://vwo-fme-node-sdk/../../../lib/enums/UrlEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/enums/log-messages/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/CampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/FeatureModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/ImpactCampaignModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/MetricModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/RuleModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariableModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/campaign/VariationModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/schemas/SettingsSchemaValidation.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/settings/SettingsModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/models/user/ContextVWOModel.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/decision-maker/index.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/LogMessageBuilder.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/Logger.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/core/LogManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/core/TransportManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/enums/LogLevelEnum.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/logger/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/logger/transports/ConsoleTransport.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/client/NetworkBrowserClient.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/client/NetworkClient.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/handlers/RequestHandler.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/network-layer/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/manager/NetworkManager.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/GlobalRequestModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/RequestModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/network-layer/models/ResponseModel.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/core/SegmentationManger.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandRegexEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperandValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/enums/SegmentOperatorValueEnum.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/evaluators/SegmentEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/evaluators/SegmentOperandEvaluator.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/segmentation-evaluator/index.ts","webpack://vwo-fme-node-sdk/../../../../../lib/packages/segmentation-evaluator/utils/SegmentUtil.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Connector.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/Storage.ts","webpack://vwo-fme-node-sdk/../../../../lib/packages/storage/index.ts","webpack://vwo-fme-node-sdk/../../../lib/services/CampaignDecisionService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/HooksService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/SettingsService.ts","webpack://vwo-fme-node-sdk/../../../lib/services/StorageService.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/CampaignUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DataTypeUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/DecisionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/FunctionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/GatewayServiceUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/ImpressionUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/LogMessageUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/MegUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/NetworkUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/PromiseUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/RuleEvaluationUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/SettingsUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UrlUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/UuidUtil.ts","webpack://vwo-fme-node-sdk/../../../lib/utils/XMLUtil.ts","webpack://vwo-fme-node-sdk/external commonjs \"murmurhash\"","webpack://vwo-fme-node-sdk/external commonjs \"superstruct\"","webpack://vwo-fme-node-sdk/external commonjs \"uuid\"","webpack://vwo-fme-node-sdk/external commonjs \"vwo-fme-sdk-log-messages\"","webpack://vwo-fme-node-sdk/external node-commonjs \"http\"","webpack://vwo-fme-node-sdk/external node-commonjs \"https\"","webpack://vwo-fme-node-sdk/webpack/bootstrap","webpack://vwo-fme-node-sdk/../../lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"module.exports = require(\"murmurhash\");","module.exports = require(\"superstruct\");","module.exports = require(\"uuid\");","module.exports = require(\"vwo-fme-sdk-log-messages\");","module.exports = require(\"http\");","module.exports = require(\"https\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n"],"names":["VWOBuilder_1","require","DataTypeUtil_1","PromiseUtil_1","log_messages_1","LogMessageUtil_1","PlatformEnum_1","VWO","options","setInstance","_this","optionsVWOBuilder","vwoBuilder","VWOBuilder","instance","setLogger","setSettingsService","setStorage","setNetworkManager","setSegmentation","initPolling","settings","Promise","resolve","build","getSettings","then","Object","defineProperty","exports","_global","date","Date","toISOString","isObject","msg","buildMessage","ErrorLogMessagesEnum","INIT_OPTIONS_ERROR","console","error","sdkKey","isString","INIT_OPTIONS_SDK_KEY_ERROR","accountId","INIT_OPTIONS_ACCOUNT_ID_ERROR","process","env","platform","PlatformEnum","CLIENT","SERVER","vwoInitDeferred","Deferred","isSettingsFetched","_vwoInstance","err","API_THROW_ERROR","apiName","info","concat","date_1","InfoLogMessagesEnum","ON_INIT_ALREADY_RESOLVED","setTimeout","ON_INIT_SETTINGS_FAILED","reject","Error","promise","logger_1","network_layer_1","segmentation_evaluator_1","storage_1","VWOClient_1","SettingsService_1","FunctionUtil_1","SettingsUtil_1","UuidUtil_1","prototype","networkInstance","NetworkManager","Instance","attachClient","_b","_a","network","client","LogManager","debug","DebugLogMessagesEnum","SERVICE_INITIALIZED","service","getConfig","setDevelopmentMode","_c","isDevelopmentMode","SegmentationManager","attachEvaluator","segmentation","fetchSettings","force","deferredObject","isSettingsFetchInProgress","settingFileManager","originalSettings","storage","Storage","attachConnector","SettingsService","logManager","logger","getRandomUserId","API_CALLED","getRandomUUID","pollInterval","isNumber","INIT_OPTIONS_INVALID","key","correctType","checkAndPoll","vwoInstance","VWOClient","pollingInterval","setInterval","latestSettings","lastSettings","JSON","stringify","clonedSettings","cloneObject","POLLING_SET_SETTINGS","setSettingsAndAddCampaignsToRules","POLLING_NO_CHANGE_IN_SETTINGS","catch","POLLING_FETCH_SETTINGS_FAILED","GetFlag_1","SetAttribute_1","TrackEvent_1","SettingsSchemaValidation_1","ContextModel_1","HooksService_1","UrlUtil_1","NetworkUtil_1","UrlUtil","init","collectionPrefix","getCollectionPrefix","setShouldWaitForTrackingCalls","shouldWaitForTrackingCalls","CLIENT_INITIALIZED","getFlag","featureKey","context","errorReturnSchema","isEnabled","getVariables","getVariable","_key","defaultValue","hooksService","default","API_INVALID_PARAM","type","getType","TypeError","SettingsSchema","isSettingsValid","API_SETTING_INVALID","id","API_CONTEXT_INVALID","contextModel","ContextModel","modelFromDictionary","FlagApi","get","data","trackEvent","eventName","eventProperties","TrackApi","track","setAttribute","attributeKey","attributeValue","isBoolean","SetAttributeApi","sent","err_1","StorageDecorator_1","ApiEnum_1","CampaignTypeEnum_1","CampaignModel_1","VariableModel_1","StorageService_1","CampaignUtil_1","DecisionUtil_1","ImpressionUtil_1","RuleEvaluationUtil_1","rolloutVariationToReturn","experimentVariationToReturn","shouldCheckForExperimentsRules","passedRulesInformation","evaluatedFeatureMap","Map","feature","getFeatureFromKey","decision","featureName","getName","featureId","getId","getKey","userId","api","ApiEnum","GET_FLAG","storageService","StorageService","StorageDecorator","getFeatureFromStorage","storedData","_k","experimentVariationId","experimentKey","variation_1","getVariationFromCampaignKey","STORED_VARIATION_FOUND","variationKey","experimentType","find","variable","VariableModel","getValue","rolloutKey","rolloutId","variation","rolloutVariationId","EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED","featureInfo","set","assign","undefined","setContextualData","FEATURE_NOT_FOUND","rollOutRules","getSpecificRulesBasedOnType","CampaignTypeEnum","ROLLOUT","length","rolloutRulesToEvaluate","rollOutRules_1","_i","rule","evaluateRule","preSegmentationResult","updatedDecision","push","_d","getVariations","passedRolloutCampaign","CampaignModel","evaluateTrafficAndGetVariation","keys","_updateIntegrationsDecisionObject","getShouldWaitForTrackingCalls","createAndSendImpressionForVariationShown","EXPERIMENTS_EVALUATION_WHEN_NO_ROLLOUT_PRESENT","experimentRulesToEvaluate","experimentRules","getAllExperimentRules","megGroupWinnerCampaigns","experimentRules_1","whitelistedObject","experimentId","variationId","campaign","setDataInStorage","__assign","execute","_e","getImpactCampaign","getCampaignId","IMPACT_ANALYSIS","status","_f","_g","variablesForEvaluatedFlag","_j","_h","variables","value","EventEnum_1","createImpressionForAttribute","__awaiter","properties","getEventsBaseProperties","EventEnum","VWO_SYNC_VISITOR_PROP","encodeURIComponent","getUserAgent","getIpAddress","payload","getAttributePayloadData","sendPostApiRequest","doesEventBelongToAnyFeature","createImpressionForTrack","TRACK","EVENT_NOT_FOUND","getTrackGoalPayloadData","HTTP","HTTPS","packageFile","Url_1","name","version","SDK_VERSION","SDK_NAME","PLATFORM","MAX_TRAFFIC_PERCENT","MAX_TRAFFIC_VALUE","STATUS_RUNNING","SEED_VALUE","MAX_EVENTS_PER_REQUEST","DEFAULT_REQUEST_TIME_INTERVAL","DEFAULT_EVENTS_PER_REQUEST","SEED_URL","HTTP_PROTOCOL","HTTPS_PROTOCOL","SETTINGS","SETTINGS_EXPIRY","SETTINGS_TIMEOUT","HOST_NAME","SETTINTS_ENDPOINT","LOCATION_ENDPOINT","VWO_FS_ENVIRONMENT","RANDOM_ALGO","API_VERSION","VWO_META_MEG_KEY","StorageEnum_1","getDataInStorage","campaignMap","StorageEnum","STORAGE_UNDEFINED","NO_DATA_FOUND","INCORRECT_DATA","CAMPAIGN_PAUSED","VARIATION_NOT_FOUND","WHITELISTED_VARIATION","STORING_DATA_ERROR","HeadersEnum","HttpMethodEnum","StatusEnum","UrlEnum","messages","debugMessages","infoMessages","errorMessages","MetricModel_1","VariationModel_1","variations","metrics","copy","campaignModel","processCampaignKeys","processCampaignProperties","constructor","forEach","VariationModel","metric","MetricModel","percentTraffic","campaignId","ruleKey","isForcedVariationEnabled","isUserListEnabled","segments","getSegments","getTraffic","getIsForcedVariationEnabled","getIsUserListEnabled","getMetrics","getRuleKey","ImpactCampaignModel_1","RuleModel_1","FeatureModel","m","rules","impactCampaign","rulesLinkedCampaign","isGatewayServiceRequired","ImpactCapmaignModel","metricList","ruleList","RuleModel","linkedCampaignList","getRules","getRulesLinkedCampaign","setRulesLinkedCampaign","getIsGatewayServiceRequired","setIsGatewayServiceRequired","identifier","i","t","getIdentifier","getVariationId","getStatus","val","k","setValue","setKey","setType","n","weight","w","setStartRange","startRangeVariation","setEndRange","endRangeVariation","seg","startRange","endRange","setWeight","getWeight","getStartRangeVariation","getEndRangeVariation","superstruct_1","initializeSchemas","campaignMetricSchema","object","union","number","string","mca","optional","hasProps","boolean","revenueProp","variableObjectSchema","campaignVariationSchema","array","campaignObjectSchema","isAlwaysCheckSegment","ruleSchema","featureSchema","settingsSchema","features","campaigns","groups","campaignGroups","validate","FeatureModel_1","SettingsModel","f","c","cG","g","sK","a","v","getFeatures","getCampaigns","getSdkkey","getAccountId","getVersion","getCampaignGroups","getGroups","ContextVWOModel_1","userAgent","ipAddress","customVariables","variationTargetingVariables","_vwo","ContextVWOModel","toString","getCustomVariables","setCustomVariables","getVariationTargetingVariables","setVariationTargetingVariables","getVwo","setVwo","location","getLocation","getUaInfo","Hasher","DecisionMaker","generateBucketValue","hashValue","maxValue","multiplier","multipliedValue","Math","pow","floor","getBucketValueForUser","hashKey","v3","calculateBucketValue","str","generateHashValue","LogLevelEnum_1","AnsiColorEnum","LogMessageBuilder","loggerConfig","transportConfig","prefix","dateTimeFormat","formatMessage","level","message","getFormattedLevel","getFormattedPrefix","getFormattedDateTime","isAnsiColorEnabled","LogLevelColorInfoEnum","upperCaseLevel","toUpperCase","LogLevelEnum","TRACE","DEBUG","INFO","WARN","ERROR","uuid_1","Logger_1","ConsoleTransport_1","TransportManager_1","_super","config","call","requestId","v4","isAlwaysNewInstance","transportManager","LogTransportManager","handleTransports","__extends","transports","addTransports","transport","addTransport","ConsoleTransport","trace","log","warn","Logger","LogLevelNumberEnum","LogMessageBuilder_1","shouldLog","transportLevel","configLevel","formattedMessage","isFunction","LogManager_1","enumerable","consoleLog","XMLUtil_1","ResponseModel_1","NetworkBrowserClient","GET","requestModel","deferred","networkOptions","getOptions","responseModel","ResponseModel","sendGetCall","successCallback","setData","errorCallback","setError","POST","request","sendPostCall","http","https","NetworkClient","req","scheme","res","setStatusCode","statusCode","contentType","headers","rawData","test","resume","setEncoding","on","chunk","parsedData","parse","getStatusCode","error_1","getBody","write","body","end","RequestHandler","createRequest","getBaseUrl","getUrl","setUrl","getTimeout","setBody","setHeaders","getHeaders","requestQueryParams","getQuery","configQueryParams","queryKey","hasOwnProperty","setQuery","NetworkManager_1","GlobalRequestModel_1","GlobalRequestModel","RequestModel_1","RequestModel","RequestHandler_1","setConfig","response","errorResponse","post","url","query","timeout","setBaseUrl","getDevelopmentMode","HttpMethodEnum_1","method","path","port","getMethod","setMethod","getScheme","setScheme","getPort","setPort","getPath","setPath","queryParams","split","hostname","agent","postBody","Buffer","TextEncoder","encode","byteLength","charAt","substring","getData","getError","SegmentEvaluator_1","GatewayServiceUtil_1","UrlEnum_1","evaluator","SegmentEvaluator","isGatewayServiceProvided","isUndefined","params","getQueryParams","getFromGatewayService","GET_USER_DATA","validateSegmentation","dsl","isSegmentationValid","SegmentOperandRegexEnum","SegmentOperandValueEnum","SegmentOperatorValueEnum","SegmentOperatorValueEnum_1","SegmentUtil_1","SegmentOperandEvaluator_1","getKeyValue","subDsl","NOT","AND","OR","CUSTOM_VARIABLE","USER","UA","every","some","SegmentOperandEvaluator","evaluateCustomVariableDSL","evaluateUserDSL","evaluateUserAgentDSL","dslNodes","uaParserMap","keyCount","isUaParser","dslNodes_1","OPERATING_SYSTEM","BROWSER_AGENT","DEVICE_TYPE","DEVICE","Array","isArray","FEATURE_ID","featureIdObject","featureIdKey_1","featureIdValue","this_1","parseInt","checkInUserStorage","result","checkUserAgentParser","locationMap","dslNodes_2","COUNTRY","REGION","CITY","addLocationValuesToMap","checkLocationPreSegmentation","valuesMatch","checkValuePresent","expectedMap","actualMap","expectedValues_2","index","toLowerCase","actualValue","expectedValues_1","startsWith","endsWith","wildcardPattern","slice","RegExp","replace","includes","expectedLocationMap","userLocation","entries","normalizedValue1","normalizeValue","normalizedValue2","trim","SegmentOperandValueEnum_1","SegmentOperandRegexEnum_1","dslOperandValue","operandKey","operand","listIdRegex","match","tagValue","preProcessTagValue","listId","queryParamsObj","attribute","ATTRIBUTE_CHECK","preProcessOperandValue","operandType","operandValue","processedValues","processValues","extractResult","users","_vwoUserId","decodeURIComponent","matchWithRegex","LOWER_MATCH","LOWER_VALUE","extractOperandValue","WILDCARD_MATCH","startingStar","STARTING_STAR","endingStar","ENDING_STAR","STARTING_ENDING_STAR_VALUE","STARTING_STAR_VALUE","ENDING_STAR_VALUE","REGEX_MATCH","REGEX_VALUE","GREATER_THAN_MATCH","GREATER_THAN_VALUE","GREATER_THAN_EQUAL_TO_MATCH","GREATER_THAN_EQUAL_TO_VALUE","LESS_THAN_MATCH","LESS_THAN_VALUE","LESS_THAN_EQUAL_TO_MATCH","LESS_THAN_EQUAL_TO_VALUE","EQUAL_VALUE","regex","processedOperandValue","parseFloat","processedTagValue","indexOf","SegmentationManger_1","obj","connector","getConnector","Storage_1","decision_maker_1","constants_1","CampaignDecisionService","isUserPartOfCampaign","trafficAllocation","PERSONALIZE","valueAssignedToUser","isUserPart","USER_PART_OF_CAMPAIGN","notPart","campaignKey","AB","getVariation","bucketValue","checkInRange","bucketUserToVariation","Constants","USER_BUCKET_TO_VARIATION","getPreSegmentationDecision","campaignType","SEGMENTATION_SKIP","SEGMENTATION_STATUS","getVariationAlloted","HooksService","callback","integrations","isCallBackFunction","expiry","networkTimeout","gatewayService","parsedUrl","URL","protocol","setSettingsExpiry","settingsTimeout","fetchSettingsAndCacheInStorage","clearTimeout","SETTINGS_FETCH_ERROR","getSettingsPath","s","forceFetch","fetchedSettings","SETTINGS_FETCH_SUCCESS","SETTINGS_SCHEMA_INVALID","storageData","storageInstance","isNull","STORED_DATA_ERROR","assignRangeValues","currentAllocation","stepFactor","_getVariationBucketRange","getGroupDetailsIfCampaignPartOfIt","campaignToCheck","groupId","groupName","assignRangeValuesMEG","variationWeight","ceil","min","VARIATION_RANGE_ALLOCATION","_handleRolloutCampaign","currentAllocation_1","totalWeight","reduce","acc","equalWeight_1","ruleArray","group","findIndex","grp","campaignIdWithVariation","featureKeys","map","Number","campaignIdWithVariation_1","campaignIds","isNaN","isDate","isRegex","isPromise","StatusEnum_1","CampaignDecisionService_1","DataTypeUtil_2","MegUtil_1","vwoUserId","getUUID","_checkCampaignWhitelisting","whitelistedVariation","WHITELISTING_SKIP","groupWinnerCampaignId","MEG_CAMPAIGN_FOUND_IN_STORAGE","isPreSegmentationPassed","evaluateGroups","winnerCampaign","USER_CAMPAIGN_BUCKET_INFO","_evaluateWhitelisting","whitelistingResult","PASSED","FAILED","variationString","WHITELISTING_STATUS","targetedVariations","promises","SegmentEvaluatorResult","evaluationResult","all","scaleVariationWeights","getBucketingSeed","variationName","random","filter","rulesLinkedCampaignModel","linkedCampaign","endpoint","GATEWAY_URL_ERROR","encodedParams","encodedValue","String","pattern","rules_1","matches","VWO_VARIATION_SHOWN","getTrackUserPayloadData","nargs","template","getFeatureKeysFromGroup","groupCampaignIds","getCampaignsByGroupId","getFeatureKeysFromCampaignIds","featureToSkip","feature_1","_isRolloutRuleForFeaturePassed","has","item","featureKeys_1","_getEligbleCampaigns","eligibleCampaigns","eligibleCampaignsWithStorage","_findWinnerCampaignAmongEligibleCampaigns","ruleToTestForTraffic","MEG_SKIP_ROLLOUT_EVALUATE_EXPERIMENTS","inEligibleCampaigns","campaignMapArray","from","campaignMapArray_1","MEG_CAMPAIGN_ELIGIBLE","campaigns_1","getCampaignIdsFromFeatureKey","megAlgoNumber","et","MEG_WINNER_CAMPAIGN","algo","_normalizeWeightsAndFindWinningCampaign","_getCampaignUsingAdvancedAlgo","shortlistedCampaigns","calledCampaignIds","round","setCampaignAllocation","found","priorityOrder","p","wt","j","participatingCampaignList","clonedCampaign","HeadersEnum_1","_getEventBasePayload","visitorUserAgent","uuid","props","vwo_sdkName","vwo_sdkVersion","vwo_envKey","d","msgId","getCurrentUnixTimestampInMillis","visId","sessionId","getCurrentUnixTimestamp","visitor_ua","visitor_ip","event","time","visitor","vwo_fs_environment","sId","u","r","event_type","account_id","uId","sdk","getRandomNumber","ap","ed","sd","sv","setting","en","eTime","EVENTS","isFirst","IMPRESSION_FOR_TRACK_USER","isCustomEvent","prop","USER_AGENT","IP","NETWORK_CALL_FAILED","checkWhitelistingAndPreSeg","SettingsModel_1","vwoClientInstance","setVariationAllocation","addLinkedCampaignsToSettings","addIsGatewayServiceRequiredFlag","baseUrl","uuid_2","generateUUID","namespace","v5","DNS","VWO_NAMESPACE","userIdNamespace","uuidForUserIdAccountId","noop","sendRequest","customHeaders","xhr","XMLHttpRequest","headerName","onload","responseText","parsedResponse","statusText","onerror","ontimeout","open","setRequestHeader","send","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","Connector_1","Connector","VWO_1","onInit"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/types/VWOBuilder.d.ts b/dist/types/VWOBuilder.d.ts index 6f222b0..ad4f11d 100644 --- a/dist/types/VWOBuilder.d.ts +++ b/dist/types/VWOBuilder.d.ts @@ -17,18 +17,17 @@ import { dynamic } from './types/Common'; import { ILogManager } from './packages/logger'; import { Storage } from './packages/storage'; import { IVWOClient } from './VWOClient'; -import { SettingsModel } from './models/settings/SettingsModel'; import { IVWOOptions } from './models/VWOOptionsModel'; export interface IVWOBuilder { - settings: SettingsModel; + settings: Record; storage: Storage; logManager: ILogManager; isSettingsFetchInProgress: boolean; vwoInstance: IVWOClient; - build(settings: SettingsModel): IVWOClient; - fetchSettings(): Promise; + build(settings: Record): IVWOClient; + fetchSettings(): Promise>; setSettingsService(): this; - getSettings(force: boolean): Promise; + getSettings(force: boolean): Promise>; setStorage(): this; setNetworkManager(): this; initPolling(): this; @@ -39,7 +38,7 @@ export declare class VWOBuilder implements IVWOBuilder { readonly sdkKey: string; readonly options: IVWOOptions; private settingFileManager; - settings: SettingsModel; + settings: Record; storage: Storage; logManager: ILogManager; originalSettings: dynamic; @@ -61,13 +60,13 @@ export declare class VWOBuilder implements IVWOBuilder { * @param {boolean} [force=false] - Force fetch ignoring cache. * @returns {Promise} A promise that resolves to the fetched settings. */ - fetchSettings(force?: boolean): Promise; + fetchSettings(force?: boolean): Promise>; /** * Gets the settings, fetching them if not cached or if forced. * @param {boolean} [force=false] - Force fetch ignoring cache. * @returns {Promise} A promise that resolves to the settings. */ - getSettings(force?: boolean): Promise; + getSettings(force?: boolean): Promise>; /** * Sets the storage connector based on the provided storage options. * @returns {this} The instance of this builder. @@ -106,7 +105,7 @@ export declare class VWOBuilder implements IVWOBuilder { * @param {SettingsModel} settings - The settings for the VWOClient. * @returns {VWOClient} The new VWOClient instance. */ - build(settings: SettingsModel): IVWOClient; + build(settings: Record): IVWOClient; /** * Checks and polls for settings updates at the provided interval. */ diff --git a/dist/types/VWOClient.d.ts b/dist/types/VWOClient.d.ts index 4595e72..3e0ef15 100644 --- a/dist/types/VWOClient.d.ts +++ b/dist/types/VWOClient.d.ts @@ -5,6 +5,7 @@ import { IVWOOptions } from './models/VWOOptionsModel'; export interface IVWOClient { readonly options?: IVWOOptions; settings: SettingsModel; + originalSettings: Record; getFlag(featureKey: string, context: Record): Record; trackEvent( eventName: string, @@ -21,7 +22,7 @@ export declare class VWOClient implements IVWOClient { settings: SettingsModel; originalSettings: Record; storage: Storage; - constructor(settings: SettingsModel, options: IVWOOptions); + constructor(settings: Record, options: IVWOOptions); options?: IVWOOptions; /** * Retrieves the value of a feature flag for a given feature key and context. diff --git a/dist/types/models/VWOOptionsModel.d.ts b/dist/types/models/VWOOptionsModel.d.ts index 29cb6e7..3c49d22 100644 --- a/dist/types/models/VWOOptionsModel.d.ts +++ b/dist/types/models/VWOOptionsModel.d.ts @@ -38,6 +38,7 @@ export interface IVWOOptions { network?: INetworkOptions; platform?: string; shouldWaitForTrackingCalls?: boolean; + settings?: Record; vwoBuilder?: IVWOBuilder; } export declare class VWOOptionsModel implements IVWOOptions { @@ -52,6 +53,7 @@ export declare class VWOOptionsModel implements IVWOOptions { integrations?: IIntegrationOptions; network?: INetworkOptions; shouldWaitForTrackingCalls?: boolean; + settings?: Record; vwoBuilder?: IVWOBuilder; modelFromDictionary(options: VWOOptionsModel): this; getAccountId(): string; @@ -64,5 +66,6 @@ export declare class VWOOptionsModel implements IVWOOptions { getSegmentation(): SegmentEvaluator; getNetwork(): INetworkOptions; getVWOBuilder(): IVWOBuilder; + getSettings(): Record; } export {}; diff --git a/dist/types/services/SettingsService.d.ts b/dist/types/services/SettingsService.d.ts index e9e75c4..f9228de 100644 --- a/dist/types/services/SettingsService.d.ts +++ b/dist/types/services/SettingsService.d.ts @@ -1,24 +1,7 @@ -/** - * Copyright 2024 Wingify Software Pvt. Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { dynamic } from '../types/Common'; -import { SettingsModel } from '../models/settings/SettingsModel'; interface ISettingsService { sdkKey: string; - getSettings(forceFetch: boolean): Promise; - fetchSettings(): Promise; + getSettings(forceFetch: boolean): Promise>; + fetchSettings(): Promise>; } export declare class SettingsService implements ISettingsService { sdkKey: string; @@ -34,7 +17,7 @@ export declare class SettingsService implements ISettingsService { static get Instance(): SettingsService; private setSettingsExpiry; private fetchSettingsAndCacheInStorage; - fetchSettings(): Promise; - getSettings(forceFetch?: boolean): Promise; + fetchSettings(): Promise>; + getSettings(forceFetch?: boolean): Promise>; } export {}; diff --git a/dist/types/utils/SettingsUtil.d.ts b/dist/types/utils/SettingsUtil.d.ts index 6b83cd5..99f994d 100644 --- a/dist/types/utils/SettingsUtil.d.ts +++ b/dist/types/utils/SettingsUtil.d.ts @@ -1 +1,22 @@ -export declare function setSettingsAndAddCampaignsToRules(settings: any, vwoClientInstance: any): void; +/** + * Copyright 2024 Wingify Software Pvt. Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { IVWOClient } from './../VWOClient'; +/** + * Sets settings and adds campaigns to rules + * @param settings settings + * @param vwoClientInstance VWOClient instance + */ +export declare function setSettingsAndAddCampaignsToRules(settings: any, vwoClientInstance: IVWOClient): void; diff --git a/lib/VWO.ts b/lib/VWO.ts index 05739f9..3bb12a6 100644 --- a/lib/VWO.ts +++ b/lib/VWO.ts @@ -16,7 +16,6 @@ import { VWOBuilder } from './VWOBuilder'; import { IVWOClient } from './VWOClient'; import { IVWOOptions } from './models/VWOOptionsModel'; -import { SettingsModel } from './models/settings/SettingsModel'; import { dynamic } from './types/Common'; import { isObject, isString } from './utils/DataTypeUtil'; import { Deferred } from './utils/PromiseUtil'; @@ -59,7 +58,11 @@ export class VWO { .initPolling(); // Starts polling mechanism for regular updates. // .setAnalyticsCallback() // Sets up analytics callback for data analysis. - return this.vwoBuilder.getSettings().then((settings: SettingsModel) => { + if (options?.settings) { + return Promise.resolve(this.vwoBuilder.build(options.settings)); + } + + return this.vwoBuilder.getSettings().then((settings: Record) => { return this.vwoBuilder.build(settings); // Builds the VWO instance with the fetched settings. }); } diff --git a/lib/VWOBuilder.ts b/lib/VWOBuilder.ts index c1506ae..26f799a 100644 --- a/lib/VWOBuilder.ts +++ b/lib/VWOBuilder.ts @@ -35,17 +35,17 @@ import { setSettingsAndAddCampaignsToRules } from './utils/SettingsUtil'; import { getRandomUUID } from './utils/UuidUtil'; export interface IVWOBuilder { - settings: SettingsModel; // Holds the configuration settings for the VWO client + settings: Record; // Holds the configuration settings for the VWO client storage: Storage; // Interface for storage management logManager: ILogManager; // Manages logging across the VWO SDK isSettingsFetchInProgress: boolean; // Flag to check if settings fetch is in progress vwoInstance: IVWOClient; - build(settings: SettingsModel): IVWOClient; // Builds and returns a new VWOClient instance + build(settings: Record): IVWOClient; // Builds and returns a new VWOClient instance - fetchSettings(): Promise; // Asynchronously fetches settings from the server + fetchSettings(): Promise>; // Asynchronously fetches settings from the server setSettingsService(): this; // Sets up the settings manager with provided options - getSettings(force: boolean): Promise; // Fetches settings, optionally forcing a refresh + getSettings(force: boolean): Promise>; // Fetches settings, optionally forcing a refresh setStorage(): this; // Sets up the storage connector based on provided options setNetworkManager(): this; // Configures the network manager with client and mode // initBatching(): this; // Initializes event batching with provided configuration @@ -61,7 +61,7 @@ export class VWOBuilder implements IVWOBuilder { private settingFileManager: SettingsService; - settings: SettingsModel; + settings: Record; storage: Storage; logManager: ILogManager; originalSettings: dynamic; @@ -110,13 +110,13 @@ export class VWOBuilder implements IVWOBuilder { * @param {boolean} [force=false] - Force fetch ignoring cache. * @returns {Promise} A promise that resolves to the fetched settings. */ - fetchSettings(force?: boolean): Promise { + fetchSettings(force?: boolean): Promise> { const deferredObject = new Deferred(); // Check if a fetch operation is already in progress if (!this.isSettingsFetchInProgress) { this.isSettingsFetchInProgress = true; - this.settingFileManager.getSettings(force).then((settings: SettingsModel) => { + this.settingFileManager.getSettings(force).then((settings: Record) => { // if force is false, update original settings, if true the request is from polling and no need to update original settings if (!force) { this.originalSettings = settings; @@ -138,7 +138,7 @@ export class VWOBuilder implements IVWOBuilder { * @param {boolean} [force=false] - Force fetch ignoring cache. * @returns {Promise} A promise that resolves to the settings. */ - getSettings(force?: boolean): Promise { + getSettings(force?: boolean): Promise> { const deferredObject = new Deferred(); try { @@ -148,7 +148,7 @@ export class VWOBuilder implements IVWOBuilder { deferredObject.resolve(this.settings); } else { // Fetch settings if not cached or forced - this.fetchSettings(force).then((settings: SettingsModel) => { + this.fetchSettings(force).then((settings: Record) => { deferredObject.resolve(settings); }); } @@ -323,7 +323,7 @@ export class VWOBuilder implements IVWOBuilder { * @param {SettingsModel} settings - The settings for the VWOClient. * @returns {VWOClient} The new VWOClient instance. */ - build(settings: SettingsModel): IVWOClient { + build(settings: Record): IVWOClient { this.vwoInstance = new VWOClient(settings, this.options); return this.vwoInstance; diff --git a/lib/VWOClient.ts b/lib/VWOClient.ts index 82684f6..8efba33 100644 --- a/lib/VWOClient.ts +++ b/lib/VWOClient.ts @@ -43,6 +43,7 @@ import { setShouldWaitForTrackingCalls } from './utils/NetworkUtil'; export interface IVWOClient { readonly options?: IVWOOptions; settings: SettingsModel; + originalSettings: Record; getFlag(featureKey: string, context: Record): Record; trackEvent( @@ -62,7 +63,7 @@ export class VWOClient implements IVWOClient { originalSettings: Record; storage: Storage; - constructor(settings: SettingsModel, options: IVWOOptions) { + constructor(settings: Record, options: IVWOOptions) { this.options = options; setSettingsAndAddCampaignsToRules(settings, this); diff --git a/lib/models/VWOOptionsModel.ts b/lib/models/VWOOptionsModel.ts index bec5bfe..8f20399 100644 --- a/lib/models/VWOOptionsModel.ts +++ b/lib/models/VWOOptionsModel.ts @@ -42,6 +42,7 @@ export interface IVWOOptions { network?: INetworkOptions; platform?: string; shouldWaitForTrackingCalls?: boolean; + settings?: Record; vwoBuilder?: IVWOBuilder; } @@ -58,6 +59,7 @@ export class VWOOptionsModel implements IVWOOptions { integrations?: IIntegrationOptions; network?: INetworkOptions; shouldWaitForTrackingCalls?: boolean; + settings?: Record; vwoBuilder?: IVWOBuilder; @@ -94,6 +96,10 @@ export class VWOOptionsModel implements IVWOOptions { this.network = options.network; } + if (options?.settings) { + this.settings = options.settings; + } + return this; } @@ -136,4 +142,8 @@ export class VWOOptionsModel implements IVWOOptions { getVWOBuilder(): IVWOBuilder { return this.vwoBuilder; } + + getSettings(): Record { + return this.settings; + } } diff --git a/lib/services/SettingsService.ts b/lib/services/SettingsService.ts index 2034786..3aa0d09 100644 --- a/lib/services/SettingsService.ts +++ b/lib/services/SettingsService.ts @@ -25,16 +25,15 @@ import { HTTPS_PROTOCOL, HTTP_PROTOCOL } from '../constants/Url'; import { HttpMethodEnum } from '../enums/HttpMethodEnum'; import { DebugLogMessagesEnum, ErrorLogMessagesEnum, InfoLogMessagesEnum } from '../enums/log-messages'; import { SettingsSchema } from '../models/schemas/SettingsSchemaValidation'; -import { SettingsModel } from '../models/settings/SettingsModel'; import { buildMessage } from '../utils/LogMessageUtil'; import { getSettingsPath } from '../utils/NetworkUtil'; interface ISettingsService { sdkKey: string; - getSettings(forceFetch: boolean): Promise; + getSettings(forceFetch: boolean): Promise>; - fetchSettings(): Promise; + fetchSettings(): Promise>; } export class SettingsService implements ISettingsService { @@ -134,7 +133,7 @@ export class SettingsService implements ISettingsService { return deferredObject.promise; } - fetchSettings(): Promise { + fetchSettings(): Promise> { const deferredObject = new Deferred(); if (!this.sdkKey || !this.accountId) { @@ -186,11 +185,11 @@ export class SettingsService implements ISettingsService { } } - getSettings(forceFetch = false): Promise { + getSettings(forceFetch = false): Promise> { const deferredObject = new Deferred(); if (forceFetch) { - this.fetchSettingsAndCacheInStorage().then((settings) => { + this.fetchSettingsAndCacheInStorage().then((settings: Record) => { deferredObject.resolve(settings); }); } else { @@ -219,7 +218,7 @@ export class SettingsService implements ISettingsService { // }); // }); // } else { - this.fetchSettingsAndCacheInStorage().then((fetchedSettings) => { + this.fetchSettingsAndCacheInStorage().then((fetchedSettings: Record) => { const isSettingsValid = new SettingsSchema().isSettingsValid(fetchedSettings); if (isSettingsValid) { LogManager.Instance.info(InfoLogMessagesEnum.SETTINGS_FETCH_SUCCESS); diff --git a/lib/utils/SettingsUtil.ts b/lib/utils/SettingsUtil.ts index 52f7852..c907cc9 100644 --- a/lib/utils/SettingsUtil.ts +++ b/lib/utils/SettingsUtil.ts @@ -13,12 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { IVWOClient } from './../VWOClient'; import { SettingsModel } from '../models/settings/SettingsModel'; import { setVariationAllocation } from './CampaignUtil'; import { addLinkedCampaignsToSettings } from './FunctionUtil'; import { addIsGatewayServiceRequiredFlag } from './GatewayServiceUtil'; -export function setSettingsAndAddCampaignsToRules(settings, vwoClientInstance) { +/** + * Sets settings and adds campaigns to rules + * @param settings settings + * @param vwoClientInstance VWOClient instance + */ +export function setSettingsAndAddCampaignsToRules(settings: any, vwoClientInstance: IVWOClient) { + // create settings model and set it to vwoClientInstance vwoClientInstance.settings = new SettingsModel(settings); vwoClientInstance.originalSettings = settings; // Optimize loop by avoiding multiple calls to `getCampaigns()`