@flagship.io/react-sdk 3.0.4-alpha.3 → 3.0.4-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.browser.js.LICENSE.txt */
2
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(function(){return(()=>{var t={3547:(t,e,r)=>{var n,i=r(1030);self,n=function(t,e,r,n,o,s,a,u,c,l,f,d,p,h,g,v,y,m,_,E,I,b,O,T,A,R,S,C,j,N,k,P,M,x,D,w,L,F){return(()=>{var V={"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":(t,e,r)=>{"use strict";function n(t){if(Array.isArray(t))return t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":(t,e,r)=>{"use strict";function n(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,u,"next",t)}function u(t){n(s,i,o,a,u,"throw",t)}a(void 0)}))}}r.r(e),r.d(e,{default:()=>i})},"./node_modules/@babel/runtime/helpers/esm/createClass.js":(t,e,r)=>{"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}r.r(e),r.d(e,{default:()=>i})},"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":(t,e,r)=>{"use strict";function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&(0,n.default)(t,e)}},"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":(t,e,r)=>{"use strict";function n(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":(t,e,r)=>{"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function o(t,e){if(e&&("object"===(0,n.default)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.default)(t)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>a});var n=r("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),i=r("./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"),o=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),s=r("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function a(t,e){return(0,n.default)(t)||(0,i.default)(t,e)||(0,o.default)(t,e)||(0,s.default)()}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function i(t,e){if(t){if("string"==typeof t)return(0,n.default)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.default)(t,e):void 0}}},"./node_modules/@babel/runtime/regenerator/index.js":(t,e,r)=>{t.exports=r("./node_modules/regenerator-runtime/runtime.js")},"./src/api/TrackingManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TrackingManager:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),a=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),u=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),l=r.n(c),f=(r("core-js/modules/es.array.concat.js"),r("core-js/modules/es.function.name.js"),r("./src/enum/FlagshipConstant.ts")),d=r("./src/enum/HitType.ts"),p=r("./src/hit/index.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var g=function(t){(0,s.default)(c,t);var e,r,a,u=h(c);function c(){return u.apply(this,arguments)}return(0,o.default)(c,[{key:"sendConsentHit",value:(a=(0,i.default)(l().mark((function t(e){var r,i,o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},(0,n.default)(r,f.T_API_ITEM,d.HitType.EVENT),(0,n.default)(r,f.EVENT_LABEL_API_ITEM,"".concat(f.SDK_LANGUAGE.name,":").concat(e.hasConsented)),(0,n.default)(r,f.EVENT_ACTION_API_ITEM,"fs_consent"),(0,n.default)(r,f.EVENT_CATEGORY_API_ITEM,p.EventCategory.USER_ENGAGEMENT),(0,n.default)(r,f.CUSTOMER_ENV_ID_API_ITEM,this.config.envId),(0,n.default)(r,f.DS_API_ITEM,f.SDK_APP),i=r,e.visitorId&&e.anonymousId?(i[f.VISITOR_ID_API_ITEM]=e.anonymousId,i[f.CUSTOMER_UID]=e.visitorId):(i[f.VISITOR_ID_API_ITEM]=e.anonymousId||e.visitorId,i[f.CUSTOMER_UID]=null),o=(0,n.default)({},f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),t.next=5,this.httpClient.postAsync(f.HIT_CONSENT_URL,{headers:o,timeout:this.config.timeout,body:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"sendActive",value:(r=(0,i.default)(l().mark((function t(e,r){var i,o,s,a,u;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={},(0,n.default)(i,f.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,n.default)(i,f.HEADER_X_SDK_CLIENT,f.SDK_LANGUAGE.name),(0,n.default)(i,f.HEADER_X_SDK_VERSION,f.SDK_VERSION),(0,n.default)(i,f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),s=i,a="".concat(f.BASE_API_URL).concat(f.URL_ACTIVATE_MODIFICATION),o={},(0,n.default)(o,f.VISITOR_ID_API_ITEM,e.visitorId),(0,n.default)(o,f.VARIATION_ID_API_ITEM,r.variationId),(0,n.default)(o,f.VARIATION_GROUP_ID_API_ITEM,r.variationGroupId),(0,n.default)(o,f.CUSTOMER_ENV_ID_API_ITEM,"".concat(this.config.envId)),u=o,e.visitorId&&e.anonymousId?(u[f.VISITOR_ID_API_ITEM]=e.visitorId,u[f.ANONYMOUS_ID]=e.anonymousId):(u[f.VISITOR_ID_API_ITEM]=e.anonymousId||e.visitorId,u[f.ANONYMOUS_ID]=null),t.next=6,this.httpClient.postAsync(a,{headers:s,timeout:this.config.timeout,body:u});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"sendHit",value:(e=(0,i.default)(l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,n.default)({},f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),t.next=3,this.httpClient.postAsync(f.HIT_API_URL,{headers:r,timeout:this.config.timeout,body:e.toApiKeys()});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),c}(r("./src/api/TrackingManagerAbstract.ts").TrackingManagerAbstract)},"./src/api/TrackingManagerAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TrackingManagerAbstract:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t,e){this._httpClient=t,this._config=e}return(0,n.default)(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()},"./src/cache/DefaultHitCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FS_HIT_PREFIX:()=>i,DefaultHitCache:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.array.slice.js"),r("core-js/modules/es.array.concat.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),"FS_DEFAULT_HIT_CACHE_"),o=function(){function t(){}return(0,n.default)(t,[{key:"cacheHit",value:function(t,e){var r=localStorage.getItem(i+t),n="";if(r){var o=r.slice(0,-1);n="".concat(o,",").concat(JSON.stringify(e),"]")}else n="[".concat(JSON.stringify(e),"]");return localStorage.setItem(i+t,n),Promise.resolve()}},{key:"lookupHits",value:function(t){var e=localStorage.getItem(i+t);return localStorage.removeItem(i+t),e?JSON.parse(e):null}},{key:"flushHits",value:function(t){return localStorage.removeItem(i+t),Promise.resolve()}}]),t}()},"./src/cache/DefaultVisitorCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VISITOR_PREFIX:()=>i,DefaultVisitorCache:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),"FS_VISITOR_CACHE_"),o=function(){function t(){}return(0,n.default)(t,[{key:"cacheVisitor",value:function(t,e){return localStorage.setItem(i+t,JSON.stringify(e)),Promise.resolve()}},{key:"lookupVisitor",value:function(t){var e=localStorage.getItem(i+t);return e?JSON.parse(e):null}},{key:"flushVisitor",value:function(t){return localStorage.removeItem(i+t),Promise.resolve()}}]),t}()},"./src/config/BucketingConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BucketingConfig:()=>d}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/enum/index.ts"),u=r("./src/config/FlagshipConfig.ts");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var d=function(t){(0,i.default)(r,t);var e=f(r);function r(t){var r,n;return(n=e.call(this,l(l({},t),{},{decisionMode:u.DecisionMode.BUCKETING}))).pollingInterval=null!=(r=null==t?void 0:t.pollingInterval)?r:a.DEFAULT_POLLING_INTERVAL,n.onBucketingFail=null==t?void 0:t.onBucketingFail,n.onBucketingSuccess=null==t?void 0:t.onBucketingSuccess,n.onBucketingUpdated=null==t?void 0:t.onBucketingUpdated,n}return r}(u.FlagshipConfig)},"./src/config/ConfigManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ConfigManager:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t,e,r){this._config=t,this._decisionManager=e,this._trackingManager=r}return(0,n.default)(t,[{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"decisionManager",get:function(){return this._decisionManager},set:function(t){this._decisionManager=t}},{key:"trackingManager",get:function(){return this._trackingManager},set:function(t){this._trackingManager=t}}]),t}()},"./src/config/DecisionApiConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionApiConfig:()=>f}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/config/FlagshipConfig.ts");function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var f=function(t){(0,i.default)(r,t);var e=l(r);function r(t){return e.call(this,c(c({},t),{},{decisionMode:a.DecisionMode.DECISION_API}))}return r}(a.FlagshipConfig)},"./src/config/FlagshipConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionMode:()=>n,statusChangeError:()=>a,FlagshipConfig:()=>u});var n,i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=(r("core-js/modules/es.function.name.js"),r("./src/enum/index.ts")),s=r("./src/utils/utils.ts");!function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(n||(n={}));var a="statusChangedCallback must be a function",u=function(){function t(t){var e=t.envId,r=t.apiKey,i=t.timeout,s=t.logLevel,a=t.logManager,u=t.statusChangedCallback,c=t.fetchNow,l=t.decisionMode,f=t.enableClientCache,d=t.initialBucketing,p=t.decisionApiUrl,h=t.activateDeduplicationTime,g=t.hitDeduplicationTime,v=t.visitorCacheImplementation,y=t.hitCacheImplementation,m=t.disableCache;switch(t.language){case 1:o.SDK_LANGUAGE.name="ReactJS";break;case 2:o.SDK_LANGUAGE.name="React-Native";break;default:o.SDK_LANGUAGE.name="undefined"!=typeof window&&"Deno"in window?"Deno":"Typescript"}this.decisionApiUrl=p||o.BASE_API_URL,this._envId=e,this._apiKey=r,this.logLevel=null!=s?s:o.LogLevel.ALL,this.timeout=i||o.REQUEST_TIME_OUT,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===f||f,this._decisionMode=l||n.DECISION_API,this._initialBucketing=d,this.activateDeduplicationTime=null!=h?h:o.DEFAULT_DEDUPLICATION_TIME,this.hitDeduplicationTime=null!=g?g:o.DEFAULT_DEDUPLICATION_TIME,this.disableCache=!!m,v&&(this.visitorCacheImplementation=v),y&&(this.hitCacheImplementation=y),a&&(this.logManager=a),this.statusChangedCallback=u}return(0,i.default)(t,[{key:"initialBucketing",get:function(){return this._initialBucketing},set:function(t){this._initialBucketing=t}},{key:"enableClientCache",get:function(){return this._enableClientCache},set:function(t){this._enableClientCache=t}},{key:"onBucketingSuccess",get:function(){return this._onBucketingSuccess},set:function(t){this._onBucketingSuccess=t}},{key:"onBucketingFail",get:function(){return this._onBucketingFail},set:function(t){this._onBucketingFail=t}},{key:"onBucketingUpdated",get:function(){return this._onBucketingUpdated},set:function(t){this._onBucketingUpdated=t}},{key:"envId",get:function(){return this._envId},set:function(t){this._envId=t}},{key:"apiKey",get:function(){return this._apiKey},set:function(t){this._apiKey=t}},{key:"decisionMode",get:function(){return this._decisionMode}},{key:"timeout",get:function(){return this._timeout},set:function(t){this._timeout=t}},{key:"logLevel",get:function(){return this._logLevel},set:function(t){this._logLevel=t}},{key:"fetchNow",get:function(){return this._fetchNow},set:function(t){this._fetchNow=t}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){this._pollingInterval=t}},{key:"activateDeduplicationTime",get:function(){return this._activateDeduplicationTime},set:function(t){"number"==typeof t?this._activateDeduplicationTime=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"activateDeduplicationTime","number"),"activateDeduplicationTime")}},{key:"hitDeduplicationTime",get:function(){return this._hitDeduplicationTime},set:function(t){"number"==typeof t?this._hitDeduplicationTime=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"hitDeduplicationTime","number"),"hitDeduplicationTime")}},{key:"visitorCacheImplementation",get:function(){return this._visitorCacheImplementation},set:function(t){this._visitorCacheImplementation=t}},{key:"hitCacheImplementation",get:function(){return this._hitCacheImplementation},set:function(t){this._hitCacheImplementation=t}},{key:"disableCache",get:function(){return this._disableCache},set:function(t){this._disableCache=t}},{key:"statusChangedCallback",get:function(){return this._statusChangedCallback},set:function(t){"function"==typeof t?this._statusChangedCallback=t:(0,s.logError)(this,a,"statusChangedCallback")}},{key:"logManager",get:function(){return this._logManager},set:function(t){this._logManager=t}},{key:"decisionApiUrl",get:function(){return this._decisionApiUrl},set:function(t){"string"==typeof t?this._decisionApiUrl=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"decisionApiUrl","string"),"decisionApiUrl")}}]),t}()},"./src/config/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ConfigManager:()=>n.ConfigManager,DecisionApiConfig:()=>i.DecisionApiConfig,BucketingConfig:()=>o.BucketingConfig,DecisionMode:()=>s.DecisionMode,FlagshipConfig:()=>s.FlagshipConfig});var n=r("./src/config/ConfigManager.ts"),i=r("./src/config/DecisionApiConfig.ts"),o=r("./src/config/BucketingConfig.ts"),s=r("./src/config/FlagshipConfig.ts")},"./src/decision/ApiManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ApiManager:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),a=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),u=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),l=r.n(c),f=(r("core-js/modules/es.function.name.js"),r("core-js/modules/es.array.concat.js"),r("./src/enum/index.ts")),d=r("./src/decision/DecisionManager.ts"),p=r("./src/utils/utils.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var g=function(t){(0,s.default)(a,t);var e,r=h(a);function a(){return r.apply(this,arguments)}return(0,o.default)(a,[{key:"getCampaignsAsync",value:(e=(0,i.default)(l().mark((function t(e){var r,i,o,s,a=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},(0,n.default)(r,f.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,n.default)(r,f.HEADER_X_SDK_CLIENT,f.SDK_LANGUAGE.name),(0,n.default)(r,f.HEADER_X_SDK_VERSION,f.SDK_VERSION),(0,n.default)(r,f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),i=r,o={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},s="".concat(this.config.decisionApiUrl||f.BASE_API_URL).concat(this.config.envId).concat(f.URL_CAMPAIGNS,"?").concat(f.EXPOSE_ALL_KEYS,"=true"),e.hasConsented||(s+="&".concat(f.SEND_CONTEXT_EVENT,"=false")),t.abrupt("return",this._httpClient.postAsync(s,{headers:i,timeout:this.config.timeout,body:o}).then((function(t){a.panic=!!t.body.panic;var e=[];return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return(0,p.logError)(a.config,t.message||t,f.PROCESS_GET_CAMPAIGNS),[]})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),a}(d.DecisionManager)},"./src/decision/BucketingManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BucketingManager:()=>y}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.array.slice.js"),r("core-js/modules/es.array.from.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.symbol.description.js"),r("core-js/modules/es.symbol.iterator.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/web.dom-collections.iterator.js");var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),l=r("./node_modules/@babel/runtime/regenerator/index.js"),f=r.n(l),d=(r("core-js/modules/es.function.name.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.find.js"),r("core-js/modules/es.array.includes.js"),r("core-js/modules/es.string.includes.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.string.starts-with.js"),r("core-js/modules/es.string.ends-with.js"),r("./src/enum/index.ts")),p=r("./src/utils/utils.ts");function h(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,c.default)(t);if(e){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var y=function(t){(0,a.default)(l,t);var e,r,u,c=v(l);function l(t,e,r){var n;return(n=c.call(this,t,e))._murmurHash=r,n._isFirstPooling=!0,e.initialBucketing&&(n._bucketingContent=e.initialBucketing),n}return(0,s.default)(l,[{key:"finishLoop",value:function(t){if(200===t.status&&(this._bucketingContent=t.body),t.headers&&t.headers["last-modified"]){var e=t.headers["last-modified"];this._lastModified!==e&&this.config.onBucketingUpdated&&this.config.onBucketingUpdated(new Date(e)),this._lastModified=e}this._isFirstPooling&&(this._isFirstPooling=!1,this.updateFlagshipStatus(d.FlagshipStatus.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:function(){var t,e=this,r=1e3*(null!=(t=this.config.pollingInterval)?t:d.REQUEST_TIME_OUT);(0,p.logInfo)(this.config,"Bucketing polling starts","startPolling"),this.polling(),0!==r&&(this._intervalID=setInterval((function(){e.polling()}),r))}},{key:"polling",value:(u=(0,o.default)(f().mark((function t(){var e,r,n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isPooling){t.next=2;break}return t.abrupt("return");case 2:return this._isPooling=!0,this._isFirstPooling&&this.updateFlagshipStatus(d.FlagshipStatus.POLLING),t.prev=4,r=(0,p.sprintf)(d.BUCKETING_API_URL,this.config.envId),e={},(0,i.default)(e,d.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,i.default)(e,d.HEADER_X_SDK_CLIENT,d.SDK_LANGUAGE.name),(0,i.default)(e,d.HEADER_X_SDK_VERSION,d.SDK_VERSION),(0,i.default)(e,d.HEADER_CONTENT_TYPE,d.HEADER_APPLICATION_JSON),n=e,this._lastModified&&(n["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(r,{headers:n,timeout:this.config.timeout});case 10:o=t.sent,this.finishLoop(o),t.next=20;break;case 14:t.prev=14,t.t0=t.catch(4),this._isPooling=!1,(0,p.logError)(this.config,t.t0,"startPolling"),this._isFirstPooling&&this.updateFlagshipStatus(d.FlagshipStatus.NOT_INITIALIZED),"function"==typeof this.config.onBucketingFail&&this.config.onBucketingFail(new Error(t.t0));case 20:case"end":return t.stop()}}),t,this,[[4,14]])}))),function(){return u.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,(0,p.logInfo)(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(r=(0,o.default)(f().mark((function t(e){var r,n,o,s;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(Object.keys(e.context).length<=3)){t.next=3;break}return t.abrupt("return");case 3:return n=(0,p.sprintf)(d.BUCKETING_API_CONTEXT_URL,this.config.envId),r={},(0,i.default)(r,d.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,i.default)(r,d.HEADER_X_SDK_CLIENT,d.SDK_LANGUAGE.name),(0,i.default)(r,d.HEADER_X_SDK_VERSION,d.SDK_VERSION),(0,i.default)(r,d.HEADER_CONTENT_TYPE,d.HEADER_APPLICATION_JSON),o=r,s={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=8,this._httpClient.postAsync(n,{headers:o,body:s,timeout:this.config.timeout});case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),(0,p.logError)(this.config,t.t0.message||t.t0,"sendContext");case 13:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return r.apply(this,arguments)})},{key:"getCampaignsAsync",value:(e=(0,o.default)(f().mark((function t(e){var r,n=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._bucketingContent){t.next=2;break}return t.abrupt("return",[]);case 2:if(!this._bucketingContent.panic){t.next=5;break}return this.panic=!0,t.abrupt("return",[]);case 5:if(this.panic=!1,this._bucketingContent.campaigns){t.next=8;break}return t.abrupt("return",[]);case 8:return this.sendContext(e),r=[],this._bucketingContent.campaigns.forEach((function(t){var i=n.getVisitorCampaigns(t.variationGroups,t.id,t.type,e);i&&r.push(i)})),t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,r,n){var i,o=h(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(this.isMatchTargeting(s,n)){var a=this.getVariation(s,n);return a?{id:e,variation:a,variationGroupId:s.id,type:r}:null}}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"getVariation",value:function(t,e){var r,i=this._murmurHash.murmurHash3Int32(t.id+e.visitorId)%100,o=0,s=h(t.variations);try{var a=function(){var n,s,a=r.value,u=null==(n=e.visitorCache)||null==(s=n.data)?void 0:s.assignmentsHistory,c=u?u[t.id]:null;if(c){var l=t.variations.find((function(t){return t.id===c}));return l?{v:{id:l.id,modifications:l.modifications,reference:l.reference}}:"continue"}return void 0===a.allocation?"continue":(o+=a.allocation,i<=o?{v:{id:a.id,modifications:a.modifications,reference:a.reference}}:void 0)};for(s.s();!(r=s.n()).done;){var u=a();if("continue"!==u&&"object"===(0,n.default)(u))return u.v}}catch(t){s.e(t)}finally{s.f()}return null}},{key:"isMatchTargeting",value:function(t,e){var r=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return r.checkAndTargeting(t.targetings,e)}))}},{key:"isANDListOperator",value:function(t){return["NOT_EQUALS","NOT_CONTAINS"].includes(t)}},{key:"checkAndTargeting",value:function(t,e){var r,n,i=!1,o=h(t);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s.key,u=s.value,c=s.operator;if("fs_all_users"!==a){if("fs_users"===a)r=e.visitorId;else{if(!(a in e.context)){i=!1;break}r=e.context[a]}if(!(i=this.testOperator(c,r,u)))break}else i=!0}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"testListOperatorLoop",value:function(t,e,r,n){var i,o=n,s=h(r);try{for(s.s();!(i=s.n()).done;){var a=i.value;if((o=this.testOperator(t,e,a))!==n)break}}catch(t){s.e(t)}finally{s.f()}return o}},{key:"testListOperator",value:function(t,e,r){return this.isANDListOperator(t)?this.testListOperatorLoop(t,e,r,!0):this.testListOperatorLoop(t,e,r,!1)}},{key:"testOperator",value:function(t,e,r){var n;if(Array.isArray(r))return this.testListOperator(t,e,r);switch(t){case"EQUALS":n=e===r;break;case"NOT_EQUALS":n=e!==r;break;case"CONTAINS":n=e.toString().includes(r.toString());break;case"NOT_CONTAINS":n=!e.toString().includes(r.toString());break;case"GREATER_THAN":n=e>r;break;case"LOWER_THAN":n=e<r;break;case"GREATER_THAN_OR_EQUALS":n=e>=r;break;case"LOWER_THAN_OR_EQUALS":n=e<=r;break;case"STARTS_WITH":n=e.toString().startsWith(r.toString());break;case"ENDS_WITH":n=e.toString().endsWith(r.toString());break;default:n=!1}return n}}]),l}(r("./src/decision/DecisionManager.ts").DecisionManager)},"./src/decision/DecisionManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionManager:()=>l});var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),s=r("./node_modules/@babel/runtime/regenerator/index.js"),a=r.n(s),u=(r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.map.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/web.dom-collections.iterator.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("./src/enum/index.ts")),c=r("./src/utils/utils.ts"),l=function(){function t(t,e){(0,o.default)(this,"_panic",!1),this._config=e,this._httpClient=t}var e;return(0,i.default)(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?u.FlagshipStatus.READY_PANIC_ON:u.FlagshipStatus.READY),this._panic=t}},{key:"statusChangedCallback",value:function(t){this._statusChangedCallback=t}},{key:"updateFlagshipStatus",value:function(t){"function"==typeof this._statusChangedCallback&&this._statusChangedCallback&&this._statusChangedCallback(t)}},{key:"getModifications",value:function(t){var e=new Map;return t.forEach((function(t){var r=t.variation.modifications.value;for(var n in r){var i=r[n];e.set(n,{key:n,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,campaignType:t.type,value:i})}})),e}},{key:"getCampaignsModificationsAsync",value:(e=(0,n.default)(a().mark((function t(e){var r=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getCampaignsAsync(e).then((function(t){return r.getModifications(t)})).catch((function(t){return(0,c.logError)(r.config,t.message||t,"getCampaignsModificationsAsync"),new Map})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"isPanic",value:function(){return this._panic}}]),t}()},"./src/enum/FlagshipConstant.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDK_LANGUAGE:()=>n,REQUEST_TIME_OUT:()=>i,DEFAULT_DEDUPLICATION_TIME:()=>o,DEFAULT_POLLING_INTERVAL:()=>s,BASE_API_URL:()=>a,HIT_API_URL:()=>u,BUCKETING_API_URL:()=>c,BUCKETING_API_CONTEXT_URL:()=>l,HIT_CONSENT_URL:()=>f,URL_CAMPAIGNS:()=>d,URL_ACTIVATE_MODIFICATION:()=>p,EXPOSE_ALL_KEYS:()=>h,SEND_CONTEXT_EVENT:()=>g,SDK_VERSION:()=>v,VISITOR_CACHE_VERSION:()=>y,HIT_CACHE_VERSION:()=>m,DEFAULT_HIT_CACHE_TIME:()=>_,SDK_STARTED_INFO:()=>E,FLAGSHIP_SDK:()=>I,EMIT_READY:()=>b,INITIALIZATION_PARAM_ERROR:()=>O,ERROR:()=>T,CONTEXT_NULL_ERROR:()=>A,CONTEXT_PARAM_ERROR:()=>R,GET_MODIFICATION_CAST_ERROR:()=>S,GET_FLAG_CAST_ERROR:()=>C,GET_MODIFICATION_MISSING_ERROR:()=>j,GET_FLAG_MISSING_ERROR:()=>N,GET_MODIFICATION_KEY_ERROR:()=>k,ACTIVATE_MODIFICATION_KEY_ERROR:()=>P,GET_MODIFICATION_ERROR:()=>M,GET_FLAG_ERROR:()=>x,USER_EXPOSED_FLAG_ERROR:()=>D,USER_EXPOSED_CAST_ERROR:()=>w,GET_METADATA_CAST_ERROR:()=>L,ACTIVATE_MODIFICATION_ERROR:()=>F,DECISION_MANAGER_MISSING_ERROR:()=>V,TRACKER_MANAGER_MISSING_ERROR:()=>G,CURL_LIBRARY_IS_NOT_LOADED:()=>H,TYPE_ERROR:()=>U,TYPE_INTEGER_ERROR:()=>B,VISITOR_ID_ERROR:()=>K,PANIC_MODE_ERROR:()=>Y,METHOD_DEACTIVATED_CONSENT_ERROR:()=>X,METHOD_DEACTIVATED_ERROR:()=>W,METHOD_DEACTIVATED_BUCKETING_ERROR:()=>z,FLAGSHIP_VISITOR_NOT_AUTHENTICATE:()=>J,PREDEFINED_CONTEXT_TYPE_ERROR:()=>Q,METHOD_DEACTIVATED_SEND_CONSENT_ERROR:()=>$,PROCESS:()=>Z,PROCESS_INITIALIZATION:()=>q,PROCESS_UPDATE_CONTEXT:()=>tt,PROCESS_GET_MODIFICATION:()=>et,PROCESS_GET_MODIFICATION_INFO:()=>rt,PROCESS_NEW_VISITOR:()=>nt,PROCESS_ACTIVE_MODIFICATION:()=>it,PROCESS_SYNCHRONIZED_MODIFICATION:()=>ot,PROCESS_SEND_HIT:()=>st,PROCESS_SEND_ACTIVATE:()=>at,PROCESS_GET_CAMPAIGNS:()=>ut,PROCESS_GET_ALL_MODIFICATION:()=>ct,PROCESS_MODIFICATIONS_FOR_CAMPAIGN:()=>lt,PROCESS_CACHE_HIT:()=>ft,CUSTOMER_ENV_ID_API_ITEM:()=>dt,CUSTOMER_UID:()=>pt,ANONYMOUS_ID:()=>ht,VISITOR_ID_API_ITEM:()=>gt,VARIATION_GROUP_ID_API_ITEM:()=>vt,VARIATION_ID_API_ITEM:()=>yt,DS_API_ITEM:()=>mt,T_API_ITEM:()=>_t,DL_API_ITEM:()=>Et,SDK_APP:()=>It,TID_API_ITEM:()=>bt,TA_API_ITEM:()=>Ot,TT_API_ITEM:()=>Tt,TC_API_ITEM:()=>At,TCC_API_ITEM:()=>Rt,ICN_API_ITEM:()=>St,SM_API_ITEM:()=>Ct,PM_API_ITEM:()=>jt,TR_API_ITEM:()=>Nt,TS_API_ITEM:()=>kt,IN_API_ITEM:()=>Pt,IC_API_ITEM:()=>Mt,IP_API_ITEM:()=>xt,IQ_API_ITEM:()=>Dt,IV_API_ITEM:()=>wt,EVENT_CATEGORY_API_ITEM:()=>Lt,EVENT_ACTION_API_ITEM:()=>Ft,EVENT_LABEL_API_ITEM:()=>Vt,EVENT_VALUE_API_ITEM:()=>Gt,USER_IP_API_ITEM:()=>Ht,SCREEN_RESOLUTION_API_ITEM:()=>Ut,USER_LANGUAGE:()=>Bt,SESSION_NUMBER:()=>Kt,HEADER_X_API_KEY:()=>Yt,HEADER_CONTENT_TYPE:()=>Xt,HEADER_X_SDK_CLIENT:()=>Wt,HEADER_X_SDK_VERSION:()=>zt,HEADER_APPLICATION_JSON:()=>Jt});var n={name:"TypeScript"},i=2,o=2.5,s=1,a="https://decision.flagship.io/v2/",u="https://ariane.abtasty.com",c="https://cdn.flagship.io/{0}/bucketing.json",l="https://decision.flagship.io/v2/{0}/events",f="https://ariane.abtasty.com",d="/campaigns",p="activate",h="exposeAllKeys",g="sendContextEvent",v="v3",y=1,m=1,_=144e5,E="Flagship SDK (version: {0}) READY",I="Flagship SDK",b="ready",O="Params 'envId' and 'apiKey' must not be null or empty.",T="error",A="Context must not to be null",R="params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",S="Modification for key {0} has a different type. Default value is returned.",C="Flag for key {0} has a different type. Default value is returned.",j="No modification for key {0}. Default value is returned.",N="No Flag for key {0}. Default value is returned.",k="Key {0} must not be null. Default value is returned.",P="Key {0} must not be null, no activate will be sent.",M="No modification for key {0}.",x="No flag for key {0}.",D="No flag for key {0}, no activate will be sent",w="Flag for key {0} has a different type with defaultValue, no activate will be sent",L="Flag for key {0} has a different type with defaultValue, an empty metadata object is returned",F="No modification for key {0}, no activate will be sent.",V="decisionManager must not be null.",G="trackerManager must not be null.",H="curl library is not loaded",U="{0} must be a {1}",B="value of {0} is not an {1}, it will be truncated to {1}",K="visitorId must not be null or empty",Y="{0} deactivated while panic mode is on.",X="Method {0} is deactivated for visitor {1} : visitor did not consent.",W="Method {0} is deactivated while SDK status is: {1}.",z="Method {0} is deactivated on Bucketing mode.",J="Visitor is not authenticated yet",Q="Predefined Context {0} must be type of {1}",$="Send consent hit is deactivated while SDK status is: {1}.",Z="process",q="INITIALIZATION",tt="UPDATE CONTEXT",et="GET MODIFICATION",rt="GET MODIFICATION INFO",nt="NEW VISITOR",it="ACTIVE MODIFICATION",ot="SYNCHRONIZED MODIFICATION",st="SEND HIT",at="SEND ACTIVATE",ut="GET CAMPAIGNS",ct="GET ALL MODIFICATIONS",lt="GET MODIFICATION FOR CAMPAIGN",ft="cacheHit",dt="cid",pt="cuid",ht="aid",gt="vid",vt="caid",yt="vaid",mt="ds",_t="t",Et="dl",It="APP",bt="tid",Ot="ta",Tt="tt",At="tc",Rt="tcc",St="icn",Ct="sm",jt="pm",Nt="tr",kt="ts",Pt="in",Mt="ic",xt="ip",Dt="iq",wt="iv",Lt="ec",Ft="ea",Vt="el",Gt="ev",Ht="uip",Ut="sr",Bt="ul",Kt="sn",Yt="x-api-key",Xt="Content-Type",Wt="x-sdk-client",zt="x-sdk-version",Jt="application/json"},"./src/enum/FlagshipContext.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DEVICE_LOCALE:()=>o,DEVICE_TYPE:()=>s,DEVICE_MODEL:()=>a,LOCATION_CITY:()=>u,LOCATION_REGION:()=>c,LOCATION_COUNTRY:()=>l,LOCATION_LAT:()=>f,LOCATION_LONG:()=>d,IP:()=>p,OS_NAME:()=>h,OS_VERSION_NAME:()=>g,OS_VERSION_CODE:()=>v,CARRIER_NAME:()=>y,INTERNET_CONNECTION:()=>m,APP_VERSION_NAME:()=>_,APP_VERSION_CODE:()=>E,INTERFACE_NAME:()=>I,FLAGSHIP_CLIENT:()=>b,FLAGSHIP_VERSION:()=>O,FLAGSHIP_VISITOR:()=>T,FLAGSHIP_CONTEXT:()=>A});var n,i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o="sdk_deviceLanguage",s="sdk_deviceType",a="sdk_deviceModel",u="sdk_city",c="sdk_region",l="sdk_country",f="sdk_lat",d="sdk_long",p="sdk_ip",h="sdk_osName",g="sdk_osVersionName",v="sdk_osVersionCode",y="sdk_carrierName",m="sdk_internetConnection",_="sdk_versionName",E="sdk_versionCode",I="sdk_interfaceName",b="fs_client",O="fs_version",T="fs_users",A=(n={},(0,i.default)(n,o,"string"),(0,i.default)(n,s,"string"),(0,i.default)(n,a,"string"),(0,i.default)(n,u,"string"),(0,i.default)(n,c,"string"),(0,i.default)(n,l,"string"),(0,i.default)(n,f,"number"),(0,i.default)(n,d,"number"),(0,i.default)(n,p,"string"),(0,i.default)(n,h,"string"),(0,i.default)(n,g,"string"),(0,i.default)(n,v,"number"),(0,i.default)(n,y,"string"),(0,i.default)(n,m,"string"),(0,i.default)(n,_,"string"),(0,i.default)(n,E,"number"),(0,i.default)(n,I,"string"),(0,i.default)(n,b,"string"),(0,i.default)(n,O,"string"),(0,i.default)(n,T,"string"),n)},"./src/enum/FlagshipStatus.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{FlagshipStatus:()=>n}),function(t){t[t.NOT_READY=0]="NOT_READY",t[t.NOT_INITIALIZED=0]="NOT_INITIALIZED",t[t.STARTING=1]="STARTING",t[t.POLLING=2]="POLLING",t[t.READY_PANIC_ON=3]="READY_PANIC_ON",t[t.READY=4]="READY"}(n||(n={}))},"./src/enum/HitType.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{HitType:()=>n}),function(t){t.PAGE_VIEW="PAGEVIEW",t.PAGE="PAGEVIEW",t.SCREEN_VIEW="SCREENVIEW",t.SCREEN="SCREENVIEW",t.TRANSACTION="TRANSACTION",t.ITEM="ITEM",t.EVENT="EVENT"}(n||(n={}))},"./src/enum/LogLevel.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{LogLevel:()=>n}),function(t){t[t.NONE=0]="NONE",t[t.EMERGENCY=1]="EMERGENCY",t[t.ALERT=2]="ALERT",t[t.CRITICAL=3]="CRITICAL",t[t.ERROR=4]="ERROR",t[t.WARNING=5]="WARNING",t[t.NOTICE=6]="NOTICE",t[t.INFO=7]="INFO",t[t.DEBUG=8]="DEBUG",t[t.ALL=9]="ALL"}(n||(n={}))},"./src/enum/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LogLevel:()=>n.LogLevel,ACTIVATE_MODIFICATION_ERROR:()=>i.ACTIVATE_MODIFICATION_ERROR,ACTIVATE_MODIFICATION_KEY_ERROR:()=>i.ACTIVATE_MODIFICATION_KEY_ERROR,ANONYMOUS_ID:()=>i.ANONYMOUS_ID,BASE_API_URL:()=>i.BASE_API_URL,BUCKETING_API_CONTEXT_URL:()=>i.BUCKETING_API_CONTEXT_URL,BUCKETING_API_URL:()=>i.BUCKETING_API_URL,CONTEXT_NULL_ERROR:()=>i.CONTEXT_NULL_ERROR,CONTEXT_PARAM_ERROR:()=>i.CONTEXT_PARAM_ERROR,CURL_LIBRARY_IS_NOT_LOADED:()=>i.CURL_LIBRARY_IS_NOT_LOADED,CUSTOMER_ENV_ID_API_ITEM:()=>i.CUSTOMER_ENV_ID_API_ITEM,CUSTOMER_UID:()=>i.CUSTOMER_UID,DECISION_MANAGER_MISSING_ERROR:()=>i.DECISION_MANAGER_MISSING_ERROR,DEFAULT_DEDUPLICATION_TIME:()=>i.DEFAULT_DEDUPLICATION_TIME,DEFAULT_HIT_CACHE_TIME:()=>i.DEFAULT_HIT_CACHE_TIME,DEFAULT_POLLING_INTERVAL:()=>i.DEFAULT_POLLING_INTERVAL,DL_API_ITEM:()=>i.DL_API_ITEM,DS_API_ITEM:()=>i.DS_API_ITEM,EMIT_READY:()=>i.EMIT_READY,ERROR:()=>i.ERROR,EVENT_ACTION_API_ITEM:()=>i.EVENT_ACTION_API_ITEM,EVENT_CATEGORY_API_ITEM:()=>i.EVENT_CATEGORY_API_ITEM,EVENT_LABEL_API_ITEM:()=>i.EVENT_LABEL_API_ITEM,EVENT_VALUE_API_ITEM:()=>i.EVENT_VALUE_API_ITEM,EXPOSE_ALL_KEYS:()=>i.EXPOSE_ALL_KEYS,FLAGSHIP_SDK:()=>i.FLAGSHIP_SDK,FLAGSHIP_VISITOR_NOT_AUTHENTICATE:()=>i.FLAGSHIP_VISITOR_NOT_AUTHENTICATE,GET_FLAG_CAST_ERROR:()=>i.GET_FLAG_CAST_ERROR,GET_FLAG_ERROR:()=>i.GET_FLAG_ERROR,GET_FLAG_MISSING_ERROR:()=>i.GET_FLAG_MISSING_ERROR,GET_METADATA_CAST_ERROR:()=>i.GET_METADATA_CAST_ERROR,GET_MODIFICATION_CAST_ERROR:()=>i.GET_MODIFICATION_CAST_ERROR,GET_MODIFICATION_ERROR:()=>i.GET_MODIFICATION_ERROR,GET_MODIFICATION_KEY_ERROR:()=>i.GET_MODIFICATION_KEY_ERROR,GET_MODIFICATION_MISSING_ERROR:()=>i.GET_MODIFICATION_MISSING_ERROR,HEADER_APPLICATION_JSON:()=>i.HEADER_APPLICATION_JSON,HEADER_CONTENT_TYPE:()=>i.HEADER_CONTENT_TYPE,HEADER_X_API_KEY:()=>i.HEADER_X_API_KEY,HEADER_X_SDK_CLIENT:()=>i.HEADER_X_SDK_CLIENT,HEADER_X_SDK_VERSION:()=>i.HEADER_X_SDK_VERSION,HIT_API_URL:()=>i.HIT_API_URL,HIT_CACHE_VERSION:()=>i.HIT_CACHE_VERSION,HIT_CONSENT_URL:()=>i.HIT_CONSENT_URL,ICN_API_ITEM:()=>i.ICN_API_ITEM,IC_API_ITEM:()=>i.IC_API_ITEM,INITIALIZATION_PARAM_ERROR:()=>i.INITIALIZATION_PARAM_ERROR,IN_API_ITEM:()=>i.IN_API_ITEM,IP_API_ITEM:()=>i.IP_API_ITEM,IQ_API_ITEM:()=>i.IQ_API_ITEM,IV_API_ITEM:()=>i.IV_API_ITEM,METHOD_DEACTIVATED_BUCKETING_ERROR:()=>i.METHOD_DEACTIVATED_BUCKETING_ERROR,METHOD_DEACTIVATED_CONSENT_ERROR:()=>i.METHOD_DEACTIVATED_CONSENT_ERROR,METHOD_DEACTIVATED_ERROR:()=>i.METHOD_DEACTIVATED_ERROR,METHOD_DEACTIVATED_SEND_CONSENT_ERROR:()=>i.METHOD_DEACTIVATED_SEND_CONSENT_ERROR,PANIC_MODE_ERROR:()=>i.PANIC_MODE_ERROR,PM_API_ITEM:()=>i.PM_API_ITEM,PREDEFINED_CONTEXT_TYPE_ERROR:()=>i.PREDEFINED_CONTEXT_TYPE_ERROR,PROCESS:()=>i.PROCESS,PROCESS_ACTIVE_MODIFICATION:()=>i.PROCESS_ACTIVE_MODIFICATION,PROCESS_CACHE_HIT:()=>i.PROCESS_CACHE_HIT,PROCESS_GET_ALL_MODIFICATION:()=>i.PROCESS_GET_ALL_MODIFICATION,PROCESS_GET_CAMPAIGNS:()=>i.PROCESS_GET_CAMPAIGNS,PROCESS_GET_MODIFICATION:()=>i.PROCESS_GET_MODIFICATION,PROCESS_GET_MODIFICATION_INFO:()=>i.PROCESS_GET_MODIFICATION_INFO,PROCESS_INITIALIZATION:()=>i.PROCESS_INITIALIZATION,PROCESS_MODIFICATIONS_FOR_CAMPAIGN:()=>i.PROCESS_MODIFICATIONS_FOR_CAMPAIGN,PROCESS_NEW_VISITOR:()=>i.PROCESS_NEW_VISITOR,PROCESS_SEND_ACTIVATE:()=>i.PROCESS_SEND_ACTIVATE,PROCESS_SEND_HIT:()=>i.PROCESS_SEND_HIT,PROCESS_SYNCHRONIZED_MODIFICATION:()=>i.PROCESS_SYNCHRONIZED_MODIFICATION,PROCESS_UPDATE_CONTEXT:()=>i.PROCESS_UPDATE_CONTEXT,REQUEST_TIME_OUT:()=>i.REQUEST_TIME_OUT,SCREEN_RESOLUTION_API_ITEM:()=>i.SCREEN_RESOLUTION_API_ITEM,SDK_APP:()=>i.SDK_APP,SDK_LANGUAGE:()=>i.SDK_LANGUAGE,SDK_STARTED_INFO:()=>i.SDK_STARTED_INFO,SDK_VERSION:()=>i.SDK_VERSION,SEND_CONTEXT_EVENT:()=>i.SEND_CONTEXT_EVENT,SESSION_NUMBER:()=>i.SESSION_NUMBER,SM_API_ITEM:()=>i.SM_API_ITEM,TA_API_ITEM:()=>i.TA_API_ITEM,TCC_API_ITEM:()=>i.TCC_API_ITEM,TC_API_ITEM:()=>i.TC_API_ITEM,TID_API_ITEM:()=>i.TID_API_ITEM,TRACKER_MANAGER_MISSING_ERROR:()=>i.TRACKER_MANAGER_MISSING_ERROR,TR_API_ITEM:()=>i.TR_API_ITEM,TS_API_ITEM:()=>i.TS_API_ITEM,TT_API_ITEM:()=>i.TT_API_ITEM,TYPE_ERROR:()=>i.TYPE_ERROR,TYPE_INTEGER_ERROR:()=>i.TYPE_INTEGER_ERROR,T_API_ITEM:()=>i.T_API_ITEM,URL_ACTIVATE_MODIFICATION:()=>i.URL_ACTIVATE_MODIFICATION,URL_CAMPAIGNS:()=>i.URL_CAMPAIGNS,USER_EXPOSED_CAST_ERROR:()=>i.USER_EXPOSED_CAST_ERROR,USER_EXPOSED_FLAG_ERROR:()=>i.USER_EXPOSED_FLAG_ERROR,USER_IP_API_ITEM:()=>i.USER_IP_API_ITEM,USER_LANGUAGE:()=>i.USER_LANGUAGE,VARIATION_GROUP_ID_API_ITEM:()=>i.VARIATION_GROUP_ID_API_ITEM,VARIATION_ID_API_ITEM:()=>i.VARIATION_ID_API_ITEM,VISITOR_CACHE_VERSION:()=>i.VISITOR_CACHE_VERSION,VISITOR_ID_API_ITEM:()=>i.VISITOR_ID_API_ITEM,VISITOR_ID_ERROR:()=>i.VISITOR_ID_ERROR,FlagshipStatus:()=>o.FlagshipStatus,HitType:()=>s.HitType});var n=r("./src/enum/LogLevel.ts"),i=r("./src/enum/FlagshipConstant.ts"),o=r("./src/enum/FlagshipStatus.ts"),s=r("./src/enum/HitType.ts")},"./src/flag/FlagMetadata.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FlagMetadata:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t){var e=t.campaignId,r=t.variationGroupId,n=t.variationId,i=t.isReference,o=t.campaignType;this.campaignId=e,this.variationGroupId=r,this.variationId=n,this.isReference=i,this.campaignType=o}return(0,n.default)(t,null,[{key:"Empty",value:function(){return new t({campaignId:"",campaignType:"",variationId:"",variationGroupId:"",isReference:!1})}}]),t}()},"./src/flag/Flags.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flag:()=>s});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./src/utils/utils.ts"),o=r("./src/flag/FlagMetadata.ts"),s=function(){function t(t){var e=t.key,r=t.visitor,n=t.defaultValue;this._key=e,this._visitor=r,this._defaultValue=n}return(0,n.default)(t,[{key:"exists",value:function(){var t=this._visitor.flagsData.get(this._key);return!!(null!=t&&t.campaignId&&t.variationId&&t.variationGroupId)}},{key:"metadata",get:function(){var t=this._visitor.flagsData.get(this._key),e=new o.FlagMetadata({campaignId:(null==t?void 0:t.campaignId)||"",variationGroupId:(null==t?void 0:t.variationGroupId)||"",variationId:(null==t?void 0:t.variationId)||"",isReference:!(null==t||!t.isReference),campaignType:(null==t?void 0:t.campaignType)||""});return t?this._visitor.getFlagMetadata({metadata:e,hasSameType:!t.value||(0,i.hasSameType)(t.value,this._defaultValue),key:t.key}):e}},{key:"userExposed",value:function(){var t=this._visitor.flagsData.get(this._key);return this._visitor.userExposed({key:this._key,flag:t,defaultValue:this._defaultValue})}},{key:"getValue",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this._visitor.flagsData.get(this._key);return this._visitor.getFlagValue({key:this._key,defaultValue:this._defaultValue,flag:e,userExposed:t})}}]),t}()},"./src/flag/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flag:()=>n.Flag,FlagMetadata:()=>i.FlagMetadata});var n=r("./src/flag/Flags.ts"),i=r("./src/flag/FlagMetadata.ts")},"./src/hit/Batch.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BATCH:()=>p,ERROR_MESSAGE:()=>h,Batch:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.array.map.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/hit/HitAbstract.ts");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p="BATCH",h="Please check required fields",g=function(t){(0,o.default)(r,t);var e=d(r);function r(t){var r;return(r=e.call(this,f(f({},t),{},{type:p}))).hits=t.hits,r}return(0,i.default)(r,[{key:"hits",get:function(){return this._hits},set:function(t){this._hits=t}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.hits&&this.hits.length>0&&this.hits.every((function(t){return t.isReady(!1)})))}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.h=this.hits.map((function(t){var e=t.toApiKeys();return delete e[u.VISITOR_ID_API_ITEM],delete e[u.CUSTOMER_ENV_ID_API_ITEM],delete e[u.USER_IP_API_ITEM],delete e[u.SCREEN_RESOLUTION_API_ITEM],delete e[u.USER_LANGUAGE],delete e[u.SESSION_NUMBER],delete e[u.VISITOR_ID_API_ITEM],delete e[u.CUSTOMER_UID],e})),e}},{key:"toObject",value:function(){return f(f({},t.prototype.toObject.call(this)),{},{hits:this.hits.map((function(t){return t.toObject()}))})}},{key:"getErrorMessage",value:function(){return h}}]),r}(c.HitAbstract)},"./src/hit/Event.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>v,CATEGORY_ERROR:()=>y,EventCategory:()=>g,Event:()=>m}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.array.includes.js"),r("core-js/modules/es.string.includes.js"),r("core-js/modules/es.object.values.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/utils/utils.ts"),f=r("./src/hit/HitAbstract.ts");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g,v="event category and event action are required",y="The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING";!function(t){t.ACTION_TRACKING="Action Tracking",t.USER_ENGAGEMENT="User Engagement"}(g||(g={}));var m=function(t){(0,o.default)(r,t);var e=h(r);function r(t){var r;r=e.call(this,{type:c.HitType.EVENT,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.category,i=t.action,o=t.label,s=t.value;return r.category=n,r.action=i,o&&(r.label=o),s&&(r.value=s),r}return(0,i.default)(r,[{key:"category",get:function(){return this._category},set:function(t){Object.values(g).includes(t)?this._category=t:(0,l.logError)(this.config,y,"category")}},{key:"action",get:function(){return this._action},set:function(t){this.isNotEmptyString(t,"action")&&(this._action=t)}},{key:"label",get:function(){return this._label},set:function(t){this.isNotEmptyString(t,"label")&&(this._label=t)}},{key:"value",get:function(){return this._value},set:function(t){this.isNumeric(t,"value")&&(this._value=t)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.EVENT_CATEGORY_API_ITEM]=this.category,e[u.EVENT_ACTION_API_ITEM]=this.action,this.label&&(e[u.EVENT_LABEL_API_ITEM]=this.label),this.value&&(e[u.EVENT_VALUE_API_ITEM]=this.value),e}},{key:"toObject",value:function(){return p(p({},t.prototype.toObject.call(this)),{},{category:this.category,action:this.action,label:this.label,value:this.value})}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.category||!this.action)}},{key:"getErrorMessage",value:function(){return v}}]),r}(f.HitAbstract)},"./src/hit/HitAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{HitAbstract:()=>a});var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=(r("core-js/modules/es.number.is-integer.js"),r("core-js/modules/es.number.constructor.js"),r("./src/enum/FlagshipConstant.ts")),s=r("./src/utils/utils.ts"),a=function(){function t(t){var e=t.type,r=t.userIp,n=t.screenResolution,i=t.locale,o=t.sessionNumber;this._type=e,r&&(this.userIp=r),n&&(this.screenResolution=n),i&&(this.locale=i),o&&(this.sessionNumber=o),this._anonymousId=null}return(0,i.default)(t,[{key:"sessionNumber",get:function(){return this._sessionNumber},set:function(t){this._sessionNumber=t}},{key:"locale",get:function(){return this._locale},set:function(t){this._locale=t}},{key:"screenResolution",get:function(){return this._screenResolution},set:function(t){this._screenResolution=t}},{key:"userIp",get:function(){return this._userIp},set:function(t){this._userIp=t}},{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){this._visitorId=t}},{key:"ds",get:function(){return this._ds},set:function(t){this._ds=t}},{key:"type",get:function(){return this._type}},{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"isNotEmptyString",value:function(t,e){return!(!t||"string"!=typeof t)||((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return t&&"number"==typeof t?(Number.isInteger(t)||(0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_INTEGER_ERROR,e,"integer"),e),!0):((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e,r=(e={},(0,n.default)(e,o.VISITOR_ID_API_ITEM,this.visitorId),(0,n.default)(e,o.DS_API_ITEM,this.ds),(0,n.default)(e,o.CUSTOMER_ENV_ID_API_ITEM,"".concat(null==(t=this.config)?void 0:t.envId)),(0,n.default)(e,o.T_API_ITEM,this.type),e);return this.userIp&&(r[o.USER_IP_API_ITEM]=this.userIp),this.screenResolution&&(r[o.SCREEN_RESOLUTION_API_ITEM]=this.screenResolution),this.locale&&(r[o.USER_LANGUAGE]=this.locale),this.sessionNumber&&(r[o.SESSION_NUMBER]=this.sessionNumber),this.visitorId&&this._anonymousId?(r[o.VISITOR_ID_API_ITEM]=this._anonymousId,r[o.CUSTOMER_UID]=this.visitorId):(r[o.VISITOR_ID_API_ITEM]=this._anonymousId||this.visitorId,r[o.CUSTOMER_UID]=null),r}},{key:"toObject",value:function(){return{visitorId:this.visitorId,ds:this.ds,type:this.type,userIp:this.userIp,screenResolution:this.screenResolution,locale:this.locale,sessionNumber:this.sessionNumber,anonymousId:this.anonymousId}}},{key:"isReady",value:function(){return!!(this.visitorId&&this.ds&&this.config&&this.config.envId&&this.type)}}]),t}()},"./src/hit/Item.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Item:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.math.trunc.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="Transaction Id, Item name and item code are required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;r=e.call(this,{type:c.HitType.ITEM,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.transactionId,i=t.productName,o=t.productSku,s=t.itemCategory,a=t.itemPrice,u=t.itemQuantity;return r.transactionId=n,r.productName=i,r.productSku=o,s&&(r.itemCategory=s),a&&(r.itemPrice=a),u&&(r.itemQuantity=u),r}return(0,i.default)(r,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"productName",get:function(){return this._productName},set:function(t){this.isNotEmptyString(t,"productName")&&(this._productName=t)}},{key:"productSku",get:function(){return this._productSku},set:function(t){this.isNotEmptyString(t,"productSku")&&(this._productSku=t)}},{key:"itemPrice",get:function(){return this._itemPrice},set:function(t){this.isNumeric(t,"itemPrice")&&(this._itemPrice=t)}},{key:"itemQuantity",get:function(){return this._itemQuantity},set:function(t){this.isInteger(t,"itemQuantity")&&(this._itemQuantity=Math.trunc(t))}},{key:"itemCategory",get:function(){return this._itemCategory},set:function(t){this.isNotEmptyString(t,"itemCategory")&&(this._itemCategory=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.transactionId||!this.productName||!this.productSku)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.TID_API_ITEM]=this.transactionId,e[u.IN_API_ITEM]=this.productName,e[u.IC_API_ITEM]=this.productSku,this.itemPrice&&(e[u.IP_API_ITEM]=this.itemPrice),this.itemQuantity&&(e[u.IQ_API_ITEM]=this.itemQuantity),this.itemCategory&&(e[u.IV_API_ITEM]=this.itemCategory),e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{transactionId:this.transactionId,productName:this.productName,productSku:this.productSku,itemPrice:this.itemPrice,itemQuantity:this.itemQuantity,itemCategory:this.itemCategory})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Page.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Page:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=r("./src/enum/FlagshipConstant.ts"),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="documentLocation url is required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;return(r=e.call(this,{type:c.HitType.PAGE_VIEW,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber})).documentLocation=null==t?void 0:t.documentLocation,r}return(0,i.default)(r,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.DL_API_ITEM]=this.documentLocation,e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Screen.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Screen:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=r("./src/enum/FlagshipConstant.ts"),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="Screen name is required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;return(r=e.call(this,{type:c.HitType.SCREEN_VIEW,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber})).documentLocation=null==t?void 0:t.documentLocation,r}return(0,i.default)(r,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.DL_API_ITEM]=this.documentLocation,e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Transaction.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CURRENCY_ERROR:()=>g,ERROR_MESSAGE:()=>v,Transaction:()=>y}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.math.trunc.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/utils/utils.ts"),f=r("./src/hit/HitAbstract.ts");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g="{0} must be a string and have exactly 3 letters",v="Transaction Id and Transaction affiliation are required",y=function(t){(0,o.default)(r,t);var e=h(r);function r(t){var r;r=e.call(this,{type:c.HitType.TRANSACTION,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.transactionId,i=t.affiliation,o=t.taxes,s=t.currency,a=t.couponCode,u=t.itemCount,l=t.shippingMethod,f=t.paymentMethod,d=t.totalRevenue,p=t.shippingCosts;return r.transactionId=n,r.affiliation=i,o&&(r.taxes=o),s&&(r.currency=s),a&&(r.couponCode=a),u&&(r.itemCount=u),l&&(r.shippingMethod=l),f&&(r.paymentMethod=f),d&&(r.totalRevenue=d),p&&(r.shippingCosts=p),r}return(0,i.default)(r,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"affiliation",get:function(){return this._affiliation},set:function(t){this.isNotEmptyString(t,"affiliation")&&(this._affiliation=t)}},{key:"taxes",get:function(){return this._taxes},set:function(t){this.isNumeric(t,"taxes")&&(this._taxes=t)}},{key:"currency",get:function(){return this._currency},set:function(t){t&&"string"==typeof t&&3===t.length?this._currency=t:(0,l.logError)(this.config,(0,l.sprintf)(g,"currency"),"currency")}},{key:"couponCode",get:function(){return this._couponCode},set:function(t){this.isNotEmptyString(t,"couponCode")&&(this._couponCode=t)}},{key:"itemCount",get:function(){return this._itemCount},set:function(t){this.isInteger(t,"itemCount")&&(this._itemCount=Math.trunc(t))}},{key:"shippingMethod",get:function(){return this._shippingMethod},set:function(t){this.isNotEmptyString(t,"shippingMethod")&&(this._shippingMethod=t)}},{key:"paymentMethod",get:function(){return this._paymentMethod},set:function(t){this.isNotEmptyString(t,"paymentMethod")&&(this._paymentMethod=t)}},{key:"totalRevenue",get:function(){return this._totalRevenue},set:function(t){this.isNumeric(t,"totalRevenue")&&(this._totalRevenue=t)}},{key:"shippingCosts",get:function(){return this._shippingCosts},set:function(t){this.isNumeric(t,"shippingCosts")&&(this._shippingCosts=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.transactionId||!this.affiliation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.TID_API_ITEM]=this.transactionId,e[u.TA_API_ITEM]=this.affiliation,this.taxes&&(e[u.TT_API_ITEM]=this.taxes),this.currency&&(e[u.TC_API_ITEM]=this.currency),this.couponCode&&(e[u.TCC_API_ITEM]=this.couponCode),this.itemCount&&(e[u.ICN_API_ITEM]=this.itemCount),this.shippingMethod&&(e[u.SM_API_ITEM]=this.shippingMethod),this.paymentMethod&&(e[u.PM_API_ITEM]=this.paymentMethod),this.totalRevenue&&(e[u.TR_API_ITEM]=this.totalRevenue),this.shippingCosts&&(e[u.TS_API_ITEM]=this.shippingCosts),e}},{key:"toObject",value:function(){return p(p({},t.prototype.toObject.call(this)),{},{transactionId:this.transactionId,affiliation:this.affiliation,taxes:this.taxes,currency:this.currency,couponCode:this.couponCode,itemCount:this.itemCount,shippingMethod:this.shippingMethod,paymentMethod:this.paymentMethod,totalRevenue:this.totalRevenue,shippingCosts:this.shippingCosts})}},{key:"getErrorMessage",value:function(){return v}}]),r}(f.HitAbstract)},"./src/hit/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Event:()=>n.Event,EventCategory:()=>n.EventCategory,Item:()=>i.Item,Page:()=>o.Page,Screen:()=>s.Screen,Transaction:()=>a.Transaction,HitAbstract:()=>u.HitAbstract});var n=r("./src/hit/Event.ts"),i=r("./src/hit/Item.ts"),o=r("./src/hit/Page.ts"),s=r("./src/hit/Screen.ts"),a=r("./src/hit/Transaction.ts"),u=r("./src/hit/HitAbstract.ts")},"./src/main/Flagship.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flagship:()=>b});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./src/visitor/Visitor.ts"),s=r("./src/enum/FlagshipStatus.ts"),a=r("./src/config/FlagshipConfig.ts"),u=r("./src/config/DecisionApiConfig.ts"),c=r("./src/config/ConfigManager.ts"),l=r("./src/decision/ApiManager.ts"),f=r("./src/api/TrackingManager.ts"),d=r("./src/utils/FlagshipLogManager.ts"),p=r("./src/utils/utils.ts"),h=r("./src/enum/index.ts"),g=r("./src/visitor/VisitorDelegate.ts"),v=r("./src/config/index.ts"),y=r("./src/decision/BucketingManager.ts"),m=r("./src/utils/MurmurHash.ts"),_=r("./src/utils/HttpClient.ts"),E=r("./src/cache/DefaultHitCache.ts"),I=r("./src/cache/DefaultVisitorCache.ts"),b=function(){function t(){}return(0,i.default)(t,[{key:"configManager",get:function(){return this._configManger},set:function(t){this._configManger=t}},{key:"setStatus",value:function(t){var e=this.getConfig().statusChangedCallback;if(this.getConfig()&&e&&this._status!==t)return this._status=t,void e(t);this._status=t}},{key:"getStatus",value:function(){return this._status}},{key:"getConfig",value:function(){return this._config}},{key:"getVisitor",value:function(){return this._visitorInstance}},{key:"buildConfig",value:function(t){return t instanceof a.FlagshipConfig?t:(null==t?void 0:t.decisionMode)===a.DecisionMode.BUCKETING?new v.BucketingConfig(t):new u.DecisionApiConfig(t)}},{key:"buildDecisionManager",value:function(t,e,r){var n,i=function(e){t.setStatus(e)};if(e.decisionMode===a.DecisionMode.BUCKETING){var o=n=new y.BucketingManager(r,e,new m.MurmurHash);n.statusChangedCallback(i),o.startPolling()}else(n=new l.ApiManager(r,e)).statusChangedCallback(i);return n}},{key:"newVisitor",value:function(e,r){return t.newVisitor(e,r)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new this),this._instance}},{key:"isReady",value:function(){var t,e,r,n,i,o=null==(t=this._instance)||null==(e=t.getConfig())?void 0:e.apiKey,s=null==(r=this._instance)||null==(n=r.getConfig())?void 0:n.envId,a=null==(i=this._instance)?void 0:i.configManager;return!!(this._instance&&o&&s&&a)}},{key:"getStatus",value:function(){return this.getInstance()._status}},{key:"getConfig",value:function(){return this.getInstance()._config}},{key:"getVisitor",value:function(){return this.getInstance().getVisitor()}},{key:"start",value:function(t,e,r){var i,o=this.getInstance();if((r=o.buildConfig(r)).envId=t,r.apiKey=e,o._config=r,o.setStatus(s.FlagshipStatus.STARTING),r.logManager||(r.logManager=new d.FlagshipLogManager),!t||!e)return o.setStatus(s.FlagshipStatus.NOT_INITIALIZED),(0,p.logError)(r,h.INITIALIZATION_PARAM_ERROR,h.PROCESS_INITIALIZATION),null;var a=null==(i=o.configManager)?void 0:i.decisionManager;"object"===(0,n.default)(a)&&a instanceof y.BucketingManager&&a.stopPolling();var u=new _.HttpClient;a=o.buildDecisionManager(o,r,u);var l=new f.TrackingManager(u,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=a,o.configManager.trackingManager=l):o.configManager=new c.ConfigManager(r,a,l),!r.hitCacheImplementation&&(0,p.isBrowser)()&&(r.hitCacheImplementation=new E.DefaultHitCache),!r.visitorCacheImplementation&&(0,p.isBrowser)()&&(r.visitorCacheImplementation=new I.DefaultVisitorCache),this.isReady()?(o._status===s.FlagshipStatus.STARTING&&o.setStatus(s.FlagshipStatus.READY),(0,p.logInfo)(r,(0,p.sprintf)(h.SDK_STARTED_INFO,h.SDK_VERSION),h.PROCESS_INITIALIZATION),o):(o.setStatus(s.FlagshipStatus.NOT_INITIALIZED),null)}},{key:"newVisitor",value:function(t,e){if(!this.isReady())return null;var r,n,i,s,a,u,c=!1,l=!0,f=!(0,p.isBrowser)();"string"==typeof t||null===t?(r=t||void 0,n=e||{}):(r=null==t?void 0:t.visitorId,n=(null==t?void 0:t.context)||{},c=!(null==t||!t.isAuthenticated),l=null==(a=null==t?void 0:t.hasConsented)||a,i=(null==t?void 0:t.initialFlagsData)||(null==t?void 0:t.initialModifications),s=null==t?void 0:t.initialCampaigns,f=null!=(u=null==t?void 0:t.isNewInstance)?u:f);var d=new g.VisitorDelegate({visitorId:r,context:n,isAuthenticated:c,hasConsented:l,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:s,initialFlagsData:i}),h=new o.Visitor(d);return this.getInstance()._visitorInstance=f?void 0:h,this.getConfig().fetchNow&&h.fetchFlags(),h}}]),t}()},"./src/nodeDeps.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{globalOption:()=>i,fetch:()=>o,EventEmitter:()=>n.EventEmitter}),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js");var n=r("./node_modules/events/events.js"),i={},o="undefined"==typeof window?r("node-fetch").default:window.fetch;if("undefined"==typeof window){var s=r("?1749").Agent,a=r("?b7f9").Agent;i.agent=function(t){return"http:"===t.protocol?new s({keepAlive:!0}):new a({keepAlive:!0})}}},"./src/types.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utils/FlagshipLogManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FlagshipLogManager:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.array.concat.js"),r("./src/enum/index.ts")),o=function(){function t(){}return(0,n.default)(t,[{key:"emergency",value:function(t,e){this.log(i.LogLevel.EMERGENCY,t,e)}},{key:"alert",value:function(t,e){this.log(i.LogLevel.ALERT,t,e)}},{key:"critical",value:function(t,e){this.log(i.LogLevel.CRITICAL,t,e)}},{key:"error",value:function(t,e){this.log(i.LogLevel.ERROR,t,e)}},{key:"warning",value:function(t,e){this.log(i.LogLevel.WARNING,t,e)}},{key:"notice",value:function(t,e){this.log(i.LogLevel.NOTICE,t,e)}},{key:"info",value:function(t,e){this.log(i.LogLevel.INFO,t,e)}},{key:"debug",value:function(t,e){this.log(i.LogLevel.DEBUG,t,e)}},{key:"log",value:function(t,e,r){var n=new Date,o=function(t){return 1===t.toString().length?"0".concat(t):t},s="[".concat(o(n.getFullYear()),"-").concat(o(n.getMonth()),"-").concat(o(n.getDay())," ").concat(o(n.getHours()),":").concat(o(n.getMinutes()),"] [").concat(i.FLAGSHIP_SDK,"] [").concat(i.LogLevel[t],"] [").concat(r,"] : ").concat(e);console.log(s)}}]),t}()},"./src/utils/HttpClient.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{HttpClient:()=>p});var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/regenerator/index.js"),u=r.n(a),c=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.promise.finally.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js"),r("./src/enum/index.ts")),l=r("./src/nodeDeps.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var p=function(){function t(){}var e;return(0,s.default)(t,[{key:"getResponse",value:(e=(0,o.default)(u().mark((function t(e){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.headers.get("Content-Type"),n="application/json"===r,t.next=4,e.text();case 4:if((i=t.sent)&&n&&(i=JSON.parse(i)),!(e.status>=400)){t.next=8;break}throw new Error(i||e.statusText);case 8:return o={},e.headers.forEach((function(t,e){o[e]=t})),t.abrupt("return",{status:e.status,body:i,headers:o});case 11:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var r=new i,n=setTimeout((function(){return r.abort()}),1e3*(null!=e&&e.timeout?e.timeout:c.REQUEST_TIME_OUT));return(0,l.fetch)(t,d(d({},l.globalOption),{},{method:"GET",headers:null==e?void 0:e.headers,signal:r.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(n)}))}},{key:"postAsync",value:function(t,e){var r=new i,n=setTimeout((function(){return r.abort()}),e.timeout?1e3*e.timeout:1e3*c.REQUEST_TIME_OUT);return(0,l.fetch)(t,d(d({},l.globalOption),{},{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:r.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(n)}))}}]),t}()},"./src/utils/MurmurHash.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MurmurHash:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(){}return(0,n.default)(t,[{key:"murmurHash3Int32",value:function(t){var e,r,n,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=3&t.length,a=t.length-s;e=o;var u=3432918353,c=461845907;for(i=0;i<a;)n=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,e=27492+(65535&(r=5*(65535&(e=(e^=n=(65535&(n=(n=(65535&n)*u+(((n>>>16)*u&65535)<<16)&4294967295)<<15|n>>>17))*c+(((n>>>16)*c&65535)<<16)&4294967295)<<13|e>>>19))+((5*(e>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(n=0,s){case 3:n^=(255&t.charCodeAt(i+2))<<16;case 2:n^=(255&t.charCodeAt(i+1))<<8;case 1:e^=n=(65535&(n=(n=(65535&(n^=255&t.charCodeAt(i)))*u+(((n>>>16)*u&65535)<<16)&4294967295)<<15|n>>>17))*c+(((n>>>16)*c&65535)<<16)&4294967295}return e^=t.length,e=2246822507*(65535&(e^=e>>>16))+((2246822507*(e>>>16)&65535)<<16)&4294967295,e=3266489909*(65535&(e^=e>>>13))+((3266489909*(e>>>16)&65535)<<16)&4294967295,(e^=e>>>16)>>>0}}]),t}()},"./src/utils/utils.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprintf:()=>o,logError:()=>s,logInfo:()=>a,sleep:()=>u,isBrowser:()=>c,hasSameType:()=>l});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=(r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.replace.js"),r("core-js/modules/es.regexp.constructor.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./src/enum/index.ts"));function o(t){for(var e=t,r=0;r<(arguments.length<=1?0:arguments.length-1);r++){var n=r+1<1||arguments.length<=r+1?void 0:arguments[r+1];e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),n)}return e}function s(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<i.LogLevel.ERROR)&&t.logManager.error(e,r)}function a(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<i.LogLevel.INFO)&&t.logManager.info(e,r)}function u(t){return new Promise((function(e){return setTimeout(e,t)}))}function c(){return"undefined"!=typeof window&&!("Deno"in window)}function l(t,e){return(0,n.default)(t)===(0,n.default)(e)&&("object"!==(0,n.default)(t)||"object"!==(0,n.default)(e)||Array.isArray(t)===Array.isArray(e))}},"./src/visitor/DefaultStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TYPE_HIT_REQUIRED_ERROR:()=>O,DefaultStrategy:()=>T}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),l=r("./node_modules/@babel/runtime/regenerator/index.js"),f=r.n(l),d=(r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.match.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.map.js"),r("core-js/modules/es.regexp.flags.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.function.name.js"),r("core-js/modules/es.array.filter.js"),r("./src/enum/index.ts")),p=r("./src/hit/index.ts"),h=r("./src/utils/utils.ts"),g=r("./src/visitor/VisitorStrategyAbstract.ts"),v=r("./src/config/index.ts"),y=r("./src/enum/FlagshipContext.ts"),m=r("./src/hit/Batch.ts"),_=r("./src/flag/FlagMetadata.ts");function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,c.default)(t);if(e){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var O="property type is required and must ",T=function(t){(0,a.default)(x,t);var e,r,n,u,c,l,g,E,T,A,R,S,C,j,N,k,P,M=b(x);function x(){return M.apply(this,arguments)}return(0,s.default)(x,[{key:"checkPredefinedContext",value:function(t,e){var r=y.FLAGSHIP_CONTEXT[t];if(!r)return null;var n=!1;return"string"===r?n="string"==typeof e:"number"===r&&(n="number"==typeof e),n||(0,h.logError)(this.config,(0,h.sprintf)(d.PREDEFINED_CONTEXT_TYPE_ERROR,t,r),d.PROCESS_UPDATE_CONTEXT),n}},{key:"updateContextKeyValue",value:function(t,e){var r=(0,o.default)(e);if("string"!=typeof t||""===t||"string"!==r&&"number"!==r&&"boolean"!==r)(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.CONTEXT_PARAM_ERROR,t),d.PROCESS_UPDATE_CONTEXT);else if(!t.match(/^fs_/i)){var n=this.checkPredefinedContext(t,e);("boolean"!=typeof n||n)&&(this.visitor.context[t]=e)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var r=t[e];this.updateContextKeyValue(e,r)}else(0,h.logError)(this.visitor.config,d.CONTEXT_NULL_ERROR,d.PROCESS_UPDATE_CONTEXT)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(t,e){var r=this,n=t.key,i=t.defaultValue,s=t.activate;if(!n||"string"!=typeof n)return(0,h.logError)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,n),d.PROCESS_GET_MODIFICATION),i;var a=this.visitor.flagsData.get(n);if(!a)return(0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_MISSING_ERROR,n),d.PROCESS_GET_MODIFICATION),i;var u=function(){(0,h.logError)(r.config,(0,h.sprintf)(d.GET_MODIFICATION_CAST_ERROR,n),d.PROCESS_GET_MODIFICATION),a.value||!s&&!e||r.activateModification(n)};return"object"===(0,o.default)(a.value)&&"object"===(0,o.default)(i)&&Array.isArray(a.value)!==Array.isArray(i)||(0,o.default)(a.value)!==(0,o.default)(i)?(u(),i):((s||e)&&this.activateModification(n),a.value)}},{key:"getModifications",value:(P=(0,i.default)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationsSync(e,r));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return P.apply(this,arguments)})},{key:"getModificationsSync",value:function(t,e){var r=this,n={};return t.forEach((function(t){n[t.key]=r.checkAndGetModification(t,e)})),n}},{key:"getModification",value:(k=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(N=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationInfoSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return N.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){if(!t||"string"!=typeof t)return(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,t),d.PROCESS_GET_MODIFICATION_INFO),null;var e=this.visitor.flagsData.get(t);return e||((0,h.logError)(this.visitor.config,(0,h.sprintf)(d.GET_MODIFICATION_ERROR,t),d.PROCESS_GET_MODIFICATION_INFO),null)}},{key:"fetchVisitorCampaigns",value:function(t){var e;return Array.isArray(null==t||null==(e=t.visitorCache)?void 0:e.data.campaigns)?(t.updateContext(t.visitorCache.data.context||{}),t.visitorCache.data.campaigns.map((function(t){return{id:t.campaignId,variationGroupId:t.variationGroupId,variation:{id:t.variationId,reference:!!t.isReference,modifications:{type:t.type,value:t.flags}}}}))):[]}},{key:"globalFetchFlags",value:(j=(0,i.default)(f().mark((function t(e){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.decisionManager.getCampaignsAsync(this.visitor);case 3:(r=t.sent).length||(r=this.fetchVisitorCampaigns(this.visitor)),this.visitor.campaigns=r,this.visitor.flagsData=this.decisionManager.getModifications(this.visitor.campaigns),this.cacheVisitor(),this.visitor.emit(d.EMIT_READY),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),this.visitor.emit(d.EMIT_READY,t.t0),(0,h.logError)(this.config,t.t0.message||t.t0,e);case 15:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(t){return j.apply(this,arguments)})},{key:"synchronizeModifications",value:(C=(0,i.default)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags(d.PROCESS_SYNCHRONIZED_MODIFICATION));case 1:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"activateModification",value:(S=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return(0,h.logError)(this.config,(0,h.sprintf)(d.ACTIVATE_MODIFICATION_KEY_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"activateModifications",value:(R=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return(0,h.logError)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 3:e.forEach((function(t){"string"==typeof t?r.activate(t):r.activate(t.key)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return R.apply(this,arguments)})},{key:"isDeDuplicated",value:function(t,e){if(0===e)return!1;var r=this.visitor.deDuplicationCache[t];return!!(r&&Date.now()-r<=1e3*e)||(this.visitor.deDuplicationCache[t]=Date.now(),this.visitor.clearDeDuplicationCache(e),!1)}},{key:"sendActivate",value:(A=(0,i.default)(f().mark((function t(e){var r,n=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:d.PROCESS_ACTIVE_MODIFICATION,t.prev=1,t.next=4,this.trackingManager.sendActive(this.visitor,e);case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(1),(0,h.logError)(this.config,t.t0.message||t.t0,r),this.cacheHit(e);case 10:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(t){return A.apply(this,arguments)})},{key:"activate",value:(T=(0,i.default)(f().mark((function t(e){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.visitor.flagsData.get(e)){t.next=4;break}return(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.ACTIVATE_MODIFICATION_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 4:if(!this.isDeDuplicated(r.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=6;break}return t.abrupt("return");case 6:if(this.hasTrackingManager(d.PROCESS_ACTIVE_MODIFICATION)){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,this.sendActivate(r);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return T.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(d.PROCESS_SEND_HIT)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(E=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(d.PROCESS_SEND_HIT)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){return r.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getHitLegacy",value:function(t){var e=null;if(!t||!t.type)return null;var r={type:{Screen:d.HitType.SCREEN_VIEW,ScreenView:d.HitType.SCREEN_VIEW,Transaction:d.HitType.TRANSACTION,Page:d.HitType.PAGE_VIEW,PageView:d.HitType.PAGE_VIEW,Item:d.HitType.ITEM,Event:d.HitType.EVENT}[t.type]},n=I(I({},r),t.data);switch(r.type.toUpperCase()){case d.HitType.EVENT:e=new p.Event(n);break;case d.HitType.ITEM:var i=t.data;e=new p.Item(I(I({},n),{},{productName:i.name,productSku:i.code,transactionId:i.transactionId,itemCategory:i.category,itemPrice:i.price,itemQuantity:i.quantity}));break;case d.HitType.PAGE_VIEW:e=new p.Page(n);break;case d.HitType.SCREEN_VIEW:e=new p.Screen(n);break;case d.HitType.TRANSACTION:e=new p.Transaction(t.data)}return e}},{key:"getHit",value:function(t){var e,r=this,n=null;if(!t||!t.type)return n;switch(t.type.toUpperCase()){case d.HitType.EVENT:n=new p.Event(t);break;case d.HitType.ITEM:n=new p.Item(t);break;case d.HitType.PAGE_VIEW:n=new p.Page(t);break;case d.HitType.SCREEN_VIEW:n=new p.Screen(t);break;case d.HitType.TRANSACTION:n=new p.Transaction(t);break;case m.BATCH:n=new m.Batch({hits:null==t||null==(e=t.hits)?void 0:e.map((function(t){return r.getHit(t)})).filter((function(t){return t}))})}return n}},{key:"prepareAndSendHit",value:(g=(0,i.default)(f().mark((function t(e){var r,n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof p.HitAbstract)){t.next=4;break}r=e,t.next=18;break;case 4:if(!("data"in e)){t.next=13;break}if(n=e,i=this.getHitLegacy(n)){t.next=10;break}return(0,h.logError)(this.config,O,d.PROCESS_SEND_HIT),t.abrupt("return");case 10:r=i,t.next=18;break;case 13:if(o=this.getHit(e)){t.next=17;break}return(0,h.logError)(this.config,O,d.PROCESS_SEND_HIT),t.abrupt("return");case 17:r=o;case 18:if(r.visitorId=this.visitor.visitorId,r.ds=d.SDK_APP,r.config=this.config,r.anonymousId=this.visitor.anonymousId,!this.isDeDuplicated(JSON.stringify(r),this.config.hitDeduplicationTime)){t.next=24;break}return t.abrupt("return");case 24:if(r.isReady()){t.next=27;break}return(0,h.logError)(this.config,r.getErrorMessage(),d.PROCESS_SEND_HIT),t.abrupt("return");case 27:return t.prev=27,t.next=30,this.trackingManager.sendHit(r);case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(27),(0,h.logError)(this.config,t.t0.message||t.t0,d.PROCESS_SEND_HIT),this.cacheHit(r);case 36:case"end":return t.stop()}}),t,this,[[27,32]])}))),function(t){return g.apply(this,arguments)})},{key:"getAllModifications",value:(l=(0,i.default)(f().mark((function t(){var e,r=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]&&r[0],t.abrupt("return",this.getAllFlagsData(e));case 2:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getAllFlagsData",value:(c=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.visitor.flagsData.forEach((function(t,e){r.activateModification(e)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(u=(0,i.default)(f().mark((function t(e){var r,n=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]&&n[1],t.abrupt("return",this.getFlatsDataForCampaign(e,r));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getFlatsDataForCampaign",value:(n=(0,i.default)(f().mark((function t(e,r){var n=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r&&this.visitor.flagsData.forEach((function(t){t.campaignId===e&&n.userExposed({key:t.key,flag:t,defaultValue:t.value})})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns.filter((function(t){return t.id===e}))});case 2:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==v.DecisionMode.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):(0,h.logError)(this.config,d.VISITOR_ID_ERROR,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==v.DecisionMode.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):(0,h.logError)(this.config,d.FLAGSHIP_VISITOR_NOT_AUTHENTICATE,t):this.logDeactivateOnBucketing(t)}},{key:"fetchFlags",value:(r=(0,i.default)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags("fetchFlags"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"userExposed",value:(e=(0,i.default)(f().mark((function t(e){var r,n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.key,n=e.flag,i=e.defaultValue,o="userExposed",n){t.next=5;break}return(0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.USER_EXPOSED_FLAG_ERROR,r),o),t.abrupt("return");case 5:if(null==i||!n.value||(0,h.hasSameType)(n.value,i)){t.next=8;break}return(0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.USER_EXPOSED_CAST_ERROR,r),o),t.abrupt("return");case 8:if(!this.isDeDuplicated(n.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=10;break}return t.abrupt("return");case 10:if(this.hasTrackingManager(o)){t.next=12;break}return t.abrupt("return");case 12:return t.abrupt("return",this.sendActivate(n,o));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getFlagValue",value:function(t){var e=t.key,r=t.defaultValue,n=t.flag,i=t.userExposed,o="getFlag value";return n?n.value?null==r||(0,h.hasSameType)(n.value,r)?(i&&this.userExposed({key:e,flag:n,defaultValue:r}),n.value):((0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_FLAG_CAST_ERROR,e),o),r):(i&&this.userExposed({key:e,flag:n,defaultValue:r}),r):((0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_FLAG_MISSING_ERROR,e),o),r)}},{key:"getFlagMetadata",value:function(t){var e=t.metadata,r=t.hasSameType,n=t.key;return r?e:((0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.GET_METADATA_CAST_ERROR,n),"flag.metadata"),_.FlagMetadata.Empty())}},{key:"logDeactivateOnBucketing",value:function(t){(0,h.logError)(this.config,(0,h.sprintf)(d.METHOD_DEACTIVATED_BUCKETING_ERROR,t),t)}}]),x}(g.VisitorStrategyAbstract)},"./src/visitor/NoConsentStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NoConsentStrategy:()=>p}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts");function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p=function(t){(0,o.default)(v,t);var e,r,s,a,u,p,h,g=d(v);function v(){return g.apply(this,arguments)}return(0,i.default)(v,[{key:"activateModification",value:(h=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"activateModifications",value:(p=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"lookupHits",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"lookupVisitor",value:(a=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"cacheVisitor",value:(s=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"cacheHit",value:(r=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_CONSENT_ERROR,t,this.visitor.visitorId),t)}}]),v}(r("./src/visitor/DefaultStrategy.ts").DefaultStrategy)},"./src/visitor/NotReadyStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NotReadyStrategy:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts"),d=r("./src/visitor/DefaultStrategy.ts"),p=r("./src/flag/FlagMetadata.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g=function(t){(0,o.default)(m,t);var e,r,s,a,u,d,g,v,y=h(m);function m(){return y.apply(this,arguments)}return(0,i.default)(m,[{key:"synchronizeModifications",value:(v=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("synchronizeModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var r={};return t.forEach((function(t){r[t.key]=t.defaultValue})),r}},{key:"lookupHits",value:(g=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"lookupVisitor",value:(d=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"cacheVisitor",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(a=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"activateModifications",value:(s=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"fetchFlags",value:(r=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("fetchFlags");case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getFlagValue",value:function(t){return this.log("Flag.value"),t.defaultValue}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getFlagMetadata",value:function(){return this.log("flag.metadata"),p.FlagMetadata.Empty()}},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_ERROR,t,l.FlagshipStatus[l.FlagshipStatus.NOT_INITIALIZED]),t)}}]),m}(d.DefaultStrategy)},"./src/visitor/PanicStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{PanicStrategy:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts"),d=r("./src/visitor/DefaultStrategy.ts"),p=r("./src/flag/FlagMetadata.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g=function(t){(0,o.default)(y,t);var e,r,s,a,u,d,g,v=h(y);function y(){return v.apply(this,arguments)}return(0,i.default)(y,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_SEND_CONSENT_ERROR,l.FlagshipStatus[l.FlagshipStatus.READY_PANIC_ON]),"setConsent")}},{key:"updateContext",value:function(t){this.log("updateContext")}},{key:"clearContext",value:function(){this.log("clearContext")}},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"lookupHits",value:(g=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"lookupVisitor",value:(d=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"cacheVisitor",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"cacheHit",value:(a=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var r={};return t.forEach((function(t){r[t.key]=t.defaultValue})),r}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(s=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"activateModifications",value:(r=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"getFlagValue",value:function(t){return this.log("Flag.value"),t.defaultValue}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getFlagMetadata",value:function(){return this.log("flag.metadata"),p.FlagMetadata.Empty()}},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_ERROR,t,l.FlagshipStatus[l.FlagshipStatus.READY_PANIC_ON]),t)}}]),y}(d.DefaultStrategy)},"./src/visitor/Visitor.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Visitor:()=>l}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/nodeDeps.ts"),u=r("./src/enum/index.ts");function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var l=function(t){(0,i.default)(r,t);var e=c(r);function r(t){var r;return(r=e.call(this)).visitorDelegate=t,r.visitorDelegate.on(u.EMIT_READY,(function(t){r.emit(u.EMIT_READY,t)})),r}return(0,n.default)(r,[{key:"getModificationsArray",value:function(){return this.visitorDelegate.getModificationsArray()}},{key:"getFlagsDataArray",value:function(){return this.visitorDelegate.getFlagsDataArray()}},{key:"visitorId",get:function(){return this.visitorDelegate.visitorId},set:function(t){this.visitorDelegate.visitorId=t}},{key:"anonymousId",get:function(){return this.visitorDelegate.anonymousId}},{key:"hasConsented",get:function(){return this.visitorDelegate.hasConsented}},{key:"setConsent",value:function(t){this.visitorDelegate.setConsent(t)}},{key:"config",get:function(){return this.visitorDelegate.config}},{key:"context",get:function(){return this.visitorDelegate.context}},{key:"flagsData",get:function(){return this.visitorDelegate.flagsData}},{key:"modifications",get:function(){return this.visitorDelegate.flagsData}},{key:"updateContext",value:function(t){this.visitorDelegate.updateContext(t)}},{key:"clearContext",value:function(){this.visitorDelegate.clearContext()}},{key:"getFlag",value:function(t,e){return this.visitorDelegate.getFlag(t,e)}},{key:"getModification",value:function(t){return this.visitorDelegate.getModification(t)}},{key:"getModificationSync",value:function(t){return this.visitorDelegate.getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.visitorDelegate.getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.visitorDelegate.getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.visitorDelegate.getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.visitorDelegate.getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.visitorDelegate.synchronizeModifications()}},{key:"fetchFlags",value:function(){return this.visitorDelegate.fetchFlags()}},{key:"activateModification",value:function(t){return this.visitorDelegate.activateModification(t)}},{key:"activateModifications",value:function(t){return this.visitorDelegate.activateModifications(t)}},{key:"sendHit",value:function(t){return this.visitorDelegate.sendHit(t)}},{key:"sendHits",value:function(t){return this.visitorDelegate.sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.visitorDelegate.getAllModifications(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.visitorDelegate.getModificationsForCampaign(t,e)}},{key:"getAllFlagsData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.visitorDelegate.getAllFlagsData(t)}},{key:"getFlatsDataForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.visitorDelegate.getFlatsDataForCampaign(t,e)}},{key:"authenticate",value:function(t){this.visitorDelegate.authenticate(t)}},{key:"unauthenticate",value:function(){this.visitorDelegate.unauthenticate()}}]),r}(a.EventEmitter)},"./src/visitor/VisitorAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VisitorAbstract:()=>_}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.object.entries.js"),r("core-js/modules/es.array.from.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.map.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/web.dom-collections.iterator.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.function.name.js"),r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.replace.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.array.concat.js"),r("./src/config/index.ts")),c=r("./src/enum/index.ts"),l=r("./src/utils/utils.ts"),f=r("./src/visitor/DefaultStrategy.ts"),d=r("./src/nodeDeps.ts"),p=r("./src/main/Flagship.ts"),h=r("./src/visitor/NotReadyStrategy.ts"),g=r("./src/visitor/PanicStrategy.ts"),v=r("./src/visitor/NoConsentStrategy.ts"),y=r("./src/visitor/VisitorCache.ts");function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var _=function(t){(0,o.default)(r,t);var e=m(r);function r(t){var r,n=t.visitorId,i=t.configManager,o=t.context,s=t.isAuthenticated,a=t.hasConsented,c=t.initialModifications,l=t.initialFlagsData,f=t.initialCampaigns;(r=e.call(this))._isCleaningDeDuplicationCache=!1,r.deDuplicationCache={},r._context={},r._configManager=i;var d=r.config.enableClientCache?y.cacheVisitor.loadVisitorProfile():null;return r.visitorId=n||(null==d?void 0:d.visitorId)||r.createVisitorId(),r.setConsent(null==a||a),r.campaigns=[],r.updateContext(o),r._anonymousId=(null==d?void 0:d.anonymousId)||null,r.loadPredefinedContext(),!r._anonymousId&&s&&r.config.decisionMode===u.DecisionMode.DECISION_API&&(r._anonymousId=r.uuidV4()),r.updateCache(),r.setInitialFlags(l||c),r.setInitializeCampaigns(f,!!c),r.getStrategy().lookupVisitor(),r.getStrategy().lookupHits(),r}return(0,i.default)(r,[{key:"clearDeDuplicationCache",value:function(t){if(!this._isCleaningDeDuplicationCache){this._isCleaningDeDuplicationCache=!0;for(var e=0,r=Object.entries(this.deDuplicationCache);e<r.length;e++){var i=(0,n.default)(r[e],2),o=i[0],s=i[1];Date.now()-s>1e3*t&&delete this.deDuplicationCache[o]}this._isCleaningDeDuplicationCache=!1}}},{key:"getModificationsArray",value:function(){return Array.from(this._flags,(function(t){var e=(0,n.default)(t,2);return e[0],e[1]}))}},{key:"getFlagsDataArray",value:function(){return Array.from(this._flags,(function(t){var e=(0,n.default)(t,2);return e[0],e[1]}))}},{key:"setInitialFlags",value:function(t){var e=this;this._flags=new Map,t&&(t instanceof Map||Array.isArray(t))&&t.forEach((function(t){e._flags.set(t.key,t)}))}},{key:"setInitializeCampaigns",value:function(t,e){t&&Array.isArray(t)&&!e&&this.getStrategy().updateCampaigns(t)}},{key:"updateCache",value:function(){var t={visitorId:this.visitorId,anonymousId:this.anonymousId};y.cacheVisitor.saveVisitorProfile(t)}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=c.SDK_LANGUAGE.name,this.context.fs_version=c.SDK_VERSION,this.context.fs_users=this.visitorId}},{key:"uuidV4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},{key:"createVisitorId",value:function(){var t=new Date,e=Math.floor(89999*Math.random()+1e4),r=function(t){return 1===t.toString().length?"0".concat(t):t};return"".concat(t.getFullYear()).concat(r(t.getMonth()+1)).concat(r(t.getDate())).concat(r(t.getHours())).concat(r(t.getMinutes())).concat(e)}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){t&&"string"==typeof t?(this._visitorId=t,this.loadPredefinedContext(),this.visitorCache=void 0):(0,l.logError)(this.config,c.VISITOR_ID_ERROR,"VISITOR ID")}},{key:"hasConsented",get:function(){return this._hasConsented},set:function(t){this._hasConsented=t}},{key:"setConsent",value:function(t){this.hasConsented=t,this.getStrategy().setConsent(t)}},{key:"context",get:function(){return this._context},set:function(t){this._context={},this.updateContext(t)}},{key:"flagsData",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"modifications",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"configManager",get:function(){return this._configManager}},{key:"config",get:function(){return this.configManager.config}},{key:"campaigns",get:function(){return this._campaigns},set:function(t){this._campaigns=t}},{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"getStrategy",value:function(){return p.Flagship.getStatus()&&p.Flagship.getStatus()!==c.FlagshipStatus.NOT_INITIALIZED?p.Flagship.getStatus()===c.FlagshipStatus.READY_PANIC_ON?new g.PanicStrategy(this):this.hasConsented?new f.DefaultStrategy(this):new v.NoConsentStrategy(this):new h.NotReadyStrategy(this)}}]),r}(d.EventEmitter)},"./src/visitor/VisitorCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CLIENT_CACHE_KEY:()=>n,cacheVisitor:()=>i});var n="FS_CLIENT_VISITOR",i={saveVisitorProfile:function(t){try{localStorage.setItem(n,JSON.stringify(t))}catch(t){}},loadVisitorProfile:function(){var t=null;try{t=localStorage.getItem(n)}catch(t){}return t?JSON.parse(t):null}}},"./src/visitor/VisitorDelegate.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VisitorDelegate:()=>l}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/visitor/VisitorAbstract.ts"),u=r("./src/flag/Flags.ts");function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var l=function(t){(0,i.default)(r,t);var e=c(r);function r(){return e.apply(this,arguments)}return(0,n.default)(r,[{key:"updateContext",value:function(t){this.getStrategy().updateContext(t),this.loadPredefinedContext()}},{key:"clearContext",value:function(){this.getStrategy().clearContext()}},{key:"getFlag",value:function(t,e){return new u.Flag({key:t,visitor:this,defaultValue:e})}},{key:"getModification",value:function(t){return this.getStrategy().getModification(t)}},{key:"getModificationSync",value:function(t){return this.getStrategy().getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.getStrategy().getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.getStrategy().getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.getStrategy().getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.getStrategy().getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.getStrategy().synchronizeModifications()}},{key:"activateModification",value:function(t){return this.getStrategy().activateModification(t)}},{key:"activateModifications",value:function(t){return this.getStrategy().activateModifications(t)}},{key:"sendHit",value:function(t){return this.getStrategy().sendHit(t)}},{key:"sendHits",value:function(t){return this.getStrategy().sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllModifications(t)}},{key:"getAllFlagsData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllFlagsData(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getModificationsForCampaign(t,e)}},{key:"getFlatsDataForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getFlatsDataForCampaign(t,e)}},{key:"authenticate",value:function(t){this.getStrategy().authenticate(t),this.updateCache()}},{key:"unauthenticate",value:function(){this.getStrategy().unauthenticate(),this.updateCache()}},{key:"fetchFlags",value:function(){return this.getStrategy().fetchFlags()}},{key:"userExposed",value:function(t){return this.getStrategy().userExposed(t)}},{key:"getFlagValue",value:function(t){return this.getStrategy().getFlagValue(t)}},{key:"getFlagMetadata",value:function(t){return this.getStrategy().getFlagMetadata(t)}}]),r}(a.VisitorAbstract)},"./src/visitor/VisitorStrategyAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LOOKUP_HITS_JSON_ERROR:()=>p,LOOKUP_HITS_JSON_OBJECT_ERROR:()=>h,LOOKUP_VISITOR_JSON_OBJECT_ERROR:()=>g,VISITOR_ID_MISMATCH_ERROR:()=>v,VisitorStrategyAbstract:()=>y}),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=(r("core-js/modules/es.array.map.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.filter.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),a=r.n(s),u=r("./src/hit/index.ts"),c=r("./src/utils/utils.ts"),l=r("./src/enum/index.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var p="JSON DATA must be an array of object",h="JSON DATA must fit the type HitCacheDTO",g="JSON DATA must fit the type VisitorCacheDTO",v="Visitor ID mismatch: {0} vs {1}",y=function(){function t(t){this.visitor=t}var e,r,n,s,f,y;return(0,o.default)(t,[{key:"configManager",get:function(){return this.visitor.configManager}},{key:"trackingManager",get:function(){return this.configManager.trackingManager}},{key:"decisionManager",get:function(){return this.configManager.decisionManager}},{key:"config",get:function(){return this.visitor.config}},{key:"updateCampaigns",value:function(t){try{this.visitor.campaigns=t,this.visitor.flagsData=this.decisionManager.getModifications(t)}catch(t){(0,c.logError)(this.config,t.message||t,"updateCampaigns")}}},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||(0,c.logError)(this.config,(0,c.sprintf)(l.TRACKER_MANAGER_MISSING_ERROR),t),!!e}},{key:"setConsent",value:function(t){var e=this,r="setConsent";this.visitor.hasConsented=t,t||(this.flushHits(),this.flushVisitor()),this.hasTrackingManager(r)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){(0,c.logError)(e.config,t.message||t,r)}))}},{key:"checKLookupVisitorDataV1",value:function(t){if(!t||!t.data||!t.data.visitorId)return!1;var e=t.data.campaigns;return!e||!!Array.isArray(e)&&(t.data.visitorId!==this.visitor.visitorId?((0,c.logInfo)(this.config,(0,c.sprintf)(v,t.data.visitorId,this.visitor.visitorId),"lookupVisitor"),!1):e.every((function(t){return t.campaignId&&t.type&&t.variationGroupId&&t.variationId})))}},{key:"checKLookupVisitorData",value:function(t){return 1===t.version&&this.checKLookupVisitorDataV1(t)}},{key:"lookupVisitor",value:(y=(0,i.default)(a().mark((function t(){var e,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.visitorCacheImplementation,!this.config.disableCache&&e&&e.lookupVisitor&&"function"==typeof e.lookupVisitor){t.next=4;break}return t.abrupt("return");case 4:if(r=e.lookupVisitor(this.visitor.visitorId)){t.next=7;break}return t.abrupt("return");case 7:if(this.checKLookupVisitorData(r)){t.next=9;break}throw new Error(g);case 9:this.visitor.visitorCache=r,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"lookupVisitor");case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return y.apply(this,arguments)})},{key:"cacheVisitor",value:(f=(0,i.default)(a().mark((function t(){var e,r,n,i,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.config.visitorCacheImplementation,!this.config.disableCache&&n&&"function"==typeof n.cacheVisitor){t.next=4;break}return t.abrupt("return");case 4:return i={},(o={version:l.VISITOR_CACHE_VERSION,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,consent:this.visitor.hasConsented,context:this.visitor.context,campaigns:this.visitor.campaigns.map((function(t){return i[t.variationGroupId]=t.variation.id,{campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,type:t.variation.modifications.type,activated:!1,flags:t.variation.modifications.value}}))}}).data.assignmentsHistory=d(d({},null==(e=this.visitor.visitorCache)||null==(r=e.data)?void 0:r.assignmentsHistory),i),t.next=9,n.cacheVisitor(this.visitor.visitorId,o);case 9:this.visitor.visitorCache=o,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"cacheVisitor");case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return f.apply(this,arguments)})},{key:"flushVisitor",value:(s=(0,i.default)(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.visitorCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.flushVisitor){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.flushVisitor(this.visitor.visitorId);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"flushVisitor");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:"checKLookupHitData",value:function(t){return!!(t&&1===t.version&&t.data&&t.data.type&&t.data.visitorId)||((0,c.logError)(this.config,h,"lookupHits"),!1)}},{key:"lookupHits",value:(n=(0,i.default)(a().mark((function t(){var e,r,n,i,o,s=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.hitCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.lookupHits){t.next=4;break}return t.abrupt("return");case 4:if(r=e.lookupHits(this.visitor.visitorId)){t.next=7;break}return t.abrupt("return");case 7:if(Array.isArray(r)){t.next=9;break}throw Error(p);case 9:if(n=function(t){return(Date.now()-t)/1e3<=l.DEFAULT_HIT_CACHE_TIME},i=[{type:"BATCH",hits:[]}],o=0,r.filter((function(t){return s.checKLookupHitData(t)&&n(t.data.time)})).forEach((function(t){"ACTIVATE"!==t.data.type?"BATCH"!==t.data.type?JSON.stringify(i[o]).length>2621440?(o++,i[o]={type:"BATCH",hits:[t.data.content]}):i[o].hits.push(t.data.content):s.sendHit(t.data.content):s.sendActivate(t.data.content)})),1!==i.length||i[0].hits.length){t.next=16;break}return t.abrupt("return");case 16:this.sendHits(i),t.next=22;break;case 19:t.prev=19,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"lookupHits");case 22:case"end":return t.stop()}}),t,this,[[0,19]])}))),function(){return n.apply(this,arguments)})},{key:"cacheHit",value:(r=(0,i.default)(a().mark((function t(e){var r,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r=this.config.hitCacheImplementation,!this.config.disableCache&&r&&"function"==typeof r.cacheHit){t.next=4;break}return t.abrupt("return");case 4:return n={version:l.HIT_CACHE_VERSION,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,type:e instanceof u.HitAbstract?e.type:"ACTIVATE",content:e instanceof u.HitAbstract?e.toObject():e,time:Date.now()}},t.next=7,r.cacheHit(this.visitor.visitorId,n);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,l.PROCESS_CACHE_HIT);case 12:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t){return r.apply(this,arguments)})},{key:"flushHits",value:(e=(0,i.default)(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.hitCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.flushHits){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.flushHits(this.visitor.visitorId);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"flushHits");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return e.apply(this,arguments)})}]),t}()},"./src/visitor/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NoConsentStrategy:()=>n.NoConsentStrategy,NotReadyStrategy:()=>i.NotReadyStrategy,DefaultStrategy:()=>o.DefaultStrategy,PanicStrategy:()=>s.PanicStrategy,Visitor:()=>a.Visitor,VisitorDelegate:()=>u.VisitorDelegate});var n=r("./src/visitor/NoConsentStrategy.ts"),i=r("./src/visitor/NotReadyStrategy.ts"),o=r("./src/visitor/DefaultStrategy.ts"),s=r("./src/visitor/PanicStrategy.ts"),a=r("./src/visitor/Visitor.ts"),u=r("./src/visitor/VisitorDelegate.ts")},"./node_modules/events/events.js":t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,s,c;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):h(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,l=h(u,c);for(r=0;r<c;++r)n(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},"./node_modules/regenerator-runtime/runtime.js":t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new C(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return N()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===g)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?h:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function v(){}function y(){}function m(){}var _={};u(_,o,(function(){return this}));var E=Object.getPrototypeOf,I=E&&E(E(j([])));I&&I!==r&&n.call(I,o)&&(_=I);var b=m.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function j(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=m,u(b,"constructor",m),u(m,"constructor",y),y.displayName=u(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},O(T.prototype),u(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new T(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(b),u(b,a,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},"core-js/modules/es.array.concat.js":t=>{"use strict";t.exports=v},"core-js/modules/es.array.filter.js":t=>{"use strict";t.exports=d},"core-js/modules/es.array.find.js":t=>{"use strict";t.exports=D},"core-js/modules/es.array.from.js":t=>{"use strict";t.exports=C},"core-js/modules/es.array.includes.js":t=>{"use strict";t.exports=I},"core-js/modules/es.array.iterator.js":t=>{"use strict";t.exports=y},"core-js/modules/es.array.map.js":t=>{"use strict";t.exports=N},"core-js/modules/es.array.slice.js":t=>{"use strict";t.exports=P},"core-js/modules/es.function.name.js":t=>{"use strict";t.exports=o},"core-js/modules/es.map.js":t=>{"use strict";t.exports=m},"core-js/modules/es.math.trunc.js":t=>{"use strict";t.exports=R},"core-js/modules/es.number.constructor.js":t=>{"use strict";t.exports=A},"core-js/modules/es.number.is-integer.js":t=>{"use strict";t.exports=T},"core-js/modules/es.object.entries.js":t=>{"use strict";t.exports=S},"core-js/modules/es.object.get-own-property-descriptor.js":t=>{"use strict";t.exports=p},"core-js/modules/es.object.get-own-property-descriptors.js":t=>{"use strict";t.exports=g},"core-js/modules/es.object.keys.js":t=>{"use strict";t.exports=l},"core-js/modules/es.object.to-string.js":t=>{"use strict";t.exports=e},"core-js/modules/es.object.values.js":t=>{"use strict";t.exports=O},"core-js/modules/es.promise.finally.js":t=>{"use strict";t.exports=F},"core-js/modules/es.promise.js":t=>{"use strict";t.exports=r},"core-js/modules/es.reflect.construct.js":e=>{"use strict";e.exports=t},"core-js/modules/es.regexp.constructor.js":t=>{"use strict";t.exports=u},"core-js/modules/es.regexp.exec.js":t=>{"use strict";t.exports=s},"core-js/modules/es.regexp.flags.js":t=>{"use strict";t.exports=k},"core-js/modules/es.regexp.to-string.js":t=>{"use strict";t.exports=c},"core-js/modules/es.string.ends-with.js":t=>{"use strict";t.exports=L},"core-js/modules/es.string.includes.js":t=>{"use strict";t.exports=b},"core-js/modules/es.string.iterator.js":t=>{"use strict";t.exports=_},"core-js/modules/es.string.match.js":t=>{"use strict";t.exports=j},"core-js/modules/es.string.replace.js":t=>{"use strict";t.exports=a},"core-js/modules/es.string.starts-with.js":t=>{"use strict";t.exports=w},"core-js/modules/es.symbol.description.js":t=>{"use strict";t.exports=M},"core-js/modules/es.symbol.iterator.js":t=>{"use strict";t.exports=x},"core-js/modules/es.symbol.js":t=>{"use strict";t.exports=f},"core-js/modules/web.dom-collections.for-each.js":t=>{"use strict";t.exports=h},"core-js/modules/web.dom-collections.iterator.js":t=>{"use strict";t.exports=E},"node-fetch":t=>{"use strict";t.exports=n},"?1749":()=>{},"?b7f9":()=>{}},G={};function H(t){var e=G[t];if(void 0!==e)return e.exports;var r=G[t]={exports:{}};return V[t](r,r.exports,H),r.exports}H.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return H.d(e,{a:e}),e},H.d=(t,e)=>{for(var r in e)H.o(e,r)&&!H.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},H.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),H.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var U={};return(()=>{"use strict";H.r(U),H.d(U,{Flagship:()=>t.Flagship,DecisionApiConfig:()=>e.DecisionApiConfig,DecisionMode:()=>e.DecisionMode,Event:()=>r.Event,EventCategory:()=>r.EventCategory,Item:()=>r.Item,Page:()=>r.Page,Screen:()=>r.Screen,Transaction:()=>r.Transaction,HitAbstract:()=>r.HitAbstract,FlagshipStatus:()=>n.FlagshipStatus,LogLevel:()=>n.LogLevel,HitType:()=>n.HitType,APP_VERSION_CODE:()=>i.APP_VERSION_CODE,APP_VERSION_NAME:()=>i.APP_VERSION_NAME,CARRIER_NAME:()=>i.CARRIER_NAME,DEVICE_LOCALE:()=>i.DEVICE_LOCALE,DEVICE_MODEL:()=>i.DEVICE_MODEL,DEVICE_TYPE:()=>i.DEVICE_TYPE,FLAGSHIP_CLIENT:()=>i.FLAGSHIP_CLIENT,FLAGSHIP_CONTEXT:()=>i.FLAGSHIP_CONTEXT,FLAGSHIP_VERSION:()=>i.FLAGSHIP_VERSION,FLAGSHIP_VISITOR:()=>i.FLAGSHIP_VISITOR,INTERFACE_NAME:()=>i.INTERFACE_NAME,INTERNET_CONNECTION:()=>i.INTERNET_CONNECTION,IP:()=>i.IP,LOCATION_CITY:()=>i.LOCATION_CITY,LOCATION_COUNTRY:()=>i.LOCATION_COUNTRY,LOCATION_LAT:()=>i.LOCATION_LAT,LOCATION_LONG:()=>i.LOCATION_LONG,LOCATION_REGION:()=>i.LOCATION_REGION,OS_NAME:()=>i.OS_NAME,OS_VERSION_CODE:()=>i.OS_VERSION_CODE,OS_VERSION_NAME:()=>i.OS_VERSION_NAME,Visitor:()=>o.Visitor,Flag:()=>s.Flag,FlagMetadata:()=>s.FlagMetadata,default:()=>a});var t=H("./src/main/Flagship.ts"),e=H("./src/config/index.ts"),r=H("./src/hit/index.ts"),n=H("./src/enum/index.ts"),i=H("./src/enum/FlagshipContext.ts"),o=(H("./src/types.ts"),H("./src/visitor/index.ts")),s=H("./src/flag/index.ts");const a=t.Flagship})(),U})()},t.exports=n(r(2419),r(1539),r(8674),r(4809),r(8309),r(4916),r(5306),r(4603),r(9714),r(7941),r(2526),r(7327),r(5003),r(4747),r(9337),r(2222),r(6992),r(1532),r(8783),r(3948),r(6699),r(2023),r(2479),r(3161),r(9653),r(3689),r(9720),r(1038),r(4723),r(1249),r(2087),r(7042),r(1817),r(2165),r(9826),r(6755),r(7852),r(7727))},821:(t,e,r)=>{"use strict";r.d(e,{e:()=>p,X:()=>h});r(6992),r(1532),r(1539),r(8783),r(3948),r(4747),r(7941),r(2526),r(7327),r(5003),r(9337),r(1817),r(2165),r(7042),r(8309),r(1038);var n=r(6689),i=r.n(n),o=r(3547),s=r(4370);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={status:{isLoading:!0,isSdkReady:!1}},p=(0,n.createContext)({state:l({},d)}),h=function(t){var e=t.children,r=t.fetchNow,u=t.envId,c=t.apiKey,f=t.decisionMode,h=t.decisionApiUrl,g=t.timeout,v=t.logLevel,y=t.statusChangedCallback,m=t.logManager,_=t.pollingInterval,E=t.visitorData,I=t.onInitStart,b=t.onInitDone,O=t.onBucketingSuccess,T=t.onBucketingFail,A=t.loadingComponent,R=t.onBucketingUpdated,S=t.onUpdate,C=t.enableClientCache,j=t.initialBucketing,N=t.initialCampaigns,k=t.initialModifications,P=t.initialFlagsData,M=t.fetchFlagsOnBucketingUpdated,x=t.activateDeduplicationTime,D=t.hitDeduplicationTime,w=t.visitorCacheImplementation,L=t.hitCacheImplementation,F=t.disableCache,V=t.language,G=new Map;P&&P.forEach?P.forEach((function(t){G.set(t.key,t)})):k&&k.forEach?k.forEach((function(t){G.set(t.key,t)})):N&&(G=(0,s.B$)(N));var H=a((0,n.useState)(l(l({},d),{},{modifications:G})),2),U=H[0],B=H[1],K=a((0,n.useState)(),2),Y=K[0],X=K[1];function W(t){var e={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return B((function(r){return r.status.firstInitSuccess||(e.firstInitSuccess=(new Date).toISOString()),l(l({},r),{},{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:o.Flagship.getConfig(),status:l(l({},r.status),e)})})),e}(0,n.useRef)().current=U,(0,s.N7)((function(){var t;M&&(null===(t=U.visitor)||void 0===t||t.fetchFlags())}),[Y]),(0,s.N7)((function(){Q(!0)}),[JSON.stringify(E)]),(0,n.useEffect)((function(){q()}),[u,c,f]);var z,J=function(t,e){if(e)(0,s.H)(o.Flagship.getConfig(),e.message||e,"onReady");else{var r=W({fsVisitor:t,isSdkReady:!0,isLoading:!1});S&&S({fsModifications:t.modifications,config:o.Flagship.getConfig(),status:r})}},Q=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(E){var e=o.Flagship.newVisitor({visitorId:E.id,context:E.context,isAuthenticated:E.isAuthenticated,hasConsented:E.hasConsented,initialCampaigns:N,initialModifications:k,initialFlagsData:P});null==e||e.on("ready",(function(t){J(e,t)})),r||!e||t||W({fsVisitor:e,isSdkReady:!0,isLoading:!1}),t&&!r&&(null==e||e.fetchFlags())}},$=function(t){switch(y&&y(t),t){case o.FlagshipStatus.STARTING:t===o.FlagshipStatus.STARTING&&I&&I();break;case o.FlagshipStatus.READY_PANIC_ON:case o.FlagshipStatus.READY:b&&b(),Q();break;case o.FlagshipStatus.NOT_INITIALIZED:B((function(t){return l(l({},t),{},{config:o.Flagship.getConfig()})}))}},Z=function(t){R&&R(t),X(t)},q=function(){o.Flagship.start(u,c,{decisionMode:f,fetchNow:r,timeout:g,logLevel:v,statusChangedCallback:$,logManager:m,pollingInterval:_,onBucketingFail:T,onBucketingSuccess:O,enableClientCache:C,decisionApiUrl:h,onBucketingUpdated:Z,initialBucketing:j,activateDeduplicationTime:x,hitDeduplicationTime:D,visitorCacheImplementation:w,hitCacheImplementation:L,disableCache:F,language:V})};return i().createElement(p.Provider,{value:{state:U,setState:B}},(z=!U.visitor,U.status.isLoading&&A&&z&&r?i().createElement(i().Fragment,null,A):i().createElement(i().Fragment,null,e)))};h.defaultProps={activateDeduplicationTime:2,hitDeduplicationTime:2,fetchNow:!0,language:1}},4927:(t,e,r)=>{"use strict";r.d(e,{UM:()=>j,pc:()=>C,Nf:()=>S,nr:()=>O,_X:()=>A,GW:()=>b});r(5666),r(4747),r(1539),r(8674),r(1038),r(8783),r(2526),r(1817),r(2165),r(6992),r(3948),r(7042),r(8309),r(7941),r(7327),r(5003),r(9337);var n=r(6689),i=r(821),o=r(4370),s=r(3547),a=r.n(s),u="flagship Visitor not initialized.",c="fsVisitor not initialized, returns default value";function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var f=function(){function t(e){var r,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=void 0,(n="_defaultValue")in(r=this)?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,(0,o.yN)(a().getConfig(),u,"GetFlag"),this._defaultValue=e}var e,r,n;return e=t,(r=[{key:"getValue",value:function(){return(0,o.yN)(a().getConfig(),u,"getValue"),this._defaultValue}},{key:"exists",value:function(){return(0,o.yN)(a().getConfig(),u,"exists"),!1}},{key:"userExposed",value:function(){return(0,o.yN)(a().getConfig(),u,"userExposed"),Promise.resolve()}},{key:"metadata",get:function(){return(0,o.yN)(a().getConfig(),u,"metadata"),new s.FlagMetadata({campaignId:"",campaignType:"",isReference:!1,variationGroupId:"",variationId:""})}}])&&l(e.prototype,r),n&&l(e,n),t}();function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){y(o,n,i,s,a,"next",t)}function a(t){y(o,n,i,s,a,"throw",t)}s(void 0)}))}}function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}var E=function(t,e){return"object"===_(t)&&"object"===_(e)&&Array.isArray(t)===Array.isArray(e)||_(t)===_(e)},I=function(t){var e=t.visitor,r=t.params,n=t.activateAll,i=t.state,s=t.functionName,a=t.config;if(e)return e.getModificationsSync(r,n);var u=!i.status.isSdkReady&&!!i.modifications&&i.modifications.size>0,l={};return u?(r.forEach((function(t){var e,r=null===(e=i.modifications)||void 0===e?void 0:e.get(t.key);r&&E(null==r?void 0:r.value,t.defaultValue)?l[t.key]=r.value:l[t.key]=t.defaultValue})),l):((0,o.yN)(a,c,s),r.forEach((function(t){l[t.key]=t.defaultValue})),l)},b=function(t,e){var r=(0,n.useContext)(i.e).state,o=r.visitor,s=r.config;return I({functionName:"useFsModifications",state:r,visitor:o,config:s,params:t,activateAll:e})},O=function(t){var e,r=(0,n.useContext)(i.e).state,s=r.visitor,a=r.config;if(s)return s.getModificationSync(t);var u=null===(e=r.modifications)||void 0===e?void 0:e.get(t.key);return!r.status.isSdkReady&&u&&E(null==u?void 0:u.value,t.defaultValue)?u.value:((0,o.yN)(a,c,"useFsModifications"),t.defaultValue)},T=function(t){var e,r=t.key,n=t.visitor,i=t.state;if(n)return n.getModificationInfoSync(r);var o=null===(e=i.modifications)||void 0===e?void 0:e.get(r);return!i.status.isSdkReady&&o?o:null},A=function(t){var e=(0,n.useContext)(i.e).state,r=e.visitor;return T({key:t,state:e,visitor:r})},R=function(){var t=m(regeneratorRuntime.mark((function t(e,r,n,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n){t.next=4;break}return(0,o.yN)(i,u,r),t.abrupt("return");case 4:return t.next=6,n.activateModifications(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,o.yN)(i,t.t0.message||t.t0,r);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,r,n,i){return t.apply(this,arguments)}}(),S=function(t,e){var r=(0,n.useContext)(i.e).state.visitor;return r?r.getFlag(t,e):new f(e)},C=function(){var t=m(regeneratorRuntime.mark((function t(e){var r,o,s,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,n.useContext)(i.e),o=r.state,s=o.visitor,a=o.config,"useFsModifications",t.next=5,R(e,"useFsModifications",s,a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=(0,n.useContext)(i.e).state,e=t.visitor,r=t.config,s=null==e?void 0:e.getModificationsArray();!t.status.isSdkReady&&t.modifications&&(s=Array.from(t.modifications,(function(t){var e=g(t,2);e[0];return e[1]})));var a=function(){var t=m(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"activateModification",t.next=3,R(n,"activateModification",e,r);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),c=function(){var t=m(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=3;break}return(0,o.yN)(r,u,"synchronizeModifications"),t.abrupt("return");case 3:return t.next=5,e.synchronizeModifications();case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{visitorId:null==e?void 0:e.visitorId,anonymousId:null==e?void 0:e.anonymousId,context:p({},null==e?void 0:e.context),hasConsented:null==e?void 0:e.hasConsented,setConsent:function(t){e?e.setConsent(t):(0,o.yN)(r,u,"setConsent")},updateContext:function(t){e?(e.clearContext(),e.updateContext(t)):(0,o.H)(r,u,"updateContext")},clearContext:function(){e?e.clearContext():(0,o.H)(r,u,"cleanContext")},authenticate:function(t){e?e.authenticate(t):(0,o.H)(r,u,"authenticate")},unauthenticate:function(){e?e.unauthenticate():(0,o.H)(r,u,"unauthenticate")},status:t.status,activateModification:a,synchronizeModifications:c,getModifications:function(n,i){return I({functionName:"getModifications",state:t,visitor:e,config:r,params:n,activateAll:i})},modifications:s||[],FlagsData:(null==e?void 0:e.getFlagsDataArray())||[],getModificationInfo:function(r){return T({key:r,state:t,visitor:e})},hit:{send:function(t){return e?e.sendHit(t):((0,o.H)(r,u,"sendHit"),Promise.resolve())},sendMultiple:function(t){return e?e.sendHits(t):((0,o.H)(r,u,"sendHits"),Promise.resolve())}},getFlag:function(t,r){return e?e.getFlag(t,r):new f(r)},fetchFlags:function(){return e?e.fetchFlags():((0,o.yN)(r,u,"fetchFlags"),Promise.resolve())}}}},4370:(t,e,r)=>{"use strict";r.d(e,{H:()=>o,yN:()=>s,B$:()=>a,N7:()=>u});r(6992),r(1532),r(1539),r(8783),r(3948),r(4747),r(4916),r(5306),r(9714);var n=r(3547),i=r(6689);function o(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<n.LogLevel.ERROR)&&t.logManager.error(e,r)}function s(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<n.LogLevel.WARNING)&&t.logManager.warning(e,r)}var a=function(t){var e=new Map;return t&&Array.isArray(t)?(t.forEach((function(t){var r=t.variation.modifications.value;for(var n in r){var i=r[n];e.set(n,{key:n,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:i})}})),e):e};function u(t,e){var r=(0,i.useRef)(!0);(0,i.useEffect)((function(){if(!r.current)return"function"==typeof t?t():void 0;r.current=!1}),e)}},9662:(t,e,r)=>{var n=r(614),i=r(6330);t.exports=function(t){if(n(t))return t;throw TypeError(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),i=r(6330);t.exports=function(t){if(n(t))return t;throw TypeError(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614);t.exports=function(t){if("object"==typeof t||n(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),i=r(30),o=r(3070),s=n("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:t=>{t.exports=function(t,e,r){if(t instanceof e)return t;throw TypeError("Incorrect "+(r?r+" ":"")+"invocation")}},9670:(t,e,r)=>{var n=r(111);t.exports=function(t){if(n(t))return t;throw TypeError(String(t)+" is not an object")}},8533:(t,e,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,r)=>{"use strict";var n=r(9974),i=r(7908),o=r(3411),s=r(7659),a=r(4411),u=r(7466),c=r(6135),l=r(8554),f=r(1246);t.exports=function(t){var e=i(t),r=a(this),d=arguments.length,p=d>1?arguments[1]:void 0,h=void 0!==p;h&&(p=n(p,d>2?arguments[2]:void 0,2));var g,v,y,m,_,E,I=f(e),b=0;if(!I||this==Array&&s(I))for(g=u(e.length),v=r?new this(g):Array(g);g>b;b++)E=h?p(e[b],b):e[b],c(v,b,E);else for(_=(m=l(e,I)).next,v=r?new this:[];!(y=_.call(m)).done;b++)E=h?o(m,p,[y.value,b],!0):y.value,c(v,b,E);return v.length=b,v}},1318:(t,e,r)=>{var n=r(5656),i=r(7466),o=r(1400),s=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),l=o(s,c);if(t&&r!=r){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,r)=>{var n=r(9974),i=r(8361),o=r(7908),s=r(7466),a=r(5417),u=[].push,c=function(t){var e=1==t,r=2==t,c=3==t,l=4==t,f=6==t,d=7==t,p=5==t||f;return function(h,g,v,y){for(var m,_,E=o(h),I=i(E),b=n(g,v,3),O=s(I.length),T=0,A=y||a,R=e?A(h,O):r||d?A(h,0):void 0;O>T;T++)if((p||T in I)&&(_=b(m=I[T],T,E),t))if(e)R[T]=_;else if(_)switch(t){case 3:return!0;case 5:return m;case 6:return T;case 2:u.call(R,m)}else switch(t){case 4:return!1;case 7:u.call(R,m)}return f?-1:c||l?l:R}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},1194:(t,e,r)=>{var n=r(7293),i=r(5112),o=r(7392),s=i("species");t.exports=function(t){return o>=51||!n((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},7475:(t,e,r)=>{var n=r(3157),i=r(4411),o=r(111),s=r(5112)("species");t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===Array||n(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?Array:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),i=r(9212);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,r)=>{var n=r(1694),i=r(614),o=r(4326),s=r(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),s))?r:a?o(e):"Object"==(n=o(e))&&i(e.callee)?"Arguments":n}},5631:(t,e,r)=>{"use strict";var n=r(3070).f,i=r(30),o=r(2248),s=r(9974),a=r(5787),u=r(408),c=r(654),l=r(6340),f=r(9781),d=r(2423).fastKey,p=r(9909),h=p.set,g=p.getterFor;t.exports={getConstructor:function(t,e,r,c){var l=t((function(t,n){a(t,l,e),h(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&u(n,t[c],{that:t,AS_ENTRIES:r})})),p=g(e),v=function(t,e,r){var n,i,o=p(t),s=y(t,e);return s?s.value=r:(o.last=s={index:i=d(e,!0),key:e,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),f?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},y=function(t,e){var r,n=p(t),i=d(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return o(l.prototype,{clear:function(){for(var t=p(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,r=p(e),n=y(e,t);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),f?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=p(this),n=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(l.prototype,r?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&n(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",i=g(e),o=g(n);c(t,e,(function(t,e){h(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},7710:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(4705),s=r(1320),a=r(2423),u=r(408),c=r(5787),l=r(614),f=r(111),d=r(7293),p=r(7072),h=r(8003),g=r(9587);t.exports=function(t,e,r){var v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),m=v?"set":"add",_=i[t],E=_&&_.prototype,I=_,b={},O=function(t){var e=E[t];s(E,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(o(t,!l(_)||!(y||E.forEach&&!d((function(){(new _).entries().next()})))))I=r.getConstructor(e,t,v,m),a.enable();else if(o(t,!0)){var T=new I,A=T[m](y?{}:-0,1)!=T,R=d((function(){T.has(1)})),S=p((function(t){new _(t)})),C=!y&&d((function(){for(var t=new _,e=5;e--;)t[m](e,e);return!t.has(-0)}));S||((I=e((function(e,r){c(e,I,t);var n=g(new _,e,I);return null!=r&&u(r,n[m],{that:n,AS_ENTRIES:v}),n}))).prototype=E,E.constructor=I),(R||C)&&(O("delete"),O("has"),v&&O("get")),(C||A)&&O(m),y&&E.clear&&delete E.clear}return b[t]=I,n({global:!0,forced:I!=_},b),h(I,t),y||r.setStrong(I,t,v),I}},9920:(t,e,r)=>{var n=r(6656),i=r(3887),o=r(1236),s=r(3070);t.exports=function(t,e){for(var r=i(e),a=s.f,u=o.f,c=0;c<r.length;c++){var l=r[c];n(t,l)||a(t,l,u(e,l))}}},4964:(t,e,r)=>{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),s=r(8003),a=r(7497),u=function(){return this};t.exports=function(t,e,r){var c=e+" Iterator";return t.prototype=i(n,{next:o(1,r)}),s(t,c,!1,!0),a[c]=u,t}},8880:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9114);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);t.exports=function(t,e,r){var s=n(e);s in t?i.f(t,s,o(0,r)):t[s]=r}},654:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(6530),s=r(614),a=r(4994),u=r(9518),c=r(7674),l=r(8003),f=r(8880),d=r(1320),p=r(5112),h=r(7497),g=r(3383),v=o.PROPER,y=o.CONFIGURABLE,m=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,E=p("iterator"),I="keys",b="values",O="entries",T=function(){return this};t.exports=function(t,e,r,o,p,g,A){a(r,e,o);var R,S,C,j=function(t){if(t===p&&x)return x;if(!_&&t in P)return P[t];switch(t){case I:case b:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},N=e+" Iterator",k=!1,P=t.prototype,M=P[E]||P["@@iterator"]||p&&P[p],x=!_&&M||j(p),D="Array"==e&&P.entries||M;if(D&&(R=u(D.call(new t)))!==Object.prototype&&R.next&&(i||u(R)===m||(c?c(R,m):s(R[E])||d(R,E,T)),l(R,N,!0,!0),i&&(h[N]=T)),v&&p==b&&M&&M.name!==b&&(!i&&y?f(P,"name",b):(k=!0,x=function(){return M.call(this)})),p)if(S={values:j(b),keys:g?x:j(I),entries:j(O)},A)for(C in S)(_||k||!(C in P))&&d(P,C,S[C]);else n({target:e,proto:!0,forced:_||k},S);return i&&!A||P[E]===x||d(P,E,x,{name:p}),h[e]=x,S}},7235:(t,e,r)=>{var n=r(857),i=r(6656),o=r(6061),s=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||s(e,t,{value:o.f(t)})}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),i=r(111),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7871:t=>{t.exports="object"==typeof window},1528:(t,e,r)=>{var n=r(8113),i=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),i=r(7854);t.exports="process"==n(i.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,i,o=r(7854),s=r(8113),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l?i=(n=l.split("."))[0]<4?1:n[0]+n[1]:s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=n[1]),t.exports=i&&+i},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),s=r(1320),a=r(3505),u=r(9920),c=r(4705);t.exports=function(t,e){var r,l,f,d,p,h=t.target,g=t.global,v=t.stat;if(r=g?n:v?n[h]||a(h,{}):(n[h]||{}).prototype)for(l in e){if(d=e[l],f=t.noTargetGet?(p=i(r,l))&&p.value:r[l],!c(g?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(r,l,d,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1320),i=r(2261),o=r(7293),s=r(5112),a=r(8880),u=s("species"),c=RegExp.prototype;t.exports=function(t,e,r,l){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!p||r){var h=/./[f],g=e(f,""[t],(function(t,e,r,n,o){var s=e.exec;return s===i||s===c.exec?d&&!o?{done:!0,value:h.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));n(String.prototype,t,g[0]),n(c,f,g[1])}l&&a(c[f],"sham",!0)}},6677:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:(t,e,r)=>{var n=r(9662);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},7065:(t,e,r)=>{"use strict";var n=r(9662),i=r(111),o=[].slice,s={},a=function(t,e,r){if(!(e in s)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";s[e]=Function("C,a","return new C("+n.join(",")+")")}return s[e](t,r)};t.exports=Function.bind||function(t){var e=n(this),r=o.call(arguments,1),s=function(){var n=r.concat(o.call(arguments));return this instanceof s?a(e,n.length,n):e.apply(t,n)};return i(e.prototype)&&(s.prototype=e.prototype),s}},6530:(t,e,r)=>{var n=r(9781),i=r(6656),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5005:(t,e,r)=>{var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),i=r(8173),o=r(7497),s=r(5112)("iterator");t.exports=function(t){if(null!=t)return i(t,s)||i(t,"@@iterator")||o[n(t)]}},8554:(t,e,r)=>{var n=r(9662),i=r(9670),o=r(1246);t.exports=function(t,e){var r=arguments.length<2?o(t):e;if(n(r))return i(r.call(t));throw TypeError(String(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},647:(t,e,r)=>{var n=r(7908),i=Math.floor,o="".replace,s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,u,c,l){var f=r+t.length,d=u.length,p=a;return void 0!==c&&(c=n(c),p=s),o.call(l,p,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(f);case"<":s=c[o.slice(1,-1)];break;default:var a=+o;if(0===a)return n;if(a>d){var l=i(a/10);return 0===l?n:l<=d?void 0===u[l-1]?o.charAt(1):u[l-1]+o.charAt(1):n}s=u[a-1]}return void 0===s?"":s}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:(t,e,r)=>{var n=r(7908),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(n(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(7293),i=r(4326),o="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},9587:(t,e,r)=>{var n=r(614),i=r(111),o=r(7674);t.exports=function(t,e,r){var s,a;return o&&n(s=e.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(t,a),t}},2788:(t,e,r)=>{var n=r(614),i=r(5465),o=Function.toString;n(i.inspectSource)||(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},2423:(t,e,r)=>{var n=r(2109),i=r(3501),o=r(111),s=r(6656),a=r(3070).f,u=r(8006),c=r(1156),l=r(9711),f=r(6677),d=!1,p=l("meta"),h=0,g=Object.isExtensible||function(){return!0},v=function(t){a(t,p,{value:{objectID:"O"+h++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},d=!0;var t=u.f,e=[].splice,r={};r[p]=1,t(r).length&&(u.f=function(r){for(var n=t(r),i=0,o=n.length;i<o;i++)if(n[i]===p){e.call(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,p)){if(!g(t))return"F";if(!e)return"E";v(t)}return t[p].objectID},getWeakData:function(t,e){if(!s(t,p)){if(!g(t))return!0;if(!e)return!1;v(t)}return t[p].weakData},onFreeze:function(t){return f&&d&&g(t)&&!s(t,p)&&v(t),t}};i[p]=!0},9909:(t,e,r)=>{var n,i,o,s=r(8536),a=r(7854),u=r(111),c=r(8880),l=r(6656),f=r(5465),d=r(6200),p=r(3501),h="Object already initialized",g=a.WeakMap;if(s||f.state){var v=f.state||(f.state=new g),y=v.get,m=v.has,_=v.set;n=function(t,e){if(m.call(v,t))throw new TypeError(h);return e.facade=t,_.call(v,t,e),e},i=function(t){return y.call(v,t)||{}},o=function(t){return m.call(v,t)}}else{var E=d("state");p[E]=!0,n=function(t,e){if(l(t,E))throw new TypeError(h);return e.facade=t,c(t,E,e),e},i=function(t){return l(t,E)?t[E]:{}},o=function(t){return l(t,E)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(7293),i=r(614),o=r(648),s=r(5005),a=r(2788),u=[],c=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,f=l.exec,d=!l.exec((function(){})),p=function(t){if(!i(t))return!1;try{return c(Object,u,t),!0}catch(t){return!1}};t.exports=!c||n((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!f.call(l,a(t))}:p},4705:(t,e,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,s=function(t,e){var r=u[a(t)];return r==l||r!=c&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},8730:(t,e,r)=>{var n=r(111),i=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&i(t)===t}},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,r)=>{var n=r(614),i=r(5005),o=r(3307);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return n(e)&&Object(t)instanceof e}},408:(t,e,r)=>{var n=r(9670),i=r(7659),o=r(7466),s=r(9974),a=r(8554),u=r(1246),c=r(9212),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,d,p,h,g,v,y,m=r&&r.that,_=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),I=!(!r||!r.INTERRUPTED),b=s(e,m,1+_+I),O=function(t){return f&&c(f,"normal",t),new l(!0,t)},T=function(t){return _?(n(t),I?b(t[0],t[1],O):b(t[0],t[1])):I?b(t,O):b(t)};if(E)f=t;else{if(!(d=u(t)))throw TypeError(String(t)+" is not iterable");if(i(d)){for(p=0,h=o(t.length);h>p;p++)if((g=T(t[p]))&&g instanceof l)return g;return new l(!1)}f=a(t,d)}for(v=f.next;!(y=v.call(f)).done;){try{g=T(y.value)}catch(t){c(f,"throw",t)}if("object"==typeof g&&g&&g instanceof l)return g}return new l(!1)}},9212:(t,e,r)=>{var n=r(9670),i=r(8173);t.exports=function(t,e,r){var o,s;n(t);try{if(!(o=i(t,"return"))){if("throw"===e)throw r;return r}o=o.call(t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return n(o),r}},3383:(t,e,r)=>{"use strict";var n,i,o,s=r(7293),a=r(614),u=r(30),c=r(9518),l=r(1320),f=r(5112),d=r(1913),p=f("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=c(c(o)))!==Object.prototype&&(n=i):h=!0),null==n||s((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=u(n)),a(n[p])||l(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},7497:t=>{t.exports={}},5948:(t,e,r)=>{var n,i,o,s,a,u,c,l,f=r(7854),d=r(1236).f,p=r(261).set,h=r(6833),g=r(1528),v=r(1036),y=r(5268),m=f.MutationObserver||f.WebKitMutationObserver,_=f.document,E=f.process,I=f.Promise,b=d(f,"queueMicrotask"),O=b&&b.value;O||(n=function(){var t,e;for(y&&(t=E.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},h||y||v||!m||!_?!g&&I&&I.resolve?((c=I.resolve(void 0)).constructor=I,l=c.then,s=function(){l.call(c,n)}):s=y?function(){E.nextTick(n)}:function(){p.call(f,n)}:(a=!0,u=_.createTextNode(""),new m(n).observe(u,{characterData:!0}),s=function(){u.data=a=!a})),t.exports=O||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,s()),o=e}},3366:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},133:(t,e,r)=>{var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(t,e,r)=>{var n=r(7854),i=r(614),o=r(2788),s=n.WeakMap;t.exports=i(s)&&/native code/.test(o(s))},8523:(t,e,r)=>{"use strict";var n=r(9662),i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},3929:(t,e,r)=>{var n=r(7850);t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},30:(t,e,r)=>{var n,i=r(9670),o=r(6048),s=r(748),a=r(3501),u=r(490),c=r(317),l=r(6200),f=l("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&n?h(n):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(n);for(var r=s.length;r--;)delete g.prototype[s[r]];return g()};a[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d.prototype=i(t),r=new d,d.prototype=null,r[f]=t):r=g(),void 0===e?r:o(r,e)}},6048:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9670),s=r(1956);t.exports=n?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),a=n.length,u=0;a>u;)i.f(t,r=n[u++],e[r]);return t}},3070:(t,e,r)=>{var n=r(9781),i=r(4664),o=r(9670),s=r(4948),a=Object.defineProperty;e.f=n?a:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),i=r(5296),o=r(9114),s=r(5656),a=r(4948),u=r(6656),c=r(4664),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=a(e),c)try{return l(t,e)}catch(t){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},1156:(t,e,r)=>{var n=r(5656),i=r(8006).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},8006:(t,e,r)=>{var n=r(6324),i=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(6656),i=r(614),o=r(7908),s=r(6200),a=r(8544),u=s("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){var e=o(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof Object?c:null}},6324:(t,e,r)=>{var n=r(6656),i=r(5656),o=r(1318).indexOf,s=r(3501);t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)!n(s,r)&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},1956:(t,e,r)=>{var n=r(6324),i=r(748);t.exports=Object.keys||function(t){return n(t,i)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(9670),i=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,o){return n(r),i(o),e?t.call(r,o):r.__proto__=o,r}}():void 0)},4699:(t,e,r)=>{var n=r(9781),i=r(1956),o=r(5656),s=r(5296).f,a=function(t){return function(e){for(var r,a=o(e),u=i(a),c=u.length,l=0,f=[];c>l;)r=u[l++],n&&!s.call(a,r)||f.push(t?[r,a[r]]:a[r]);return f}};t.exports={entries:a(!0),values:a(!1)}},288:(t,e,r)=>{"use strict";var n=r(1694),i=r(648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,r)=>{var n=r(614),i=r(111);t.exports=function(t,e){var r,o;if("string"===e&&n(r=t.toString)&&!i(o=r.call(t)))return o;if(n(r=t.valueOf)&&!i(o=r.call(t)))return o;if("string"!==e&&n(r=t.toString)&&!i(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),i=r(8006),o=r(5181),s=r(9670);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=o.f;return r?e.concat(r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,r)=>{var n=r(9670),i=r(111),o=r(8523);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},2248:(t,e,r)=>{var n=r(1320);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},1320:(t,e,r)=>{var n=r(7854),i=r(614),o=r(6656),s=r(8880),a=r(3505),u=r(2788),c=r(9909),l=r(6530).CONFIGURABLE,f=c.get,d=c.enforce,p=String(String).split("String");(t.exports=function(t,e,r,u){var c,f=!!u&&!!u.unsafe,h=!!u&&!!u.enumerable,g=!!u&&!!u.noTargetGet,v=u&&void 0!==u.name?u.name:e;i(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||l&&r.name!==v)&&s(r,"name",v),(c=d(r)).source||(c.source=p.join("string"==typeof v?v:""))),t!==n?(f?!g&&t[e]&&(h=!0):delete t[e],h?t[e]=r:s(t,e,r)):h?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return i(this)&&f(this).source||u(this)}))},7651:(t,e,r)=>{var n=r(9670),i=r(614),o=r(4326),s=r(2261);t.exports=function(t,e){var r=t.exec;if(i(r)){var a=r.call(t,e);return null!==a&&n(a),a}if("RegExp"===o(t))return s.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")}},2261:(t,e,r)=>{"use strict";var n,i,o=r(1340),s=r(7066),a=r(2999),u=r(2309),c=r(30),l=r(9909).get,f=r(9441),d=r(7168),p=RegExp.prototype.exec,h=u("native-string-replace",String.prototype.replace),g=p,v=(n=/a/,i=/b*/g,p.call(n,"a"),p.call(i,"a"),0!==n.lastIndex||0!==i.lastIndex),y=a.UNSUPPORTED_Y||a.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(v||m||y||f||d)&&(g=function(t){var e,r,n,i,a,u,f,d=this,_=l(d),E=o(t),I=_.raw;if(I)return I.lastIndex=d.lastIndex,e=g.call(I,E),d.lastIndex=I.lastIndex,e;var b=_.groups,O=y&&d.sticky,T=s.call(d),A=d.source,R=0,S=E;if(O&&(-1===(T=T.replace("y","")).indexOf("g")&&(T+="g"),S=E.slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==E.charAt(d.lastIndex-1))&&(A="(?: "+A+")",S=" "+S,R++),r=new RegExp("^(?:"+A+")",T)),m&&(r=new RegExp("^"+A+"$(?!\\s)",T)),v&&(n=d.lastIndex),i=p.call(O?r:d,S),O?i?(i.input=i.input.slice(R),i[0]=i[0].slice(R),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:v&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),m&&i&&i.length>1&&h.call(i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&b)for(i.groups=u=c(null),a=0;a<b.length;a++)u[(f=b[a])[0]]=i[f[1]];return i}),t.exports=g},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;e.UNSUPPORTED_Y=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},9441:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){try{Object.defineProperty(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},6340:(t,e,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),s=r(9781),a=o("species");t.exports=function(t){var e=n(t),r=i.f;s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,i=r(6656),o=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,r)=>{var n=r(7854),i=r(3505),o="__core-js_shared__",s=n[o]||i(o,{});t.exports=s},2309:(t,e,r)=>{var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,r)=>{var n=r(9670),i=r(9483),o=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[o])?e:i(r)}},8710:(t,e,r)=>{var n=r(9958),i=r(1340),o=r(4488),s=function(t){return function(e,r){var s,a,u=i(o(e)),c=n(r),l=u.length;return c<0||c>=l?t?"":void 0:(s=u.charCodeAt(c))<55296||s>56319||c+1===l||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):s:t?u.slice(c,c+2):a-56320+(s-55296<<10)+65536}};t.exports={codeAt:s(!1),charAt:s(!0)}},3111:(t,e,r)=>{var n=r(4488),i=r(1340),o="["+r(1361)+"]",s=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),u=function(t){return function(e){var r=i(n(e));return 1&t&&(r=r.replace(s,"")),2&t&&(r=r.replace(a,"")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},261:(t,e,r)=>{var n,i,o,s,a=r(7854),u=r(614),c=r(7293),l=r(9974),f=r(490),d=r(317),p=r(6833),h=r(5268),g=a.setImmediate,v=a.clearImmediate,y=a.process,m=a.MessageChannel,_=a.Dispatch,E=0,I={},b="onreadystatechange";try{n=a.location}catch(t){}var O=function(t){if(I.hasOwnProperty(t)){var e=I[t];delete I[t],e()}},T=function(t){return function(){O(t)}},A=function(t){O(t.data)},R=function(t){a.postMessage(String(t),n.protocol+"//"+n.host)};g&&v||(g=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return I[++E]=function(){(u(t)?t:Function(t)).apply(void 0,e)},i(E),E},v=function(t){delete I[t]},h?i=function(t){y.nextTick(T(t))}:_&&_.now?i=function(t){_.now(T(t))}:m&&!p?(s=(o=new m).port2,o.port1.onmessage=A,i=l(s.postMessage,s,1)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!c(R)?(i=R,a.addEventListener("message",A,!1)):i=b in d("script")?function(t){f.appendChild(d("script")).onreadystatechange=function(){f.removeChild(this),O(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:v}},1400:(t,e,r)=>{var n=r(9958),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5656:(t,e,r)=>{var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9958:t=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},7466:(t,e,r)=>{var n=r(9958),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488);t.exports=function(t){return Object(n(t))}},7593:(t,e,r)=>{var n=r(111),i=r(2190),o=r(8173),s=r(2140),a=r(5112)("toPrimitive");t.exports=function(t,e){if(!n(t)||i(t))return t;var r,u=o(t,a);if(u){if(void 0===e&&(e="default"),r=u.call(t,e),!n(r)||i(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:(t,e,r)=>{var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:String(e)}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648);t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},6330:t=>{t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},9711:t=>{var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},3307:(t,e,r)=>{var n=r(133);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(7854),i=r(2309),o=r(6656),s=r(9711),a=r(133),u=r(3307),c=i("wks"),l=n.Symbol,f=u?l:l&&l.withoutSetter||s;t.exports=function(t){return o(c,t)&&(a||"string"==typeof c[t])||(a&&o(l,t)?c[t]=l[t]:c[t]=f("Symbol."+t)),c[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:(t,e,r)=>{"use strict";var n=r(2109),i=r(7293),o=r(3157),s=r(111),a=r(7908),u=r(7466),c=r(6135),l=r(5417),f=r(1194),d=r(5112),p=r(7392),h=d("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",y=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),m=f("concat"),_=function(t){if(!s(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)};n({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,r,n,i,o,s=a(this),f=l(s,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(_(o=-1===e?s:arguments[e])){if(d+(i=u(o.length))>g)throw TypeError(v);for(r=0;r<i;r++,d++)r in o&&c(f,d,o[r])}else{if(d>=g)throw TypeError(v);c(f,d++,o)}return f.length=d,f}})},7327:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9826:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),s="find",a=!0;s in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},1038:(t,e,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(1223);n({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:(t,e,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),s=r(9909),a=r(654),u="Array Iterator",c=s.set,l=s.getterFor(u);t.exports=a(Array,"Array",(function(t,e){c(this,{type:u,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},1249:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,e,r)=>{"use strict";var n=r(2109),i=r(3157),o=r(4411),s=r(111),a=r(1400),u=r(7466),c=r(5656),l=r(6135),f=r(5112),d=r(1194)("slice"),p=f("species"),h=[].slice,g=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,f,d=c(this),v=u(d.length),y=a(t,v),m=a(void 0===e?v:e,v);if(i(d)&&(r=d.constructor,(o(r)&&(r===Array||i(r.prototype))||s(r)&&null===(r=r[p]))&&(r=void 0),r===Array||void 0===r))return h.call(d,y,m);for(n=new(void 0===r?Array:r)(g(m-y,0)),f=0;y<m;y++,f++)y in d&&l(n,f,d[y]);return n.length=f,n}})},8309:(t,e,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(3070).f,s=Function.prototype,a=s.toString,u=/^\s*function ([^ (]*)/;n&&!i&&o(s,"name",{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(t){return""}}})},1532:(t,e,r)=>{"use strict";var n=r(7710),i=r(5631);t.exports=n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3689:(t,e,r)=>{var n=r(2109),i=Math.ceil,o=Math.floor;n({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},9653:(t,e,r)=>{"use strict";var n=r(9781),i=r(7854),o=r(4705),s=r(1320),a=r(6656),u=r(4326),c=r(9587),l=r(2190),f=r(7593),d=r(7293),p=r(30),h=r(8006).f,g=r(1236).f,v=r(3070).f,y=r(3111).trim,m="Number",_=i.Number,E=_.prototype,I=u(p(E))==m,b=function(t){if(l(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,i,o,s,a,u,c=f(t,"number");if("string"==typeof c&&c.length>2)if(43===(e=(c=y(c)).charCodeAt(0))||45===e){if(88===(r=c.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(s=(o=c.slice(2)).length,a=0;a<s;a++)if((u=o.charCodeAt(a))<48||u>i)return NaN;return parseInt(o,n)}return+c};if(o(m,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var O,T=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof T&&(I?d((function(){E.valueOf.call(r)})):u(r)!=m)?c(new _(b(e)),r,T):b(e)},A=n?h(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),R=0;A.length>R;R++)a(_,O=A[R])&&!a(T,O)&&v(T,O,g(_,O));T.prototype=E,E.constructor=T,s(i,m,T)}},3161:(t,e,r)=>{r(2109)({target:"Number",stat:!0},{isInteger:r(8730)})},9720:(t,e,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},5003:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(5656),s=r(1236).f,a=r(9781),u=i((function(){s(1)}));n({target:"Object",stat:!0,forced:!a||u,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},9337:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(3887),s=r(5656),a=r(1236),u=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=s(t),i=a.f,c=o(n),l={},f=0;c.length>f;)void 0!==(r=i(n,e=c[f++]))&&u(l,e,r);return l}})},7941:(t,e,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,r)=>{var n=r(1694),i=r(1320),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(t,e,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},7727:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3366),s=r(7293),a=r(5005),u=r(614),c=r(6707),l=r(9478),f=r(1320);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,a("Promise")),r=u(t);return this.then(r?function(r){return l(e,t()).then((function(){return r}))}:t,r?function(r){return l(e,t()).then((function(){throw r}))}:t)}}),!i&&u(o)){var d=a("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},8674:(t,e,r)=>{"use strict";var n,i,o,s,a=r(2109),u=r(1913),c=r(7854),l=r(5005),f=r(3366),d=r(1320),p=r(2248),h=r(7674),g=r(8003),v=r(6340),y=r(9662),m=r(614),_=r(111),E=r(5787),I=r(2788),b=r(408),O=r(7072),T=r(6707),A=r(261).set,R=r(5948),S=r(9478),C=r(842),j=r(8523),N=r(2534),k=r(9909),P=r(4705),M=r(5112),x=r(7871),D=r(5268),w=r(7392),L=M("species"),F="Promise",V=k.get,G=k.set,H=k.getterFor(F),U=f&&f.prototype,B=f,K=U,Y=c.TypeError,X=c.document,W=c.process,z=j.f,J=z,Q=!!(X&&X.createEvent&&c.dispatchEvent),$=m(c.PromiseRejectionEvent),Z="unhandledrejection",q=!1,tt=P(F,(function(){var t=I(B),e=t!==String(B);if(!e&&66===w)return!0;if(u&&!K.finally)return!0;if(w>=51&&/native code/.test(t))return!1;var r=new B((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[L]=n,!(q=r.then((function(){}))instanceof n)||!e&&x&&!$})),et=tt||!O((function(t){B.all(t).catch((function(){}))})),rt=function(t){var e;return!(!_(t)||!m(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;R((function(){for(var n=t.value,i=1==t.state,o=0;r.length>o;){var s,a,u,c=r[o++],l=i?c.ok:c.fail,f=c.resolve,d=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&at(t),t.rejection=1),!0===l?s=n:(p&&p.enter(),s=l(n),p&&(p.exit(),u=!0)),s===c.promise?d(Y("Promise-chain cycle")):(a=rt(s))?a.call(s,f,d):f(s)):d(n)}catch(t){p&&!u&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},it=function(t,e,r){var n,i;Q?((n=X.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!$&&(i=c["on"+t])?i(n):t===Z&&C("Unhandled promise rejection",r)},ot=function(t){A.call(c,(function(){var e,r=t.facade,n=t.value;if(st(t)&&(e=N((function(){D?W.emit("unhandledRejection",n,r):it(Z,r,n)})),t.rejection=D||st(t)?2:1,e.error))throw e.value}))},st=function(t){return 1!==t.rejection&&!t.parent},at=function(t){A.call(c,(function(){var e=t.facade;D?W.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},ut=function(t,e,r){return function(n){t(e,n,r)}},ct=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,nt(t,!0))},lt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Y("Promise can't be resolved itself");var n=rt(e);n?R((function(){var r={done:!1};try{n.call(e,ut(lt,r,t),ut(ct,r,t))}catch(e){ct(r,e,t)}})):(t.value=e,t.state=1,nt(t,!1))}catch(e){ct({done:!1},e,t)}}};if(tt&&(K=(B=function(t){E(this,B,F),y(t),n.call(this);var e=V(this);try{t(ut(lt,e),ut(ct,e))}catch(t){ct(e,t)}}).prototype,(n=function(t){G(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(K,{then:function(t,e){var r=H(this),n=z(T(this,B));return n.ok=!m(t)||t,n.fail=m(e)&&e,n.domain=D?W.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&nt(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n,e=V(t);this.promise=t,this.resolve=ut(lt,e),this.reject=ut(ct,e)},j.f=z=function(t){return t===B||t===o?new i(t):J(t)},!u&&m(f)&&U!==Object.prototype)){s=U.then,q||(d(U,"then",(function(t,e){var r=this;return new B((function(t,e){s.call(r,t,e)})).then(t,e)}),{unsafe:!0}),d(U,"catch",K.catch,{unsafe:!0}));try{delete U.constructor}catch(t){}h&&h(U,K)}a({global:!0,wrap:!0,forced:tt},{Promise:B}),g(B,F,!1,!0),v(F),o=l(F),a({target:F,stat:!0,forced:tt},{reject:function(t){var e=z(this);return e.reject.call(void 0,t),e.promise}}),a({target:F,stat:!0,forced:u||tt},{resolve:function(t){return S(u&&this===o?B:this,t)}}),a({target:F,stat:!0,forced:et},{all:function(t){var e=this,r=z(e),n=r.resolve,i=r.reject,o=N((function(){var r=y(e.resolve),o=[],s=0,a=1;b(t,(function(t){var u=s++,c=!1;o.push(void 0),a++,r.call(e,t).then((function(t){c||(c=!0,o[u]=t,--a||n(o))}),i)})),--a||n(o)}));return o.error&&i(o.value),r.promise},race:function(t){var e=this,r=z(e),n=r.reject,i=N((function(){var i=y(e.resolve);b(t,(function(t){i.call(e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},2419:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(9483),s=r(9670),a=r(111),u=r(30),c=r(7065),l=r(7293),f=i("Reflect","construct"),d=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!l((function(){f((function(){}))})),h=d||p;n({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(p&&!d)return f(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(c.apply(t,n))}var i=r.prototype,l=u(a(i)?i:Object.prototype),h=Function.apply.call(t,l,e);return a(h)?h:l}})},4603:(t,e,r)=>{var n=r(9781),i=r(7854),o=r(4705),s=r(9587),a=r(8880),u=r(3070).f,c=r(8006).f,l=r(7850),f=r(1340),d=r(7066),p=r(2999),h=r(1320),g=r(7293),v=r(6656),y=r(9909).enforce,m=r(6340),_=r(5112),E=r(9441),I=r(7168),b=_("match"),O=i.RegExp,T=O.prototype,A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,S=/a/g,C=new O(R)!==R,j=p.UNSUPPORTED_Y,N=n&&(!C||j||E||I||g((function(){return S[b]=!1,O(R)!=R||O(S)==S||"/a/i"!=O(R,"i")})));if(o("RegExp",N)){for(var k=function(t,e){var r,n,i,o,u,c,p=this instanceof k,h=l(t),g=void 0===e,m=[],_=t;if(!p&&h&&g&&t.constructor===k)return t;if((h||t instanceof k)&&(t=t.source,g&&(e="flags"in _?_.flags:d.call(_))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),_=t,E&&"dotAll"in R&&(n=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),r=e,j&&"sticky"in R&&(i=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),I&&(o=function(t){for(var e,r=t.length,n=0,i="",o=[],s={},a=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(e=t.charAt(n)))e+=t.charAt(++n);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:A.test(t.slice(n+1))&&(n+=2,u=!0),i+=e,c++;continue;case">"===e&&u:if(""===l||v(s,l))throw new SyntaxError("Invalid capture group name");s[l]=!0,o.push([l,c]),u=!1,l="";continue}u?l+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),u=s(O(t,e),p?this:T,k),(n||i||m.length)&&(c=y(u),n&&(c.dotAll=!0,c.raw=k(function(t){for(var e,r=t.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(e=t.charAt(n))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+t.charAt(++n);return i}(t),r)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==_)try{a(u,"source",""===_?"(?:)":_)}catch(t){}return u},P=function(t){t in k||u(k,t,{configurable:!0,get:function(){return O[t]},set:function(e){O[t]=e}})},M=c(O),x=0;M.length>x;)P(M[x++]);T.constructor=k,k.prototype=T,h(i,"RegExp",k)}m("RegExp")},4916:(t,e,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2087:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(7066),s=r(7293);n&&s((function(){return"sy"!==Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get.call({dotAll:!0,sticky:!0})}))&&i.f(RegExp.prototype,"flags",{configurable:!0,get:o})},9714:(t,e,r)=>{"use strict";var n=r(6530).PROPER,i=r(1320),o=r(9670),s=r(1340),a=r(7293),u=r(7066),c="toString",l=RegExp.prototype,f=l.toString,d=a((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),p=n&&f.name!=c;(d||p)&&i(RegExp.prototype,c,(function(){var t=o(this),e=s(t.source),r=t.flags;return"/"+e+"/"+s(void 0===r&&t instanceof RegExp&&!("flags"in l)?u.call(t):r)}),{unsafe:!0})},7852:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1236).f,s=r(7466),a=r(1340),u=r(3929),c=r(4488),l=r(4964),f=r(1913),d="".endsWith,p=Math.min,h=l("endsWith");i({target:"String",proto:!0,forced:!!(f||h||(n=o(String.prototype,"endsWith"),!n||n.writable))&&!h},{endsWith:function(t){var e=a(c(this));u(t);var r=arguments.length>1?arguments[1]:void 0,n=s(e.length),i=void 0===r?n:p(s(r),n),o=a(t);return d?d.call(e,o,i):e.slice(i-o.length,i)===o}})},2023:(t,e,r)=>{"use strict";var n=r(2109),i=r(3929),o=r(4488),s=r(1340);n({target:"String",proto:!0,forced:!r(4964)("includes")},{includes:function(t){return!!~s(o(this)).indexOf(s(i(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),s=r(654),a="String Iterator",u=o.set,c=o.getterFor(a);s(String,"String",(function(t){u(this,{type:a,string:i(t),index:0})}),(function(){var t,e=c(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=n(r,i),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,r)=>{"use strict";var n=r(7007),i=r(9670),o=r(7466),s=r(1340),a=r(4488),u=r(8173),c=r(1530),l=r(7651);n("match",(function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:u(e,t);return n?n.call(e,r):new RegExp(e)[t](s(r))},function(t){var n=i(this),a=s(t),u=r(e,n,a);if(u.done)return u.value;if(!n.global)return l(n,a);var f=n.unicode;n.lastIndex=0;for(var d,p=[],h=0;null!==(d=l(n,a));){var g=s(d[0]);p[h]=g,""===g&&(n.lastIndex=c(a,o(n.lastIndex),f)),h++}return 0===h?null:p}]}))},5306:(t,e,r)=>{"use strict";var n=r(7007),i=r(7293),o=r(9670),s=r(614),a=r(9958),u=r(7466),c=r(1340),l=r(4488),f=r(1530),d=r(8173),p=r(647),h=r(7651),g=r(5112)("replace"),v=Math.max,y=Math.min,m="$0"==="a".replace(/./,"$0"),_=!!/./[g]&&""===/./[g]("a","$0");n("replace",(function(t,e,r){var n=_?"$":"$0";return[function(t,r){var n=l(this),i=null==t?void 0:d(t,g);return i?i.call(t,n,r):e.call(c(n),t,r)},function(t,i){var l=o(this),d=c(t);if("string"==typeof i&&-1===i.indexOf(n)&&-1===i.indexOf("$<")){var g=r(e,l,d,i);if(g.done)return g.value}var m=s(i);m||(i=c(i));var _=l.global;if(_){var E=l.unicode;l.lastIndex=0}for(var I=[];;){var b=h(l,d);if(null===b)break;if(I.push(b),!_)break;""===c(b[0])&&(l.lastIndex=f(d,u(l.lastIndex),E))}for(var O,T="",A=0,R=0;R<I.length;R++){b=I[R];for(var S=c(b[0]),C=v(y(a(b.index),d.length),0),j=[],N=1;N<b.length;N++)j.push(void 0===(O=b[N])?O:String(O));var k=b.groups;if(m){var P=[S].concat(j,C,d);void 0!==k&&P.push(k);var M=c(i.apply(void 0,P))}else M=p(S,d,C,j,k,i);C>=A&&(T+=d.slice(A,C)+M,A=C+S.length)}return T+d.slice(A)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!m||_)},6755:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1236).f,s=r(7466),a=r(1340),u=r(3929),c=r(4488),l=r(4964),f=r(1913),d="".startsWith,p=Math.min,h=l("startsWith");i({target:"String",proto:!0,forced:!!(f||h||(n=o(String.prototype,"startsWith"),!n||n.writable))&&!h},{startsWith:function(t){var e=a(c(this));u(t);var r=s(p(arguments.length>1?arguments[1]:void 0,e.length)),n=a(t);return d?d.call(e,n,r):e.slice(r,r+n.length)===n}})},1817:(t,e,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),s=r(6656),a=r(614),u=r(111),c=r(3070).f,l=r(9920),f=o.Symbol;if(i&&a(f)&&(!("description"in f.prototype)||void 0!==f().description)){var d={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new f(t):void 0===t?f():f(t);return""===t&&(d[e]=!0),e};l(p,f);var h=p.prototype=f.prototype;h.constructor=p;var g=h.toString,v="Symbol(test)"==String(f("test")),y=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var t=u(this)?this.valueOf():this,e=g.call(t);if(s(d,t))return"";var r=v?e.slice(7,-1):e.replace(y,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:p})}},2165:(t,e,r)=>{r(7235)("iterator")},2526:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(5005),s=r(1913),a=r(9781),u=r(133),c=r(7293),l=r(6656),f=r(3157),d=r(614),p=r(111),h=r(2190),g=r(9670),v=r(7908),y=r(5656),m=r(4948),_=r(1340),E=r(9114),I=r(30),b=r(1956),O=r(8006),T=r(1156),A=r(5181),R=r(1236),S=r(3070),C=r(5296),j=r(1320),N=r(2309),k=r(6200),P=r(3501),M=r(9711),x=r(5112),D=r(6061),w=r(7235),L=r(8003),F=r(9909),V=r(2092).forEach,G=k("hidden"),H="Symbol",U=x("toPrimitive"),B=F.set,K=F.getterFor(H),Y=Object.prototype,X=i.Symbol,W=o("JSON","stringify"),z=R.f,J=S.f,Q=T.f,$=C.f,Z=N("symbols"),q=N("op-symbols"),tt=N("string-to-symbol-registry"),et=N("symbol-to-string-registry"),rt=N("wks"),nt=i.QObject,it=!nt||!nt.prototype||!nt.prototype.findChild,ot=a&&c((function(){return 7!=I(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=z(Y,e);n&&delete Y[e],J(t,e,r),n&&t!==Y&&J(Y,e,n)}:J,st=function(t,e){var r=Z[t]=I(X.prototype);return B(r,{type:H,tag:t,description:e}),a||(r.description=e),r},at=function(t,e,r){t===Y&&at(q,e,r),g(t);var n=m(e);return g(r),l(Z,n)?(r.enumerable?(l(t,G)&&t[G][n]&&(t[G][n]=!1),r=I(r,{enumerable:E(0,!1)})):(l(t,G)||J(t,G,E(1,{})),t[G][n]=!0),ot(t,n,r)):J(t,n,r)},ut=function(t,e){g(t);var r=y(e),n=b(r).concat(dt(r));return V(n,(function(e){a&&!ct.call(r,e)||at(t,e,r[e])})),t},ct=function(t){var e=m(t),r=$.call(this,e);return!(this===Y&&l(Z,e)&&!l(q,e))&&(!(r||!l(this,e)||!l(Z,e)||l(this,G)&&this[G][e])||r)},lt=function(t,e){var r=y(t),n=m(e);if(r!==Y||!l(Z,n)||l(q,n)){var i=z(r,n);return!i||!l(Z,n)||l(r,G)&&r[G][n]||(i.enumerable=!0),i}},ft=function(t){var e=Q(y(t)),r=[];return V(e,(function(t){l(Z,t)||l(P,t)||r.push(t)})),r},dt=function(t){var e=t===Y,r=Q(e?q:y(t)),n=[];return V(r,(function(t){!l(Z,t)||e&&!l(Y,t)||n.push(Z[t])})),n};(u||(X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?_(arguments[0]):void 0,e=M(t),r=function(t){this===Y&&r.call(q,t),l(this,G)&&l(this[G],e)&&(this[G][e]=!1),ot(this,e,E(1,t))};return a&&it&&ot(Y,e,{configurable:!0,set:r}),st(e,t)},j(X.prototype,"toString",(function(){return K(this).tag})),j(X,"withoutSetter",(function(t){return st(M(t),t)})),C.f=ct,S.f=at,R.f=lt,O.f=T.f=ft,A.f=dt,D.f=function(t){return st(x(t),t)},a&&(J(X.prototype,"description",{configurable:!0,get:function(){return K(this).description}}),s||j(Y,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),V(b(rt),(function(t){w(t)})),n({target:H,stat:!0,forced:!u},{for:function(t){var e=_(t);if(l(tt,e))return tt[e];var r=X(e);return tt[e]=r,et[r]=e,r},keyFor:function(t){if(!h(t))throw TypeError(t+" is not a symbol");if(l(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!a},{create:function(t,e){return void 0===e?I(t):ut(I(t),e)},defineProperty:at,defineProperties:ut,getOwnPropertyDescriptor:lt}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:dt}),n({target:"Object",stat:!0,forced:c((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(v(t))}}),W)&&n({target:"JSON",stat:!0,forced:!u||c((function(){var t=X();return"[null]"!=W([t])||"{}"!=W({a:t})||"{}"!=W(Object(t))}))},{stringify:function(t,e,r){for(var n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e,(p(e)||void 0!==t)&&!h(t))return f(e)||(e=function(t,e){if(d(n)&&(e=n.call(this,t,e)),!h(e))return e}),i[1]=e,W.apply(null,i)}});if(!X.prototype[U]){var pt=X.prototype.valueOf;j(X.prototype,U,(function(){return pt.apply(this,arguments)}))}L(X,H),P[G]=!0},4747:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(8533),a=r(8880),u=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(o)},3948:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(6992),a=r(8880),u=r(5112),c=u("iterator"),l=u("toStringTag"),f=s.values,d=function(t,e){if(t){if(t[c]!==f)try{a(t,c,f)}catch(e){t[c]=f}if(t[l]||a(t,l,e),i[e])for(var r in s)if(t[r]!==s[r])try{a(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var p in i)d(n[p]&&n[p].prototype,p);d(o,"DOMTokenList")},5666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new C(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return N()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===g)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?h:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function v(){}function y(){}function m(){}var _={};u(_,o,(function(){return this}));var E=Object.getPrototypeOf,I=E&&E(E(j([])));I&&I!==r&&n.call(I,o)&&(_=I);var b=m.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function j(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=m,u(b,"constructor",m),u(m,"constructor",y),y.displayName=u(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},O(T.prototype),u(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new T(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(b),u(b,a,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},1030:t=>{"use strict";t.exports=require("abort-controller")},4809:t=>{"use strict";t.exports=require("node-fetch")},6689:t=>{"use strict";t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{FlagshipContext:()=>t.e,FlagshipProvider:()=>t.X,useFlagship:()=>o.UM,useFsActivate:()=>o.pc,useFsFlag:()=>o.Nf,useFsModification:()=>o.nr,useFsModificationInfo:()=>o._X,useFsModifications:()=>o.GW});var t=r(821),e=r(3547),i={};for(const t in e)["default","FlagshipContext","FlagshipProvider"].indexOf(t)<0&&(i[t]=()=>e[t]);r.d(n,i);var o=r(4927)})(),n})()}));
2
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(function(){return(()=>{var t={3547:(t,e,r)=>{var n,i=r(1030);self,n=function(t,e,r,n,o,s,a,u,c,l,f,d,p,h,g,v,y,m,_,E,I,b,O,T,A,R,S,C,j,N,k,P,x,M,D,w,L,F){return(()=>{var V={"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":(t,e,r)=>{"use strict";function n(t){if(Array.isArray(t))return t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":(t,e,r)=>{"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":(t,e,r)=>{"use strict";function n(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,u,"next",t)}function u(t){n(s,i,o,a,u,"throw",t)}a(void 0)}))}}r.r(e),r.d(e,{default:()=>i})},"./node_modules/@babel/runtime/helpers/esm/createClass.js":(t,e,r)=>{"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}r.r(e),r.d(e,{default:()=>i})},"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":(t,e,r)=>{"use strict";function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&(0,n.default)(t,e)}},"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":(t,e,r)=>{"use strict";function n(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":(t,e,r)=>{"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function o(t,e){if(e&&("object"===(0,n.default)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.default)(t)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>a});var n=r("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),i=r("./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"),o=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),s=r("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function a(t,e){return(0,n.default)(t)||(0,i.default)(t,e)||(0,o.default)(t,e)||(0,s.default)()}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.r(e),r.d(e,{default:()=>n})},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function i(t,e){if(t){if("string"==typeof t)return(0,n.default)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.default)(t,e):void 0}}},"./node_modules/@babel/runtime/regenerator/index.js":(t,e,r)=>{t.exports=r("./node_modules/regenerator-runtime/runtime.js")},"./src/api/TrackingManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TrackingManager:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),a=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),u=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),l=r.n(c),f=(r("core-js/modules/es.array.concat.js"),r("core-js/modules/es.function.name.js"),r("./src/enum/FlagshipConstant.ts")),d=r("./src/enum/HitType.ts"),p=r("./src/hit/index.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var g=function(t){(0,s.default)(c,t);var e,r,a,u=h(c);function c(){return u.apply(this,arguments)}return(0,o.default)(c,[{key:"sendConsentHit",value:(a=(0,i.default)(l().mark((function t(e){var r,i,o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},(0,n.default)(r,f.T_API_ITEM,d.HitType.EVENT),(0,n.default)(r,f.EVENT_LABEL_API_ITEM,"".concat(f.SDK_LANGUAGE.name,":").concat(e.hasConsented)),(0,n.default)(r,f.EVENT_ACTION_API_ITEM,"fs_consent"),(0,n.default)(r,f.EVENT_CATEGORY_API_ITEM,p.EventCategory.USER_ENGAGEMENT),(0,n.default)(r,f.CUSTOMER_ENV_ID_API_ITEM,this.config.envId),(0,n.default)(r,f.DS_API_ITEM,f.SDK_APP),i=r,e.visitorId&&e.anonymousId?(i[f.VISITOR_ID_API_ITEM]=e.anonymousId,i[f.CUSTOMER_UID]=e.visitorId):(i[f.VISITOR_ID_API_ITEM]=e.anonymousId||e.visitorId,i[f.CUSTOMER_UID]=null),o=(0,n.default)({},f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),t.next=5,this.httpClient.postAsync(f.HIT_CONSENT_URL,{headers:o,timeout:this.config.timeout,body:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"sendActive",value:(r=(0,i.default)(l().mark((function t(e,r){var i,o,s,a,u;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={},(0,n.default)(i,f.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,n.default)(i,f.HEADER_X_SDK_CLIENT,f.SDK_LANGUAGE.name),(0,n.default)(i,f.HEADER_X_SDK_VERSION,f.SDK_VERSION),(0,n.default)(i,f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),s=i,a="".concat(f.BASE_API_URL).concat(f.URL_ACTIVATE_MODIFICATION),o={},(0,n.default)(o,f.VISITOR_ID_API_ITEM,e.visitorId),(0,n.default)(o,f.VARIATION_ID_API_ITEM,r.variationId),(0,n.default)(o,f.VARIATION_GROUP_ID_API_ITEM,r.variationGroupId),(0,n.default)(o,f.CUSTOMER_ENV_ID_API_ITEM,"".concat(this.config.envId)),u=o,e.visitorId&&e.anonymousId?(u[f.VISITOR_ID_API_ITEM]=e.visitorId,u[f.ANONYMOUS_ID]=e.anonymousId):(u[f.VISITOR_ID_API_ITEM]=e.anonymousId||e.visitorId,u[f.ANONYMOUS_ID]=null),t.next=6,this.httpClient.postAsync(a,{headers:s,timeout:this.config.timeout,body:u});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"sendHit",value:(e=(0,i.default)(l().mark((function t(e){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,n.default)({},f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),t.next=3,this.httpClient.postAsync(f.HIT_API_URL,{headers:r,timeout:this.config.timeout,body:e.toApiKeys()});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),c}(r("./src/api/TrackingManagerAbstract.ts").TrackingManagerAbstract)},"./src/api/TrackingManagerAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TrackingManagerAbstract:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t,e){this._httpClient=t,this._config=e}return(0,n.default)(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()},"./src/cache/DefaultHitCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FS_HIT_PREFIX:()=>i,DefaultHitCache:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.array.slice.js"),r("core-js/modules/es.array.concat.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),"FS_DEFAULT_HIT_CACHE_"),o=function(){function t(){}return(0,n.default)(t,[{key:"cacheHit",value:function(t,e){var r=localStorage.getItem(i+t),n="";if(r){var o=r.slice(0,-1);n="".concat(o,",").concat(JSON.stringify(e),"]")}else n="[".concat(JSON.stringify(e),"]");return localStorage.setItem(i+t,n),Promise.resolve()}},{key:"lookupHits",value:function(t){var e=localStorage.getItem(i+t);return localStorage.removeItem(i+t),Promise.resolve(e?JSON.parse(e):null)}},{key:"flushHits",value:function(t){return localStorage.removeItem(i+t),Promise.resolve()}}]),t}()},"./src/cache/DefaultVisitorCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VISITOR_PREFIX:()=>i,DefaultVisitorCache:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),"FS_VISITOR_CACHE_"),o=function(){function t(){}return(0,n.default)(t,[{key:"cacheVisitor",value:function(t,e){return localStorage.setItem(i+t,JSON.stringify(e)),Promise.resolve()}},{key:"lookupVisitor",value:function(t){var e=localStorage.getItem(i+t);return Promise.resolve(e?JSON.parse(e):null)}},{key:"flushVisitor",value:function(t){return localStorage.removeItem(i+t),Promise.resolve()}}]),t}()},"./src/config/BucketingConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BucketingConfig:()=>d}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/enum/index.ts"),u=r("./src/config/FlagshipConfig.ts");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var d=function(t){(0,i.default)(r,t);var e=f(r);function r(t){var r,n;return(n=e.call(this,l(l({},t),{},{decisionMode:u.DecisionMode.BUCKETING}))).pollingInterval=null!=(r=null==t?void 0:t.pollingInterval)?r:a.DEFAULT_POLLING_INTERVAL,n.onBucketingFail=null==t?void 0:t.onBucketingFail,n.onBucketingSuccess=null==t?void 0:t.onBucketingSuccess,n.onBucketingUpdated=null==t?void 0:t.onBucketingUpdated,n}return r}(u.FlagshipConfig)},"./src/config/ConfigManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ConfigManager:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t,e,r){this._config=t,this._decisionManager=e,this._trackingManager=r}return(0,n.default)(t,[{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"decisionManager",get:function(){return this._decisionManager},set:function(t){this._decisionManager=t}},{key:"trackingManager",get:function(){return this._trackingManager},set:function(t){this._trackingManager=t}}]),t}()},"./src/config/DecisionApiConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionApiConfig:()=>f}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/config/FlagshipConfig.ts");function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var f=function(t){(0,i.default)(r,t);var e=l(r);function r(t){return e.call(this,c(c({},t),{},{decisionMode:a.DecisionMode.DECISION_API}))}return r}(a.FlagshipConfig)},"./src/config/FlagshipConfig.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionMode:()=>n,statusChangeError:()=>a,FlagshipConfig:()=>u});var n,i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=(r("core-js/modules/es.function.name.js"),r("./src/enum/index.ts")),s=r("./src/utils/utils.ts");!function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(n||(n={}));var a="statusChangedCallback must be a function",u=function(){function t(t){var e=t.envId,r=t.apiKey,i=t.timeout,s=t.logLevel,a=t.logManager,u=t.statusChangedCallback,c=t.fetchNow,l=t.decisionMode,f=t.enableClientCache,d=t.initialBucketing,p=t.decisionApiUrl,h=t.activateDeduplicationTime,g=t.hitDeduplicationTime,v=t.visitorCacheImplementation,y=t.hitCacheImplementation,m=t.disableCache;switch(t.language){case 1:o.SDK_LANGUAGE.name="ReactJS";break;case 2:o.SDK_LANGUAGE.name="React-Native";break;default:o.SDK_LANGUAGE.name="undefined"!=typeof window&&"Deno"in window?"Deno":"Typescript"}this.decisionApiUrl=p||o.BASE_API_URL,this._envId=e,this._apiKey=r,this.logLevel=null!=s?s:o.LogLevel.ALL,this.timeout=i||o.REQUEST_TIME_OUT,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===f||f,this._decisionMode=l||n.DECISION_API,this._initialBucketing=d,this.activateDeduplicationTime=null!=h?h:o.DEFAULT_DEDUPLICATION_TIME,this.hitDeduplicationTime=null!=g?g:o.DEFAULT_DEDUPLICATION_TIME,this.disableCache=!!m,v&&(this.visitorCacheImplementation=v),y&&(this.hitCacheImplementation=y),a&&(this.logManager=a),this.statusChangedCallback=u}return(0,i.default)(t,[{key:"initialBucketing",get:function(){return this._initialBucketing},set:function(t){this._initialBucketing=t}},{key:"enableClientCache",get:function(){return this._enableClientCache},set:function(t){this._enableClientCache=t}},{key:"onBucketingSuccess",get:function(){return this._onBucketingSuccess},set:function(t){this._onBucketingSuccess=t}},{key:"onBucketingFail",get:function(){return this._onBucketingFail},set:function(t){this._onBucketingFail=t}},{key:"onBucketingUpdated",get:function(){return this._onBucketingUpdated},set:function(t){this._onBucketingUpdated=t}},{key:"envId",get:function(){return this._envId},set:function(t){this._envId=t}},{key:"apiKey",get:function(){return this._apiKey},set:function(t){this._apiKey=t}},{key:"decisionMode",get:function(){return this._decisionMode}},{key:"timeout",get:function(){return this._timeout},set:function(t){this._timeout=t}},{key:"logLevel",get:function(){return this._logLevel},set:function(t){this._logLevel=t}},{key:"fetchNow",get:function(){return this._fetchNow},set:function(t){this._fetchNow=t}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(t){this._pollingInterval=t}},{key:"activateDeduplicationTime",get:function(){return this._activateDeduplicationTime},set:function(t){"number"==typeof t?this._activateDeduplicationTime=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"activateDeduplicationTime","number"),"activateDeduplicationTime")}},{key:"hitDeduplicationTime",get:function(){return this._hitDeduplicationTime},set:function(t){"number"==typeof t?this._hitDeduplicationTime=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"hitDeduplicationTime","number"),"hitDeduplicationTime")}},{key:"visitorCacheImplementation",get:function(){return this._visitorCacheImplementation},set:function(t){this._visitorCacheImplementation=t}},{key:"hitCacheImplementation",get:function(){return this._hitCacheImplementation},set:function(t){this._hitCacheImplementation=t}},{key:"disableCache",get:function(){return this._disableCache},set:function(t){this._disableCache=t}},{key:"statusChangedCallback",get:function(){return this._statusChangedCallback},set:function(t){"function"==typeof t?this._statusChangedCallback=t:(0,s.logError)(this,a,"statusChangedCallback")}},{key:"logManager",get:function(){return this._logManager},set:function(t){this._logManager=t}},{key:"decisionApiUrl",get:function(){return this._decisionApiUrl},set:function(t){"string"==typeof t?this._decisionApiUrl=t:(0,s.logError)(this,(0,s.sprintf)(o.TYPE_ERROR,"decisionApiUrl","string"),"decisionApiUrl")}}]),t}()},"./src/config/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ConfigManager:()=>n.ConfigManager,DecisionApiConfig:()=>i.DecisionApiConfig,BucketingConfig:()=>o.BucketingConfig,DecisionMode:()=>s.DecisionMode,FlagshipConfig:()=>s.FlagshipConfig});var n=r("./src/config/ConfigManager.ts"),i=r("./src/config/DecisionApiConfig.ts"),o=r("./src/config/BucketingConfig.ts"),s=r("./src/config/FlagshipConfig.ts")},"./src/decision/ApiManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ApiManager:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),a=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),u=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),l=r.n(c),f=(r("core-js/modules/es.function.name.js"),r("core-js/modules/es.array.concat.js"),r("./src/enum/index.ts")),d=r("./src/decision/DecisionManager.ts"),p=r("./src/utils/utils.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.default)(this,r)}}var g=function(t){(0,s.default)(a,t);var e,r=h(a);function a(){return r.apply(this,arguments)}return(0,o.default)(a,[{key:"getCampaignsAsync",value:(e=(0,i.default)(l().mark((function t(e){var r,i,o,s,a=this;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},(0,n.default)(r,f.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,n.default)(r,f.HEADER_X_SDK_CLIENT,f.SDK_LANGUAGE.name),(0,n.default)(r,f.HEADER_X_SDK_VERSION,f.SDK_VERSION),(0,n.default)(r,f.HEADER_CONTENT_TYPE,f.HEADER_APPLICATION_JSON),i=r,o={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},s="".concat(this.config.decisionApiUrl||f.BASE_API_URL).concat(this.config.envId).concat(f.URL_CAMPAIGNS,"?").concat(f.EXPOSE_ALL_KEYS,"=true"),e.hasConsented||(s+="&".concat(f.SEND_CONTEXT_EVENT,"=false")),t.abrupt("return",this._httpClient.postAsync(s,{headers:i,timeout:this.config.timeout,body:o}).then((function(t){a.panic=!!t.body.panic;var e=[];return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return(0,p.logError)(a.config,t.message||t,f.PROCESS_GET_CAMPAIGNS),null})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),a}(d.DecisionManager)},"./src/decision/BucketingManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BucketingManager:()=>y}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.array.slice.js"),r("core-js/modules/es.array.from.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.symbol.description.js"),r("core-js/modules/es.symbol.iterator.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/web.dom-collections.iterator.js");var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),l=(r("core-js/modules/es.function.name.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.find.js"),r("core-js/modules/es.array.includes.js"),r("core-js/modules/es.string.includes.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.string.starts-with.js"),r("core-js/modules/es.string.ends-with.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),f=r.n(l),d=r("./src/enum/index.ts"),p=r("./src/utils/utils.ts");function h(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,c.default)(t);if(e){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var y=function(t){(0,a.default)(g,t);var e,r,u,c,l=v(g);function g(t,e,r){var n;return(n=l.call(this,t,e))._murmurHash=r,n._isFirstPooling=!0,e.initialBucketing&&(n._bucketingContent=e.initialBucketing),n}return(0,s.default)(g,[{key:"finishLoop",value:function(t){if(200===t.status&&(this._bucketingContent=t.body),t.headers&&t.headers["last-modified"]){var e=t.headers["last-modified"];this._lastModified!==e&&this.config.onBucketingUpdated&&this.config.onBucketingUpdated(new Date(e)),this._lastModified=e}this._isFirstPooling&&(this._isFirstPooling=!1,this.updateFlagshipStatus(d.FlagshipStatus.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:(c=(0,o.default)(f().mark((function t(){var e,r,n=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=1e3*(null!=(e=this.config.pollingInterval)?e:d.REQUEST_TIME_OUT),(0,p.logInfo)(this.config,"Bucketing polling starts","startPolling"),t.next=4,this.polling();case 4:if(0!==r){t.next=6;break}return t.abrupt("return");case 6:this._intervalID=setInterval((function(){n.polling()}),r);case 7:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"polling",value:(u=(0,o.default)(f().mark((function t(){var e,r,n,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._isPooling){t.next=2;break}return t.abrupt("return");case 2:return this._isPooling=!0,this._isFirstPooling&&this.updateFlagshipStatus(d.FlagshipStatus.POLLING),t.prev=4,r=(0,p.sprintf)(d.BUCKETING_API_URL,this.config.envId),e={},(0,i.default)(e,d.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,i.default)(e,d.HEADER_X_SDK_CLIENT,d.SDK_LANGUAGE.name),(0,i.default)(e,d.HEADER_X_SDK_VERSION,d.SDK_VERSION),(0,i.default)(e,d.HEADER_CONTENT_TYPE,d.HEADER_APPLICATION_JSON),n=e,this._lastModified&&(n["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(r,{headers:n,timeout:this.config.timeout});case 10:o=t.sent,this.finishLoop(o),t.next=20;break;case 14:t.prev=14,t.t0=t.catch(4),this._isPooling=!1,(0,p.logError)(this.config,t.t0,"startPolling"),this._isFirstPooling&&this.updateFlagshipStatus(d.FlagshipStatus.NOT_INITIALIZED),"function"==typeof this.config.onBucketingFail&&this.config.onBucketingFail(new Error(t.t0));case 20:case"end":return t.stop()}}),t,this,[[4,14]])}))),function(){return u.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,(0,p.logInfo)(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(r=(0,o.default)(f().mark((function t(e){var r,n,o,s;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(Object.keys(e.context).length<=3)){t.next=3;break}return t.abrupt("return");case 3:return n=(0,p.sprintf)(d.BUCKETING_API_CONTEXT_URL,this.config.envId),r={},(0,i.default)(r,d.HEADER_X_API_KEY,"".concat(this.config.apiKey)),(0,i.default)(r,d.HEADER_X_SDK_CLIENT,d.SDK_LANGUAGE.name),(0,i.default)(r,d.HEADER_X_SDK_VERSION,d.SDK_VERSION),(0,i.default)(r,d.HEADER_CONTENT_TYPE,d.HEADER_APPLICATION_JSON),o=r,s={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=8,this._httpClient.postAsync(n,{headers:o,body:s,timeout:this.config.timeout});case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),(0,p.logError)(this.config,t.t0.message||t.t0,"sendContext");case 13:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return r.apply(this,arguments)})},{key:"getCampaignsAsync",value:(e=(0,o.default)(f().mark((function t(e){var r,n=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._bucketingContent){t.next=2;break}return t.abrupt("return",null);case 2:if(!this._bucketingContent.panic){t.next=5;break}return this.panic=!0,t.abrupt("return",[]);case 5:if(this.panic=!1,this._bucketingContent.campaigns){t.next=8;break}return t.abrupt("return",null);case 8:return this.sendContext(e),r=[],this._bucketingContent.campaigns.forEach((function(t){var i=n.getVisitorCampaigns(t.variationGroups,t.id,t.type,e);i&&(i.slug=t.slug,r.push(i))})),t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,r,n){var i,o=h(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(this.isMatchTargeting(s,n)){var a=this.getVariation(s,n);return a?{id:e,variation:a,variationGroupId:s.id,type:r}:null}}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"getVariation",value:function(t,e){var r,i=this._murmurHash.murmurHash3Int32(t.id+e.visitorId)%100,o=0,s=h(t.variations);try{var a=function(){var n,s,a=r.value,u=null==(n=e.visitorCache)||null==(s=n.data)?void 0:s.assignmentsHistory,c=u?u[t.id]:null;if(c){var l=t.variations.find((function(t){return t.id===c}));return l?{v:{id:l.id,modifications:l.modifications,reference:l.reference}}:"continue"}return void 0===a.allocation?"continue":(o+=a.allocation,i<=o?{v:{id:a.id,modifications:a.modifications,reference:a.reference}}:void 0)};for(s.s();!(r=s.n()).done;){var u=a();if("continue"!==u&&"object"===(0,n.default)(u))return u.v}}catch(t){s.e(t)}finally{s.f()}return null}},{key:"isMatchTargeting",value:function(t,e){var r=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return r.checkAndTargeting(t.targetings,e)}))}},{key:"isANDListOperator",value:function(t){return["NOT_EQUALS","NOT_CONTAINS"].includes(t)}},{key:"checkAndTargeting",value:function(t,e){var r,n,i=!1,o=h(t);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s.key,u=s.value,c=s.operator;if("fs_all_users"!==a){if("fs_users"===a)r=e.visitorId;else{if(!(a in e.context)){i=!1;break}r=e.context[a]}if(!(i=this.testOperator(c,r,u)))break}else i=!0}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"testListOperatorLoop",value:function(t,e,r,n){var i,o=n,s=h(r);try{for(s.s();!(i=s.n()).done;){var a=i.value;if((o=this.testOperator(t,e,a))!==n)break}}catch(t){s.e(t)}finally{s.f()}return o}},{key:"testListOperator",value:function(t,e,r){return this.isANDListOperator(t)?this.testListOperatorLoop(t,e,r,!0):this.testListOperatorLoop(t,e,r,!1)}},{key:"testOperator",value:function(t,e,r){var n;if(Array.isArray(r))return this.testListOperator(t,e,r);switch(t){case"EQUALS":n=e===r;break;case"NOT_EQUALS":n=e!==r;break;case"CONTAINS":n=e.toString().includes(r.toString());break;case"NOT_CONTAINS":n=!e.toString().includes(r.toString());break;case"GREATER_THAN":n=e>r;break;case"LOWER_THAN":n=e<r;break;case"GREATER_THAN_OR_EQUALS":n=e>=r;break;case"LOWER_THAN_OR_EQUALS":n=e<=r;break;case"STARTS_WITH":n=e.toString().startsWith(r.toString());break;case"ENDS_WITH":n=e.toString().endsWith(r.toString());break;default:n=!1}return n}}]),g}(r("./src/decision/DecisionManager.ts").DecisionManager)},"./src/decision/DecisionManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DecisionManager:()=>s});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=(r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.map.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/web.dom-collections.iterator.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("./src/enum/index.ts")),s=function(){function t(t,e){(0,i.default)(this,"_panic",!1),this._config=e,this._httpClient=t}return(0,n.default)(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?o.FlagshipStatus.READY_PANIC_ON:o.FlagshipStatus.READY),this._panic=t}},{key:"statusChangedCallback",value:function(t){this._statusChangedCallback=t}},{key:"updateFlagshipStatus",value:function(t){"function"==typeof this._statusChangedCallback&&this._statusChangedCallback&&this._statusChangedCallback(t)}},{key:"getModifications",value:function(t){var e=new Map;return t.forEach((function(t){var r=t.variation.modifications.value;for(var n in r){var i=r[n];e.set(n,{key:n,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,campaignType:t.type,slug:t.slug,value:i})}})),e}},{key:"isPanic",value:function(){return this._panic}}]),t}()},"./src/enum/FlagshipConstant.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{SDK_LANGUAGE:()=>n,REQUEST_TIME_OUT:()=>i,DEFAULT_DEDUPLICATION_TIME:()=>o,DEFAULT_POLLING_INTERVAL:()=>s,BASE_API_URL:()=>a,HIT_API_URL:()=>u,BUCKETING_API_URL:()=>c,BUCKETING_API_CONTEXT_URL:()=>l,HIT_CONSENT_URL:()=>f,URL_CAMPAIGNS:()=>d,URL_ACTIVATE_MODIFICATION:()=>p,EXPOSE_ALL_KEYS:()=>h,SEND_CONTEXT_EVENT:()=>g,SDK_VERSION:()=>v,VISITOR_CACHE_VERSION:()=>y,HIT_CACHE_VERSION:()=>m,DEFAULT_HIT_CACHE_TIME:()=>_,SDK_STARTED_INFO:()=>E,FLAGSHIP_SDK:()=>I,EMIT_READY:()=>b,INITIALIZATION_PARAM_ERROR:()=>O,ERROR:()=>T,CONTEXT_NULL_ERROR:()=>A,CONTEXT_PARAM_ERROR:()=>R,GET_MODIFICATION_CAST_ERROR:()=>S,GET_FLAG_CAST_ERROR:()=>C,GET_MODIFICATION_MISSING_ERROR:()=>j,GET_FLAG_MISSING_ERROR:()=>N,GET_MODIFICATION_KEY_ERROR:()=>k,ACTIVATE_MODIFICATION_KEY_ERROR:()=>P,GET_MODIFICATION_ERROR:()=>x,GET_FLAG_ERROR:()=>M,USER_EXPOSED_FLAG_ERROR:()=>D,USER_EXPOSED_CAST_ERROR:()=>w,GET_METADATA_CAST_ERROR:()=>L,ACTIVATE_MODIFICATION_ERROR:()=>F,DECISION_MANAGER_MISSING_ERROR:()=>V,TRACKER_MANAGER_MISSING_ERROR:()=>G,CURL_LIBRARY_IS_NOT_LOADED:()=>H,TYPE_ERROR:()=>U,TYPE_INTEGER_ERROR:()=>B,VISITOR_ID_ERROR:()=>K,PANIC_MODE_ERROR:()=>Y,METHOD_DEACTIVATED_CONSENT_ERROR:()=>X,METHOD_DEACTIVATED_ERROR:()=>W,METHOD_DEACTIVATED_BUCKETING_ERROR:()=>z,FLAGSHIP_VISITOR_NOT_AUTHENTICATE:()=>J,PREDEFINED_CONTEXT_TYPE_ERROR:()=>Q,METHOD_DEACTIVATED_SEND_CONSENT_ERROR:()=>$,PROCESS:()=>Z,PROCESS_INITIALIZATION:()=>q,PROCESS_UPDATE_CONTEXT:()=>tt,PROCESS_GET_MODIFICATION:()=>et,PROCESS_GET_MODIFICATION_INFO:()=>rt,PROCESS_NEW_VISITOR:()=>nt,PROCESS_ACTIVE_MODIFICATION:()=>it,PROCESS_SYNCHRONIZED_MODIFICATION:()=>ot,PROCESS_SEND_HIT:()=>st,PROCESS_SEND_ACTIVATE:()=>at,PROCESS_GET_CAMPAIGNS:()=>ut,PROCESS_GET_ALL_MODIFICATION:()=>ct,PROCESS_MODIFICATIONS_FOR_CAMPAIGN:()=>lt,PROCESS_CACHE_HIT:()=>ft,CUSTOMER_ENV_ID_API_ITEM:()=>dt,CUSTOMER_UID:()=>pt,ANONYMOUS_ID:()=>ht,VISITOR_ID_API_ITEM:()=>gt,VARIATION_GROUP_ID_API_ITEM:()=>vt,VARIATION_ID_API_ITEM:()=>yt,DS_API_ITEM:()=>mt,T_API_ITEM:()=>_t,DL_API_ITEM:()=>Et,SDK_APP:()=>It,TID_API_ITEM:()=>bt,TA_API_ITEM:()=>Ot,TT_API_ITEM:()=>Tt,TC_API_ITEM:()=>At,TCC_API_ITEM:()=>Rt,ICN_API_ITEM:()=>St,SM_API_ITEM:()=>Ct,PM_API_ITEM:()=>jt,TR_API_ITEM:()=>Nt,TS_API_ITEM:()=>kt,IN_API_ITEM:()=>Pt,IC_API_ITEM:()=>xt,IP_API_ITEM:()=>Mt,IQ_API_ITEM:()=>Dt,IV_API_ITEM:()=>wt,EVENT_CATEGORY_API_ITEM:()=>Lt,EVENT_ACTION_API_ITEM:()=>Ft,EVENT_LABEL_API_ITEM:()=>Vt,EVENT_VALUE_API_ITEM:()=>Gt,USER_IP_API_ITEM:()=>Ht,SCREEN_RESOLUTION_API_ITEM:()=>Ut,USER_LANGUAGE:()=>Bt,SESSION_NUMBER:()=>Kt,HEADER_X_API_KEY:()=>Yt,HEADER_CONTENT_TYPE:()=>Xt,HEADER_X_SDK_CLIENT:()=>Wt,HEADER_X_SDK_VERSION:()=>zt,HEADER_APPLICATION_JSON:()=>Jt});var n={name:"TypeScript"},i=2,o=2.5,s=1,a="https://decision.flagship.io/v2/",u="https://ariane.abtasty.com",c="https://cdn.flagship.io/{0}/bucketing.json",l="https://decision.flagship.io/v2/{0}/events",f="https://ariane.abtasty.com",d="/campaigns",p="activate",h="exposeAllKeys",g="sendContextEvent",v="v3",y=1,m=1,_=144e5,E="Flagship SDK (version: {0}) READY",I="Flagship SDK",b="ready",O="Params 'envId' and 'apiKey' must not be null or empty.",T="error",A="Context must not to be null",R="params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",S="Modification for key {0} has a different type. Default value is returned.",C="Flag for key {0} has a different type. Default value is returned.",j="No modification for key {0}. Default value is returned.",N="No Flag for key {0}. Default value is returned.",k="Key {0} must not be null. Default value is returned.",P="Key {0} must not be null, no activate will be sent.",x="No modification for key {0}.",M="No flag for key {0}.",D="No flag for key {0}, no activate will be sent",w="Flag for key {0} has a different type with defaultValue, no activate will be sent",L="Flag for key {0} has a different type with defaultValue, an empty metadata object is returned",F="No modification for key {0}, no activate will be sent.",V="decisionManager must not be null.",G="trackerManager must not be null.",H="curl library is not loaded",U="{0} must be a {1}",B="value of {0} is not an {1}, it will be truncated to {1}",K="visitorId must not be null or empty",Y="{0} deactivated while panic mode is on.",X="Method {0} is deactivated for visitor {1} : visitor did not consent.",W="Method {0} is deactivated while SDK status is: {1}.",z="Method {0} is deactivated on Bucketing mode.",J="Visitor is not authenticated yet",Q="Predefined Context {0} must be type of {1}",$="Send consent hit is deactivated while SDK status is: {1}.",Z="process",q="INITIALIZATION",tt="UPDATE CONTEXT",et="GET MODIFICATION",rt="GET MODIFICATION INFO",nt="NEW VISITOR",it="ACTIVE MODIFICATION",ot="SYNCHRONIZED MODIFICATION",st="SEND HIT",at="SEND ACTIVATE",ut="GET CAMPAIGNS",ct="GET ALL MODIFICATIONS",lt="GET MODIFICATION FOR CAMPAIGN",ft="cacheHit",dt="cid",pt="cuid",ht="aid",gt="vid",vt="caid",yt="vaid",mt="ds",_t="t",Et="dl",It="APP",bt="tid",Ot="ta",Tt="tt",At="tc",Rt="tcc",St="icn",Ct="sm",jt="pm",Nt="tr",kt="ts",Pt="in",xt="ic",Mt="ip",Dt="iq",wt="iv",Lt="ec",Ft="ea",Vt="el",Gt="ev",Ht="uip",Ut="sr",Bt="ul",Kt="sn",Yt="x-api-key",Xt="Content-Type",Wt="x-sdk-client",zt="x-sdk-version",Jt="application/json"},"./src/enum/FlagshipContext.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{DEVICE_LOCALE:()=>o,DEVICE_TYPE:()=>s,DEVICE_MODEL:()=>a,LOCATION_CITY:()=>u,LOCATION_REGION:()=>c,LOCATION_COUNTRY:()=>l,LOCATION_LAT:()=>f,LOCATION_LONG:()=>d,IP:()=>p,OS_NAME:()=>h,OS_VERSION_NAME:()=>g,OS_VERSION_CODE:()=>v,CARRIER_NAME:()=>y,INTERNET_CONNECTION:()=>m,APP_VERSION_NAME:()=>_,APP_VERSION_CODE:()=>E,INTERFACE_NAME:()=>I,FLAGSHIP_CLIENT:()=>b,FLAGSHIP_VERSION:()=>O,FLAGSHIP_VISITOR:()=>T,FLAGSHIP_CONTEXT:()=>A});var n,i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o="sdk_deviceLanguage",s="sdk_deviceType",a="sdk_deviceModel",u="sdk_city",c="sdk_region",l="sdk_country",f="sdk_lat",d="sdk_long",p="sdk_ip",h="sdk_osName",g="sdk_osVersionName",v="sdk_osVersionCode",y="sdk_carrierName",m="sdk_internetConnection",_="sdk_versionName",E="sdk_versionCode",I="sdk_interfaceName",b="fs_client",O="fs_version",T="fs_users",A=(n={},(0,i.default)(n,o,"string"),(0,i.default)(n,s,"string"),(0,i.default)(n,a,"string"),(0,i.default)(n,u,"string"),(0,i.default)(n,c,"string"),(0,i.default)(n,l,"string"),(0,i.default)(n,f,"number"),(0,i.default)(n,d,"number"),(0,i.default)(n,p,"string"),(0,i.default)(n,h,"string"),(0,i.default)(n,g,"string"),(0,i.default)(n,v,"string"),(0,i.default)(n,y,"string"),(0,i.default)(n,m,"string"),(0,i.default)(n,_,"string"),(0,i.default)(n,E,"string"),(0,i.default)(n,I,"string"),(0,i.default)(n,b,"string"),(0,i.default)(n,O,"string"),(0,i.default)(n,T,"string"),n)},"./src/enum/FlagshipStatus.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{FlagshipStatus:()=>n}),function(t){t[t.NOT_READY=0]="NOT_READY",t[t.NOT_INITIALIZED=0]="NOT_INITIALIZED",t[t.STARTING=1]="STARTING",t[t.POLLING=2]="POLLING",t[t.READY_PANIC_ON=3]="READY_PANIC_ON",t[t.READY=4]="READY"}(n||(n={}))},"./src/enum/HitType.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{HitType:()=>n}),function(t){t.PAGE_VIEW="PAGEVIEW",t.PAGE="PAGEVIEW",t.SCREEN_VIEW="SCREENVIEW",t.SCREEN="SCREENVIEW",t.TRANSACTION="TRANSACTION",t.ITEM="ITEM",t.EVENT="EVENT"}(n||(n={}))},"./src/enum/LogLevel.ts":(t,e,r)=>{"use strict";var n;r.r(e),r.d(e,{LogLevel:()=>n}),function(t){t[t.NONE=0]="NONE",t[t.EMERGENCY=1]="EMERGENCY",t[t.ALERT=2]="ALERT",t[t.CRITICAL=3]="CRITICAL",t[t.ERROR=4]="ERROR",t[t.WARNING=5]="WARNING",t[t.NOTICE=6]="NOTICE",t[t.INFO=7]="INFO",t[t.DEBUG=8]="DEBUG",t[t.ALL=9]="ALL"}(n||(n={}))},"./src/enum/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LogLevel:()=>n.LogLevel,ACTIVATE_MODIFICATION_ERROR:()=>i.ACTIVATE_MODIFICATION_ERROR,ACTIVATE_MODIFICATION_KEY_ERROR:()=>i.ACTIVATE_MODIFICATION_KEY_ERROR,ANONYMOUS_ID:()=>i.ANONYMOUS_ID,BASE_API_URL:()=>i.BASE_API_URL,BUCKETING_API_CONTEXT_URL:()=>i.BUCKETING_API_CONTEXT_URL,BUCKETING_API_URL:()=>i.BUCKETING_API_URL,CONTEXT_NULL_ERROR:()=>i.CONTEXT_NULL_ERROR,CONTEXT_PARAM_ERROR:()=>i.CONTEXT_PARAM_ERROR,CURL_LIBRARY_IS_NOT_LOADED:()=>i.CURL_LIBRARY_IS_NOT_LOADED,CUSTOMER_ENV_ID_API_ITEM:()=>i.CUSTOMER_ENV_ID_API_ITEM,CUSTOMER_UID:()=>i.CUSTOMER_UID,DECISION_MANAGER_MISSING_ERROR:()=>i.DECISION_MANAGER_MISSING_ERROR,DEFAULT_DEDUPLICATION_TIME:()=>i.DEFAULT_DEDUPLICATION_TIME,DEFAULT_HIT_CACHE_TIME:()=>i.DEFAULT_HIT_CACHE_TIME,DEFAULT_POLLING_INTERVAL:()=>i.DEFAULT_POLLING_INTERVAL,DL_API_ITEM:()=>i.DL_API_ITEM,DS_API_ITEM:()=>i.DS_API_ITEM,EMIT_READY:()=>i.EMIT_READY,ERROR:()=>i.ERROR,EVENT_ACTION_API_ITEM:()=>i.EVENT_ACTION_API_ITEM,EVENT_CATEGORY_API_ITEM:()=>i.EVENT_CATEGORY_API_ITEM,EVENT_LABEL_API_ITEM:()=>i.EVENT_LABEL_API_ITEM,EVENT_VALUE_API_ITEM:()=>i.EVENT_VALUE_API_ITEM,EXPOSE_ALL_KEYS:()=>i.EXPOSE_ALL_KEYS,FLAGSHIP_SDK:()=>i.FLAGSHIP_SDK,FLAGSHIP_VISITOR_NOT_AUTHENTICATE:()=>i.FLAGSHIP_VISITOR_NOT_AUTHENTICATE,GET_FLAG_CAST_ERROR:()=>i.GET_FLAG_CAST_ERROR,GET_FLAG_ERROR:()=>i.GET_FLAG_ERROR,GET_FLAG_MISSING_ERROR:()=>i.GET_FLAG_MISSING_ERROR,GET_METADATA_CAST_ERROR:()=>i.GET_METADATA_CAST_ERROR,GET_MODIFICATION_CAST_ERROR:()=>i.GET_MODIFICATION_CAST_ERROR,GET_MODIFICATION_ERROR:()=>i.GET_MODIFICATION_ERROR,GET_MODIFICATION_KEY_ERROR:()=>i.GET_MODIFICATION_KEY_ERROR,GET_MODIFICATION_MISSING_ERROR:()=>i.GET_MODIFICATION_MISSING_ERROR,HEADER_APPLICATION_JSON:()=>i.HEADER_APPLICATION_JSON,HEADER_CONTENT_TYPE:()=>i.HEADER_CONTENT_TYPE,HEADER_X_API_KEY:()=>i.HEADER_X_API_KEY,HEADER_X_SDK_CLIENT:()=>i.HEADER_X_SDK_CLIENT,HEADER_X_SDK_VERSION:()=>i.HEADER_X_SDK_VERSION,HIT_API_URL:()=>i.HIT_API_URL,HIT_CACHE_VERSION:()=>i.HIT_CACHE_VERSION,HIT_CONSENT_URL:()=>i.HIT_CONSENT_URL,ICN_API_ITEM:()=>i.ICN_API_ITEM,IC_API_ITEM:()=>i.IC_API_ITEM,INITIALIZATION_PARAM_ERROR:()=>i.INITIALIZATION_PARAM_ERROR,IN_API_ITEM:()=>i.IN_API_ITEM,IP_API_ITEM:()=>i.IP_API_ITEM,IQ_API_ITEM:()=>i.IQ_API_ITEM,IV_API_ITEM:()=>i.IV_API_ITEM,METHOD_DEACTIVATED_BUCKETING_ERROR:()=>i.METHOD_DEACTIVATED_BUCKETING_ERROR,METHOD_DEACTIVATED_CONSENT_ERROR:()=>i.METHOD_DEACTIVATED_CONSENT_ERROR,METHOD_DEACTIVATED_ERROR:()=>i.METHOD_DEACTIVATED_ERROR,METHOD_DEACTIVATED_SEND_CONSENT_ERROR:()=>i.METHOD_DEACTIVATED_SEND_CONSENT_ERROR,PANIC_MODE_ERROR:()=>i.PANIC_MODE_ERROR,PM_API_ITEM:()=>i.PM_API_ITEM,PREDEFINED_CONTEXT_TYPE_ERROR:()=>i.PREDEFINED_CONTEXT_TYPE_ERROR,PROCESS:()=>i.PROCESS,PROCESS_ACTIVE_MODIFICATION:()=>i.PROCESS_ACTIVE_MODIFICATION,PROCESS_CACHE_HIT:()=>i.PROCESS_CACHE_HIT,PROCESS_GET_ALL_MODIFICATION:()=>i.PROCESS_GET_ALL_MODIFICATION,PROCESS_GET_CAMPAIGNS:()=>i.PROCESS_GET_CAMPAIGNS,PROCESS_GET_MODIFICATION:()=>i.PROCESS_GET_MODIFICATION,PROCESS_GET_MODIFICATION_INFO:()=>i.PROCESS_GET_MODIFICATION_INFO,PROCESS_INITIALIZATION:()=>i.PROCESS_INITIALIZATION,PROCESS_MODIFICATIONS_FOR_CAMPAIGN:()=>i.PROCESS_MODIFICATIONS_FOR_CAMPAIGN,PROCESS_NEW_VISITOR:()=>i.PROCESS_NEW_VISITOR,PROCESS_SEND_ACTIVATE:()=>i.PROCESS_SEND_ACTIVATE,PROCESS_SEND_HIT:()=>i.PROCESS_SEND_HIT,PROCESS_SYNCHRONIZED_MODIFICATION:()=>i.PROCESS_SYNCHRONIZED_MODIFICATION,PROCESS_UPDATE_CONTEXT:()=>i.PROCESS_UPDATE_CONTEXT,REQUEST_TIME_OUT:()=>i.REQUEST_TIME_OUT,SCREEN_RESOLUTION_API_ITEM:()=>i.SCREEN_RESOLUTION_API_ITEM,SDK_APP:()=>i.SDK_APP,SDK_LANGUAGE:()=>i.SDK_LANGUAGE,SDK_STARTED_INFO:()=>i.SDK_STARTED_INFO,SDK_VERSION:()=>i.SDK_VERSION,SEND_CONTEXT_EVENT:()=>i.SEND_CONTEXT_EVENT,SESSION_NUMBER:()=>i.SESSION_NUMBER,SM_API_ITEM:()=>i.SM_API_ITEM,TA_API_ITEM:()=>i.TA_API_ITEM,TCC_API_ITEM:()=>i.TCC_API_ITEM,TC_API_ITEM:()=>i.TC_API_ITEM,TID_API_ITEM:()=>i.TID_API_ITEM,TRACKER_MANAGER_MISSING_ERROR:()=>i.TRACKER_MANAGER_MISSING_ERROR,TR_API_ITEM:()=>i.TR_API_ITEM,TS_API_ITEM:()=>i.TS_API_ITEM,TT_API_ITEM:()=>i.TT_API_ITEM,TYPE_ERROR:()=>i.TYPE_ERROR,TYPE_INTEGER_ERROR:()=>i.TYPE_INTEGER_ERROR,T_API_ITEM:()=>i.T_API_ITEM,URL_ACTIVATE_MODIFICATION:()=>i.URL_ACTIVATE_MODIFICATION,URL_CAMPAIGNS:()=>i.URL_CAMPAIGNS,USER_EXPOSED_CAST_ERROR:()=>i.USER_EXPOSED_CAST_ERROR,USER_EXPOSED_FLAG_ERROR:()=>i.USER_EXPOSED_FLAG_ERROR,USER_IP_API_ITEM:()=>i.USER_IP_API_ITEM,USER_LANGUAGE:()=>i.USER_LANGUAGE,VARIATION_GROUP_ID_API_ITEM:()=>i.VARIATION_GROUP_ID_API_ITEM,VARIATION_ID_API_ITEM:()=>i.VARIATION_ID_API_ITEM,VISITOR_CACHE_VERSION:()=>i.VISITOR_CACHE_VERSION,VISITOR_ID_API_ITEM:()=>i.VISITOR_ID_API_ITEM,VISITOR_ID_ERROR:()=>i.VISITOR_ID_ERROR,FlagshipStatus:()=>o.FlagshipStatus,HitType:()=>s.HitType});var n=r("./src/enum/LogLevel.ts"),i=r("./src/enum/FlagshipConstant.ts"),o=r("./src/enum/FlagshipStatus.ts"),s=r("./src/enum/HitType.ts")},"./src/flag/FlagMetadata.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FlagMetadata:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(t){var e=t.campaignId,r=t.variationGroupId,n=t.variationId,i=t.isReference,o=t.campaignType,s=t.slug;this.campaignId=e,this.variationGroupId=r,this.variationId=n,this.isReference=i,this.campaignType=o,this.slug=s}return(0,n.default)(t,null,[{key:"Empty",value:function(){return new t({campaignId:"",campaignType:"",variationId:"",variationGroupId:"",isReference:!1,slug:null})}}]),t}()},"./src/flag/Flags.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flag:()=>s});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./src/utils/utils.ts"),o=r("./src/flag/FlagMetadata.ts"),s=function(){function t(t){var e=t.key,r=t.visitor,n=t.defaultValue;this._key=e,this._visitor=r,this._defaultValue=n}return(0,n.default)(t,[{key:"exists",value:function(){var t=this._visitor.flagsData.get(this._key);return!!(null!=t&&t.campaignId&&t.variationId&&t.variationGroupId)}},{key:"metadata",get:function(){var t=this._visitor.flagsData.get(this._key),e=new o.FlagMetadata({campaignId:(null==t?void 0:t.campaignId)||"",variationGroupId:(null==t?void 0:t.variationGroupId)||"",variationId:(null==t?void 0:t.variationId)||"",isReference:!(null==t||!t.isReference),campaignType:(null==t?void 0:t.campaignType)||"",slug:null==t?void 0:t.slug});return t?this._visitor.getFlagMetadata({metadata:e,hasSameType:!t.value||(0,i.hasSameType)(t.value,this._defaultValue),key:t.key}):e}},{key:"userExposed",value:function(){var t=this._visitor.flagsData.get(this._key);return this._visitor.userExposed({key:this._key,flag:t,defaultValue:this._defaultValue})}},{key:"getValue",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this._visitor.flagsData.get(this._key);return this._visitor.getFlagValue({key:this._key,defaultValue:this._defaultValue,flag:e,userExposed:t})}}]),t}()},"./src/flag/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flag:()=>n.Flag,FlagMetadata:()=>i.FlagMetadata});var n=r("./src/flag/Flags.ts"),i=r("./src/flag/FlagMetadata.ts")},"./src/hit/Batch.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{BATCH:()=>p,ERROR_MESSAGE:()=>h,Batch:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.array.map.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/hit/HitAbstract.ts");function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p="BATCH",h="Please check required fields",g=function(t){(0,o.default)(r,t);var e=d(r);function r(t){var r;return(r=e.call(this,f(f({},t),{},{type:p}))).hits=t.hits,r}return(0,i.default)(r,[{key:"hits",get:function(){return this._hits},set:function(t){this._hits=t}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.hits&&this.hits.length>0&&this.hits.every((function(t){return t.isReady(!1)})))}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.h=this.hits.map((function(t){var e=t.toApiKeys();return delete e[u.VISITOR_ID_API_ITEM],delete e[u.CUSTOMER_ENV_ID_API_ITEM],delete e[u.USER_IP_API_ITEM],delete e[u.SCREEN_RESOLUTION_API_ITEM],delete e[u.USER_LANGUAGE],delete e[u.SESSION_NUMBER],delete e[u.VISITOR_ID_API_ITEM],delete e[u.CUSTOMER_UID],e})),e}},{key:"toObject",value:function(){return f(f({},t.prototype.toObject.call(this)),{},{hits:this.hits.map((function(t){return t.toObject()}))})}},{key:"getErrorMessage",value:function(){return h}}]),r}(c.HitAbstract)},"./src/hit/Event.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>v,CATEGORY_ERROR:()=>y,EventCategory:()=>g,Event:()=>m}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.array.includes.js"),r("core-js/modules/es.string.includes.js"),r("core-js/modules/es.object.values.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/utils/utils.ts"),f=r("./src/hit/HitAbstract.ts");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g,v="event category and event action are required",y="The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING";!function(t){t.ACTION_TRACKING="Action Tracking",t.USER_ENGAGEMENT="User Engagement"}(g||(g={}));var m=function(t){(0,o.default)(r,t);var e=h(r);function r(t){var r;r=e.call(this,{type:c.HitType.EVENT,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.category,i=t.action,o=t.label,s=t.value;return r.category=n,r.action=i,o&&(r.label=o),s&&(r.value=s),r}return(0,i.default)(r,[{key:"category",get:function(){return this._category},set:function(t){Object.values(g).includes(t)?this._category=t:(0,l.logError)(this.config,y,"category")}},{key:"action",get:function(){return this._action},set:function(t){this.isNotEmptyString(t,"action")&&(this._action=t)}},{key:"label",get:function(){return this._label},set:function(t){this.isNotEmptyString(t,"label")&&(this._label=t)}},{key:"value",get:function(){return this._value},set:function(t){this.isNumeric(t,"value")&&(this._value=t)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.EVENT_CATEGORY_API_ITEM]=this.category,e[u.EVENT_ACTION_API_ITEM]=this.action,this.label&&(e[u.EVENT_LABEL_API_ITEM]=this.label),this.value&&(e[u.EVENT_VALUE_API_ITEM]=this.value),e}},{key:"toObject",value:function(){return p(p({},t.prototype.toObject.call(this)),{},{category:this.category,action:this.action,label:this.label,value:this.value})}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.category||!this.action)}},{key:"getErrorMessage",value:function(){return v}}]),r}(f.HitAbstract)},"./src/hit/HitAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{HitAbstract:()=>a});var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=(r("core-js/modules/es.number.is-integer.js"),r("core-js/modules/es.number.constructor.js"),r("./src/enum/FlagshipConstant.ts")),s=r("./src/utils/utils.ts"),a=function(){function t(t){var e=t.type,r=t.userIp,n=t.screenResolution,i=t.locale,o=t.sessionNumber;this._type=e,r&&(this.userIp=r),n&&(this.screenResolution=n),i&&(this.locale=i),o&&(this.sessionNumber=o),this._anonymousId=null}return(0,i.default)(t,[{key:"sessionNumber",get:function(){return this._sessionNumber},set:function(t){this._sessionNumber=t}},{key:"locale",get:function(){return this._locale},set:function(t){this._locale=t}},{key:"screenResolution",get:function(){return this._screenResolution},set:function(t){this._screenResolution=t}},{key:"userIp",get:function(){return this._userIp},set:function(t){this._userIp=t}},{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){this._visitorId=t}},{key:"ds",get:function(){return this._ds},set:function(t){this._ds=t}},{key:"type",get:function(){return this._type}},{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"isNotEmptyString",value:function(t,e){return!(!t||"string"!=typeof t)||((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return t&&"number"==typeof t?(Number.isInteger(t)||(0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_INTEGER_ERROR,e,"integer"),e),!0):((0,s.logError)(this.config,(0,s.sprintf)(o.TYPE_ERROR,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e,r=(e={},(0,n.default)(e,o.VISITOR_ID_API_ITEM,this.visitorId),(0,n.default)(e,o.DS_API_ITEM,this.ds),(0,n.default)(e,o.CUSTOMER_ENV_ID_API_ITEM,"".concat(null==(t=this.config)?void 0:t.envId)),(0,n.default)(e,o.T_API_ITEM,this.type),e);return this.userIp&&(r[o.USER_IP_API_ITEM]=this.userIp),this.screenResolution&&(r[o.SCREEN_RESOLUTION_API_ITEM]=this.screenResolution),this.locale&&(r[o.USER_LANGUAGE]=this.locale),this.sessionNumber&&(r[o.SESSION_NUMBER]=this.sessionNumber),this.visitorId&&this._anonymousId?(r[o.VISITOR_ID_API_ITEM]=this._anonymousId,r[o.CUSTOMER_UID]=this.visitorId):(r[o.VISITOR_ID_API_ITEM]=this._anonymousId||this.visitorId,r[o.CUSTOMER_UID]=null),r}},{key:"toObject",value:function(){return{visitorId:this.visitorId,ds:this.ds,type:this.type,userIp:this.userIp,screenResolution:this.screenResolution,locale:this.locale,sessionNumber:this.sessionNumber,anonymousId:this.anonymousId}}},{key:"isReady",value:function(){return!!(this.visitorId&&this.ds&&this.config&&this.config.envId&&this.type)}}]),t}()},"./src/hit/Item.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Item:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.math.trunc.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="Transaction Id, Item name and item code are required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;r=e.call(this,{type:c.HitType.ITEM,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.transactionId,i=t.productName,o=t.productSku,s=t.itemCategory,a=t.itemPrice,u=t.itemQuantity;return r.transactionId=n,r.productName=i,r.productSku=o,s&&(r.itemCategory=s),a&&(r.itemPrice=a),u&&(r.itemQuantity=u),r}return(0,i.default)(r,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"productName",get:function(){return this._productName},set:function(t){this.isNotEmptyString(t,"productName")&&(this._productName=t)}},{key:"productSku",get:function(){return this._productSku},set:function(t){this.isNotEmptyString(t,"productSku")&&(this._productSku=t)}},{key:"itemPrice",get:function(){return this._itemPrice},set:function(t){this.isNumeric(t,"itemPrice")&&(this._itemPrice=t)}},{key:"itemQuantity",get:function(){return this._itemQuantity},set:function(t){this.isInteger(t,"itemQuantity")&&(this._itemQuantity=Math.trunc(t))}},{key:"itemCategory",get:function(){return this._itemCategory},set:function(t){this.isNotEmptyString(t,"itemCategory")&&(this._itemCategory=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.transactionId||!this.productName||!this.productSku)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.TID_API_ITEM]=this.transactionId,e[u.IN_API_ITEM]=this.productName,e[u.IC_API_ITEM]=this.productSku,this.itemPrice&&(e[u.IP_API_ITEM]=this.itemPrice),this.itemQuantity&&(e[u.IQ_API_ITEM]=this.itemQuantity),this.itemCategory&&(e[u.IV_API_ITEM]=this.itemCategory),e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{transactionId:this.transactionId,productName:this.productName,productSku:this.productSku,itemPrice:this.itemPrice,itemQuantity:this.itemQuantity,itemCategory:this.itemCategory})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Page.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Page:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=r("./src/enum/FlagshipConstant.ts"),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="documentLocation url is required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;return(r=e.call(this,{type:c.HitType.PAGE_VIEW,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber})).documentLocation=null==t?void 0:t.documentLocation,r}return(0,i.default)(r,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.DL_API_ITEM]=this.documentLocation,e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Screen.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{ERROR_MESSAGE:()=>h,Screen:()=>g}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=r("./src/enum/FlagshipConstant.ts"),c=r("./src/enum/HitType.ts"),l=r("./src/hit/HitAbstract.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h="Screen name is required",g=function(t){(0,o.default)(r,t);var e=p(r);function r(t){var r;return(r=e.call(this,{type:c.HitType.SCREEN_VIEW,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber})).documentLocation=null==t?void 0:t.documentLocation,r}return(0,i.default)(r,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.documentLocation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.DL_API_ITEM]=this.documentLocation,e}},{key:"toObject",value:function(){return d(d({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return h}}]),r}(l.HitAbstract)},"./src/hit/Transaction.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CURRENCY_ERROR:()=>g,ERROR_MESSAGE:()=>v,Transaction:()=>y}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.math.trunc.js"),r("./src/enum/FlagshipConstant.ts")),c=r("./src/enum/HitType.ts"),l=r("./src/utils/utils.ts"),f=r("./src/hit/HitAbstract.ts");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g="{0} must be a string and have exactly 3 letters",v="Transaction Id and Transaction affiliation are required",y=function(t){(0,o.default)(r,t);var e=h(r);function r(t){var r;r=e.call(this,{type:c.HitType.TRANSACTION,userIp:null==t?void 0:t.userIp,screenResolution:null==t?void 0:t.screenResolution,locale:null==t?void 0:t.locale,sessionNumber:null==t?void 0:t.sessionNumber});var n=t.transactionId,i=t.affiliation,o=t.taxes,s=t.currency,a=t.couponCode,u=t.itemCount,l=t.shippingMethod,f=t.paymentMethod,d=t.totalRevenue,p=t.shippingCosts;return r.transactionId=n,r.affiliation=i,o&&(r.taxes=o),s&&(r.currency=s),a&&(r.couponCode=a),u&&(r.itemCount=u),l&&(r.shippingMethod=l),f&&(r.paymentMethod=f),d&&(r.totalRevenue=d),p&&(r.shippingCosts=p),r}return(0,i.default)(r,[{key:"transactionId",get:function(){return this._transactionId},set:function(t){this.isNotEmptyString(t,"transactionId")&&(this._transactionId=t)}},{key:"affiliation",get:function(){return this._affiliation},set:function(t){this.isNotEmptyString(t,"affiliation")&&(this._affiliation=t)}},{key:"taxes",get:function(){return this._taxes},set:function(t){this.isNumeric(t,"taxes")&&(this._taxes=t)}},{key:"currency",get:function(){return this._currency},set:function(t){t&&"string"==typeof t&&3===t.length?this._currency=t:(0,l.logError)(this.config,(0,l.sprintf)(g,"currency"),"currency")}},{key:"couponCode",get:function(){return this._couponCode},set:function(t){this.isNotEmptyString(t,"couponCode")&&(this._couponCode=t)}},{key:"itemCount",get:function(){return this._itemCount},set:function(t){this.isInteger(t,"itemCount")&&(this._itemCount=Math.trunc(t))}},{key:"shippingMethod",get:function(){return this._shippingMethod},set:function(t){this.isNotEmptyString(t,"shippingMethod")&&(this._shippingMethod=t)}},{key:"paymentMethod",get:function(){return this._paymentMethod},set:function(t){this.isNotEmptyString(t,"paymentMethod")&&(this._paymentMethod=t)}},{key:"totalRevenue",get:function(){return this._totalRevenue},set:function(t){this.isNumeric(t,"totalRevenue")&&(this._totalRevenue=t)}},{key:"shippingCosts",get:function(){return this._shippingCosts},set:function(t){this.isNumeric(t,"shippingCosts")&&(this._shippingCosts=t)}},{key:"isReady",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!(e&&!t.prototype.isReady.call(this)||!this.transactionId||!this.affiliation)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e[u.TID_API_ITEM]=this.transactionId,e[u.TA_API_ITEM]=this.affiliation,this.taxes&&(e[u.TT_API_ITEM]=this.taxes),this.currency&&(e[u.TC_API_ITEM]=this.currency),this.couponCode&&(e[u.TCC_API_ITEM]=this.couponCode),this.itemCount&&(e[u.ICN_API_ITEM]=this.itemCount),this.shippingMethod&&(e[u.SM_API_ITEM]=this.shippingMethod),this.paymentMethod&&(e[u.PM_API_ITEM]=this.paymentMethod),this.totalRevenue&&(e[u.TR_API_ITEM]=this.totalRevenue),this.shippingCosts&&(e[u.TS_API_ITEM]=this.shippingCosts),e}},{key:"toObject",value:function(){return p(p({},t.prototype.toObject.call(this)),{},{transactionId:this.transactionId,affiliation:this.affiliation,taxes:this.taxes,currency:this.currency,couponCode:this.couponCode,itemCount:this.itemCount,shippingMethod:this.shippingMethod,paymentMethod:this.paymentMethod,totalRevenue:this.totalRevenue,shippingCosts:this.shippingCosts})}},{key:"getErrorMessage",value:function(){return v}}]),r}(f.HitAbstract)},"./src/hit/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Event:()=>n.Event,EventCategory:()=>n.EventCategory,Item:()=>i.Item,Page:()=>o.Page,Screen:()=>s.Screen,Transaction:()=>a.Transaction,HitAbstract:()=>u.HitAbstract});var n=r("./src/hit/Event.ts"),i=r("./src/hit/Item.ts"),o=r("./src/hit/Page.ts"),s=r("./src/hit/Screen.ts"),a=r("./src/hit/Transaction.ts"),u=r("./src/hit/HitAbstract.ts")},"./src/main/Flagship.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Flagship:()=>b});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./src/visitor/Visitor.ts"),s=r("./src/enum/FlagshipStatus.ts"),a=r("./src/config/FlagshipConfig.ts"),u=r("./src/config/DecisionApiConfig.ts"),c=r("./src/config/ConfigManager.ts"),l=r("./src/decision/ApiManager.ts"),f=r("./src/api/TrackingManager.ts"),d=r("./src/utils/FlagshipLogManager.ts"),p=r("./src/utils/utils.ts"),h=r("./src/enum/index.ts"),g=r("./src/visitor/VisitorDelegate.ts"),v=r("./src/config/index.ts"),y=r("./src/decision/BucketingManager.ts"),m=r("./src/utils/MurmurHash.ts"),_=r("./src/utils/HttpClient.ts"),E=r("./src/cache/DefaultHitCache.ts"),I=r("./src/cache/DefaultVisitorCache.ts"),b=function(){function t(){}return(0,i.default)(t,[{key:"configManager",get:function(){return this._configManger},set:function(t){this._configManger=t}},{key:"setStatus",value:function(t){var e=this.getConfig().statusChangedCallback;if(this.getConfig()&&e&&this._status!==t)return this._status=t,void e(t);this._status=t}},{key:"getStatus",value:function(){return this._status}},{key:"getConfig",value:function(){return this._config}},{key:"getVisitor",value:function(){return this._visitorInstance}},{key:"buildConfig",value:function(t){return t instanceof a.FlagshipConfig?t:(null==t?void 0:t.decisionMode)===a.DecisionMode.BUCKETING?new v.BucketingConfig(t):new u.DecisionApiConfig(t)}},{key:"buildDecisionManager",value:function(t,e,r){var n,i=function(e){t.setStatus(e)};if(e.decisionMode===a.DecisionMode.BUCKETING){var o=n=new y.BucketingManager(r,e,new m.MurmurHash);n.statusChangedCallback(i),o.startPolling()}else(n=new l.ApiManager(r,e)).statusChangedCallback(i);return n}},{key:"newVisitor",value:function(e,r){return t.newVisitor(e,r)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new this),this._instance}},{key:"isReady",value:function(){var t,e,r,n,i,o=null==(t=this._instance)||null==(e=t.getConfig())?void 0:e.apiKey,s=null==(r=this._instance)||null==(n=r.getConfig())?void 0:n.envId,a=null==(i=this._instance)?void 0:i.configManager;return!!(this._instance&&o&&s&&a)}},{key:"getStatus",value:function(){return this.getInstance()._status}},{key:"getConfig",value:function(){return this.getInstance()._config}},{key:"getVisitor",value:function(){return this.getInstance().getVisitor()}},{key:"start",value:function(t,e,r){var i,o=this.getInstance();if((r=o.buildConfig(r)).envId=t,r.apiKey=e,o._config=r,o.setStatus(s.FlagshipStatus.STARTING),r.logManager||(r.logManager=new d.FlagshipLogManager),!t||!e)return o.setStatus(s.FlagshipStatus.NOT_INITIALIZED),(0,p.logError)(r,h.INITIALIZATION_PARAM_ERROR,h.PROCESS_INITIALIZATION),null;var a=null==(i=o.configManager)?void 0:i.decisionManager;"object"===(0,n.default)(a)&&a instanceof y.BucketingManager&&a.stopPolling();var u=new _.HttpClient;a=o.buildDecisionManager(o,r,u);var l=new f.TrackingManager(u,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=a,o.configManager.trackingManager=l):o.configManager=new c.ConfigManager(r,a,l),!r.hitCacheImplementation&&(0,p.isBrowser)()&&(r.hitCacheImplementation=new E.DefaultHitCache),!r.visitorCacheImplementation&&(0,p.isBrowser)()&&(r.visitorCacheImplementation=new I.DefaultVisitorCache),this.isReady()?(o._status===s.FlagshipStatus.STARTING&&o.setStatus(s.FlagshipStatus.READY),(0,p.logInfo)(r,(0,p.sprintf)(h.SDK_STARTED_INFO,h.SDK_VERSION),h.PROCESS_INITIALIZATION),o):(o.setStatus(s.FlagshipStatus.NOT_INITIALIZED),null)}},{key:"newVisitor",value:function(t,e){if(!this.isReady())return null;var r,n,i,s,a,u,c=!1,l=!0,f=!(0,p.isBrowser)();"string"==typeof t||null===t?(r=t||void 0,n=e||{}):(r=null==t?void 0:t.visitorId,n=(null==t?void 0:t.context)||{},c=!(null==t||!t.isAuthenticated),l=null==(a=null==t?void 0:t.hasConsented)||a,i=(null==t?void 0:t.initialFlagsData)||(null==t?void 0:t.initialModifications),s=null==t?void 0:t.initialCampaigns,f=null!=(u=null==t?void 0:t.isNewInstance)?u:f);var d=new g.VisitorDelegate({visitorId:r,context:n,isAuthenticated:c,hasConsented:l,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:s,initialFlagsData:i}),h=new o.Visitor(d);return this.getInstance()._visitorInstance=f?void 0:h,this.getConfig().fetchNow&&h.fetchFlags(),h}}]),t}()},"./src/nodeDeps.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{globalOption:()=>i,fetch:()=>o,EventEmitter:()=>n.EventEmitter}),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js");var n=r("./node_modules/events/events.js"),i={},o="undefined"==typeof window?r("node-fetch").default:window.fetch;if("undefined"==typeof window){var s=r("?1749").Agent,a=r("?b7f9").Agent;i.agent=function(t){return"http:"===t.protocol?new s({keepAlive:!0}):new a({keepAlive:!0})}}},"./src/types.ts":(t,e,r)=>{"use strict";r.r(e)},"./src/utils/FlagshipLogManager.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{FlagshipLogManager:()=>o});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.array.concat.js"),r("./src/enum/index.ts")),o=function(){function t(){}return(0,n.default)(t,[{key:"emergency",value:function(t,e){this.log(i.LogLevel.EMERGENCY,t,e)}},{key:"alert",value:function(t,e){this.log(i.LogLevel.ALERT,t,e)}},{key:"critical",value:function(t,e){this.log(i.LogLevel.CRITICAL,t,e)}},{key:"error",value:function(t,e){this.log(i.LogLevel.ERROR,t,e)}},{key:"warning",value:function(t,e){this.log(i.LogLevel.WARNING,t,e)}},{key:"notice",value:function(t,e){this.log(i.LogLevel.NOTICE,t,e)}},{key:"info",value:function(t,e){this.log(i.LogLevel.INFO,t,e)}},{key:"debug",value:function(t,e){this.log(i.LogLevel.DEBUG,t,e)}},{key:"log",value:function(t,e,r){var n=new Date,o=function(t){return 1===t.toString().length?"0".concat(t):t},s="[".concat(o(n.getFullYear()),"-").concat(o(n.getMonth()),"-").concat(o(n.getDay())," ").concat(o(n.getHours()),":").concat(o(n.getMinutes()),"] [").concat(i.FLAGSHIP_SDK,"] [").concat(i.LogLevel[t],"] [").concat(r,"] : ").concat(e);console.log(s)}}]),t}()},"./src/utils/HttpClient.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{HttpClient:()=>p});var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/regenerator/index.js"),u=r.n(a),c=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.promise.finally.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.array.filter.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js"),r("./src/enum/index.ts")),l=r("./src/nodeDeps.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var p=function(){function t(){}var e;return(0,s.default)(t,[{key:"getResponse",value:(e=(0,o.default)(u().mark((function t(e){var r,n,i,o;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.headers.get("Content-Type"),n="application/json"===r,t.next=4,e.text();case 4:if((i=t.sent)&&n&&(i=JSON.parse(i)),!(e.status>=400)){t.next=8;break}throw new Error(i||e.statusText);case 8:return o={},e.headers.forEach((function(t,e){o[e]=t})),t.abrupt("return",{status:e.status,body:i,headers:o});case 11:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var r=new i,n=setTimeout((function(){return r.abort()}),1e3*(null!=e&&e.timeout?e.timeout:c.REQUEST_TIME_OUT));return(0,l.fetch)(t,d(d({},l.globalOption),{},{method:"GET",headers:null==e?void 0:e.headers,signal:r.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(n)}))}},{key:"postAsync",value:function(t,e){var r=new i,n=setTimeout((function(){return r.abort()}),e.timeout?1e3*e.timeout:1e3*c.REQUEST_TIME_OUT);return(0,l.fetch)(t,d(d({},l.globalOption),{},{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:r.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(n)}))}}]),t}()},"./src/utils/MurmurHash.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{MurmurHash:()=>i});var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=function(){function t(){}return(0,n.default)(t,[{key:"murmurHash3Int32",value:function(t){var e,r,n,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=3&t.length,a=t.length-s;e=o;var u=3432918353,c=461845907;for(i=0;i<a;)n=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,e=27492+(65535&(r=5*(65535&(e=(e^=n=(65535&(n=(n=(65535&n)*u+(((n>>>16)*u&65535)<<16)&4294967295)<<15|n>>>17))*c+(((n>>>16)*c&65535)<<16)&4294967295)<<13|e>>>19))+((5*(e>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(n=0,s){case 3:n^=(255&t.charCodeAt(i+2))<<16;case 2:n^=(255&t.charCodeAt(i+1))<<8;case 1:e^=n=(65535&(n=(n=(65535&(n^=255&t.charCodeAt(i)))*u+(((n>>>16)*u&65535)<<16)&4294967295)<<15|n>>>17))*c+(((n>>>16)*c&65535)<<16)&4294967295}return e^=t.length,e=2246822507*(65535&(e^=e>>>16))+((2246822507*(e>>>16)&65535)<<16)&4294967295,e=3266489909*(65535&(e^=e>>>13))+((3266489909*(e>>>16)&65535)<<16)&4294967295,(e^=e>>>16)>>>0}}]),t}()},"./src/utils/utils.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{sprintf:()=>o,logError:()=>s,logInfo:()=>a,sleep:()=>u,isBrowser:()=>c,hasSameType:()=>l});var n=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),i=(r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.replace.js"),r("core-js/modules/es.regexp.constructor.js"),r("core-js/modules/es.regexp.to-string.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./src/enum/index.ts"));function o(t){for(var e=t,r=0;r<(arguments.length<=1?0:arguments.length-1);r++){var n=r+1<1||arguments.length<=r+1?void 0:arguments[r+1];e=e.replace(new RegExp("\\{".concat(r,"\\}"),"g"),n)}return e}function s(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<i.LogLevel.ERROR)&&t.logManager.error(e,r)}function a(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<i.LogLevel.INFO)&&t.logManager.info(e,r)}function u(t){return new Promise((function(e){return setTimeout(e,t)}))}function c(){return"undefined"!=typeof window&&!("Deno"in window)}function l(t,e){return(0,n.default)(t)===(0,n.default)(e)&&("object"!==(0,n.default)(t)||"object"!==(0,n.default)(e)||Array.isArray(t)===Array.isArray(e))}},"./src/visitor/DefaultStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{TYPE_HIT_REQUIRED_ERROR:()=>O,DefaultStrategy:()=>T}),r("core-js/modules/es.reflect.construct.js"),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),a=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),l=r("./node_modules/@babel/runtime/regenerator/index.js"),f=r.n(l),d=(r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.match.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.map.js"),r("core-js/modules/es.regexp.flags.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.function.name.js"),r("core-js/modules/es.array.filter.js"),r("./src/enum/index.ts")),p=r("./src/hit/index.ts"),h=r("./src/utils/utils.ts"),g=r("./src/visitor/VisitorStrategyAbstract.ts"),v=r("./src/config/index.ts"),y=r("./src/enum/FlagshipContext.ts"),m=r("./src/hit/Batch.ts"),_=r("./src/flag/FlagMetadata.ts");function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,c.default)(t);if(e){var i=(0,c.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,u.default)(this,r)}}var O="property type is required and must ",T=function(t){(0,a.default)(M,t);var e,r,n,u,c,l,g,E,T,A,R,S,C,j,N,k,P,x=b(M);function M(){return x.apply(this,arguments)}return(0,s.default)(M,[{key:"checkPredefinedContext",value:function(t,e){var r=y.FLAGSHIP_CONTEXT[t];if(!r)return null;var n=!1;return"string"===r?n="string"==typeof e:"number"===r&&(n="number"==typeof e),n||(0,h.logError)(this.config,(0,h.sprintf)(d.PREDEFINED_CONTEXT_TYPE_ERROR,t,r),d.PROCESS_UPDATE_CONTEXT),n}},{key:"updateContextKeyValue",value:function(t,e){var r=(0,o.default)(e);if("string"!=typeof t||""===t||"string"!==r&&"number"!==r&&"boolean"!==r)(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.CONTEXT_PARAM_ERROR,t),d.PROCESS_UPDATE_CONTEXT);else if(!t.match(/^fs_/i)){var n=this.checkPredefinedContext(t,e);("boolean"!=typeof n||n)&&(this.visitor.context[t]=e)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var r=t[e];this.updateContextKeyValue(e,r)}else(0,h.logError)(this.visitor.config,d.CONTEXT_NULL_ERROR,d.PROCESS_UPDATE_CONTEXT)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(t,e){var r=this,n=t.key,i=t.defaultValue,s=t.activate;if(!n||"string"!=typeof n)return(0,h.logError)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,n),d.PROCESS_GET_MODIFICATION),i;var a=this.visitor.flagsData.get(n);if(!a)return(0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_MISSING_ERROR,n),d.PROCESS_GET_MODIFICATION),i;var u=function(){(0,h.logError)(r.config,(0,h.sprintf)(d.GET_MODIFICATION_CAST_ERROR,n),d.PROCESS_GET_MODIFICATION),a.value||!s&&!e||r.activateModification(n)};return"object"===(0,o.default)(a.value)&&"object"===(0,o.default)(i)&&Array.isArray(a.value)!==Array.isArray(i)||(0,o.default)(a.value)!==(0,o.default)(i)?(u(),i):((s||e)&&this.activateModification(n),a.value)}},{key:"getModifications",value:(P=(0,i.default)(f().mark((function t(e,r){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationsSync(e,r));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return P.apply(this,arguments)})},{key:"getModificationsSync",value:function(t,e){var r=this,n={};return t.forEach((function(t){n[t.key]=r.checkAndGetModification(t,e)})),n}},{key:"getModification",value:(k=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(N=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationInfoSync(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return N.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){if(!t||"string"!=typeof t)return(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,t),d.PROCESS_GET_MODIFICATION_INFO),null;var e=this.visitor.flagsData.get(t);return e||((0,h.logError)(this.visitor.config,(0,h.sprintf)(d.GET_MODIFICATION_ERROR,t),d.PROCESS_GET_MODIFICATION_INFO),null)}},{key:"fetchVisitorCampaigns",value:function(t){var e;return Array.isArray(null==t||null==(e=t.visitorCache)?void 0:e.data.campaigns)?(t.updateContext(t.visitorCache.data.context||{}),t.visitorCache.data.campaigns.map((function(t){return{id:t.campaignId,variationGroupId:t.variationGroupId,slug:t.slug,variation:{id:t.variationId,reference:!!t.isReference,modifications:{type:t.type,value:t.flags}}}}))):[]}},{key:"globalFetchFlags",value:(j=(0,i.default)(f().mark((function t(e){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.decisionManager.getCampaignsAsync(this.visitor);case 3:(r=t.sent)||(r=this.fetchVisitorCampaigns(this.visitor)),this.visitor.campaigns=r,this.visitor.flagsData=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(d.EMIT_READY),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),this.visitor.emit(d.EMIT_READY,t.t0),(0,h.logError)(this.config,t.t0.message||t.t0,e);case 14:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return j.apply(this,arguments)})},{key:"synchronizeModifications",value:(C=(0,i.default)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags(d.PROCESS_SYNCHRONIZED_MODIFICATION));case 1:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"activateModification",value:(S=(0,i.default)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return(0,h.logError)(this.config,(0,h.sprintf)(d.ACTIVATE_MODIFICATION_KEY_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"activateModifications",value:(R=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return(0,h.logError)(this.config,(0,h.sprintf)(d.GET_MODIFICATION_KEY_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 3:e.forEach((function(t){"string"==typeof t?r.activate(t):r.activate(t.key)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return R.apply(this,arguments)})},{key:"isDeDuplicated",value:function(t,e){if(0===e)return!1;var r=this.visitor.deDuplicationCache[t];return!!(r&&Date.now()-r<=1e3*e)||(this.visitor.deDuplicationCache[t]=Date.now(),this.visitor.clearDeDuplicationCache(e),!1)}},{key:"sendActivate",value:(A=(0,i.default)(f().mark((function t(e){var r,n=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:d.PROCESS_ACTIVE_MODIFICATION,t.prev=1,t.next=4,this.trackingManager.sendActive(this.visitor,e);case 4:t.next=10;break;case 6:t.prev=6,t.t0=t.catch(1),(0,h.logError)(this.config,t.t0.message||t.t0,r),this.cacheHit(e);case 10:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(t){return A.apply(this,arguments)})},{key:"activate",value:(T=(0,i.default)(f().mark((function t(e){var r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.visitor.flagsData.get(e)){t.next=4;break}return(0,h.logError)(this.visitor.config,(0,h.sprintf)(d.ACTIVATE_MODIFICATION_ERROR,e),d.PROCESS_ACTIVE_MODIFICATION),t.abrupt("return");case 4:if(!this.isDeDuplicated(r.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=6;break}return t.abrupt("return");case 6:if(this.hasTrackingManager(d.PROCESS_ACTIVE_MODIFICATION)){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,this.sendActivate(r);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return T.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(d.PROCESS_SEND_HIT)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(E=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(d.PROCESS_SEND_HIT)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){return r.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getHitLegacy",value:function(t){var e=null;if(!t||!t.type)return null;var r={type:{Screen:d.HitType.SCREEN_VIEW,ScreenView:d.HitType.SCREEN_VIEW,Transaction:d.HitType.TRANSACTION,Page:d.HitType.PAGE_VIEW,PageView:d.HitType.PAGE_VIEW,Item:d.HitType.ITEM,Event:d.HitType.EVENT}[t.type]},n=I(I({},r),t.data);switch(r.type.toUpperCase()){case d.HitType.EVENT:e=new p.Event(n);break;case d.HitType.ITEM:var i=t.data;e=new p.Item(I(I({},n),{},{productName:i.name,productSku:i.code,transactionId:i.transactionId,itemCategory:i.category,itemPrice:i.price,itemQuantity:i.quantity}));break;case d.HitType.PAGE_VIEW:e=new p.Page(n);break;case d.HitType.SCREEN_VIEW:e=new p.Screen(n);break;case d.HitType.TRANSACTION:e=new p.Transaction(t.data)}return e}},{key:"getHit",value:function(t){var e,r=this,n=null;if(!t||!t.type)return n;switch(t.type.toUpperCase()){case d.HitType.EVENT:n=new p.Event(t);break;case d.HitType.ITEM:n=new p.Item(t);break;case d.HitType.PAGE_VIEW:n=new p.Page(t);break;case d.HitType.SCREEN_VIEW:n=new p.Screen(t);break;case d.HitType.TRANSACTION:n=new p.Transaction(t);break;case m.BATCH:n=new m.Batch({hits:null==t||null==(e=t.hits)?void 0:e.map((function(t){return r.getHit(t)})).filter((function(t){return t}))})}return n}},{key:"prepareAndSendHit",value:(g=(0,i.default)(f().mark((function t(e){var r,n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof p.HitAbstract)){t.next=4;break}r=e,t.next=18;break;case 4:if(!("data"in e)){t.next=13;break}if(n=e,i=this.getHitLegacy(n)){t.next=10;break}return(0,h.logError)(this.config,O,d.PROCESS_SEND_HIT),t.abrupt("return");case 10:r=i,t.next=18;break;case 13:if(o=this.getHit(e)){t.next=17;break}return(0,h.logError)(this.config,O,d.PROCESS_SEND_HIT),t.abrupt("return");case 17:r=o;case 18:if(r.visitorId=this.visitor.visitorId,r.ds=d.SDK_APP,r.config=this.config,r.anonymousId=this.visitor.anonymousId,!this.isDeDuplicated(JSON.stringify(r),this.config.hitDeduplicationTime)){t.next=24;break}return t.abrupt("return");case 24:if(r.isReady()){t.next=27;break}return(0,h.logError)(this.config,r.getErrorMessage(),d.PROCESS_SEND_HIT),t.abrupt("return");case 27:return t.prev=27,t.next=30,this.trackingManager.sendHit(r);case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(27),(0,h.logError)(this.config,t.t0.message||t.t0,d.PROCESS_SEND_HIT),this.cacheHit(r);case 36:case"end":return t.stop()}}),t,this,[[27,32]])}))),function(t){return g.apply(this,arguments)})},{key:"getAllModifications",value:(l=(0,i.default)(f().mark((function t(){var e,r=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]&&r[0],t.abrupt("return",this.getAllFlagsData(e));case 2:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getAllFlagsData",value:(c=(0,i.default)(f().mark((function t(e){var r=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.visitor.flagsData.forEach((function(t,e){r.activateModification(e)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(u=(0,i.default)(f().mark((function t(e){var r,n=arguments;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]&&n[1],t.abrupt("return",this.getFlatsDataForCampaign(e,r));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getFlatsDataForCampaign",value:(n=(0,i.default)(f().mark((function t(e,r){var n=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r&&this.visitor.flagsData.forEach((function(t){t.campaignId===e&&n.userExposed({key:t.key,flag:t,defaultValue:t.value})})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns.filter((function(t){return t.id===e}))});case 2:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==v.DecisionMode.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):(0,h.logError)(this.config,d.VISITOR_ID_ERROR,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==v.DecisionMode.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):(0,h.logError)(this.config,d.FLAGSHIP_VISITOR_NOT_AUTHENTICATE,t):this.logDeactivateOnBucketing(t)}},{key:"fetchFlags",value:(r=(0,i.default)(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags("fetchFlags"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"userExposed",value:(e=(0,i.default)(f().mark((function t(e){var r,n,i,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.key,n=e.flag,i=e.defaultValue,o="userExposed",n){t.next=5;break}return(0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.USER_EXPOSED_FLAG_ERROR,r),o),t.abrupt("return");case 5:if(null==i||!n.value||(0,h.hasSameType)(n.value,i)){t.next=8;break}return(0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.USER_EXPOSED_CAST_ERROR,r),o),t.abrupt("return");case 8:if(!this.isDeDuplicated(n.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=10;break}return t.abrupt("return");case 10:if(this.hasTrackingManager(o)){t.next=12;break}return t.abrupt("return");case 12:return t.abrupt("return",this.sendActivate(n,o));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getFlagValue",value:function(t){var e=t.key,r=t.defaultValue,n=t.flag,i=t.userExposed,o="getFlag value";return n?n.value?null==r||(0,h.hasSameType)(n.value,r)?(i&&this.userExposed({key:e,flag:n,defaultValue:r}),n.value):((0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_FLAG_CAST_ERROR,e),o),r):(i&&this.userExposed({key:e,flag:n,defaultValue:r}),r):((0,h.logInfo)(this.config,(0,h.sprintf)(d.GET_FLAG_MISSING_ERROR,e),o),r)}},{key:"getFlagMetadata",value:function(t){var e=t.metadata,r=t.hasSameType,n=t.key;return r?e:((0,h.logInfo)(this.visitor.config,(0,h.sprintf)(d.GET_METADATA_CAST_ERROR,n),"flag.metadata"),_.FlagMetadata.Empty())}},{key:"logDeactivateOnBucketing",value:function(t){(0,h.logError)(this.config,(0,h.sprintf)(d.METHOD_DEACTIVATED_BUCKETING_ERROR,t),t)}}]),M}(g.VisitorStrategyAbstract)},"./src/visitor/NoConsentStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NoConsentStrategy:()=>p}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts");function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p=function(t){(0,o.default)(v,t);var e,r,s,a,u,p,h,g=d(v);function v(){return g.apply(this,arguments)}return(0,i.default)(v,[{key:"activateModification",value:(h=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"activateModifications",value:(p=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"lookupHits",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"lookupVisitor",value:(a=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"cacheVisitor",value:(s=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"cacheHit",value:(r=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_CONSENT_ERROR,t,this.visitor.visitorId),t)}}]),v}(r("./src/visitor/DefaultStrategy.ts").DefaultStrategy)},"./src/visitor/NotReadyStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NotReadyStrategy:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts"),d=r("./src/visitor/DefaultStrategy.ts"),p=r("./src/flag/FlagMetadata.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g=function(t){(0,o.default)(m,t);var e,r,s,a,u,d,g,v,y=h(m);function m(){return y.apply(this,arguments)}return(0,i.default)(m,[{key:"synchronizeModifications",value:(v=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("synchronizeModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var r={};return t.forEach((function(t){r[t.key]=t.defaultValue})),r}},{key:"lookupHits",value:(g=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"lookupVisitor",value:(d=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"cacheVisitor",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(a=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"activateModifications",value:(s=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"fetchFlags",value:(r=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("fetchFlags");case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getFlagValue",value:function(t){return this.log("Flag.value"),t.defaultValue}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getFlagMetadata",value:function(){return this.log("flag.metadata"),p.FlagMetadata.Empty()}},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_ERROR,t,l.FlagshipStatus[l.FlagshipStatus.NOT_INITIALIZED]),t)}}]),m}(d.DefaultStrategy)},"./src/visitor/PanicStrategy.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{PanicStrategy:()=>g}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),c=r.n(u),l=r("./src/enum/index.ts"),f=r("./src/utils/utils.ts"),d=r("./src/visitor/DefaultStrategy.ts"),p=r("./src/flag/FlagMetadata.ts");function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var g=function(t){(0,o.default)(y,t);var e,r,s,a,u,d,g,v=h(y);function y(){return v.apply(this,arguments)}return(0,i.default)(y,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_SEND_CONSENT_ERROR,l.FlagshipStatus[l.FlagshipStatus.READY_PANIC_ON]),"setConsent")}},{key:"updateContext",value:function(t){this.log("updateContext")}},{key:"clearContext",value:function(){this.log("clearContext")}},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"lookupHits",value:(g=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"lookupVisitor",value:(d=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"cacheVisitor",value:(u=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"cacheHit",value:(a=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var r={};return t.forEach((function(t){r[t.key]=t.defaultValue})),r}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(s=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModification");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"activateModifications",value:(r=(0,n.default)(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("activateModifications");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.log("sendHit"),Promise.resolve()}},{key:"sendHits",value:function(t){return this.log("sendHits"),Promise.resolve()}},{key:"getFlagValue",value:function(t){return this.log("Flag.value"),t.defaultValue}},{key:"userExposed",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.log("userExposed");case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getFlagMetadata",value:function(){return this.log("flag.metadata"),p.FlagMetadata.Empty()}},{key:"log",value:function(t){(0,f.logError)(this.config,(0,f.sprintf)(l.METHOD_DEACTIVATED_ERROR,t,l.FlagshipStatus[l.FlagshipStatus.READY_PANIC_ON]),t)}}]),y}(d.DefaultStrategy)},"./src/visitor/Visitor.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{Visitor:()=>l}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),o=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./src/nodeDeps.ts"),u=r("./src/enum/index.ts");function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,o.default)(this,r)}}var l=function(t){(0,i.default)(r,t);var e=c(r);function r(t){var r;return(r=e.call(this)).visitorDelegate=t,r.visitorDelegate.on(u.EMIT_READY,(function(t){r.emit(u.EMIT_READY,t)})),r}return(0,n.default)(r,[{key:"getModificationsArray",value:function(){return this.visitorDelegate.getModificationsArray()}},{key:"getFlagsDataArray",value:function(){return this.visitorDelegate.getFlagsDataArray()}},{key:"visitorId",get:function(){return this.visitorDelegate.visitorId},set:function(t){this.visitorDelegate.visitorId=t}},{key:"anonymousId",get:function(){return this.visitorDelegate.anonymousId}},{key:"hasConsented",get:function(){return this.visitorDelegate.hasConsented}},{key:"setConsent",value:function(t){this.visitorDelegate.setConsent(t)}},{key:"config",get:function(){return this.visitorDelegate.config}},{key:"context",get:function(){return this.visitorDelegate.context}},{key:"flagsData",get:function(){return this.visitorDelegate.flagsData}},{key:"modifications",get:function(){return this.visitorDelegate.flagsData}},{key:"updateContext",value:function(t){this.visitorDelegate.updateContext(t)}},{key:"clearContext",value:function(){this.visitorDelegate.clearContext()}},{key:"getFlag",value:function(t,e){return this.visitorDelegate.getFlag(t,e)}},{key:"getModification",value:function(t){return this.visitorDelegate.getModification(t)}},{key:"getModificationSync",value:function(t){return this.visitorDelegate.getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.visitorDelegate.getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.visitorDelegate.getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.visitorDelegate.getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.visitorDelegate.getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.visitorDelegate.synchronizeModifications()}},{key:"fetchFlags",value:function(){return this.visitorDelegate.fetchFlags()}},{key:"activateModification",value:function(t){return this.visitorDelegate.activateModification(t)}},{key:"activateModifications",value:function(t){return this.visitorDelegate.activateModifications(t)}},{key:"sendHit",value:function(t){return this.visitorDelegate.sendHit(t)}},{key:"sendHits",value:function(t){return this.visitorDelegate.sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.visitorDelegate.getAllModifications(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.visitorDelegate.getModificationsForCampaign(t,e)}},{key:"getAllFlagsData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.visitorDelegate.getAllFlagsData(t)}},{key:"getFlatsDataForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.visitorDelegate.getFlatsDataForCampaign(t,e)}},{key:"authenticate",value:function(t){this.visitorDelegate.authenticate(t)}},{key:"unauthenticate",value:function(){this.visitorDelegate.unauthenticate()}}]),r}(a.EventEmitter)},"./src/visitor/VisitorAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VisitorAbstract:()=>_}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=(r("core-js/modules/es.object.entries.js"),r("core-js/modules/es.array.from.js"),r("core-js/modules/es.string.iterator.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.map.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/web.dom-collections.iterator.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.function.name.js"),r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.replace.js"),r("core-js/modules/es.regexp.to-string.js"),r("./src/config/index.ts")),c=r("./src/enum/index.ts"),l=r("./src/utils/utils.ts"),f=r("./src/visitor/DefaultStrategy.ts"),d=r("./src/nodeDeps.ts"),p=r("./src/main/Flagship.ts"),h=r("./src/visitor/NotReadyStrategy.ts"),g=r("./src/visitor/PanicStrategy.ts"),v=r("./src/visitor/NoConsentStrategy.ts"),y=r("./src/visitor/VisitorCache.ts");function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var _=function(t){(0,o.default)(r,t);var e=m(r);function r(t){var r,n=t.visitorId,i=t.configManager,o=t.context,s=t.isAuthenticated,a=t.hasConsented,c=t.initialModifications,l=t.initialFlagsData,f=t.initialCampaigns;(r=e.call(this))._isCleaningDeDuplicationCache=!1,r.deDuplicationCache={},r._context={},r._configManager=i;var d=r.config.enableClientCache?y.cacheVisitor.loadVisitorProfile():null;return r.visitorId=n||(null==d?void 0:d.visitorId)||r.uuidV4(),r.setConsent(null==a||a),r.campaigns=[],r.updateContext(o),r._anonymousId=(null==d?void 0:d.anonymousId)||null,r.loadPredefinedContext(),!r._anonymousId&&s&&r.config.decisionMode===u.DecisionMode.DECISION_API&&(r._anonymousId=r.uuidV4()),r.updateCache(),r.setInitialFlags(l||c),r.setInitializeCampaigns(f,!!c),r}return(0,i.default)(r,[{key:"clearDeDuplicationCache",value:function(t){if(!this._isCleaningDeDuplicationCache){this._isCleaningDeDuplicationCache=!0;for(var e=0,r=Object.entries(this.deDuplicationCache);e<r.length;e++){var i=(0,n.default)(r[e],2),o=i[0],s=i[1];Date.now()-s>1e3*t&&delete this.deDuplicationCache[o]}this._isCleaningDeDuplicationCache=!1}}},{key:"getModificationsArray",value:function(){return Array.from(this._flags,(function(t){var e=(0,n.default)(t,2);return e[0],e[1]}))}},{key:"getFlagsDataArray",value:function(){return Array.from(this._flags,(function(t){var e=(0,n.default)(t,2);return e[0],e[1]}))}},{key:"setInitialFlags",value:function(t){var e=this;this._flags=new Map,t&&(t instanceof Map||Array.isArray(t))&&t.forEach((function(t){e._flags.set(t.key,t)}))}},{key:"setInitializeCampaigns",value:function(t,e){t&&Array.isArray(t)&&!e&&this.getStrategy().updateCampaigns(t)}},{key:"updateCache",value:function(){var t={visitorId:this.visitorId,anonymousId:this.anonymousId};y.cacheVisitor.saveVisitorProfile(t)}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=c.SDK_LANGUAGE.name,this.context.fs_version=c.SDK_VERSION,this.context.fs_users=this.visitorId}},{key:"uuidV4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){t&&"string"==typeof t?(this._visitorId=t,this.loadPredefinedContext(),this.visitorCache=void 0):(0,l.logError)(this.config,c.VISITOR_ID_ERROR,"VISITOR ID")}},{key:"hasConsented",get:function(){return this._hasConsented},set:function(t){this._hasConsented=t}},{key:"setConsent",value:function(t){this.hasConsented=t,this.getStrategy().setConsent(t)}},{key:"context",get:function(){return this._context},set:function(t){this._context={},this.updateContext(t)}},{key:"flagsData",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"modifications",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"configManager",get:function(){return this._configManager}},{key:"config",get:function(){return this.configManager.config}},{key:"campaigns",get:function(){return this._campaigns},set:function(t){this._campaigns=t}},{key:"anonymousId",get:function(){return this._anonymousId},set:function(t){this._anonymousId=t}},{key:"getStrategy",value:function(){return p.Flagship.getStatus()&&p.Flagship.getStatus()!==c.FlagshipStatus.NOT_INITIALIZED?p.Flagship.getStatus()===c.FlagshipStatus.READY_PANIC_ON?new g.PanicStrategy(this):this.hasConsented?new f.DefaultStrategy(this):new v.NoConsentStrategy(this):new h.NotReadyStrategy(this)}}]),r}(d.EventEmitter)},"./src/visitor/VisitorCache.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{CLIENT_CACHE_KEY:()=>n,cacheVisitor:()=>i});var n="FS_CLIENT_VISITOR",i={saveVisitorProfile:function(t){try{localStorage.setItem(n,JSON.stringify(t))}catch(t){}},loadVisitorProfile:function(){var t=null;try{t=localStorage.getItem(n)}catch(t){}return t?JSON.parse(t):null}}},"./src/visitor/VisitorDelegate.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{VisitorDelegate:()=>p}),r("core-js/modules/es.reflect.construct.js");var n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),s=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),a=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),u=r("./node_modules/@babel/runtime/regenerator/index.js"),c=r.n(u),l=r("./src/visitor/VisitorAbstract.ts"),f=r("./src/flag/Flags.ts");function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,a.default)(t);if(e){var i=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p=function(t){(0,o.default)(a,t);var e,r,s=d(a);function a(){return s.apply(this,arguments)}return(0,i.default)(a,[{key:"updateContext",value:function(t){this.getStrategy().updateContext(t),this.loadPredefinedContext()}},{key:"clearContext",value:function(){this.getStrategy().clearContext()}},{key:"getFlag",value:function(t,e){return new f.Flag({key:t,visitor:this,defaultValue:e})}},{key:"getModification",value:function(t){return this.getStrategy().getModification(t)}},{key:"getModificationSync",value:function(t){return this.getStrategy().getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.getStrategy().getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.getStrategy().getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.getStrategy().getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.getStrategy().getModificationInfoSync(t)}},{key:"synchronizeModifications",value:(r=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getStrategy().lookupVisitor();case 2:return t.next=4,this.getStrategy().lookupHits();case 4:return t.next=6,this.getStrategy().synchronizeModifications();case 6:return t.next=8,this.getStrategy().cacheVisitor();case 8:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"activateModification",value:function(t){return this.getStrategy().activateModification(t)}},{key:"activateModifications",value:function(t){return this.getStrategy().activateModifications(t)}},{key:"sendHit",value:function(t){return this.getStrategy().sendHit(t)}},{key:"sendHits",value:function(t){return this.getStrategy().sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllModifications(t)}},{key:"getAllFlagsData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllFlagsData(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getModificationsForCampaign(t,e)}},{key:"getFlatsDataForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getFlatsDataForCampaign(t,e)}},{key:"authenticate",value:function(t){this.getStrategy().authenticate(t),this.updateCache()}},{key:"unauthenticate",value:function(){this.getStrategy().unauthenticate(),this.updateCache()}},{key:"fetchFlags",value:(e=(0,n.default)(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getStrategy().lookupVisitor();case 2:return t.next=4,this.getStrategy().lookupHits();case 4:return t.next=6,this.getStrategy().fetchFlags();case 6:return t.next=8,this.getStrategy().cacheVisitor();case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"userExposed",value:function(t){return this.getStrategy().userExposed(t)}},{key:"getFlagValue",value:function(t){return this.getStrategy().getFlagValue(t)}},{key:"getFlagMetadata",value:function(t){return this.getStrategy().getFlagMetadata(t)}}]),a}(l.VisitorAbstract)},"./src/visitor/VisitorStrategyAbstract.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{LOOKUP_HITS_JSON_ERROR:()=>p,LOOKUP_HITS_JSON_OBJECT_ERROR:()=>h,LOOKUP_VISITOR_JSON_OBJECT_ERROR:()=>g,VISITOR_ID_MISMATCH_ERROR:()=>v,VisitorStrategyAbstract:()=>y}),r("core-js/modules/es.object.keys.js"),r("core-js/modules/es.symbol.js"),r("core-js/modules/es.object.get-own-property-descriptor.js"),r("core-js/modules/es.object.get-own-property-descriptors.js");var n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=(r("core-js/modules/es.array.map.js"),r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.array.filter.js"),r("./node_modules/@babel/runtime/regenerator/index.js")),a=r.n(s),u=r("./src/hit/index.ts"),c=r("./src/utils/utils.ts"),l=r("./src/enum/index.ts");function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){(0,n.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var p="JSON DATA must be an array of object",h="JSON DATA must fit the type HitCacheDTO",g="JSON DATA must fit the type VisitorCacheDTO",v="Visitor ID mismatch: {0} vs {1}",y=function(){function t(t){this.visitor=t}var e,r,n,s,f,y;return(0,o.default)(t,[{key:"configManager",get:function(){return this.visitor.configManager}},{key:"trackingManager",get:function(){return this.configManager.trackingManager}},{key:"decisionManager",get:function(){return this.configManager.decisionManager}},{key:"config",get:function(){return this.visitor.config}},{key:"updateCampaigns",value:function(t){try{this.visitor.campaigns=t,this.visitor.flagsData=this.decisionManager.getModifications(t)}catch(t){(0,c.logError)(this.config,t.message||t,"updateCampaigns")}}},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||(0,c.logError)(this.config,(0,c.sprintf)(l.TRACKER_MANAGER_MISSING_ERROR),t),!!e}},{key:"setConsent",value:function(t){var e=this,r="setConsent";this.visitor.hasConsented=t,t||(this.flushHits(),this.flushVisitor()),this.hasTrackingManager(r)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){(0,c.logError)(e.config,t.message||t,r)}))}},{key:"checKLookupVisitorDataV1",value:function(t){if(!t||!t.data||!t.data.visitorId)return!1;var e=t.data.campaigns;return!e||!!Array.isArray(e)&&(t.data.visitorId!==this.visitor.visitorId?((0,c.logInfo)(this.config,(0,c.sprintf)(v,t.data.visitorId,this.visitor.visitorId),"lookupVisitor"),!1):e.every((function(t){return t.campaignId&&t.type&&t.variationGroupId&&t.variationId})))}},{key:"checKLookupVisitorData",value:function(t){return 1===t.version&&this.checKLookupVisitorDataV1(t)}},{key:"lookupVisitor",value:(y=(0,i.default)(a().mark((function t(){var e,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.visitorCacheImplementation,!this.config.disableCache&&e&&e.lookupVisitor&&"function"==typeof e.lookupVisitor){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.lookupVisitor(this.visitor.visitorId);case 6:if(r=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(this.checKLookupVisitorData(r)){t.next=11;break}throw new Error(g);case 11:this.visitor.visitorCache=r,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"lookupVisitor");case 17:case"end":return t.stop()}}),t,this,[[0,14]])}))),function(){return y.apply(this,arguments)})},{key:"cacheVisitor",value:(f=(0,i.default)(a().mark((function t(){var e,r,n,i,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.config.visitorCacheImplementation,!this.config.disableCache&&n&&"function"==typeof n.cacheVisitor){t.next=4;break}return t.abrupt("return");case 4:return i={},(o={version:l.VISITOR_CACHE_VERSION,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,consent:this.visitor.hasConsented,context:this.visitor.context,campaigns:this.visitor.campaigns.map((function(t){return i[t.variationGroupId]=t.variation.id,{campaignId:t.id,slug:t.slug,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,type:t.variation.modifications.type,activated:!1,flags:t.variation.modifications.value}}))}}).data.assignmentsHistory=d(d({},null==(e=this.visitor.visitorCache)||null==(r=e.data)?void 0:r.assignmentsHistory),i),t.next=9,n.cacheVisitor(this.visitor.visitorId,o);case 9:this.visitor.visitorCache=o,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"cacheVisitor");case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return f.apply(this,arguments)})},{key:"flushVisitor",value:(s=(0,i.default)(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.visitorCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.flushVisitor){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.flushVisitor(this.visitor.visitorId);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"flushVisitor");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:"checKLookupHitData",value:function(t){return!!(t&&1===t.version&&t.data&&t.data.type&&t.data.visitorId)||((0,c.logError)(this.config,h,"lookupHits"),!1)}},{key:"lookupHits",value:(n=(0,i.default)(a().mark((function t(){var e,r,n,i,o,s=this;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.hitCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.lookupHits){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.lookupHits(this.visitor.visitorId);case 6:if(r=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(Array.isArray(r)){t.next=11;break}throw Error(p);case 11:if(n=function(t){return(Date.now()-t)/1e3<=l.DEFAULT_HIT_CACHE_TIME},i=[{type:"BATCH",hits:[]}],o=0,r.filter((function(t){return s.checKLookupHitData(t)&&n(t.data.time)})).forEach((function(t){"ACTIVATE"!==t.data.type?"BATCH"!==t.data.type?JSON.stringify(i[o]).length>2621440?(o++,i[o]={type:"BATCH",hits:[t.data.content]}):i[o].hits.push(t.data.content):s.sendHit(t.data.content):s.sendActivate(t.data.content)})),1!==i.length||i[0].hits.length){t.next=18;break}return t.abrupt("return");case 18:this.sendHits(i),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"lookupHits");case 24:case"end":return t.stop()}}),t,this,[[0,21]])}))),function(){return n.apply(this,arguments)})},{key:"cacheHit",value:(r=(0,i.default)(a().mark((function t(e){var r,n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r=this.config.hitCacheImplementation,!this.config.disableCache&&r&&"function"==typeof r.cacheHit){t.next=4;break}return t.abrupt("return");case 4:return n={version:l.HIT_CACHE_VERSION,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,type:e instanceof u.HitAbstract?e.type:"ACTIVATE",content:e instanceof u.HitAbstract?e.toObject():e,time:Date.now()}},t.next=7,r.cacheHit(this.visitor.visitorId,n);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,l.PROCESS_CACHE_HIT);case 12:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t){return r.apply(this,arguments)})},{key:"flushHits",value:(e=(0,i.default)(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=this.config.hitCacheImplementation,!this.config.disableCache&&e&&"function"==typeof e.flushHits){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,e.flushHits(this.visitor.visitorId);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,c.logError)(this.config,t.t0.message||t.t0,"flushHits");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return e.apply(this,arguments)})}]),t}()},"./src/visitor/index.ts":(t,e,r)=>{"use strict";r.r(e),r.d(e,{NoConsentStrategy:()=>n.NoConsentStrategy,NotReadyStrategy:()=>i.NotReadyStrategy,DefaultStrategy:()=>o.DefaultStrategy,PanicStrategy:()=>s.PanicStrategy,Visitor:()=>a.Visitor,VisitorDelegate:()=>u.VisitorDelegate});var n=r("./src/visitor/NoConsentStrategy.ts"),i=r("./src/visitor/NotReadyStrategy.ts"),o=r("./src/visitor/DefaultStrategy.ts"),s=r("./src/visitor/PanicStrategy.ts"),a=r("./src/visitor/Visitor.ts"),u=r("./src/visitor/VisitorDelegate.ts")},"./node_modules/events/events.js":t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,s,c;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):h(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,l=h(u,c);for(r=0;r<c;++r)n(l[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,f(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,f(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},"./node_modules/regenerator-runtime/runtime.js":t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new C(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return N()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===g)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?h:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function v(){}function y(){}function m(){}var _={};u(_,o,(function(){return this}));var E=Object.getPrototypeOf,I=E&&E(E(j([])));I&&I!==r&&n.call(I,o)&&(_=I);var b=m.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function j(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=m,u(b,"constructor",m),u(m,"constructor",y),y.displayName=u(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},O(T.prototype),u(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new T(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(b),u(b,a,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},"core-js/modules/es.array.concat.js":t=>{"use strict";t.exports=v},"core-js/modules/es.array.filter.js":t=>{"use strict";t.exports=d},"core-js/modules/es.array.find.js":t=>{"use strict";t.exports=D},"core-js/modules/es.array.from.js":t=>{"use strict";t.exports=C},"core-js/modules/es.array.includes.js":t=>{"use strict";t.exports=I},"core-js/modules/es.array.iterator.js":t=>{"use strict";t.exports=y},"core-js/modules/es.array.map.js":t=>{"use strict";t.exports=N},"core-js/modules/es.array.slice.js":t=>{"use strict";t.exports=P},"core-js/modules/es.function.name.js":t=>{"use strict";t.exports=o},"core-js/modules/es.map.js":t=>{"use strict";t.exports=m},"core-js/modules/es.math.trunc.js":t=>{"use strict";t.exports=R},"core-js/modules/es.number.constructor.js":t=>{"use strict";t.exports=A},"core-js/modules/es.number.is-integer.js":t=>{"use strict";t.exports=T},"core-js/modules/es.object.entries.js":t=>{"use strict";t.exports=S},"core-js/modules/es.object.get-own-property-descriptor.js":t=>{"use strict";t.exports=p},"core-js/modules/es.object.get-own-property-descriptors.js":t=>{"use strict";t.exports=g},"core-js/modules/es.object.keys.js":t=>{"use strict";t.exports=l},"core-js/modules/es.object.to-string.js":t=>{"use strict";t.exports=e},"core-js/modules/es.object.values.js":t=>{"use strict";t.exports=O},"core-js/modules/es.promise.finally.js":t=>{"use strict";t.exports=F},"core-js/modules/es.promise.js":t=>{"use strict";t.exports=r},"core-js/modules/es.reflect.construct.js":e=>{"use strict";e.exports=t},"core-js/modules/es.regexp.constructor.js":t=>{"use strict";t.exports=u},"core-js/modules/es.regexp.exec.js":t=>{"use strict";t.exports=s},"core-js/modules/es.regexp.flags.js":t=>{"use strict";t.exports=k},"core-js/modules/es.regexp.to-string.js":t=>{"use strict";t.exports=c},"core-js/modules/es.string.ends-with.js":t=>{"use strict";t.exports=L},"core-js/modules/es.string.includes.js":t=>{"use strict";t.exports=b},"core-js/modules/es.string.iterator.js":t=>{"use strict";t.exports=_},"core-js/modules/es.string.match.js":t=>{"use strict";t.exports=j},"core-js/modules/es.string.replace.js":t=>{"use strict";t.exports=a},"core-js/modules/es.string.starts-with.js":t=>{"use strict";t.exports=w},"core-js/modules/es.symbol.description.js":t=>{"use strict";t.exports=x},"core-js/modules/es.symbol.iterator.js":t=>{"use strict";t.exports=M},"core-js/modules/es.symbol.js":t=>{"use strict";t.exports=f},"core-js/modules/web.dom-collections.for-each.js":t=>{"use strict";t.exports=h},"core-js/modules/web.dom-collections.iterator.js":t=>{"use strict";t.exports=E},"node-fetch":t=>{"use strict";t.exports=n},"?1749":()=>{},"?b7f9":()=>{}},G={};function H(t){var e=G[t];if(void 0!==e)return e.exports;var r=G[t]={exports:{}};return V[t](r,r.exports,H),r.exports}H.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return H.d(e,{a:e}),e},H.d=(t,e)=>{for(var r in e)H.o(e,r)&&!H.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},H.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),H.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var U={};return(()=>{"use strict";H.r(U),H.d(U,{Flagship:()=>t.Flagship,DecisionApiConfig:()=>e.DecisionApiConfig,DecisionMode:()=>e.DecisionMode,Event:()=>r.Event,EventCategory:()=>r.EventCategory,Item:()=>r.Item,Page:()=>r.Page,Screen:()=>r.Screen,Transaction:()=>r.Transaction,HitAbstract:()=>r.HitAbstract,FlagshipStatus:()=>n.FlagshipStatus,LogLevel:()=>n.LogLevel,HitType:()=>n.HitType,APP_VERSION_CODE:()=>i.APP_VERSION_CODE,APP_VERSION_NAME:()=>i.APP_VERSION_NAME,CARRIER_NAME:()=>i.CARRIER_NAME,DEVICE_LOCALE:()=>i.DEVICE_LOCALE,DEVICE_MODEL:()=>i.DEVICE_MODEL,DEVICE_TYPE:()=>i.DEVICE_TYPE,FLAGSHIP_CLIENT:()=>i.FLAGSHIP_CLIENT,FLAGSHIP_CONTEXT:()=>i.FLAGSHIP_CONTEXT,FLAGSHIP_VERSION:()=>i.FLAGSHIP_VERSION,FLAGSHIP_VISITOR:()=>i.FLAGSHIP_VISITOR,INTERFACE_NAME:()=>i.INTERFACE_NAME,INTERNET_CONNECTION:()=>i.INTERNET_CONNECTION,IP:()=>i.IP,LOCATION_CITY:()=>i.LOCATION_CITY,LOCATION_COUNTRY:()=>i.LOCATION_COUNTRY,LOCATION_LAT:()=>i.LOCATION_LAT,LOCATION_LONG:()=>i.LOCATION_LONG,LOCATION_REGION:()=>i.LOCATION_REGION,OS_NAME:()=>i.OS_NAME,OS_VERSION_CODE:()=>i.OS_VERSION_CODE,OS_VERSION_NAME:()=>i.OS_VERSION_NAME,Visitor:()=>o.Visitor,Flag:()=>s.Flag,FlagMetadata:()=>s.FlagMetadata,default:()=>a});var t=H("./src/main/Flagship.ts"),e=H("./src/config/index.ts"),r=H("./src/hit/index.ts"),n=H("./src/enum/index.ts"),i=H("./src/enum/FlagshipContext.ts"),o=(H("./src/types.ts"),H("./src/visitor/index.ts")),s=H("./src/flag/index.ts");const a=t.Flagship})(),U})()},t.exports=n(r(2419),r(1539),r(8674),r(4809),r(8309),r(4916),r(5306),r(4603),r(9714),r(7941),r(2526),r(7327),r(5003),r(4747),r(9337),r(2222),r(6992),r(1532),r(8783),r(3948),r(6699),r(2023),r(2479),r(3161),r(9653),r(3689),r(9720),r(1038),r(4723),r(1249),r(2087),r(7042),r(1817),r(2165),r(9826),r(6755),r(7852),r(7727))},821:(t,e,r)=>{"use strict";r.d(e,{e:()=>p,X:()=>h});r(6992),r(1532),r(1539),r(8783),r(3948),r(4747),r(7941),r(2526),r(7327),r(5003),r(9337),r(1817),r(2165),r(7042),r(8309),r(1038);var n=r(6689),i=r.n(n),o=r(3547),s=r(4370);function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={status:{isLoading:!0,isSdkReady:!1}},p=(0,n.createContext)({state:l({},d)}),h=function(t){var e=t.children,r=t.fetchNow,u=t.envId,c=t.apiKey,f=t.decisionMode,h=t.decisionApiUrl,g=t.timeout,v=t.logLevel,y=t.statusChangedCallback,m=t.logManager,_=t.pollingInterval,E=t.visitorData,I=t.onInitStart,b=t.onInitDone,O=t.onBucketingSuccess,T=t.onBucketingFail,A=t.loadingComponent,R=t.onBucketingUpdated,S=t.onUpdate,C=t.enableClientCache,j=t.initialBucketing,N=t.initialCampaigns,k=t.initialModifications,P=t.initialFlagsData,x=t.fetchFlagsOnBucketingUpdated,M=t.activateDeduplicationTime,D=t.hitDeduplicationTime,w=t.visitorCacheImplementation,L=t.hitCacheImplementation,F=t.disableCache,V=t.language,G=new Map;P&&P.forEach?P.forEach((function(t){G.set(t.key,t)})):k&&k.forEach?k.forEach((function(t){G.set(t.key,t)})):N&&(G=(0,s.B$)(N));var H=a((0,n.useState)(l(l({},d),{},{modifications:G})),2),U=H[0],B=H[1],K=a((0,n.useState)(),2),Y=K[0],X=K[1];function W(t){var e={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return B((function(r){return r.status.firstInitSuccess||(e.firstInitSuccess=(new Date).toISOString()),l(l({},r),{},{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:o.Flagship.getConfig(),status:l(l({},r.status),e)})})),e}(0,n.useRef)().current=U,(0,s.N7)((function(){var t;x&&(null===(t=U.visitor)||void 0===t||t.fetchFlags())}),[Y]),(0,s.N7)((function(){Q(!0)}),[JSON.stringify(E)]),(0,n.useEffect)((function(){q()}),[u,c,f]);var z,J=function(t,e){if(e)(0,s.H)(o.Flagship.getConfig(),e.message||e,"onReady");else{var r=W({fsVisitor:t,isSdkReady:!0,isLoading:!1});S&&S({fsModifications:t.modifications,config:o.Flagship.getConfig(),status:r})}},Q=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(E){var e=o.Flagship.newVisitor({visitorId:E.id,context:E.context,isAuthenticated:E.isAuthenticated,hasConsented:E.hasConsented,initialCampaigns:N,initialModifications:k,initialFlagsData:P});null==e||e.on("ready",(function(t){J(e,t)})),r||!e||t||W({fsVisitor:e,isSdkReady:!0,isLoading:!1}),t&&!r&&(null==e||e.fetchFlags())}},$=function(t){switch(y&&y(t),t){case o.FlagshipStatus.STARTING:t===o.FlagshipStatus.STARTING&&I&&I();break;case o.FlagshipStatus.READY_PANIC_ON:case o.FlagshipStatus.READY:b&&b(),Q();break;case o.FlagshipStatus.NOT_INITIALIZED:B((function(t){return l(l({},t),{},{config:o.Flagship.getConfig()})}))}},Z=function(t){R&&R(t),X(t)},q=function(){o.Flagship.start(u,c,{decisionMode:f,fetchNow:r,timeout:g,logLevel:v,statusChangedCallback:$,logManager:m,pollingInterval:_,onBucketingFail:T,onBucketingSuccess:O,enableClientCache:C,decisionApiUrl:h,onBucketingUpdated:Z,initialBucketing:j,activateDeduplicationTime:M,hitDeduplicationTime:D,visitorCacheImplementation:w,hitCacheImplementation:L,disableCache:F,language:V})};return i().createElement(p.Provider,{value:{state:U,setState:B}},(z=!U.visitor,U.status.isLoading&&A&&z&&r?i().createElement(i().Fragment,null,A):i().createElement(i().Fragment,null,e)))};h.defaultProps={activateDeduplicationTime:2,hitDeduplicationTime:2,fetchNow:!0,language:1}},4927:(t,e,r)=>{"use strict";r.d(e,{UM:()=>j,pc:()=>C,Nf:()=>S,nr:()=>O,_X:()=>A,GW:()=>b});r(5666),r(4747),r(1539),r(8674),r(1038),r(8783),r(2526),r(1817),r(2165),r(6992),r(3948),r(7042),r(8309),r(7941),r(7327),r(5003),r(9337);var n=r(6689),i=r(821),o=r(4370),s=r(3547),a=r.n(s),u="flagship Visitor not initialized.",c="fsVisitor not initialized, returns default value";function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var f=function(){function t(e){var r,n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=void 0,(n="_defaultValue")in(r=this)?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,(0,o.yN)(a().getConfig(),u,"GetFlag"),this._defaultValue=e}var e,r,n;return e=t,(r=[{key:"getValue",value:function(){return(0,o.yN)(a().getConfig(),u,"getValue"),this._defaultValue}},{key:"exists",value:function(){return(0,o.yN)(a().getConfig(),u,"exists"),!1}},{key:"userExposed",value:function(){return(0,o.yN)(a().getConfig(),u,"userExposed"),Promise.resolve()}},{key:"metadata",get:function(){return(0,o.yN)(a().getConfig(),u,"metadata"),s.FlagMetadata.Empty()}}])&&l(e.prototype,r),n&&l(e,n),t}();function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){y(o,n,i,s,a,"next",t)}function a(t){y(o,n,i,s,a,"throw",t)}s(void 0)}))}}function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}var E=function(t,e){return"object"===_(t)&&"object"===_(e)&&Array.isArray(t)===Array.isArray(e)||_(t)===_(e)},I=function(t){var e=t.visitor,r=t.params,n=t.activateAll,i=t.state,s=t.functionName,a=t.config;if(e)return e.getModificationsSync(r,n);var u=!i.status.isSdkReady&&!!i.modifications&&i.modifications.size>0,l={};return u?(r.forEach((function(t){var e,r=null===(e=i.modifications)||void 0===e?void 0:e.get(t.key);r&&E(null==r?void 0:r.value,t.defaultValue)?l[t.key]=r.value:l[t.key]=t.defaultValue})),l):((0,o.yN)(a,c,s),r.forEach((function(t){l[t.key]=t.defaultValue})),l)},b=function(t,e){var r=(0,n.useContext)(i.e).state,o=r.visitor,s=r.config;return I({functionName:"useFsModifications",state:r,visitor:o,config:s,params:t,activateAll:e})},O=function(t){var e,r=(0,n.useContext)(i.e).state,s=r.visitor,a=r.config;if(s)return s.getModificationSync(t);var u=null===(e=r.modifications)||void 0===e?void 0:e.get(t.key);return!r.status.isSdkReady&&u&&E(null==u?void 0:u.value,t.defaultValue)?u.value:((0,o.yN)(a,c,"useFsModifications"),t.defaultValue)},T=function(t){var e,r=t.key,n=t.visitor,i=t.state;if(n)return n.getModificationInfoSync(r);var o=null===(e=i.modifications)||void 0===e?void 0:e.get(r);return!i.status.isSdkReady&&o?o:null},A=function(t){var e=(0,n.useContext)(i.e).state,r=e.visitor;return T({key:t,state:e,visitor:r})},R=function(){var t=m(regeneratorRuntime.mark((function t(e,r,n,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n){t.next=4;break}return(0,o.yN)(i,u,r),t.abrupt("return");case 4:return t.next=6,n.activateModifications(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),(0,o.yN)(i,t.t0.message||t.t0,r);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,r,n,i){return t.apply(this,arguments)}}(),S=function(t,e){var r=(0,n.useContext)(i.e).state.visitor;return r?r.getFlag(t,e):new f(e)},C=function(){var t=m(regeneratorRuntime.mark((function t(e){var r,o,s,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,n.useContext)(i.e),o=r.state,s=o.visitor,a=o.config,"useFsModifications",t.next=5,R(e,"useFsModifications",s,a);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=(0,n.useContext)(i.e).state,e=t.visitor,r=t.config,s=null==e?void 0:e.getModificationsArray();!t.status.isSdkReady&&t.modifications&&(s=Array.from(t.modifications,(function(t){var e=g(t,2);e[0];return e[1]})));var a=function(){var t=m(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"activateModification",t.next=3,R(n,"activateModification",e,r);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),c=function(){var t=m(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=3;break}return(0,o.yN)(r,u,"synchronizeModifications"),t.abrupt("return");case 3:return t.next=5,e.synchronizeModifications();case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{visitorId:null==e?void 0:e.visitorId,anonymousId:null==e?void 0:e.anonymousId,context:p({},null==e?void 0:e.context),hasConsented:null==e?void 0:e.hasConsented,setConsent:function(t){e?e.setConsent(t):(0,o.yN)(r,u,"setConsent")},updateContext:function(t){e?(e.clearContext(),e.updateContext(t)):(0,o.H)(r,u,"updateContext")},clearContext:function(){e?e.clearContext():(0,o.H)(r,u,"cleanContext")},authenticate:function(t){e?e.authenticate(t):(0,o.H)(r,u,"authenticate")},unauthenticate:function(){e?e.unauthenticate():(0,o.H)(r,u,"unauthenticate")},status:t.status,activateModification:a,synchronizeModifications:c,getModifications:function(n,i){return I({functionName:"getModifications",state:t,visitor:e,config:r,params:n,activateAll:i})},modifications:s||[],FlagsData:(null==e?void 0:e.getFlagsDataArray())||[],getModificationInfo:function(r){return T({key:r,state:t,visitor:e})},hit:{send:function(t){return e?e.sendHit(t):((0,o.H)(r,u,"sendHit"),Promise.resolve())},sendMultiple:function(t){return e?e.sendHits(t):((0,o.H)(r,u,"sendHits"),Promise.resolve())}},getFlag:function(t,r){return e?e.getFlag(t,r):new f(r)},fetchFlags:function(){return e?e.fetchFlags():((0,o.yN)(r,u,"fetchFlags"),Promise.resolve())}}}},4370:(t,e,r)=>{"use strict";r.d(e,{H:()=>o,yN:()=>s,B$:()=>a,N7:()=>u});r(6992),r(1532),r(1539),r(8783),r(3948),r(4747),r(4916),r(5306),r(9714);var n=r(3547),i=r(6689);function o(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<n.LogLevel.ERROR)&&t.logManager.error(e,r)}function s(t,e,r){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<n.LogLevel.WARNING)&&t.logManager.warning(e,r)}var a=function(t){var e=new Map;return t&&Array.isArray(t)?(t.forEach((function(t){var r=t.variation.modifications.value;for(var n in r){var i=r[n];e.set(n,{key:n,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:i})}})),e):e};function u(t,e){var r=(0,i.useRef)(!0);(0,i.useEffect)((function(){if(!r.current)return"function"==typeof t?t():void 0;r.current=!1}),e)}},9662:(t,e,r)=>{var n=r(614),i=r(6330);t.exports=function(t){if(n(t))return t;throw TypeError(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),i=r(6330);t.exports=function(t){if(n(t))return t;throw TypeError(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614);t.exports=function(t){if("object"==typeof t||n(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),i=r(30),o=r(3070),s=n("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1530:(t,e,r)=>{"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:t=>{t.exports=function(t,e,r){if(t instanceof e)return t;throw TypeError("Incorrect "+(r?r+" ":"")+"invocation")}},9670:(t,e,r)=>{var n=r(111);t.exports=function(t){if(n(t))return t;throw TypeError(String(t)+" is not an object")}},8533:(t,e,r)=>{"use strict";var n=r(2092).forEach,i=r(9341)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,r)=>{"use strict";var n=r(9974),i=r(7908),o=r(3411),s=r(7659),a=r(4411),u=r(7466),c=r(6135),l=r(8554),f=r(1246);t.exports=function(t){var e=i(t),r=a(this),d=arguments.length,p=d>1?arguments[1]:void 0,h=void 0!==p;h&&(p=n(p,d>2?arguments[2]:void 0,2));var g,v,y,m,_,E,I=f(e),b=0;if(!I||this==Array&&s(I))for(g=u(e.length),v=r?new this(g):Array(g);g>b;b++)E=h?p(e[b],b):e[b],c(v,b,E);else for(_=(m=l(e,I)).next,v=r?new this:[];!(y=_.call(m)).done;b++)E=h?o(m,p,[y.value,b],!0):y.value,c(v,b,E);return v.length=b,v}},1318:(t,e,r)=>{var n=r(5656),i=r(7466),o=r(1400),s=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),l=o(s,c);if(t&&r!=r){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:(t,e,r)=>{var n=r(9974),i=r(8361),o=r(7908),s=r(7466),a=r(5417),u=[].push,c=function(t){var e=1==t,r=2==t,c=3==t,l=4==t,f=6==t,d=7==t,p=5==t||f;return function(h,g,v,y){for(var m,_,E=o(h),I=i(E),b=n(g,v,3),O=s(I.length),T=0,A=y||a,R=e?A(h,O):r||d?A(h,0):void 0;O>T;T++)if((p||T in I)&&(_=b(m=I[T],T,E),t))if(e)R[T]=_;else if(_)switch(t){case 3:return!0;case 5:return m;case 6:return T;case 2:u.call(R,m)}else switch(t){case 4:return!1;case 7:u.call(R,m)}return f?-1:c||l?l:R}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},1194:(t,e,r)=>{var n=r(7293),i=r(5112),o=r(7392),s=i("species");t.exports=function(t){return o>=51||!n((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,r)=>{"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},7475:(t,e,r)=>{var n=r(3157),i=r(4411),o=r(111),s=r(5112)("species");t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===Array||n(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?Array:e}},5417:(t,e,r)=>{var n=r(7475);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},3411:(t,e,r)=>{var n=r(9670),i=r(9212);t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},7072:(t,e,r)=>{var n=r(5112)("iterator"),i=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){i=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},t(o)}catch(t){}return r}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,r)=>{var n=r(1694),i=r(614),o=r(4326),s=r(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),s))?r:a?o(e):"Object"==(n=o(e))&&i(e.callee)?"Arguments":n}},5631:(t,e,r)=>{"use strict";var n=r(3070).f,i=r(30),o=r(2248),s=r(9974),a=r(5787),u=r(408),c=r(654),l=r(6340),f=r(9781),d=r(2423).fastKey,p=r(9909),h=p.set,g=p.getterFor;t.exports={getConstructor:function(t,e,r,c){var l=t((function(t,n){a(t,l,e),h(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&u(n,t[c],{that:t,AS_ENTRIES:r})})),p=g(e),v=function(t,e,r){var n,i,o=p(t),s=y(t,e);return s?s.value=r:(o.last=s={index:i=d(e,!0),key:e,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),f?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},y=function(t,e){var r,n=p(t),i=d(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return o(l.prototype,{clear:function(){for(var t=p(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,r=p(e),n=y(e,t);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),f?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=p(this),n=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(l.prototype,r?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&n(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",i=g(e),o=g(n);c(t,e,(function(t,e){h(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},7710:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(4705),s=r(1320),a=r(2423),u=r(408),c=r(5787),l=r(614),f=r(111),d=r(7293),p=r(7072),h=r(8003),g=r(9587);t.exports=function(t,e,r){var v=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),m=v?"set":"add",_=i[t],E=_&&_.prototype,I=_,b={},O=function(t){var e=E[t];s(E,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(o(t,!l(_)||!(y||E.forEach&&!d((function(){(new _).entries().next()})))))I=r.getConstructor(e,t,v,m),a.enable();else if(o(t,!0)){var T=new I,A=T[m](y?{}:-0,1)!=T,R=d((function(){T.has(1)})),S=p((function(t){new _(t)})),C=!y&&d((function(){for(var t=new _,e=5;e--;)t[m](e,e);return!t.has(-0)}));S||((I=e((function(e,r){c(e,I,t);var n=g(new _,e,I);return null!=r&&u(r,n[m],{that:n,AS_ENTRIES:v}),n}))).prototype=E,E.constructor=I),(R||C)&&(O("delete"),O("has"),v&&O("get")),(C||A)&&O(m),y&&E.clear&&delete E.clear}return b[t]=I,n({global:!0,forced:I!=_},b),h(I,t),y||r.setStrong(I,t,v),I}},9920:(t,e,r)=>{var n=r(6656),i=r(3887),o=r(1236),s=r(3070);t.exports=function(t,e){for(var r=i(e),a=s.f,u=o.f,c=0;c<r.length;c++){var l=r[c];n(t,l)||a(t,l,u(e,l))}}},4964:(t,e,r)=>{var n=r(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,i=r(30),o=r(9114),s=r(8003),a=r(7497),u=function(){return this};t.exports=function(t,e,r){var c=e+" Iterator";return t.prototype=i(n,{next:o(1,r)}),s(t,c,!1,!0),a[c]=u,t}},8880:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9114);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,r)=>{"use strict";var n=r(4948),i=r(3070),o=r(9114);t.exports=function(t,e,r){var s=n(e);s in t?i.f(t,s,o(0,r)):t[s]=r}},654:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(6530),s=r(614),a=r(4994),u=r(9518),c=r(7674),l=r(8003),f=r(8880),d=r(1320),p=r(5112),h=r(7497),g=r(3383),v=o.PROPER,y=o.CONFIGURABLE,m=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,E=p("iterator"),I="keys",b="values",O="entries",T=function(){return this};t.exports=function(t,e,r,o,p,g,A){a(r,e,o);var R,S,C,j=function(t){if(t===p&&M)return M;if(!_&&t in P)return P[t];switch(t){case I:case b:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},N=e+" Iterator",k=!1,P=t.prototype,x=P[E]||P["@@iterator"]||p&&P[p],M=!_&&x||j(p),D="Array"==e&&P.entries||x;if(D&&(R=u(D.call(new t)))!==Object.prototype&&R.next&&(i||u(R)===m||(c?c(R,m):s(R[E])||d(R,E,T)),l(R,N,!0,!0),i&&(h[N]=T)),v&&p==b&&x&&x.name!==b&&(!i&&y?f(P,"name",b):(k=!0,M=function(){return x.call(this)})),p)if(S={values:j(b),keys:g?M:j(I),entries:j(O)},A)for(C in S)(_||k||!(C in P))&&d(P,C,S[C]);else n({target:e,proto:!0,forced:_||k},S);return i&&!A||P[E]===M||d(P,E,M,{name:p}),h[e]=M,S}},7235:(t,e,r)=>{var n=r(857),i=r(6656),o=r(6061),s=r(3070).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||s(e,t,{value:o.f(t)})}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,r)=>{var n=r(7854),i=r(111),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7871:t=>{t.exports="object"==typeof window},1528:(t,e,r)=>{var n=r(8113),i=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==i.Pebble},6833:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),i=r(7854);t.exports="process"==n(i.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,i,o=r(7854),s=r(8113),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l?i=(n=l.split("."))[0]<4?1:n[0]+n[1]:s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=n[1]),t.exports=i&&+i},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,r)=>{var n=r(7854),i=r(1236).f,o=r(8880),s=r(1320),a=r(3505),u=r(9920),c=r(4705);t.exports=function(t,e){var r,l,f,d,p,h=t.target,g=t.global,v=t.stat;if(r=g?n:v?n[h]||a(h,{}):(n[h]||{}).prototype)for(l in e){if(d=e[l],f=t.noTargetGet?(p=i(r,l))&&p.value:r[l],!c(g?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(r,l,d,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,r)=>{"use strict";r(4916);var n=r(1320),i=r(2261),o=r(7293),s=r(5112),a=r(8880),u=s("species"),c=RegExp.prototype;t.exports=function(t,e,r,l){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!p||r){var h=/./[f],g=e(f,""[t],(function(t,e,r,n,o){var s=e.exec;return s===i||s===c.exec?d&&!o?{done:!0,value:h.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));n(String.prototype,t,g[0]),n(c,f,g[1])}l&&a(c[f],"sham",!0)}},6677:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:(t,e,r)=>{var n=r(9662);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},7065:(t,e,r)=>{"use strict";var n=r(9662),i=r(111),o=[].slice,s={},a=function(t,e,r){if(!(e in s)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";s[e]=Function("C,a","return new C("+n.join(",")+")")}return s[e](t,r)};t.exports=Function.bind||function(t){var e=n(this),r=o.call(arguments,1),s=function(){var n=r.concat(o.call(arguments));return this instanceof s?a(e,n.length,n):e.apply(t,n)};return i(e.prototype)&&(s.prototype=e.prototype),s}},6530:(t,e,r)=>{var n=r(9781),i=r(6656),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5005:(t,e,r)=>{var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),i=r(8173),o=r(7497),s=r(5112)("iterator");t.exports=function(t){if(null!=t)return i(t,s)||i(t,"@@iterator")||o[n(t)]}},8554:(t,e,r)=>{var n=r(9662),i=r(9670),o=r(1246);t.exports=function(t,e){var r=arguments.length<2?o(t):e;if(n(r))return i(r.call(t));throw TypeError(String(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},647:(t,e,r)=>{var n=r(7908),i=Math.floor,o="".replace,s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,u,c,l){var f=r+t.length,d=u.length,p=a;return void 0!==c&&(c=n(c),p=s),o.call(l,p,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(f);case"<":s=c[o.slice(1,-1)];break;default:var a=+o;if(0===a)return n;if(a>d){var l=i(a/10);return 0===l?n:l<=d?void 0===u[l-1]?o.charAt(1):u[l-1]+o.charAt(1):n}s=u[a-1]}return void 0===s?"":s}))}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:(t,e,r)=>{var n=r(7908),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(n(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(7293),i=r(4326),o="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},9587:(t,e,r)=>{var n=r(614),i=r(111),o=r(7674);t.exports=function(t,e,r){var s,a;return o&&n(s=e.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(t,a),t}},2788:(t,e,r)=>{var n=r(614),i=r(5465),o=Function.toString;n(i.inspectSource)||(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},2423:(t,e,r)=>{var n=r(2109),i=r(3501),o=r(111),s=r(6656),a=r(3070).f,u=r(8006),c=r(1156),l=r(9711),f=r(6677),d=!1,p=l("meta"),h=0,g=Object.isExtensible||function(){return!0},v=function(t){a(t,p,{value:{objectID:"O"+h++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},d=!0;var t=u.f,e=[].splice,r={};r[p]=1,t(r).length&&(u.f=function(r){for(var n=t(r),i=0,o=n.length;i<o;i++)if(n[i]===p){e.call(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,p)){if(!g(t))return"F";if(!e)return"E";v(t)}return t[p].objectID},getWeakData:function(t,e){if(!s(t,p)){if(!g(t))return!0;if(!e)return!1;v(t)}return t[p].weakData},onFreeze:function(t){return f&&d&&g(t)&&!s(t,p)&&v(t),t}};i[p]=!0},9909:(t,e,r)=>{var n,i,o,s=r(8536),a=r(7854),u=r(111),c=r(8880),l=r(6656),f=r(5465),d=r(6200),p=r(3501),h="Object already initialized",g=a.WeakMap;if(s||f.state){var v=f.state||(f.state=new g),y=v.get,m=v.has,_=v.set;n=function(t,e){if(m.call(v,t))throw new TypeError(h);return e.facade=t,_.call(v,t,e),e},i=function(t){return y.call(v,t)||{}},o=function(t){return m.call(v,t)}}else{var E=d("state");p[E]=!0,n=function(t,e){if(l(t,E))throw new TypeError(h);return e.facade=t,c(t,E,e),e},i=function(t){return l(t,E)?t[E]:{}},o=function(t){return l(t,E)}}t.exports={set:n,get:i,has:o,enforce:function(t){return o(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),i=r(7497),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||s[o]===t)}},3157:(t,e,r)=>{var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(7293),i=r(614),o=r(648),s=r(5005),a=r(2788),u=[],c=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,f=l.exec,d=!l.exec((function(){})),p=function(t){if(!i(t))return!1;try{return c(Object,u,t),!0}catch(t){return!1}};t.exports=!c||n((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!f.call(l,a(t))}:p},4705:(t,e,r)=>{var n=r(7293),i=r(614),o=/#|\.prototype\./,s=function(t,e){var r=u[a(t)];return r==l||r!=c&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},8730:(t,e,r)=>{var n=r(111),i=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&i(t)===t}},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},7850:(t,e,r)=>{var n=r(111),i=r(4326),o=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,r)=>{var n=r(614),i=r(5005),o=r(3307);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return n(e)&&Object(t)instanceof e}},408:(t,e,r)=>{var n=r(9670),i=r(7659),o=r(7466),s=r(9974),a=r(8554),u=r(1246),c=r(9212),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,d,p,h,g,v,y,m=r&&r.that,_=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),I=!(!r||!r.INTERRUPTED),b=s(e,m,1+_+I),O=function(t){return f&&c(f,"normal",t),new l(!0,t)},T=function(t){return _?(n(t),I?b(t[0],t[1],O):b(t[0],t[1])):I?b(t,O):b(t)};if(E)f=t;else{if(!(d=u(t)))throw TypeError(String(t)+" is not iterable");if(i(d)){for(p=0,h=o(t.length);h>p;p++)if((g=T(t[p]))&&g instanceof l)return g;return new l(!1)}f=a(t,d)}for(v=f.next;!(y=v.call(f)).done;){try{g=T(y.value)}catch(t){c(f,"throw",t)}if("object"==typeof g&&g&&g instanceof l)return g}return new l(!1)}},9212:(t,e,r)=>{var n=r(9670),i=r(8173);t.exports=function(t,e,r){var o,s;n(t);try{if(!(o=i(t,"return"))){if("throw"===e)throw r;return r}o=o.call(t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return n(o),r}},3383:(t,e,r)=>{"use strict";var n,i,o,s=r(7293),a=r(614),u=r(30),c=r(9518),l=r(1320),f=r(5112),d=r(1913),p=f("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=c(c(o)))!==Object.prototype&&(n=i):h=!0),null==n||s((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=u(n)),a(n[p])||l(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},7497:t=>{t.exports={}},5948:(t,e,r)=>{var n,i,o,s,a,u,c,l,f=r(7854),d=r(1236).f,p=r(261).set,h=r(6833),g=r(1528),v=r(1036),y=r(5268),m=f.MutationObserver||f.WebKitMutationObserver,_=f.document,E=f.process,I=f.Promise,b=d(f,"queueMicrotask"),O=b&&b.value;O||(n=function(){var t,e;for(y&&(t=E.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?s():o=void 0,t}}o=void 0,t&&t.enter()},h||y||v||!m||!_?!g&&I&&I.resolve?((c=I.resolve(void 0)).constructor=I,l=c.then,s=function(){l.call(c,n)}):s=y?function(){E.nextTick(n)}:function(){p.call(f,n)}:(a=!0,u=_.createTextNode(""),new m(n).observe(u,{characterData:!0}),s=function(){u.data=a=!a})),t.exports=O||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,s()),o=e}},3366:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},133:(t,e,r)=>{var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(t,e,r)=>{var n=r(7854),i=r(614),o=r(2788),s=n.WeakMap;t.exports=i(s)&&/native code/.test(o(s))},8523:(t,e,r)=>{"use strict";var n=r(9662),i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},3929:(t,e,r)=>{var n=r(7850);t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},30:(t,e,r)=>{var n,i=r(9670),o=r(6048),s=r(748),a=r(3501),u=r(490),c=r(317),l=r(6200),f=l("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&n?h(n):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(n);for(var r=s.length;r--;)delete g.prototype[s[r]];return g()};a[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d.prototype=i(t),r=new d,d.prototype=null,r[f]=t):r=g(),void 0===e?r:o(r,e)}},6048:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(9670),s=r(1956);t.exports=n?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),a=n.length,u=0;a>u;)i.f(t,r=n[u++],e[r]);return t}},3070:(t,e,r)=>{var n=r(9781),i=r(4664),o=r(9670),s=r(4948),a=Object.defineProperty;e.f=n?a:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),i=r(5296),o=r(9114),s=r(5656),a=r(4948),u=r(6656),c=r(4664),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=s(t),e=a(e),c)try{return l(t,e)}catch(t){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},1156:(t,e,r)=>{var n=r(5656),i=r(8006).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},8006:(t,e,r)=>{var n=r(6324),i=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(6656),i=r(614),o=r(7908),s=r(6200),a=r(8544),u=s("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){var e=o(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof Object?c:null}},6324:(t,e,r)=>{var n=r(6656),i=r(5656),o=r(1318).indexOf,s=r(3501);t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)!n(s,r)&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},1956:(t,e,r)=>{var n=r(6324),i=r(748);t.exports=Object.keys||function(t){return n(t,i)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(9670),i=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,o){return n(r),i(o),e?t.call(r,o):r.__proto__=o,r}}():void 0)},4699:(t,e,r)=>{var n=r(9781),i=r(1956),o=r(5656),s=r(5296).f,a=function(t){return function(e){for(var r,a=o(e),u=i(a),c=u.length,l=0,f=[];c>l;)r=u[l++],n&&!s.call(a,r)||f.push(t?[r,a[r]]:a[r]);return f}};t.exports={entries:a(!0),values:a(!1)}},288:(t,e,r)=>{"use strict";var n=r(1694),i=r(648);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,r)=>{var n=r(614),i=r(111);t.exports=function(t,e){var r,o;if("string"===e&&n(r=t.toString)&&!i(o=r.call(t)))return o;if(n(r=t.valueOf)&&!i(o=r.call(t)))return o;if("string"!==e&&n(r=t.toString)&&!i(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),i=r(8006),o=r(5181),s=r(9670);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=o.f;return r?e.concat(r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,r)=>{var n=r(9670),i=r(111),o=r(8523);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},2248:(t,e,r)=>{var n=r(1320);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},1320:(t,e,r)=>{var n=r(7854),i=r(614),o=r(6656),s=r(8880),a=r(3505),u=r(2788),c=r(9909),l=r(6530).CONFIGURABLE,f=c.get,d=c.enforce,p=String(String).split("String");(t.exports=function(t,e,r,u){var c,f=!!u&&!!u.unsafe,h=!!u&&!!u.enumerable,g=!!u&&!!u.noTargetGet,v=u&&void 0!==u.name?u.name:e;i(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||l&&r.name!==v)&&s(r,"name",v),(c=d(r)).source||(c.source=p.join("string"==typeof v?v:""))),t!==n?(f?!g&&t[e]&&(h=!0):delete t[e],h?t[e]=r:s(t,e,r)):h?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return i(this)&&f(this).source||u(this)}))},7651:(t,e,r)=>{var n=r(9670),i=r(614),o=r(4326),s=r(2261);t.exports=function(t,e){var r=t.exec;if(i(r)){var a=r.call(t,e);return null!==a&&n(a),a}if("RegExp"===o(t))return s.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")}},2261:(t,e,r)=>{"use strict";var n,i,o=r(1340),s=r(7066),a=r(2999),u=r(2309),c=r(30),l=r(9909).get,f=r(9441),d=r(7168),p=RegExp.prototype.exec,h=u("native-string-replace",String.prototype.replace),g=p,v=(n=/a/,i=/b*/g,p.call(n,"a"),p.call(i,"a"),0!==n.lastIndex||0!==i.lastIndex),y=a.UNSUPPORTED_Y||a.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(v||m||y||f||d)&&(g=function(t){var e,r,n,i,a,u,f,d=this,_=l(d),E=o(t),I=_.raw;if(I)return I.lastIndex=d.lastIndex,e=g.call(I,E),d.lastIndex=I.lastIndex,e;var b=_.groups,O=y&&d.sticky,T=s.call(d),A=d.source,R=0,S=E;if(O&&(-1===(T=T.replace("y","")).indexOf("g")&&(T+="g"),S=E.slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==E.charAt(d.lastIndex-1))&&(A="(?: "+A+")",S=" "+S,R++),r=new RegExp("^(?:"+A+")",T)),m&&(r=new RegExp("^"+A+"$(?!\\s)",T)),v&&(n=d.lastIndex),i=p.call(O?r:d,S),O?i?(i.input=i.input.slice(R),i[0]=i[0].slice(R),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:v&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),m&&i&&i.length>1&&h.call(i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&b)for(i.groups=u=c(null),a=0;a<b.length;a++)u[(f=b[a])[0]]=i[f[1]];return i}),t.exports=g},7066:(t,e,r)=>{"use strict";var n=r(9670);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;e.UNSUPPORTED_Y=n((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},9441:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,r)=>{var n=r(7293),i=r(7854).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){try{Object.defineProperty(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},6340:(t,e,r)=>{"use strict";var n=r(5005),i=r(3070),o=r(5112),s=r(9781),a=o("species");t.exports=function(t){var e=n(t),r=i.f;s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,i=r(6656),o=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,r)=>{var n=r(7854),i=r(3505),o="__core-js_shared__",s=n[o]||i(o,{});t.exports=s},2309:(t,e,r)=>{var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,r)=>{var n=r(9670),i=r(9483),o=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[o])?e:i(r)}},8710:(t,e,r)=>{var n=r(9958),i=r(1340),o=r(4488),s=function(t){return function(e,r){var s,a,u=i(o(e)),c=n(r),l=u.length;return c<0||c>=l?t?"":void 0:(s=u.charCodeAt(c))<55296||s>56319||c+1===l||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):s:t?u.slice(c,c+2):a-56320+(s-55296<<10)+65536}};t.exports={codeAt:s(!1),charAt:s(!0)}},3111:(t,e,r)=>{var n=r(4488),i=r(1340),o="["+r(1361)+"]",s=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),u=function(t){return function(e){var r=i(n(e));return 1&t&&(r=r.replace(s,"")),2&t&&(r=r.replace(a,"")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},261:(t,e,r)=>{var n,i,o,s,a=r(7854),u=r(614),c=r(7293),l=r(9974),f=r(490),d=r(317),p=r(6833),h=r(5268),g=a.setImmediate,v=a.clearImmediate,y=a.process,m=a.MessageChannel,_=a.Dispatch,E=0,I={},b="onreadystatechange";try{n=a.location}catch(t){}var O=function(t){if(I.hasOwnProperty(t)){var e=I[t];delete I[t],e()}},T=function(t){return function(){O(t)}},A=function(t){O(t.data)},R=function(t){a.postMessage(String(t),n.protocol+"//"+n.host)};g&&v||(g=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return I[++E]=function(){(u(t)?t:Function(t)).apply(void 0,e)},i(E),E},v=function(t){delete I[t]},h?i=function(t){y.nextTick(T(t))}:_&&_.now?i=function(t){_.now(T(t))}:m&&!p?(s=(o=new m).port2,o.port1.onmessage=A,i=l(s.postMessage,s,1)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!c(R)?(i=R,a.addEventListener("message",A,!1)):i=b in d("script")?function(t){f.appendChild(d("script")).onreadystatechange=function(){f.removeChild(this),O(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:v}},1400:(t,e,r)=>{var n=r(9958),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5656:(t,e,r)=>{var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9958:t=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},7466:(t,e,r)=>{var n=r(9958),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488);t.exports=function(t){return Object(n(t))}},7593:(t,e,r)=>{var n=r(111),i=r(2190),o=r(8173),s=r(2140),a=r(5112)("toPrimitive");t.exports=function(t,e){if(!n(t)||i(t))return t;var r,u=o(t,a);if(u){if(void 0===e&&(e="default"),r=u.call(t,e),!n(r)||i(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:(t,e,r)=>{var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:String(e)}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648);t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},6330:t=>{t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},9711:t=>{var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},3307:(t,e,r)=>{var n=r(133);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(t,e,r)=>{var n=r(5112);e.f=n},5112:(t,e,r)=>{var n=r(7854),i=r(2309),o=r(6656),s=r(9711),a=r(133),u=r(3307),c=i("wks"),l=n.Symbol,f=u?l:l&&l.withoutSetter||s;t.exports=function(t){return o(c,t)&&(a||"string"==typeof c[t])||(a&&o(l,t)?c[t]=l[t]:c[t]=f("Symbol."+t)),c[t]}},1361:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},2222:(t,e,r)=>{"use strict";var n=r(2109),i=r(7293),o=r(3157),s=r(111),a=r(7908),u=r(7466),c=r(6135),l=r(5417),f=r(1194),d=r(5112),p=r(7392),h=d("isConcatSpreadable"),g=9007199254740991,v="Maximum allowed index exceeded",y=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),m=f("concat"),_=function(t){if(!s(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)};n({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,r,n,i,o,s=a(this),f=l(s,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(_(o=-1===e?s:arguments[e])){if(d+(i=u(o.length))>g)throw TypeError(v);for(r=0;r<i;r++,d++)r in o&&c(f,d,o[r])}else{if(d>=g)throw TypeError(v);c(f,d++,o)}return f.length=d,f}})},7327:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).filter;n({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9826:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).find,o=r(1223),s="find",a=!0;s in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},1038:(t,e,r)=>{var n=r(2109),i=r(8457);n({target:"Array",stat:!0,forced:!r(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,r)=>{"use strict";var n=r(2109),i=r(1318).includes,o=r(1223);n({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:(t,e,r)=>{"use strict";var n=r(5656),i=r(1223),o=r(7497),s=r(9909),a=r(654),u="Array Iterator",c=s.set,l=s.getterFor(u);t.exports=a(Array,"Array",(function(t,e){c(this,{type:u,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},1249:(t,e,r)=>{"use strict";var n=r(2109),i=r(2092).map;n({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},7042:(t,e,r)=>{"use strict";var n=r(2109),i=r(3157),o=r(4411),s=r(111),a=r(1400),u=r(7466),c=r(5656),l=r(6135),f=r(5112),d=r(1194)("slice"),p=f("species"),h=[].slice,g=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,f,d=c(this),v=u(d.length),y=a(t,v),m=a(void 0===e?v:e,v);if(i(d)&&(r=d.constructor,(o(r)&&(r===Array||i(r.prototype))||s(r)&&null===(r=r[p]))&&(r=void 0),r===Array||void 0===r))return h.call(d,y,m);for(n=new(void 0===r?Array:r)(g(m-y,0)),f=0;y<m;y++,f++)y in d&&l(n,f,d[y]);return n.length=f,n}})},8309:(t,e,r)=>{var n=r(9781),i=r(6530).EXISTS,o=r(3070).f,s=Function.prototype,a=s.toString,u=/^\s*function ([^ (]*)/;n&&!i&&o(s,"name",{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(t){return""}}})},1532:(t,e,r)=>{"use strict";var n=r(7710),i=r(5631);t.exports=n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3689:(t,e,r)=>{var n=r(2109),i=Math.ceil,o=Math.floor;n({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},9653:(t,e,r)=>{"use strict";var n=r(9781),i=r(7854),o=r(4705),s=r(1320),a=r(6656),u=r(4326),c=r(9587),l=r(2190),f=r(7593),d=r(7293),p=r(30),h=r(8006).f,g=r(1236).f,v=r(3070).f,y=r(3111).trim,m="Number",_=i.Number,E=_.prototype,I=u(p(E))==m,b=function(t){if(l(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,i,o,s,a,u,c=f(t,"number");if("string"==typeof c&&c.length>2)if(43===(e=(c=y(c)).charCodeAt(0))||45===e){if(88===(r=c.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(s=(o=c.slice(2)).length,a=0;a<s;a++)if((u=o.charCodeAt(a))<48||u>i)return NaN;return parseInt(o,n)}return+c};if(o(m,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var O,T=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof T&&(I?d((function(){E.valueOf.call(r)})):u(r)!=m)?c(new _(b(e)),r,T):b(e)},A=n?h(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),R=0;A.length>R;R++)a(_,O=A[R])&&!a(T,O)&&v(T,O,g(_,O));T.prototype=E,E.constructor=T,s(i,m,T)}},3161:(t,e,r)=>{r(2109)({target:"Number",stat:!0},{isInteger:r(8730)})},9720:(t,e,r)=>{var n=r(2109),i=r(4699).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},5003:(t,e,r)=>{var n=r(2109),i=r(7293),o=r(5656),s=r(1236).f,a=r(9781),u=i((function(){s(1)}));n({target:"Object",stat:!0,forced:!a||u,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},9337:(t,e,r)=>{var n=r(2109),i=r(9781),o=r(3887),s=r(5656),a=r(1236),u=r(6135);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=s(t),i=a.f,c=o(n),l={},f=0;c.length>f;)void 0!==(r=i(n,e=c[f++]))&&u(l,e,r);return l}})},7941:(t,e,r)=>{var n=r(2109),i=r(7908),o=r(1956);n({target:"Object",stat:!0,forced:r(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,r)=>{var n=r(1694),i=r(1320),o=r(288);n||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(t,e,r)=>{var n=r(2109),i=r(4699).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},7727:(t,e,r)=>{"use strict";var n=r(2109),i=r(1913),o=r(3366),s=r(7293),a=r(5005),u=r(614),c=r(6707),l=r(9478),f=r(1320);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&s((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,a("Promise")),r=u(t);return this.then(r?function(r){return l(e,t()).then((function(){return r}))}:t,r?function(r){return l(e,t()).then((function(){throw r}))}:t)}}),!i&&u(o)){var d=a("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},8674:(t,e,r)=>{"use strict";var n,i,o,s,a=r(2109),u=r(1913),c=r(7854),l=r(5005),f=r(3366),d=r(1320),p=r(2248),h=r(7674),g=r(8003),v=r(6340),y=r(9662),m=r(614),_=r(111),E=r(5787),I=r(2788),b=r(408),O=r(7072),T=r(6707),A=r(261).set,R=r(5948),S=r(9478),C=r(842),j=r(8523),N=r(2534),k=r(9909),P=r(4705),x=r(5112),M=r(7871),D=r(5268),w=r(7392),L=x("species"),F="Promise",V=k.get,G=k.set,H=k.getterFor(F),U=f&&f.prototype,B=f,K=U,Y=c.TypeError,X=c.document,W=c.process,z=j.f,J=z,Q=!!(X&&X.createEvent&&c.dispatchEvent),$=m(c.PromiseRejectionEvent),Z="unhandledrejection",q=!1,tt=P(F,(function(){var t=I(B),e=t!==String(B);if(!e&&66===w)return!0;if(u&&!K.finally)return!0;if(w>=51&&/native code/.test(t))return!1;var r=new B((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[L]=n,!(q=r.then((function(){}))instanceof n)||!e&&M&&!$})),et=tt||!O((function(t){B.all(t).catch((function(){}))})),rt=function(t){var e;return!(!_(t)||!m(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;R((function(){for(var n=t.value,i=1==t.state,o=0;r.length>o;){var s,a,u,c=r[o++],l=i?c.ok:c.fail,f=c.resolve,d=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&at(t),t.rejection=1),!0===l?s=n:(p&&p.enter(),s=l(n),p&&(p.exit(),u=!0)),s===c.promise?d(Y("Promise-chain cycle")):(a=rt(s))?a.call(s,f,d):f(s)):d(n)}catch(t){p&&!u&&p.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},it=function(t,e,r){var n,i;Q?((n=X.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!$&&(i=c["on"+t])?i(n):t===Z&&C("Unhandled promise rejection",r)},ot=function(t){A.call(c,(function(){var e,r=t.facade,n=t.value;if(st(t)&&(e=N((function(){D?W.emit("unhandledRejection",n,r):it(Z,r,n)})),t.rejection=D||st(t)?2:1,e.error))throw e.value}))},st=function(t){return 1!==t.rejection&&!t.parent},at=function(t){A.call(c,(function(){var e=t.facade;D?W.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},ut=function(t,e,r){return function(n){t(e,n,r)}},ct=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,nt(t,!0))},lt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Y("Promise can't be resolved itself");var n=rt(e);n?R((function(){var r={done:!1};try{n.call(e,ut(lt,r,t),ut(ct,r,t))}catch(e){ct(r,e,t)}})):(t.value=e,t.state=1,nt(t,!1))}catch(e){ct({done:!1},e,t)}}};if(tt&&(K=(B=function(t){E(this,B,F),y(t),n.call(this);var e=V(this);try{t(ut(lt,e),ut(ct,e))}catch(t){ct(e,t)}}).prototype,(n=function(t){G(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(K,{then:function(t,e){var r=H(this),n=z(T(this,B));return n.ok=!m(t)||t,n.fail=m(e)&&e,n.domain=D?W.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&nt(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n,e=V(t);this.promise=t,this.resolve=ut(lt,e),this.reject=ut(ct,e)},j.f=z=function(t){return t===B||t===o?new i(t):J(t)},!u&&m(f)&&U!==Object.prototype)){s=U.then,q||(d(U,"then",(function(t,e){var r=this;return new B((function(t,e){s.call(r,t,e)})).then(t,e)}),{unsafe:!0}),d(U,"catch",K.catch,{unsafe:!0}));try{delete U.constructor}catch(t){}h&&h(U,K)}a({global:!0,wrap:!0,forced:tt},{Promise:B}),g(B,F,!1,!0),v(F),o=l(F),a({target:F,stat:!0,forced:tt},{reject:function(t){var e=z(this);return e.reject.call(void 0,t),e.promise}}),a({target:F,stat:!0,forced:u||tt},{resolve:function(t){return S(u&&this===o?B:this,t)}}),a({target:F,stat:!0,forced:et},{all:function(t){var e=this,r=z(e),n=r.resolve,i=r.reject,o=N((function(){var r=y(e.resolve),o=[],s=0,a=1;b(t,(function(t){var u=s++,c=!1;o.push(void 0),a++,r.call(e,t).then((function(t){c||(c=!0,o[u]=t,--a||n(o))}),i)})),--a||n(o)}));return o.error&&i(o.value),r.promise},race:function(t){var e=this,r=z(e),n=r.reject,i=N((function(){var i=y(e.resolve);b(t,(function(t){i.call(e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},2419:(t,e,r)=>{var n=r(2109),i=r(5005),o=r(9483),s=r(9670),a=r(111),u=r(30),c=r(7065),l=r(7293),f=i("Reflect","construct"),d=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!l((function(){f((function(){}))})),h=d||p;n({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(p&&!d)return f(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(c.apply(t,n))}var i=r.prototype,l=u(a(i)?i:Object.prototype),h=Function.apply.call(t,l,e);return a(h)?h:l}})},4603:(t,e,r)=>{var n=r(9781),i=r(7854),o=r(4705),s=r(9587),a=r(8880),u=r(3070).f,c=r(8006).f,l=r(7850),f=r(1340),d=r(7066),p=r(2999),h=r(1320),g=r(7293),v=r(6656),y=r(9909).enforce,m=r(6340),_=r(5112),E=r(9441),I=r(7168),b=_("match"),O=i.RegExp,T=O.prototype,A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,S=/a/g,C=new O(R)!==R,j=p.UNSUPPORTED_Y,N=n&&(!C||j||E||I||g((function(){return S[b]=!1,O(R)!=R||O(S)==S||"/a/i"!=O(R,"i")})));if(o("RegExp",N)){for(var k=function(t,e){var r,n,i,o,u,c,p=this instanceof k,h=l(t),g=void 0===e,m=[],_=t;if(!p&&h&&g&&t.constructor===k)return t;if((h||t instanceof k)&&(t=t.source,g&&(e="flags"in _?_.flags:d.call(_))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),_=t,E&&"dotAll"in R&&(n=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),r=e,j&&"sticky"in R&&(i=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),I&&(o=function(t){for(var e,r=t.length,n=0,i="",o=[],s={},a=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(e=t.charAt(n)))e+=t.charAt(++n);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:A.test(t.slice(n+1))&&(n+=2,u=!0),i+=e,c++;continue;case">"===e&&u:if(""===l||v(s,l))throw new SyntaxError("Invalid capture group name");s[l]=!0,o.push([l,c]),u=!1,l="";continue}u?l+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),u=s(O(t,e),p?this:T,k),(n||i||m.length)&&(c=y(u),n&&(c.dotAll=!0,c.raw=k(function(t){for(var e,r=t.length,n=0,i="",o=!1;n<=r;n++)"\\"!==(e=t.charAt(n))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+t.charAt(++n);return i}(t),r)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==_)try{a(u,"source",""===_?"(?:)":_)}catch(t){}return u},P=function(t){t in k||u(k,t,{configurable:!0,get:function(){return O[t]},set:function(e){O[t]=e}})},x=c(O),M=0;x.length>M;)P(x[M++]);T.constructor=k,k.prototype=T,h(i,"RegExp",k)}m("RegExp")},4916:(t,e,r)=>{"use strict";var n=r(2109),i=r(2261);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2087:(t,e,r)=>{var n=r(9781),i=r(3070),o=r(7066),s=r(7293);n&&s((function(){return"sy"!==Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get.call({dotAll:!0,sticky:!0})}))&&i.f(RegExp.prototype,"flags",{configurable:!0,get:o})},9714:(t,e,r)=>{"use strict";var n=r(6530).PROPER,i=r(1320),o=r(9670),s=r(1340),a=r(7293),u=r(7066),c="toString",l=RegExp.prototype,f=l.toString,d=a((function(){return"/a/b"!=f.call({source:"a",flags:"b"})})),p=n&&f.name!=c;(d||p)&&i(RegExp.prototype,c,(function(){var t=o(this),e=s(t.source),r=t.flags;return"/"+e+"/"+s(void 0===r&&t instanceof RegExp&&!("flags"in l)?u.call(t):r)}),{unsafe:!0})},7852:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1236).f,s=r(7466),a=r(1340),u=r(3929),c=r(4488),l=r(4964),f=r(1913),d="".endsWith,p=Math.min,h=l("endsWith");i({target:"String",proto:!0,forced:!!(f||h||(n=o(String.prototype,"endsWith"),!n||n.writable))&&!h},{endsWith:function(t){var e=a(c(this));u(t);var r=arguments.length>1?arguments[1]:void 0,n=s(e.length),i=void 0===r?n:p(s(r),n),o=a(t);return d?d.call(e,o,i):e.slice(i-o.length,i)===o}})},2023:(t,e,r)=>{"use strict";var n=r(2109),i=r(3929),o=r(4488),s=r(1340);n({target:"String",proto:!0,forced:!r(4964)("includes")},{includes:function(t){return!!~s(o(this)).indexOf(s(i(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,i=r(1340),o=r(9909),s=r(654),a="String Iterator",u=o.set,c=o.getterFor(a);s(String,"String",(function(t){u(this,{type:a,string:i(t),index:0})}),(function(){var t,e=c(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=n(r,i),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,r)=>{"use strict";var n=r(7007),i=r(9670),o=r(7466),s=r(1340),a=r(4488),u=r(8173),c=r(1530),l=r(7651);n("match",(function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:u(e,t);return n?n.call(e,r):new RegExp(e)[t](s(r))},function(t){var n=i(this),a=s(t),u=r(e,n,a);if(u.done)return u.value;if(!n.global)return l(n,a);var f=n.unicode;n.lastIndex=0;for(var d,p=[],h=0;null!==(d=l(n,a));){var g=s(d[0]);p[h]=g,""===g&&(n.lastIndex=c(a,o(n.lastIndex),f)),h++}return 0===h?null:p}]}))},5306:(t,e,r)=>{"use strict";var n=r(7007),i=r(7293),o=r(9670),s=r(614),a=r(9958),u=r(7466),c=r(1340),l=r(4488),f=r(1530),d=r(8173),p=r(647),h=r(7651),g=r(5112)("replace"),v=Math.max,y=Math.min,m="$0"==="a".replace(/./,"$0"),_=!!/./[g]&&""===/./[g]("a","$0");n("replace",(function(t,e,r){var n=_?"$":"$0";return[function(t,r){var n=l(this),i=null==t?void 0:d(t,g);return i?i.call(t,n,r):e.call(c(n),t,r)},function(t,i){var l=o(this),d=c(t);if("string"==typeof i&&-1===i.indexOf(n)&&-1===i.indexOf("$<")){var g=r(e,l,d,i);if(g.done)return g.value}var m=s(i);m||(i=c(i));var _=l.global;if(_){var E=l.unicode;l.lastIndex=0}for(var I=[];;){var b=h(l,d);if(null===b)break;if(I.push(b),!_)break;""===c(b[0])&&(l.lastIndex=f(d,u(l.lastIndex),E))}for(var O,T="",A=0,R=0;R<I.length;R++){b=I[R];for(var S=c(b[0]),C=v(y(a(b.index),d.length),0),j=[],N=1;N<b.length;N++)j.push(void 0===(O=b[N])?O:String(O));var k=b.groups;if(m){var P=[S].concat(j,C,d);void 0!==k&&P.push(k);var x=c(i.apply(void 0,P))}else x=p(S,d,C,j,k,i);C>=A&&(T+=d.slice(A,C)+x,A=C+S.length)}return T+d.slice(A)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!m||_)},6755:(t,e,r)=>{"use strict";var n,i=r(2109),o=r(1236).f,s=r(7466),a=r(1340),u=r(3929),c=r(4488),l=r(4964),f=r(1913),d="".startsWith,p=Math.min,h=l("startsWith");i({target:"String",proto:!0,forced:!!(f||h||(n=o(String.prototype,"startsWith"),!n||n.writable))&&!h},{startsWith:function(t){var e=a(c(this));u(t);var r=s(p(arguments.length>1?arguments[1]:void 0,e.length)),n=a(t);return d?d.call(e,n,r):e.slice(r,r+n.length)===n}})},1817:(t,e,r)=>{"use strict";var n=r(2109),i=r(9781),o=r(7854),s=r(6656),a=r(614),u=r(111),c=r(3070).f,l=r(9920),f=o.Symbol;if(i&&a(f)&&(!("description"in f.prototype)||void 0!==f().description)){var d={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new f(t):void 0===t?f():f(t);return""===t&&(d[e]=!0),e};l(p,f);var h=p.prototype=f.prototype;h.constructor=p;var g=h.toString,v="Symbol(test)"==String(f("test")),y=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var t=u(this)?this.valueOf():this,e=g.call(t);if(s(d,t))return"";var r=v?e.slice(7,-1):e.replace(y,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:p})}},2165:(t,e,r)=>{r(7235)("iterator")},2526:(t,e,r)=>{"use strict";var n=r(2109),i=r(7854),o=r(5005),s=r(1913),a=r(9781),u=r(133),c=r(7293),l=r(6656),f=r(3157),d=r(614),p=r(111),h=r(2190),g=r(9670),v=r(7908),y=r(5656),m=r(4948),_=r(1340),E=r(9114),I=r(30),b=r(1956),O=r(8006),T=r(1156),A=r(5181),R=r(1236),S=r(3070),C=r(5296),j=r(1320),N=r(2309),k=r(6200),P=r(3501),x=r(9711),M=r(5112),D=r(6061),w=r(7235),L=r(8003),F=r(9909),V=r(2092).forEach,G=k("hidden"),H="Symbol",U=M("toPrimitive"),B=F.set,K=F.getterFor(H),Y=Object.prototype,X=i.Symbol,W=o("JSON","stringify"),z=R.f,J=S.f,Q=T.f,$=C.f,Z=N("symbols"),q=N("op-symbols"),tt=N("string-to-symbol-registry"),et=N("symbol-to-string-registry"),rt=N("wks"),nt=i.QObject,it=!nt||!nt.prototype||!nt.prototype.findChild,ot=a&&c((function(){return 7!=I(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=z(Y,e);n&&delete Y[e],J(t,e,r),n&&t!==Y&&J(Y,e,n)}:J,st=function(t,e){var r=Z[t]=I(X.prototype);return B(r,{type:H,tag:t,description:e}),a||(r.description=e),r},at=function(t,e,r){t===Y&&at(q,e,r),g(t);var n=m(e);return g(r),l(Z,n)?(r.enumerable?(l(t,G)&&t[G][n]&&(t[G][n]=!1),r=I(r,{enumerable:E(0,!1)})):(l(t,G)||J(t,G,E(1,{})),t[G][n]=!0),ot(t,n,r)):J(t,n,r)},ut=function(t,e){g(t);var r=y(e),n=b(r).concat(dt(r));return V(n,(function(e){a&&!ct.call(r,e)||at(t,e,r[e])})),t},ct=function(t){var e=m(t),r=$.call(this,e);return!(this===Y&&l(Z,e)&&!l(q,e))&&(!(r||!l(this,e)||!l(Z,e)||l(this,G)&&this[G][e])||r)},lt=function(t,e){var r=y(t),n=m(e);if(r!==Y||!l(Z,n)||l(q,n)){var i=z(r,n);return!i||!l(Z,n)||l(r,G)&&r[G][n]||(i.enumerable=!0),i}},ft=function(t){var e=Q(y(t)),r=[];return V(e,(function(t){l(Z,t)||l(P,t)||r.push(t)})),r},dt=function(t){var e=t===Y,r=Q(e?q:y(t)),n=[];return V(r,(function(t){!l(Z,t)||e&&!l(Y,t)||n.push(Z[t])})),n};(u||(X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?_(arguments[0]):void 0,e=x(t),r=function(t){this===Y&&r.call(q,t),l(this,G)&&l(this[G],e)&&(this[G][e]=!1),ot(this,e,E(1,t))};return a&&it&&ot(Y,e,{configurable:!0,set:r}),st(e,t)},j(X.prototype,"toString",(function(){return K(this).tag})),j(X,"withoutSetter",(function(t){return st(x(t),t)})),C.f=ct,S.f=at,R.f=lt,O.f=T.f=ft,A.f=dt,D.f=function(t){return st(M(t),t)},a&&(J(X.prototype,"description",{configurable:!0,get:function(){return K(this).description}}),s||j(Y,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),V(b(rt),(function(t){w(t)})),n({target:H,stat:!0,forced:!u},{for:function(t){var e=_(t);if(l(tt,e))return tt[e];var r=X(e);return tt[e]=r,et[r]=e,r},keyFor:function(t){if(!h(t))throw TypeError(t+" is not a symbol");if(l(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!a},{create:function(t,e){return void 0===e?I(t):ut(I(t),e)},defineProperty:at,defineProperties:ut,getOwnPropertyDescriptor:lt}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:dt}),n({target:"Object",stat:!0,forced:c((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(v(t))}}),W)&&n({target:"JSON",stat:!0,forced:!u||c((function(){var t=X();return"[null]"!=W([t])||"{}"!=W({a:t})||"{}"!=W(Object(t))}))},{stringify:function(t,e,r){for(var n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e,(p(e)||void 0!==t)&&!h(t))return f(e)||(e=function(t,e){if(d(n)&&(e=n.call(this,t,e)),!h(e))return e}),i[1]=e,W.apply(null,i)}});if(!X.prototype[U]){var pt=X.prototype.valueOf;j(X.prototype,U,(function(){return pt.apply(this,arguments)}))}L(X,H),P[G]=!0},4747:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(8533),a=r(8880),u=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(o)},3948:(t,e,r)=>{var n=r(7854),i=r(8324),o=r(8509),s=r(6992),a=r(8880),u=r(5112),c=u("iterator"),l=u("toStringTag"),f=s.values,d=function(t,e){if(t){if(t[c]!==f)try{a(t,c,f)}catch(e){t[c]=f}if(t[l]||a(t,l,e),i[e])for(var r in s)if(t[r]!==s[r])try{a(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var p in i)d(n[p]&&n[p].prototype,p);d(o,"DOMTokenList")},5666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new C(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===i)throw o;return N()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===g)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?h:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",g={};function v(){}function y(){}function m(){}var _={};u(_,o,(function(){return this}));var E=Object.getPrototypeOf,I=E&&E(E(j([])));I&&I!==r&&n.call(I,o)&&(_=I);var b=m.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function j(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=m,u(b,"constructor",m),u(m,"constructor",y),y.displayName=u(m,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},O(T.prototype),u(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new T(c(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(b),u(b,a,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},1030:t=>{"use strict";t.exports=require("abort-controller")},4809:t=>{"use strict";t.exports=require("node-fetch")},6689:t=>{"use strict";t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{FlagshipContext:()=>t.e,FlagshipProvider:()=>t.X,useFlagship:()=>o.UM,useFsActivate:()=>o.pc,useFsFlag:()=>o.Nf,useFsModification:()=>o.nr,useFsModificationInfo:()=>o._X,useFsModifications:()=>o.GW});var t=r(821),e=r(3547),i={};for(const t in e)["default","FlagshipContext","FlagshipProvider"].indexOf(t)<0&&(i[t]=()=>e[t]);r.d(n,i);var o=r(4927)})(),n})()}));
3
3
  //# sourceMappingURL=index.browser.js.map