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AAO,eAAe,QAAS,cAAe,CAC5C,YAAY,EACZ,IAAK,WAAc,OAAO,WAAW,WAAa,IAEpD,OAAO,eAAe,QAAS,YAAa,CAC1C,YAAY,EACZ,IAAK,WAAc,OAAO,WAAW,SAAW,IAElD,QAAQ,kBAAoB,kBAC5B,QAAQ,0BAA4B,0BACpC,QAAQ,0BAA4B,0BACpC,QAAQ,qBAAuB,qBAC/B,QAAQ,kBAAoB,kBAC5B,QAAQ,mBAAqB,mBAC7B,QAAQ,oBAAsB,oBAC9B,QAAQ,eAAiB,eACzB,QAAQ,uBAAyB,uBACjC,QAAQ,YAAc,YACtB,QAAQ,cAAgB,cACxB,QAAQ,WAAa,WACrB,QAAQ,cAAgB,cACxB,QAAQ,eAAiB","file":"/npm/@optimizely/react-sdk@3.3.1/dist/react-sdk.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@optimizely/react-sdk@3.3.1/dist/react-sdk.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar React = require('react');\nvar optimizely = require('@optimizely/optimizely-sdk');\nvar hoistNonReactStatics = require('hoist-non-react-statics');\n\nfunction _interopNamespaceDefault(e) {\n  var n = Object.create(null);\n  if (e) {\n    Object.keys(e).forEach(function (k) {\n      if (k !== 'default') {\n        var d = Object.getOwnPropertyDescriptor(e, k);\n        Object.defineProperty(n, k, d.get ? d : {\n          enumerable: true,\n          get: function () { return e[k]; }\n        });\n      }\n    });\n  }\n  n.default = e;\n  return Object.freeze(n);\n}\n\nvar React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);\nvar optimizely__namespace = /*#__PURE__*/_interopNamespaceDefault(optimizely);\n\n/**\n * Copyright 2018-2019, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar OptimizelyContext = React.createContext({\n    optimizely: null,\n    isServerSide: false,\n    timeout: 0,\n});\nvar OptimizelyContextConsumer = OptimizelyContext.Consumer;\nvar OptimizelyContextProvider = OptimizelyContext.Provider;\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n/**\n * Copyright 2019, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction areUsersEqual(user1, user2) {\n    if (user1.id !== user2.id) {\n        return false;\n    }\n    var user1Attributes = user1.attributes || {};\n    var user2Attributes = user2.attributes || {};\n    var user1Keys = Object.keys(user1Attributes);\n    var user2Keys = Object.keys(user2Attributes);\n    if (user1Keys.length !== user2Keys.length) {\n        return false;\n    }\n    for (var _i = 0, user1Keys_1 = user1Keys; _i < user1Keys_1.length; _i++) {\n        var key = user1Keys_1[_i];\n        if (user1Attributes[key] !== user2Attributes[key]) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction hoistStaticsAndForwardRefs(Target, Source, displayName) {\n    // Make sure to hoist statics and forward any refs through from Source to Target\n    // From the React docs:\n    //   https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n    //   https://reactjs.org/docs/forwarding-refs.html#forwarding-refs-in-higher-order-components\n    var forwardRef = function (props, ref) { return React__namespace.createElement(Target, __assign({}, props, { forwardedRef: ref })); };\n    forwardRef.displayName = \"\".concat(displayName, \"(\").concat(Source.displayName || Source.name, \")\");\n    return hoistNonReactStatics(React__namespace.forwardRef(forwardRef), Source);\n}\nfunction coerceUnknownAttrsValueForComparison(maybeAttrs) {\n    if (typeof maybeAttrs === 'object' && maybeAttrs !== null) {\n        return maybeAttrs;\n    }\n    return {};\n}\n/**\n * Equality check applied to override user attributes passed into hooks. Used to determine when we need to recompute\n * a decision because a new set of override attributes was passed into a hook.\n * @param {UserAttributes|undefined} oldAttrs\n * @param {UserAttributes|undefined} newAttrs\n * @returns boolean\n */\nfunction areAttributesEqual(maybeOldAttrs, maybeNewAttrs) {\n    var oldAttrs = coerceUnknownAttrsValueForComparison(maybeOldAttrs);\n    var newAttrs = coerceUnknownAttrsValueForComparison(maybeNewAttrs);\n    var oldAttrsKeys = Object.keys(oldAttrs);\n    var newAttrsKeys = Object.keys(newAttrs);\n    if (oldAttrsKeys.length !== newAttrsKeys.length) {\n        // Different attr count - must update\n        return false;\n    }\n    return oldAttrsKeys.every(function (oldAttrKey) {\n        return oldAttrKey in newAttrs && oldAttrs[oldAttrKey] === newAttrs[oldAttrKey];\n    });\n}\nfunction createFailedDecision(flagKey, message, user) {\n    return {\n        enabled: false,\n        flagKey: flagKey,\n        ruleKey: null,\n        variationKey: null,\n        variables: {},\n        reasons: [message],\n        userContext: {\n            id: user.id,\n            attributes: user.attributes,\n        },\n    };\n}\nfunction sprintf(format) {\n    var args = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        args[_i - 1] = arguments[_i];\n    }\n    var i = 0;\n    return format.replace(/%s/g, function () {\n        var arg = args[i++];\n        var type = typeof arg;\n        if (type === 'function') {\n            return arg();\n        }\n        else if (type === 'string') {\n            return arg;\n        }\n        else {\n            return String(arg);\n        }\n    });\n}\n\n/**\n * Copyright 2022, 2024, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Notifier = /** @class */ (function () {\n    function Notifier() {\n        this.observers = [];\n    }\n    Notifier.getInstance = function () {\n        if (!Notifier.instance) {\n            Notifier.instance = new Notifier();\n        }\n        return Notifier.instance;\n    };\n    Notifier.prototype.subscribe = function (key, callback) {\n        var _this = this;\n        var subscriptionId = \"key-\".concat(Math.floor(100000 + Math.random() * 999999));\n        this.observers.push({ subscriptionId: subscriptionId, key: key, callback: callback });\n        return function () {\n            var observerIndex = _this.observers.findIndex(function (observer) { return observer.subscriptionId === subscriptionId; });\n            if (observerIndex >= 0) {\n                _this.observers.splice(observerIndex, 1);\n            }\n        };\n    };\n    Notifier.prototype.notify = function (key) {\n        this.observers.filter(function (observer) { return observer.key === key; }).forEach(function (observer) { return observer.callback(); });\n    };\n    return Notifier;\n}());\nvar notifier = Notifier.getInstance();\n\n/**\n * Copyright 2022,2024 Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar logHandler = optimizely__namespace.getLogger('ReactSDK');\nvar logger$2 = {\n    warn: function (msg) {\n        var splat = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            splat[_i - 1] = arguments[_i];\n        }\n        return logHandler.log(optimizely__namespace.enums.LOG_LEVEL.WARNING, sprintf.apply(void 0, __spreadArray([msg], splat, false)));\n    },\n    info: function (msg) {\n        var splat = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            splat[_i - 1] = arguments[_i];\n        }\n        return logHandler.log(optimizely__namespace.enums.LOG_LEVEL.INFO, sprintf.apply(void 0, __spreadArray([msg], splat, false)));\n    },\n    debug: function (msg) {\n        var splat = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            splat[_i - 1] = arguments[_i];\n        }\n        return logHandler.log(optimizely__namespace.enums.LOG_LEVEL.DEBUG, sprintf.apply(void 0, __spreadArray([msg], splat, false)));\n    },\n    error: function (msg) {\n        var splat = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            splat[_i - 1] = arguments[_i];\n        }\n        return logHandler.log(optimizely__namespace.enums.LOG_LEVEL.ERROR, sprintf.apply(void 0, __spreadArray([msg], splat, false)));\n    },\n};\n\n/**\n * Copyright 2019-2024, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar NotReadyReason;\n(function (NotReadyReason) {\n    NotReadyReason[\"TIMEOUT\"] = \"TIMEOUT\";\n    NotReadyReason[\"NO_CLIENT\"] = \"NO_CLIENT\";\n    NotReadyReason[\"USER_NOT_READY\"] = \"USER_NOT_READY\";\n})(NotReadyReason || (NotReadyReason = {}));\nvar REACT_SDK_CLIENT_ENGINE = 'react-sdk';\nvar REACT_SDK_CLIENT_VERSION = '3.3.1';\nvar DefaultUser = {\n    id: null,\n    attributes: {},\n};\nvar DEFAULT_ON_READY_TIMEOUT = 5000;\nvar OptimizelyReactSDKClient = /** @class */ (function () {\n    /**\n     * Creates an instance of OptimizelyReactSDKClient.\n     * @param {optimizely.Config} [config={}]\n     */\n    function OptimizelyReactSDKClient(config) {\n        var _this = this;\n        this.userContext = null;\n        this.onUserUpdateHandlers = [];\n        this.isUserPromiseResolved = false;\n        // Its usually true from the beginning when user is provided as an object in the `OptimizelyProvider`\n        // This becomes more significant when a promise is provided instead.\n        this.isUserReady = false;\n        this.onForcedVariationsUpdateHandlers = [];\n        this.forcedDecisionFlagKeys = new Set();\n        // Is the javascript SDK instance ready.\n        this.isClientReady = false;\n        // We need to add autoupdate listener to the hooks after the instance became fully ready to avoid redundant updates to hooks\n        this.clientAndUserReadyPromiseFulfilled = false;\n        this.isUsingSdkKey = false;\n        this.user = __assign({}, DefaultUser);\n        this.initialConfig = config;\n        var configWithClientInfo = __assign(__assign({}, config), { clientEngine: REACT_SDK_CLIENT_ENGINE, clientVersion: REACT_SDK_CLIENT_VERSION });\n        this.userPromiseResolver = function () { };\n        var userReadyPromise = new Promise(function (resolve) {\n            _this.userPromiseResolver = resolve;\n        });\n        this._client = optimizely__namespace.createInstance(configWithClientInfo);\n        this.isClientReady = !!this.getOptimizelyConfig();\n        this.isUsingSdkKey = !!configWithClientInfo.sdkKey;\n        if (this._client) {\n            var clientReadyPromise = this._client.onReady();\n            this.clientAndUserReadyPromise = Promise.all([userReadyPromise, clientReadyPromise]).then(function (_a) {\n                var userResult = _a[0], clientResult = _a[1];\n                _this.isClientReady = clientResult.success;\n                _this.isUserReady = userResult.success;\n                var clientAndUserReady = _this.isReady();\n                _this.clientAndUserReadyPromiseFulfilled = true;\n                return {\n                    success: clientAndUserReady,\n                    message: clientAndUserReady ? 'Client and user are both ready.' : 'Client or user did not become ready.',\n                };\n            });\n        }\n        else {\n            logger$2.warn('Unable to resolve datafile and user information because Optimizely client failed to initialize.');\n            this.clientAndUserReadyPromise = new Promise(function (resolve) {\n                resolve({\n                    success: false,\n                    reason: NotReadyReason.NO_CLIENT,\n                    message: 'Optimizely client failed to initialize.',\n                });\n            });\n        }\n    }\n    OptimizelyReactSDKClient.prototype.getUserWithOverrides = function (overrideUserId, overrideAttributes) {\n        var id = overrideUserId === undefined ? this.user.id : overrideUserId;\n        var attributes = overrideAttributes === undefined ? this.user.attributes : overrideAttributes;\n        return {\n            id: id,\n            attributes: attributes,\n        };\n    };\n    OptimizelyReactSDKClient.prototype.getIsReadyPromiseFulfilled = function () {\n        return this.clientAndUserReadyPromiseFulfilled;\n    };\n    OptimizelyReactSDKClient.prototype.getIsUsingSdkKey = function () {\n        return this.isUsingSdkKey;\n    };\n    Object.defineProperty(OptimizelyReactSDKClient.prototype, \"odpExplicitlyOff\", {\n        get: function () {\n            var _a;\n            return (_a = this.initialConfig.odpOptions) === null || _a === void 0 ? void 0 : _a.disabled;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    OptimizelyReactSDKClient.prototype.onReady = function (config) {\n        var _this = this;\n        if (config === void 0) { config = {}; }\n        var timeoutId;\n        var timeout = DEFAULT_ON_READY_TIMEOUT;\n        if (config && config.timeout !== undefined) {\n            timeout = config.timeout;\n        }\n        var timeoutPromise = new Promise(function (resolve) {\n            timeoutId = setTimeout(function () {\n                resolve({\n                    success: false,\n                    reason: NotReadyReason.TIMEOUT,\n                    message: 'Failed to initialize before timeout',\n                    dataReadyPromise: _this.clientAndUserReadyPromise,\n                });\n            }, timeout);\n        });\n        return Promise.race([this.clientAndUserReadyPromise, timeoutPromise]).then(function (res) { return __awaiter(_this, void 0, void 0, function () {\n            return __generator(this, function (_a) {\n                clearTimeout(timeoutId);\n                return [2 /*return*/, res];\n            });\n        }); });\n    };\n    OptimizelyReactSDKClient.prototype.getUserContext = function () {\n        if (!this._client) {\n            logger$2.warn('Unable to get user context. Optimizely client not initialized.');\n            return null;\n        }\n        if (!this.userContext) {\n            logger$2.warn('Unable to get user context. User context not set.');\n            return null;\n        }\n        return this.userContext;\n    };\n    OptimizelyReactSDKClient.prototype.setCurrentUserContext = function (userInfo) {\n        if (!this._client) {\n            logger$2.warn(\"Unable to set user context for user ID \".concat(userInfo.id, \". Optimizely client not initialized.\"));\n            return;\n        }\n        if (!this.userContext) {\n            this.userContext = this._client.createUserContext(userInfo.id || undefined, userInfo.attributes);\n            return;\n        }\n        var currentUserContextUserInfo = {\n            id: this.userContext.getUserId(),\n            attributes: this.userContext.getAttributes(),\n        };\n        if (!areUsersEqual(userInfo, currentUserContextUserInfo)) {\n            this.userContext = this._client.createUserContext(userInfo.id || undefined, userInfo.attributes);\n        }\n    };\n    OptimizelyReactSDKClient.prototype.makeUserContextInstance = function (userInfo) {\n        if (!this._client) {\n            logger$2.warn(\"Unable to create user context for \".concat(userInfo.id, \". Optimizely client failed to initialize or not ready.\"));\n            return null;\n        }\n        if (this.userContext && areUsersEqual(userInfo, this.user)) {\n            // Important: We need to return the existing user context instance if the user info is the same\n            // new context misses the forced variation set on the existing context\n            return this.userContext;\n        }\n        return this._client.createUserContext(userInfo.id || undefined, userInfo.attributes);\n    };\n    OptimizelyReactSDKClient.prototype.fetchQualifiedSegments = function (options) {\n        return __awaiter(this, void 0, void 0, function () {\n            var _a;\n            return __generator(this, function (_b) {\n                switch (_b.label) {\n                    case 0:\n                        if (!this.userContext) {\n                            return [2 /*return*/, false];\n                        }\n                        if (this.odpExplicitlyOff || !((_a = this._client) === null || _a === void 0 ? void 0 : _a.isOdpIntegrated())) {\n                            return [2 /*return*/, true];\n                        }\n                        return [4 /*yield*/, this.userContext.fetchQualifiedSegments(options)];\n                    case 1: return [2 /*return*/, _b.sent()];\n                }\n            });\n        });\n    };\n    OptimizelyReactSDKClient.prototype.setUser = function (userInfo) {\n        return __awaiter(this, void 0, void 0, function () {\n            var fetchQualifedSegmentsSucceed;\n            var _this = this;\n            var _a, _b, _c;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0:\n                        // If user id is not present and ODP is explicitly off, user promise will be pending until setUser is called again with proper user id\n                        if (userInfo.id === null && this.odpExplicitlyOff) {\n                            return [2 /*return*/];\n                        }\n                        this.user = {\n                            id: userInfo.id || DefaultUser.id,\n                            attributes: userInfo.attributes || DefaultUser.attributes,\n                        };\n                        if (!(userInfo.id === DefaultUser.id)) return [3 /*break*/, 2];\n                        // wait for the SDK client to be ready before...\n                        return [4 /*yield*/, ((_a = this._client) === null || _a === void 0 ? void 0 : _a.onReady())];\n                    case 1:\n                        // wait for the SDK client to be ready before...\n                        _d.sent();\n                        // setting the user context\n                        this.setCurrentUserContext(userInfo);\n                        // (potentially) retrieve the VUID set in JS userContext or noop or to DefaultUser\n                        this.user.id = ((_b = this.userContext) === null || _b === void 0 ? void 0 : _b.getUserId()) || DefaultUser.id;\n                        return [3 /*break*/, 4];\n                    case 2:\n                        // synchronous user context setting is required including for server side rendering (SSR)\n                        this.setCurrentUserContext(userInfo);\n                        // we need to wait for fetch qualified segments success for failure\n                        return [4 /*yield*/, ((_c = this._client) === null || _c === void 0 ? void 0 : _c.onReady())];\n                    case 3:\n                        // we need to wait for fetch qualified segments success for failure\n                        _d.sent();\n                        _d.label = 4;\n                    case 4: return [4 /*yield*/, this.fetchQualifiedSegments()];\n                    case 5:\n                        fetchQualifedSegmentsSucceed = _d.sent();\n                        if (!this.isUserPromiseResolved) {\n                            this.userPromiseResolver({ success: fetchQualifedSegmentsSucceed });\n                            this.isUserPromiseResolved = true;\n                        }\n                        this.onUserUpdateHandlers.forEach(function (handler) { return handler(_this.user); });\n                        return [2 /*return*/];\n                }\n            });\n        });\n    };\n    OptimizelyReactSDKClient.prototype.onUserUpdate = function (handler) {\n        var _this = this;\n        this.onUserUpdateHandlers.push(handler);\n        return function () {\n            var ind = _this.onUserUpdateHandlers.indexOf(handler);\n            if (ind > -1) {\n                _this.onUserUpdateHandlers.splice(ind, 1);\n            }\n        };\n    };\n    /**\n     * Register a handler to be called whenever setForcedVariation is called on\n     * this client. Returns a function that un-registers the handler when called.\n     * @param {OnForcedVariationsUpdateHandler} handler\n     * @returns {DisposeFn}\n     */\n    OptimizelyReactSDKClient.prototype.onForcedVariationsUpdate = function (handler) {\n        var _this = this;\n        this.onForcedVariationsUpdateHandlers.push(handler);\n        return function () {\n            var ind = _this.onForcedVariationsUpdateHandlers.indexOf(handler);\n            if (ind > -1) {\n                _this.onForcedVariationsUpdateHandlers.splice(ind, 1);\n            }\n        };\n    };\n    OptimizelyReactSDKClient.prototype.isReady = function () {\n        return this.isClientReady && this.isUserReady;\n    };\n    /**\n     * Buckets visitor and sends impression event to Optimizely\n     * @param {string} experimentKey\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.activate = function (experimentKey, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to activate experiment \"%s\" because Optimizely client failed to initialize.', experimentKey);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to activate experiment \"%s\" because User ID is not set', experimentKey);\n            return null;\n        }\n        return this._client.activate(experimentKey, user.id, user.attributes);\n    };\n    OptimizelyReactSDKClient.prototype.decide = function (key, options, overrideUserId, overrideAttributes) {\n        if (options === void 0) { options = []; }\n        if (!this._client) {\n            logger$2.warn('Unable to evaluate feature \"%s\" because Optimizely client failed to initialize.', key);\n            return createFailedDecision(key, \"Unable to evaluate flag \".concat(key, \" because Optimizely client failed to initialize.\"), this.user);\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to evaluate feature \"%s\" because User ID is not set.', key);\n            return createFailedDecision(key, \"Unable to evaluate flag \".concat(key, \" because User ID is not set.\"), user);\n        }\n        var optlyUserContext = this.makeUserContextInstance(user);\n        if (optlyUserContext) {\n            return __assign(__assign({}, optlyUserContext.decide(key, options)), { userContext: {\n                    id: user.id,\n                    attributes: user.attributes,\n                } });\n        }\n        return createFailedDecision(key, \"Not Evaluating flag \".concat(key, \" because user id or attributes are not valid\"), user);\n    };\n    OptimizelyReactSDKClient.prototype.decideForKeys = function (keys, options, overrideUserId, overrideAttributes) {\n        if (options === void 0) { options = []; }\n        if (!this._client) {\n            logger$2.warn('Unable to evaluate features for keys because Optimizely client failed to initialize.');\n            return {};\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to evaluate features for keys because User ID is not set');\n            return {};\n        }\n        var optlyUserContext = this.makeUserContextInstance(user);\n        if (optlyUserContext) {\n            return Object.entries(optlyUserContext.decideForKeys(keys, options)).reduce(function (decisions, _a) {\n                var key = _a[0], decision = _a[1];\n                decisions[key] = __assign(__assign({}, decision), { userContext: {\n                        id: user.id || '',\n                        attributes: user.attributes,\n                    } });\n                return decisions;\n            }, {});\n        }\n        return {};\n    };\n    OptimizelyReactSDKClient.prototype.decideAll = function (options, overrideUserId, overrideAttributes) {\n        if (options === void 0) { options = []; }\n        if (!this._client) {\n            logger$2.warn('Unable to evaluate all feature decisions because Optimizely client is not initialized.');\n            return {};\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to evaluate all feature decisions because User ID is not set');\n            return {};\n        }\n        var optlyUserContext = this.makeUserContextInstance(user);\n        if (optlyUserContext) {\n            return Object.entries(optlyUserContext.decideAll(options)).reduce(function (decisions, _a) {\n                var key = _a[0], decision = _a[1];\n                decisions[key] = __assign(__assign({}, decision), { userContext: {\n                        id: user.id || '',\n                        attributes: user.attributes,\n                    } });\n                return decisions;\n            }, {});\n        }\n        return {};\n    };\n    /**\n     * Gets variation where visitor will be bucketed\n     * @param {string} experimentKey\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getVariation = function (experimentKey, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get variation for experiment \"%s\" because Optimizely client failed to initialize.', experimentKey);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get variation for experiment \"%s\" because User ID is not set', experimentKey);\n            return null;\n        }\n        return this._client.getVariation(experimentKey, user.id, user.attributes);\n    };\n    /**\n     * Sends conversion event to Optimizely\n     * @param {string} eventKey\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @param {optimizely.EventTags} [eventTags]\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.track = function (eventKey, overrideUserId, overrideAttributes, eventTags) {\n        if (!this._client) {\n            logger$2.warn('Unable to send tracking event \"%s\" because Optimizely client failed to initialize.', eventKey);\n            return;\n        }\n        if (typeof overrideUserId !== 'undefined' && typeof overrideUserId !== 'string') {\n            eventTags = overrideUserId;\n            overrideUserId = undefined;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to send tracking event \"%s\" because User ID is not set', eventKey);\n            return;\n        }\n        this._client.track(eventKey, user.id, user.attributes, eventTags);\n    };\n    /**\n     * Sets the forced decision for specified optimizely decision context.\n     * @param {optimizely.OptimizelyDecisionContext} decisionContext\n     * @param {optimizely.OptimizelyForcedDecision} forcedDecision\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.setForcedDecision = function (decisionContext, decision) {\n        if (!this.userContext) {\n            logger$2.warn('Unable to set a forced decision because the user context has not been set yet.');\n            return;\n        }\n        var isSuccess = this.userContext.setForcedDecision(decisionContext, decision);\n        if (isSuccess) {\n            this.forcedDecisionFlagKeys.add(decisionContext.flagKey);\n            notifier.notify(decisionContext.flagKey);\n        }\n    };\n    /**\n     * Returns the forced decision for specified optimizely decision context.\n     * @param {optimizely.OptimizelyDecisionContext} decisionContext\n     * @return {(optimizely.OptimizelyForcedDecision | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getForcedDecision = function (decisionContext) {\n        if (!this.userContext) {\n            logger$2.warn('Unable to get a forced decision because the user context has not been set yet.');\n            return null;\n        }\n        return this.userContext.getForcedDecision(decisionContext);\n    };\n    /**\n     * Removes the forced decision for specified optimizely decision context.\n     * @param {optimizely.OptimizelyDecisionContext} decisionContext\n     * @return {boolean}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.removeForcedDecision = function (decisionContext) {\n        if (!this.userContext) {\n            logger$2.warn('Unable to remove forced decisions because the user context has not been set yet.');\n            return false;\n        }\n        var isSuccess = this.userContext.removeForcedDecision(decisionContext);\n        if (isSuccess) {\n            this.forcedDecisionFlagKeys.delete(decisionContext.flagKey);\n            notifier.notify(decisionContext.flagKey);\n        }\n        return isSuccess;\n    };\n    /**\n     * Removes all the forced decision.\n     * @return {boolean}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.removeAllForcedDecisions = function () {\n        if (!this.userContext) {\n            logger$2.warn('Unable to remove all forced decisions because the user context has not been set yet.');\n            return false;\n        }\n        var isSuccess = this.userContext.removeAllForcedDecisions();\n        if (isSuccess) {\n            this.forcedDecisionFlagKeys.forEach(function (flagKey) { return notifier.notify(flagKey); });\n            this.forcedDecisionFlagKeys.clear();\n        }\n        return isSuccess;\n    };\n    /**\n     * Returns true if the feature is enabled for the given user\n     * @param {string} feature\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {boolean}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.isFeatureEnabled = function (feature, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to determine if feature \"%s\" is enabled because Optimizely client failed to initialize.', feature);\n            return false;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to determine if feature \"%s\" is enabled because User ID is not set', feature);\n            return false;\n        }\n        return this._client.isFeatureEnabled(feature, user.id, user.attributes);\n    };\n    /**\n     * @deprecated since 2.1.0\n     * getAllFeatureVariables is added in JavaScript SDK which is similarly returning all the feature variables, but\n     * it sends only single notification of type \"all-feature-variables\" instead of sending for each variable.\n     * As getFeatureVariables was added when this functionality wasn't provided by JavaScript SDK, so there is no\n     * need of it now and it would be removed in next major release\n     *\n     * Get all variables for a feature, regardless of the feature being enabled/disabled\n     * @param {string} featureKey\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {VariableValuesObject}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariables = function (featureKey, overrideUserId, overrideAttributes) {\n        var _this = this;\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variables for feature \"%s\" because Optimizely client failed to initialize.', featureKey);\n            return {};\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        var userId = user.id;\n        if (userId === null) {\n            logger$2.warn('Unable to get feature variables for feature \"%s\" because User ID is not set', featureKey);\n            return {};\n        }\n        var userAttributes = user.attributes;\n        var variableObj = {};\n        var optlyConfig = this._client.getOptimizelyConfig();\n        if (!optlyConfig) {\n            logger$2.warn('Unable to retrieve feature variables for feature \"%s\" because Optimizely client failed to initialize.', featureKey);\n            return {};\n        }\n        var feature = optlyConfig.featuresMap[featureKey];\n        if (!feature) {\n            logger$2.info('Unable to retrieve feature variables for feature \"%s\" because config features map is not set', featureKey);\n            return {};\n        }\n        Object.keys(feature.variablesMap).forEach(function (key) {\n            var variable = feature.variablesMap[key];\n            variableObj[variable.key] = _this._client.getFeatureVariable(featureKey, variable.key, userId, userAttributes);\n        });\n        return variableObj;\n    };\n    /**\n     * Returns value for the given string variable attached to the given feature\n     * flag\n     * @param {string} feature\n     * @param {string} variable\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariableString = function (feature, variable, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable string from feature \"%s\" because Optimizely client failed to initialize.', feature);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable string from feature \"%s\" because User ID is not set', feature);\n            return null;\n        }\n        return this._client.getFeatureVariableString(feature, variable, user.id, user.attributes);\n    };\n    /**\n     * Returns value for the given boolean variable attached to the given feature\n     * flag\n     * @param {string} feature\n     * @param {string} variable\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariableBoolean = function (feature, variable, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable boolean from feature \"%s\" because Optimizely client failed to initialize.', feature);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable boolean from feature \"%s\" because User ID is not set', feature);\n            return null;\n        }\n        return this._client.getFeatureVariableBoolean(feature, variable, user.id, user.attributes);\n    };\n    /**\n     * Returns value for the given integer variable attached to the given feature\n     * flag\n     * @param {string} feature\n     * @param {string} variable\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariableInteger = function (feature, variable, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable integer from feature \"%s\" because Optimizely client failed to initialize.', feature);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable integer from feature \"%s\" because User ID is not set', feature);\n            return null;\n        }\n        return this._client.getFeatureVariableInteger(feature, variable, user.id, user.attributes);\n    };\n    /**\n     * Returns value for the given double variable attached to the given feature\n     * flag\n     * @param {string} feature\n     * @param {string} variable\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariableDouble = function (feature, variable, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable double from feature \"%s\" because Optimizely client failed to initialize.', feature);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable double from feature \"%s\" because User ID is not set', feature);\n            return null;\n        }\n        return this._client.getFeatureVariableDouble(feature, variable, user.id, user.attributes);\n    };\n    /**\n     * Returns value for the given json variable attached to the given feature\n     * flag\n     * @param {string} feature\n     * @param {string} variable\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(unknown | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariableJSON = function (feature, variable, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable JSON from feature \"%s\" because Optimizely client failed to initialize.', feature);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable JSON from feature \"%s\" because User ID is not set', feature);\n            return null;\n        }\n        return this._client.getFeatureVariableJSON(feature, variable, user.id, user.attributes);\n    };\n    /**\n     * Returns dynamically-typed value of the variable attached to the given\n     * feature flag. Returns null if the feature key or variable key is invalid.\n     * @param {string} featureKey\n     * @param {string} variableKey\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {(FeatureVariableValue | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getFeatureVariable = function (featureKey, variableKey, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get feature variable from feature \"%s\" because Optimizely client failed to initialize.', featureKey, variableKey);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get feature variable from feature \"%s\" because User ID is not set', featureKey, variableKey);\n            return null;\n        }\n        return this._client.getFeatureVariable(featureKey, variableKey, user.id, user.attributes);\n    };\n    /**\n     * Returns values for all the variables attached to the given feature flag\n     * @param {string} featureKey\n     * @param {string} overrideUserId\n     * @param {optimizely.UserAttributes} [overrideAttributes]\n     * @returns {({ [variableKey: string]: unknown } | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getAllFeatureVariables = function (featureKey, overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get all feature variables from feature \"%s\" because Optimizely client failed to initialize.', featureKey);\n            return {};\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get all feature variables from feature \"%s\" because User ID is not set', featureKey);\n            return {};\n        }\n        return this._client.getAllFeatureVariables(featureKey, user.id, user.attributes);\n    };\n    /**\n     * Get an array of all enabled features\n     * @param {string} [overrideUserId]\n     * @param {optimizely.UserAttributes} [overrideUserId]\n     * @returns {Array<string>}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getEnabledFeatures = function (overrideUserId, overrideAttributes) {\n        if (!this._client) {\n            logger$2.warn('Unable to get list of enabled features because Optimizely client failed to initialize.');\n            return [];\n        }\n        var user = this.getUserWithOverrides(overrideUserId, overrideAttributes);\n        if (user.id === null) {\n            logger$2.info('Unable to get list of enabled features because User ID is not set');\n            return [];\n        }\n        return this._client.getEnabledFeatures(user.id, user.attributes);\n    };\n    /**\n     * Gets the forced variation for a given user and experiment\n     * @param {string} experiment\n     * @param {string} [overrideUserId]\n     * @returns {(string | null)}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.getForcedVariation = function (experiment, overrideUserId) {\n        if (!this._client) {\n            logger$2.warn('Unable to get forced variation for experiment \"%s\" because Optimizely client failed to initialize.', experiment);\n            return null;\n        }\n        var user = this.getUserWithOverrides(overrideUserId);\n        if (user.id === null) {\n            logger$2.info('Unable to get forced variation for experiment \"%s\" because User ID is not set', experiment);\n            return null;\n        }\n        return this._client.getForcedVariation(experiment, user.id);\n    };\n    /**\n     * Force a user into a variation for a given experiment\n     * @param {string} experiment\n     * @param {string} overrideUserIdOrVariationKey\n     * @param {string} [variationKey]\n     * @returns {boolean}\n     * @memberof OptimizelyReactSDKClient\n     */\n    OptimizelyReactSDKClient.prototype.setForcedVariation = function (experiment, overrideUserIdOrVariationKey, variationKey) {\n        if (!this._client) {\n            logger$2.warn('Unable to set forced variation for experiment \"%s\" because Optimizely client failed to initialize.', experiment);\n            return false;\n        }\n        var finalUserId = null;\n        var finalVariationKey = null;\n        if (arguments.length === 2) {\n            finalVariationKey = overrideUserIdOrVariationKey;\n            finalUserId = this.getUserWithOverrides().id;\n        }\n        else if (arguments.length === 3) {\n            finalUserId = this.getUserWithOverrides(overrideUserIdOrVariationKey).id;\n            if (variationKey === undefined) {\n                // can't have undefined if supplying all 3 arguments\n                return false;\n            }\n            finalVariationKey = variationKey;\n        }\n        if (finalUserId === null) {\n            logger$2.warn('Unable to set forced variation for experiment \"%s\" because User ID is not set', experiment);\n            return false;\n        }\n        var result = this._client.setForcedVariation(experiment, finalUserId, finalVariationKey);\n        this.onForcedVariationsUpdateHandlers.forEach(function (handler) { return handler(); });\n        return result;\n    };\n    /**\n     *  Returns OptimizelyConfig object containing experiments and features data\n     *  @returns {optimizely.OptimizelyConfig | null} optimizely config\n     */\n    OptimizelyReactSDKClient.prototype.getOptimizelyConfig = function () {\n        if (!this._client) {\n            logger$2.warn('Unable to get Optimizely configuration because Optimizely client failed to initialize.');\n            return null;\n        }\n        return this._client.getOptimizelyConfig();\n    };\n    /**\n     * Cleanup method for killing an running timers and flushing eventQueue\n     * @returns {Promise<{ success: boolean; reason?: string }>}\n     */\n    OptimizelyReactSDKClient.prototype.close = function () {\n        if (!this._client) {\n            /**\n             * Note:\n             * - Returns a promise that resolves as \"true\" even when this._client does not exist.\n             * - This is because cleanup relies on close() resolving as \"true\".\n             * - If we resolve as \"false\", then the cleanup for timers and the event queue will never trigger.\n             * - Not triggering cleanup may lead to memory leaks and other inefficiencies.\n             */\n            return new Promise(function (resolve, reject) {\n                return resolve({\n                    success: true,\n                    reason: 'Optimizely client is not initialized.',\n                });\n            });\n        }\n        return this._client.close();\n    };\n    Object.defineProperty(OptimizelyReactSDKClient.prototype, \"client\", {\n        /**\n         * Provide access to inner optimizely.Client object\n         */\n        get: function () {\n            if (!this._client) {\n                logger$2.warn('Unable to get client because Optimizely client failed to initialize.');\n                return null;\n            }\n            return this._client;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(OptimizelyReactSDKClient.prototype, \"notificationCenter\", {\n        get: function () {\n            if (!this._client) {\n                return {\n                    addNotificationListener: function () {\n                        logger$2.warn('Unable to add notification listener because Optimizely client failed to initialize.');\n                        return 0;\n                    },\n                    removeNotificationListener: function () {\n                        logger$2.warn('Unable to remove notification listener because Optimizely client failed to initialize.');\n                        return false;\n                    },\n                    clearAllNotificationListeners: function () {\n                        logger$2.warn('Unable to clear all notification listeners because Optimizely client failed to initialize.');\n                    },\n                    clearNotificationListeners: function () {\n                        logger$2.warn('Unable to clear notification listeners because Optimizely client failed to initialize.');\n                    },\n                };\n            }\n            return this._client.notificationCenter;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    OptimizelyReactSDKClient.prototype.sendOdpEvent = function (action, type, identifiers, data) {\n        var _a;\n        if (!action || !action.trim()) {\n            logger$2.error('ODP action is not valid (cannot be empty).');\n            return;\n        }\n        (_a = this.client) === null || _a === void 0 ? void 0 : _a.sendOdpEvent(action, type, identifiers, data);\n    };\n    OptimizelyReactSDKClient.prototype.getVuid = function () {\n        if (!this._client) {\n            logger$2.warn('Unable to get VUID because Optimizely client failed to initialize.');\n            return undefined;\n        }\n        return this._client.getVuid();\n    };\n    return OptimizelyReactSDKClient;\n}());\nfunction createInstance(config) {\n    return new OptimizelyReactSDKClient(config);\n}\n\n/**\n * Copyright 2022-2024, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar logger$1 = optimizely.getLogger('<OptimizelyProvider>');\nvar OptimizelyProvider = /** @class */ (function (_super) {\n    __extends(OptimizelyProvider, _super);\n    function OptimizelyProvider(props) {\n        var _this = _super.call(this, props) || this;\n        _this.setUserInOptimizely();\n        return _this;\n    }\n    OptimizelyProvider.prototype.setUserInOptimizely = function () {\n        return __awaiter(this, void 0, void 0, function () {\n            var _a, optimizely, userId, userAttributes, user, finalUser, _b, id, attributes;\n            return __generator(this, function (_d) {\n                switch (_d.label) {\n                    case 0:\n                        _a = this.props, optimizely = _a.optimizely, userId = _a.userId, userAttributes = _a.userAttributes, user = _a.user;\n                        if (!optimizely) {\n                            logger$1.error('OptimizelyProvider must be passed an instance of the Optimizely SDK client');\n                            return [2 /*return*/];\n                        }\n                        finalUser = null;\n                        if (user) {\n                            if ('then' in user) {\n                                user.then(function (res) {\n                                    optimizely.setUser(res);\n                                });\n                            }\n                            else {\n                                finalUser = {\n                                    id: user.id,\n                                    attributes: user.attributes || {},\n                                };\n                            }\n                        }\n                        else if (userId) {\n                            finalUser = {\n                                id: userId,\n                                attributes: userAttributes || {},\n                            };\n                            // deprecation warning\n                            logger$1.warn('Passing userId and userAttributes as props is deprecated, please switch to using `user` prop');\n                        }\n                        else if (optimizely.user) {\n                            _b = optimizely.user, id = _b.id, attributes = _b.attributes;\n                            finalUser = {\n                                id: id,\n                                attributes: userAttributes || attributes || {},\n                            };\n                        }\n                        else {\n                            finalUser = {\n                                id: DefaultUser.id,\n                                attributes: userAttributes || DefaultUser.attributes,\n                            };\n                        }\n                        if (!finalUser) return [3 /*break*/, 4];\n                        _d.label = 1;\n                    case 1:\n                        _d.trys.push([1, 3, , 4]);\n                        return [4 /*yield*/, optimizely.setUser(finalUser)];\n                    case 2:\n                        _d.sent();\n                        return [3 /*break*/, 4];\n                    case 3:\n                        _d.sent();\n                        logger$1.error('Error while trying to set user.');\n                        return [3 /*break*/, 4];\n                    case 4: return [2 /*return*/];\n                }\n            });\n        });\n    };\n    OptimizelyProvider.prototype.componentDidUpdate = function (prevProps) {\n        if (prevProps.isServerSide) {\n            // dont react to updates on server\n            return;\n        }\n        var optimizely = this.props.optimizely;\n        if (this.props.user && 'id' in this.props.user) {\n            if (!optimizely.user.id) {\n                // no user is set in optimizely, update\n                optimizely.setUser(this.props.user);\n            }\n            else if (\n            // if the users aren't equal update\n            !areUsersEqual({\n                id: optimizely.user.id,\n                attributes: optimizely.user.attributes || {},\n            }, {\n                id: this.props.user.id,\n                // TODO see if we can use computeDerivedStateFromProps\n                attributes: this.props.user.attributes || {},\n            })) {\n                optimizely.setUser(this.props.user);\n            }\n        }\n    };\n    OptimizelyProvider.prototype.render = function () {\n        var _a = this.props, optimizely = _a.optimizely, children = _a.children, timeout = _a.timeout;\n        var isServerSide = !!this.props.isServerSide;\n        var value = {\n            optimizely: optimizely,\n            isServerSide: isServerSide,\n            timeout: timeout,\n        };\n        return React__namespace.createElement(OptimizelyContextProvider, { value: value }, children);\n    };\n    return OptimizelyProvider;\n}(React__namespace.Component));\n\n/**\n * Copyright 2020, 2023 Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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 * Utility to setup listeners for changes to the datafile or user attributes and invoke the provided callback.\n * Returns an unListen function\n */\nvar setupAutoUpdateListeners = function (optimizely$1, type, value, logger, callback) {\n    var loggerSuffix = \"re-evaluating \".concat(type, \"=\\\"\").concat(value, \"\\\" for user=\\\"\").concat(optimizely$1.user.id, \"\\\"\");\n    var optimizelyNotificationId = optimizely$1.notificationCenter.addNotificationListener(optimizely.enums.NOTIFICATION_TYPES.OPTIMIZELY_CONFIG_UPDATE, function () {\n        logger.info(\"\".concat(optimizely.enums.NOTIFICATION_TYPES.OPTIMIZELY_CONFIG_UPDATE, \", \").concat(loggerSuffix));\n        callback();\n    });\n    var unregisterConfigUpdateListener = function () {\n        return optimizely$1.notificationCenter.removeNotificationListener(optimizelyNotificationId);\n    };\n    var unregisterUserListener = optimizely$1.onUserUpdate(function () {\n        logger.info(\"User update, \".concat(loggerSuffix));\n        callback();\n    });\n    return function () {\n        unregisterConfigUpdateListener();\n        unregisterUserListener();\n    };\n};\n\n/**\n * Copyright 2018-2019, 2022-2024, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar hooksLogger = optimizely.getLogger('ReactSDK');\nvar optimizelyPropError = \"The 'optimizely' prop must be supplied via a parent <OptimizelyProvider>\";\nvar HookType;\n(function (HookType) {\n    HookType[\"EXPERIMENT\"] = \"Experiment\";\n    HookType[\"FEATURE\"] = \"Feature\";\n})(HookType || (HookType = {}));\n/**\n * Equality check applied to decision inputs passed into hooks (experiment/feature keys, override user IDs, and override user attributes).\n * Used to determine when we need to recompute a decision because different inputs were passed into a hook.\n * @param {DecisionInputs} oldDecisionInputs\n * @param {DecisionInput} newDecisionInputs\n * @returns boolean\n */\nfunction areDecisionInputsEqual(oldDecisionInputs, newDecisionInputs) {\n    return (oldDecisionInputs.entityKey === newDecisionInputs.entityKey &&\n        oldDecisionInputs.overrideUserId === newDecisionInputs.overrideUserId &&\n        areAttributesEqual(oldDecisionInputs.overrideAttributes, newDecisionInputs.overrideAttributes));\n}\n/**\n * Subscribe to changes in initialization state of the argument client. onInitStateChange callback\n * is called on the following events:\n * - optimizely successfully becomes ready\n * - timeout is reached prior to optimizely becoming ready\n * - optimizely becomes ready after the timeout has already passed\n * @param {ReactSDKClient} optimizely\n * @param {number|undefined} timeout\n * @param {Function} onInitStateChange\n */\nfunction subscribeToInitialization(optimizely, timeout, onInitStateChange) {\n    optimizely\n        .onReady({ timeout: timeout })\n        .then(function (res) {\n        var _a, _b, _c, _d;\n        if (res.success) {\n            hooksLogger.info('Client immediately ready');\n            onInitStateChange({\n                clientReady: true,\n                didTimeout: false,\n            });\n            return;\n        }\n        switch (res.reason) {\n            // Optimizely client failed to initialize.\n            case NotReadyReason.NO_CLIENT:\n                hooksLogger.warn(\"Client not ready, reason=\\\"\".concat(res.message, \"\\\"\"));\n                onInitStateChange({\n                    clientReady: false,\n                    didTimeout: false,\n                });\n                (_a = res.dataReadyPromise) === null || _a === void 0 ? void 0 : _a.then(function (readyResult) {\n                    if (!readyResult) {\n                        return;\n                    }\n                    var success = readyResult.success, message = readyResult.message;\n                    if (success) {\n                        hooksLogger.info('Client became ready.');\n                    }\n                    else {\n                        hooksLogger.warn(\"Client not ready, reason=\\\"\".concat(message, \"\\\"\"));\n                    }\n                    onInitStateChange({\n                        clientReady: success,\n                        didTimeout: false,\n                    });\n                });\n                break;\n            case NotReadyReason.USER_NOT_READY:\n                hooksLogger.warn(\"User was not ready, reason=\\\"\".concat(res.message, \"\\\"\"));\n                onInitStateChange({\n                    clientReady: false,\n                    didTimeout: false,\n                });\n                (_b = res.dataReadyPromise) === null || _b === void 0 ? void 0 : _b.then(function (readyResult) {\n                    if (!readyResult) {\n                        return;\n                    }\n                    var success = readyResult.success, message = readyResult.message;\n                    if (success) {\n                        hooksLogger.info('User became ready later.');\n                    }\n                    else {\n                        hooksLogger.warn(\"Client not ready, reason=\\\"\".concat(message, \"\\\"\"));\n                    }\n                    onInitStateChange({\n                        clientReady: success,\n                        didTimeout: false,\n                    });\n                });\n                break;\n            case NotReadyReason.TIMEOUT:\n                hooksLogger.info(\"Client did not become ready before timeout of \".concat(timeout, \" ms, reason=\\\"\").concat(res.message, \"\\\"\"));\n                onInitStateChange({\n                    clientReady: false,\n                    didTimeout: true,\n                });\n                (_c = res.dataReadyPromise) === null || _c === void 0 ? void 0 : _c.then(function (readyResult) {\n                    if (!readyResult) {\n                        return;\n                    }\n                    var success = readyResult.success, message = readyResult.message;\n                    if (success) {\n                        hooksLogger.info('Client became ready after timeout already elapsed');\n                    }\n                    else {\n                        hooksLogger.warn(\"Client not ready, reason=\\\"\".concat(message, \"\\\"\"));\n                    }\n                    onInitStateChange({\n                        clientReady: success,\n                        didTimeout: true,\n                    });\n                });\n                break;\n            default:\n                hooksLogger.warn(\"Other reason client not ready, reason=\\\"\".concat(res.message, \"\\\"\"));\n                onInitStateChange({\n                    clientReady: false,\n                    didTimeout: false,\n                });\n                (_d = res.dataReadyPromise) === null || _d === void 0 ? void 0 : _d.then(function (readyResult) {\n                    if (!readyResult) {\n                        return;\n                    }\n                    var success = readyResult.success, message = readyResult.message;\n                    if (success) {\n                        hooksLogger.info('Client became ready later');\n                    }\n                    else {\n                        hooksLogger.warn(\"Client not ready, reason=\\\"\".concat(message, \"\\\"\"));\n                    }\n                    onInitStateChange({\n                        clientReady: success,\n                        didTimeout: false,\n                    });\n                });\n        }\n    })\n        .catch(function () {\n        hooksLogger.error(\"Error initializing client. The core client or user promise(s) rejected.\");\n    });\n}\nfunction useCompareAttrsMemoize(value) {\n    var ref = React.useRef();\n    if (!areAttributesEqual(value, ref.current)) {\n        ref.current = value;\n    }\n    return ref.current;\n}\n/**\n * A React Hook that retrieves the variation for an experiment, optionally\n * auto updating that value based on underlying user or datafile changes.\n *\n * Note: The react client can become ready AFTER the timeout period.\n *       ClientReady and DidTimeout provide signals to handle this scenario.\n */\nvar useExperiment = function (experimentKey, options, overrides) {\n    if (options === void 0) { options = {}; }\n    if (overrides === void 0) { overrides = {}; }\n    var _a = React.useContext(OptimizelyContext), optimizely = _a.optimizely, isServerSide = _a.isServerSide, timeout = _a.timeout;\n    var overrideAttrs = useCompareAttrsMemoize(overrides.overrideAttributes);\n    var getCurrentDecision = React.useCallback(function () { return ({\n        variation: (optimizely === null || optimizely === void 0 ? void 0 : optimizely.activate(experimentKey, overrides.overrideUserId, overrideAttrs)) || null,\n    }); }, [optimizely, experimentKey, overrides.overrideUserId, overrideAttrs]);\n    var isClientReady = isServerSide || !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.isReady());\n    var isReadyPromiseFulfilled = !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.getIsReadyPromiseFulfilled());\n    var _b = React.useState(function () {\n        var decisionState = isClientReady ? getCurrentDecision() : { variation: null };\n        return __assign(__assign({}, decisionState), { clientReady: isClientReady, didTimeout: false });\n    }), state = _b[0], setState = _b[1];\n    // Decision state is derived from entityKey and overrides arguments.\n    // Track the previous value of those arguments, and update state when they change.\n    // This is an instance of the derived state pattern recommended here:\n    // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n    var currentDecisionInputs = {\n        entityKey: experimentKey,\n        overrideUserId: overrides.overrideUserId,\n        overrideAttributes: overrideAttrs,\n    };\n    var _c = React.useState(currentDecisionInputs), prevDecisionInputs = _c[0], setPrevDecisionInputs = _c[1];\n    if (!areDecisionInputsEqual(prevDecisionInputs, currentDecisionInputs)) {\n        setPrevDecisionInputs(currentDecisionInputs);\n        setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n    }\n    var finalReadyTimeout = options.timeout !== undefined ? options.timeout : timeout;\n    React.useEffect(function () {\n        // Subscribe to initialzation promise only\n        // 1. When client is using Sdk Key, which means the initialization will be asynchronous\n        //    and we need to wait for the promise and update decision.\n        // 2. When client is using datafile only but client is not ready yet which means user\n        //    was provided as a promise and we need to subscribe and wait for user to become available.\n        if (optimizely && ((optimizely.getIsUsingSdkKey() && !isReadyPromiseFulfilled) || !isClientReady)) {\n            subscribeToInitialization(optimizely, finalReadyTimeout, function (initState) {\n                setState(__assign(__assign({}, getCurrentDecision()), initState));\n            });\n        }\n    }, [finalReadyTimeout, getCurrentDecision, isClientReady, isReadyPromiseFulfilled, optimizely]);\n    React.useEffect(function () {\n        // Subscribe to update after first datafile is fetched and readyPromise is resolved to avoid redundant rendering.\n        if (optimizely && isReadyPromiseFulfilled && options.autoUpdate) {\n            return setupAutoUpdateListeners(optimizely, HookType.EXPERIMENT, experimentKey, hooksLogger, function () {\n                setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n            });\n        }\n        return function () { };\n    }, [isReadyPromiseFulfilled, options.autoUpdate, optimizely, experimentKey, getCurrentDecision]);\n    React.useEffect(function () {\n        return optimizely === null || optimizely === void 0 ? void 0 : optimizely.onForcedVariationsUpdate(function () {\n            setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n        });\n    }, [getCurrentDecision, optimizely]);\n    if (!optimizely) {\n        hooksLogger.error(\"Unable to use experiment \".concat(experimentKey, \". \").concat(optimizelyPropError));\n    }\n    return [state.variation, state.clientReady, state.didTimeout];\n};\n/**\n * A React Hook that retrieves the status of a feature flag and its variables, optionally\n * auto updating those values based on underlying user or datafile changes.\n *\n * Note: The react client can become ready AFTER the timeout period.\n *       ClientReady and DidTimeout provide signals to handle this scenario.\n */\nvar useFeature = function (featureKey, options, overrides) {\n    if (options === void 0) { options = {}; }\n    if (overrides === void 0) { overrides = {}; }\n    var _a = React.useContext(OptimizelyContext), optimizely = _a.optimizely, isServerSide = _a.isServerSide, timeout = _a.timeout;\n    var overrideAttrs = useCompareAttrsMemoize(overrides.overrideAttributes);\n    var getCurrentDecision = React.useCallback(function () { return ({\n        isEnabled: !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.isFeatureEnabled(featureKey, overrides.overrideUserId, overrideAttrs)),\n        variables: (optimizely === null || optimizely === void 0 ? void 0 : optimizely.getFeatureVariables(featureKey, overrides.overrideUserId, overrideAttrs)) || {},\n    }); }, [optimizely, featureKey, overrides.overrideUserId, overrideAttrs]);\n    var isClientReady = isServerSide || !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.isReady());\n    var isReadyPromiseFulfilled = !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.getIsReadyPromiseFulfilled());\n    var _b = React.useState(function () {\n        var decisionState = isClientReady ? getCurrentDecision() : { isEnabled: false, variables: {} };\n        return __assign(__assign({}, decisionState), { clientReady: isClientReady, didTimeout: false });\n    }), state = _b[0], setState = _b[1];\n    // Decision state is derived from entityKey and overrides arguments.\n    // Track the previous value of those arguments, and update state when they change.\n    // This is an instance of the derived state pattern recommended here:\n    // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n    var currentDecisionInputs = {\n        entityKey: featureKey,\n        overrideUserId: overrides.overrideUserId,\n        overrideAttributes: overrides.overrideAttributes,\n    };\n    var _c = React.useState(currentDecisionInputs), prevDecisionInputs = _c[0], setPrevDecisionInputs = _c[1];\n    if (!areDecisionInputsEqual(prevDecisionInputs, currentDecisionInputs)) {\n        setPrevDecisionInputs(currentDecisionInputs);\n        setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n    }\n    var finalReadyTimeout = options.timeout !== undefined ? options.timeout : timeout;\n    React.useEffect(function () {\n        // Subscribe to initialzation promise only\n        // 1. When client is using Sdk Key, which means the initialization will be asynchronous\n        //    and we need to wait for the promise and update decision.\n        // 2. When client is using datafile only but client is not ready yet which means user\n        //    was provided as a promise and we need to subscribe and wait for user to become available.\n        if (optimizely && (optimizely.getIsUsingSdkKey() || !isClientReady)) {\n            subscribeToInitialization(optimizely, finalReadyTimeout, function (initState) {\n                setState(__assign(__assign({}, getCurrentDecision()), initState));\n            });\n        }\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [finalReadyTimeout, getCurrentDecision, optimizely]);\n    React.useEffect(function () {\n        // Subscribe to update after first datafile is fetched and readyPromise is resolved to avoid redundant rendering.\n        if (optimizely && isReadyPromiseFulfilled && options.autoUpdate) {\n            return setupAutoUpdateListeners(optimizely, HookType.FEATURE, featureKey, hooksLogger, function () {\n                setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n            });\n        }\n        return function () { };\n    }, [isReadyPromiseFulfilled, options.autoUpdate, optimizely, featureKey, getCurrentDecision]);\n    if (!optimizely) {\n        hooksLogger.error(\"Unable to properly use feature \".concat(featureKey, \". \").concat(optimizelyPropError));\n    }\n    return [state.isEnabled, state.variables, state.clientReady, state.didTimeout];\n};\n/**\n * A React Hook that retrieves the flag decision, optionally\n * auto updating those values based on underlying user or datafile changes.\n *\n * Note: The react client can become ready AFTER the timeout period.\n *       ClientReady and DidTimeout provide signals to handle this scenario.\n */\nvar useDecision = function (flagKey, options, overrides) {\n    if (options === void 0) { options = {}; }\n    if (overrides === void 0) { overrides = {}; }\n    var _a = React.useContext(OptimizelyContext), optimizely = _a.optimizely, isServerSide = _a.isServerSide, timeout = _a.timeout;\n    var overrideAttrs = useCompareAttrsMemoize(overrides.overrideAttributes);\n    var defaultDecision = React.useMemo(function () {\n        return createFailedDecision(flagKey, 'Optimizely SDK not configured properly yet.', {\n            id: overrides.overrideUserId || null,\n            attributes: overrideAttrs || {},\n        });\n    }, [flagKey, overrideAttrs, overrides.overrideUserId]);\n    var getCurrentDecision = React.useCallback(function () { return ({\n        decision: (optimizely === null || optimizely === void 0 ? void 0 : optimizely.decide(flagKey, options.decideOptions, overrides.overrideUserId, overrideAttrs)) || defaultDecision,\n    }); }, [flagKey, defaultDecision, optimizely, options.decideOptions, overrideAttrs, overrides.overrideUserId]);\n    var isClientReady = isServerSide || !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.isReady());\n    var isReadyPromiseFulfilled = !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.getIsReadyPromiseFulfilled());\n    var _b = React.useState(function () {\n        var decisionState = isClientReady\n            ? getCurrentDecision()\n            : {\n                decision: defaultDecision,\n            };\n        return __assign(__assign({}, decisionState), { clientReady: isClientReady, didTimeout: false });\n    }), state = _b[0], setState = _b[1];\n    // Decision state is derived from entityKey and overrides arguments.\n    // Track the previous value of those arguments, and update state when they change.\n    // This is an instance of the derived state pattern recommended here:\n    // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n    var currentDecisionInputs = {\n        entityKey: flagKey,\n        overrideUserId: overrides.overrideUserId,\n        overrideAttributes: overrides.overrideAttributes,\n    };\n    var _c = React.useState(currentDecisionInputs), prevDecisionInputs = _c[0], setPrevDecisionInputs = _c[1];\n    if (!areDecisionInputsEqual(prevDecisionInputs, currentDecisionInputs)) {\n        setPrevDecisionInputs(currentDecisionInputs);\n        setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n    }\n    var finalReadyTimeout = options.timeout !== undefined ? options.timeout : timeout;\n    React.useEffect(function () {\n        // Subscribe to initialzation promise only\n        // 1. When client is using Sdk Key, which means the initialization will be asynchronous\n        //    and we need to wait for the promise and update decision.\n        // 2. When client is using datafile only but client is not ready yet which means user\n        //    was provided as a promise and we need to subscribe and wait for user to become available.\n        if (optimizely && (optimizely.getIsUsingSdkKey() || !isClientReady)) {\n            subscribeToInitialization(optimizely, finalReadyTimeout, function (initState) {\n                setState(__assign(__assign({}, getCurrentDecision()), initState));\n            });\n        }\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [finalReadyTimeout, getCurrentDecision, optimizely]);\n    React.useEffect(function () {\n        if (overrides.overrideUserId || overrides.overrideAttributes || !options.autoUpdate) {\n            return;\n        }\n        // Subscribe to Forced Decision changes.\n        return notifier.subscribe(flagKey, function () {\n            setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n        });\n    }, [overrides.overrideUserId, overrides.overrideAttributes, options.autoUpdate, flagKey, getCurrentDecision]);\n    React.useEffect(function () {\n        // Subscribe to update after first datafile is fetched and readyPromise is resolved to avoid redundant rendering.\n        if (optimizely && isReadyPromiseFulfilled && options.autoUpdate) {\n            return setupAutoUpdateListeners(optimizely, HookType.FEATURE, flagKey, hooksLogger, function () {\n                setState(function (prevState) { return (__assign(__assign({}, prevState), getCurrentDecision())); });\n            });\n        }\n        return function () { };\n    }, [isReadyPromiseFulfilled, options.autoUpdate, optimizely, flagKey, getCurrentDecision]);\n    if (!optimizely) {\n        hooksLogger.error(\"Unable to use decision \".concat(flagKey, \". \").concat(optimizelyPropError));\n    }\n    return [state.decision, state.clientReady, state.didTimeout];\n};\nvar useTrackEvent = function () {\n    var _a = React.useContext(OptimizelyContext), optimizely = _a.optimizely, isServerSide = _a.isServerSide, timeout = _a.timeout;\n    var isClientReady = isServerSide || !!(optimizely === null || optimizely === void 0 ? void 0 : optimizely.isReady());\n    var track = React.useCallback(function () {\n        var rest = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            rest[_i] = arguments[_i];\n        }\n        if (!optimizely) {\n            hooksLogger.error(\"Unable to track events. \".concat(optimizelyPropError));\n            return;\n        }\n        if (!isClientReady) {\n            hooksLogger.error(\"Unable to track events. Optimizely client is not ready yet.\");\n            return;\n        }\n        optimizely.track.apply(optimizely, rest);\n    }, [optimizely, isClientReady]);\n    var _b = React.useState(function () {\n        return {\n            clientReady: isClientReady,\n            didTimeout: false,\n        };\n    }), state = _b[0], setState = _b[1];\n    React.useEffect(function () {\n        // Subscribe to initialization promise only\n        // 1. When client is using Sdk Key, which means the initialization will be asynchronous\n        //    and we need to wait for the promise and update decision.\n        // 2. When client is using datafile only but client is not ready yet which means user\n        //    was provided as a promise and we need to subscribe and wait for user to become available.\n        if (optimizely && (optimizely.getIsUsingSdkKey() || !isClientReady)) {\n            subscribeToInitialization(optimizely, timeout, function (initState) {\n                setState(initState);\n            });\n        }\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [optimizely, timeout]);\n    return [track, state.clientReady, state.didTimeout];\n};\n\n/**\n * Copyright 2018-2019, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar FeatureComponent = function (props) {\n    var feature = props.feature, timeout = props.timeout, autoUpdate = props.autoUpdate, children = props.children, overrideUserId = props.overrideUserId, overrideAttributes = props.overrideAttributes;\n    var _a = useFeature(feature, { timeout: timeout, autoUpdate: autoUpdate }, { overrideUserId: overrideUserId, overrideAttributes: overrideAttributes }), isEnabled = _a[0], variables = _a[1], clientReady = _a[2], didTimeout = _a[3];\n    if (!clientReady && !didTimeout) {\n        // Only block rendering while were waiting for the client within the allowed timeout.\n        return null;\n    }\n    // Wrap the return value here in a Fragment to please the HOC's expected React.ComponentType\n    // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051\n    return React__namespace.createElement(React__namespace.Fragment, null, children(isEnabled, variables, clientReady, didTimeout));\n};\nvar OptimizelyFeature = FeatureComponent;\n\nfunction withOptimizely(Component) {\n    var WithOptimizely = /** @class */ (function (_super) {\n        __extends(WithOptimizely, _super);\n        function WithOptimizely() {\n            return _super !== null && _super.apply(this, arguments) || this;\n        }\n        WithOptimizely.prototype.render = function () {\n            var _a = this.props, forwardedRef = _a.forwardedRef, rest = __rest(_a, [\"forwardedRef\"]);\n            // Note: Casting props to P is necessary because of this TypeScript issue:\n            // https://github.com/microsoft/TypeScript/issues/28884\n            return (React__namespace.createElement(OptimizelyContextConsumer, null, function (value) { return (React__namespace.createElement(Component, __assign({}, rest, { optimizelyReadyTimeout: value.timeout, optimizely: value.optimizely, isServerSide: value.isServerSide, ref: forwardedRef }))); }));\n        };\n        return WithOptimizely;\n    }(React__namespace.Component));\n    var withRefsForwarded = hoistStaticsAndForwardRefs(WithOptimizely, Component, 'withOptimizely');\n    return withRefsForwarded;\n}\n\n/**\n * Copyright 2018-2019, 2023-2024, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Experiment = function (props) {\n    var experiment = props.experiment, autoUpdate = props.autoUpdate, timeout = props.timeout, overrideUserId = props.overrideUserId, overrideAttributes = props.overrideAttributes, children = props.children;\n    var _a = useExperiment(experiment, { timeout: timeout, autoUpdate: autoUpdate }, { overrideUserId: overrideUserId, overrideAttributes: overrideAttributes }), variation = _a[0], clientReady = _a[1], didTimeout = _a[2];\n    if (!clientReady && !didTimeout) {\n        // Only block rendering while were waiting for the client within the allowed timeout.\n        return null;\n    }\n    if (children != null && typeof children === 'function') {\n        // Wrap the return value here in a Fragment to please the HOC's expected React.ComponentType\n        // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051\n        return React__namespace.createElement(React__namespace.Fragment, null, children(variation, clientReady, didTimeout));\n    }\n    var defaultMatch = null;\n    var variationMatch = null;\n    // We use React.Children.forEach instead of React.Children.toArray().find()\n    // here because toArray adds keys to all child elements and we do not want\n    // to trigger an unmount/remount\n    React__namespace.Children.forEach(children, function (child) {\n        if (!React__namespace.isValidElement(child)) {\n            return;\n        }\n        if (child.props.variation) {\n            if (variation === child.props.variation) {\n                variationMatch = child;\n            }\n        }\n        // Last child with default prop wins\n        if (child.props.default) {\n            defaultMatch = child;\n        }\n    });\n    var match = null;\n    if (variationMatch) {\n        match = variationMatch;\n    }\n    else if (defaultMatch) {\n        match = defaultMatch;\n    }\n    return match;\n};\nvar OptimizelyExperiment = Experiment;\n\n/**\n * Copyright 2018-2019, Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS 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// Wrap the return value here in a Fragment to please the HOC's expected React.ComponentType\n// See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051\nvar Variation = function (_a) {\n    var children = _a.children;\n    return React__namespace.createElement(React__namespace.Fragment, null, children);\n};\nvar OptimizelyVariation = Variation;\n\n/**\n * Copyright 2019, 2023-2024 Optimizely\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar logger = optimizely__namespace.getLogger('ReactSDK');\n/**\n * logOnlyEventDispatcher only logs a message at the debug level, and does not\n * send any requests to the Optimizely results backend. Use this to disable\n * all event dispatching.\n */\nvar logOnlyEventDispatcher = {\n    dispatchEvent: function (event, callback) {\n        logger.debug('Event not dispatched by disabled event dispatcher: %s', function () {\n            var eventStr;\n            try {\n                eventStr = JSON.stringify(event);\n            }\n            catch (err) {\n                eventStr = 'error stringifying event';\n            }\n            return eventStr;\n        });\n        callback({ statusCode: 204 });\n    },\n};\n\nObject.defineProperty(exports, 'OptimizelyDecideOption', {\n  enumerable: true,\n  get: function () { return optimizely.OptimizelyDecideOption; }\n});\nObject.defineProperty(exports, 'OptimizelySegmentOption', {\n  enumerable: true,\n  get: function () { return optimizely.OptimizelySegmentOption; }\n});\nObject.defineProperty(exports, 'enums', {\n  enumerable: true,\n  get: function () { return optimizely.enums; }\n});\nObject.defineProperty(exports, 'errorHandler', {\n  enumerable: true,\n  get: function () { return optimizely.errorHandler; }\n});\nObject.defineProperty(exports, 'eventDispatcher', {\n  enumerable: true,\n  get: function () { return optimizely.eventDispatcher; }\n});\nObject.defineProperty(exports, 'logging', {\n  enumerable: true,\n  get: function () { return optimizely.logging; }\n});\nObject.defineProperty(exports, 'setLogLevel', {\n  enumerable: true,\n  get: function () { return optimizely.setLogLevel; }\n});\nObject.defineProperty(exports, 'setLogger', {\n  enumerable: true,\n  get: function () { return optimizely.setLogger; }\n});\nexports.OptimizelyContext = OptimizelyContext;\nexports.OptimizelyContextConsumer = OptimizelyContextConsumer;\nexports.OptimizelyContextProvider = OptimizelyContextProvider;\nexports.OptimizelyExperiment = OptimizelyExperiment;\nexports.OptimizelyFeature = OptimizelyFeature;\nexports.OptimizelyProvider = OptimizelyProvider;\nexports.OptimizelyVariation = OptimizelyVariation;\nexports.createInstance = createInstance;\nexports.logOnlyEventDispatcher = logOnlyEventDispatcher;\nexports.useDecision = useDecision;\nexports.useExperiment = useExperiment;\nexports.useFeature = useFeature;\nexports.useTrackEvent = useTrackEvent;\nexports.withOptimizely = withOptimizely;\n"]}