@flagship.io/react-sdk 3.0.8 → 3.0.9

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.
@@ -19,7 +19,7 @@ return /******/ (() => { // webpackBootstrap
19
19
 
20
20
  /* provided dependency */ var AbortController = __webpack_require__(/*! abort-controller */ "abort-controller");
21
21
  /*! For license information please see index.browser.js.LICENSE.txt */
22
- !function(t,e){if(true)module.exports=e(__webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js"),__webpack_require__(/*! node-fetch */ "node-fetch"),__webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js"),__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js"),__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js"),__webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__(/*! core-js/modules/es.map.js */ "./node_modules/core-js/modules/es.map.js"),__webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js"),__webpack_require__(/*! core-js/modules/es.number.is-integer.js */ "./node_modules/core-js/modules/es.number.is-integer.js"),__webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__(/*! core-js/modules/es.math.trunc.js */ "./node_modules/core-js/modules/es.math.trunc.js"),__webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js"),__webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js"),__webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js"),__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ "./node_modules/core-js/modules/es.regexp.flags.js"),__webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js"),__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__(/*! core-js/modules/es.string.ends-with.js */ "./node_modules/core-js/modules/es.string.ends-with.js"),__webpack_require__(/*! core-js/modules/es.promise.finally.js */ "./node_modules/core-js/modules/es.promise.finally.js"));else { var r, n; }}(self,((t,e,n,r,i,o,s,a,c,u,l,f,h,p,d,g,y,v,m,k,b,j,I,O,_,x,w,C,E,S,A,M,N,R,D,P,T,L)=>(()=>{var V={187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.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(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)}))},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 c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,n,r){var i,o,s,u;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(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,u=l,console&&console.warn&&console.warn(u)}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,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function h(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);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){r.once&&t.removeEventListener(e,i),n(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 c(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);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 c=o[t];if(void 0===c)return!1;if("function"==typeof c)r(c,this,e);else{var u=c.length,l=d(c,u);for(n=0;n<u;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(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 n,r,i,o,s;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(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):[]}},186:t=>{"use strict";t.exports=g},938:t=>{"use strict";t.exports=f},431:t=>{"use strict";t.exports=D},740:t=>{"use strict";t.exports=C},125:t=>{"use strict";t.exports=b},810:t=>{"use strict";t.exports=y},979:t=>{"use strict";t.exports=S},102:t=>{"use strict";t.exports=M},274:t=>{"use strict";t.exports=i},969:t=>{"use strict";t.exports=v},414:t=>{"use strict";t.exports=x},101:t=>{"use strict";t.exports=_},13:t=>{"use strict";t.exports=O},523:t=>{"use strict";t.exports=w},736:t=>{"use strict";t.exports=h},16:t=>{"use strict";t.exports=d},891:t=>{"use strict";t.exports=u},816:e=>{"use strict";e.exports=t},629:t=>{"use strict";t.exports=I},123:t=>{"use strict";t.exports=L},671:t=>{"use strict";t.exports=n},182:t=>{"use strict";t.exports=e},426:t=>{"use strict";t.exports=a},536:t=>{"use strict";t.exports=o},208:t=>{"use strict";t.exports=A},244:t=>{"use strict";t.exports=c},51:t=>{"use strict";t.exports=T},82:t=>{"use strict";t.exports=j},849:t=>{"use strict";t.exports=m},248:t=>{"use strict";t.exports=E},404:t=>{"use strict";t.exports=s},113:t=>{"use strict";t.exports=P},760:t=>{"use strict";t.exports=N},665:t=>{"use strict";t.exports=R},146:t=>{"use strict";t.exports=l},491:t=>{"use strict";t.exports=p},731:t=>{"use strict";t.exports=k},906:t=>{"use strict";t.exports=r},854:()=>{},697:()=>{},61:(t,e,n)=>{var r=n(698).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new w(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=O(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=h(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p={};function d(){}function g(){}function y(){}var v={};l(v,a,(function(){return this}));var m=Object.getPrototypeOf,k=m&&m(m(C([])));k&&k!==n&&o.call(k,a)&&(v=k);var b=y.prototype=d.prototype=Object.create(v);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,s,a,c){var u=h(t[i],t,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function O(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function _(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}return g.prototype=y,l(b,"constructor",y),l(y,"constructor",g),g.displayName=l(y,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},j(I.prototype),l(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new I(f(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},j(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(n){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,n)=>{var r=n(61)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},F={};function H(t){var e=F[t];if(void 0!==e)return e.exports;var n=F[t]={exports:{}};return V[t](n,n.exports,H),n.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 n in e)H.o(e,n)&&!H.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},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 q={};return(()=>{"use strict";function t(e){return t="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(e)}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}function o(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}H.r(q),H.d(q,{APP_VERSION_CODE:()=>Ut,APP_VERSION_NAME:()=>Kt,CARRIER_NAME:()=>Bt,DEVICE_LOCALE:()=>At,DEVICE_MODEL:()=>Nt,DEVICE_TYPE:()=>Mt,DecisionApiConfig:()=>Q,DecisionMode:()=>P,Event:()=>st,EventCategory:()=>et,FLAGSHIP_CLIENT:()=>Yt,FLAGSHIP_CONTEXT:()=>zt,FLAGSHIP_VERSION:()=>Qt,FLAGSHIP_VISITOR:()=>Jt,Flag:()=>fe,FlagMetadata:()=>ee,Flagship:()=>_e,FlagshipStatus:()=>p,HitAbstract:()=>rt,HitType:()=>d,INTERFACE_NAME:()=>Wt,INTERNET_CONNECTION:()=>Gt,IP:()=>Vt,Item:()=>ut,LOCATION_CITY:()=>Rt,LOCATION_COUNTRY:()=>Pt,LOCATION_LAT:()=>Tt,LOCATION_LONG:()=>Lt,LOCATION_REGION:()=>Dt,LogLevel:()=>a,OS_NAME:()=>Ft,OS_VERSION_CODE:()=>qt,OS_VERSION_NAME:()=>Ht,Page:()=>ht,Screen:()=>gt,Transaction:()=>mt,Visitor:()=>T,default:()=>xe}),H(816),H(182),H(671);var a,c=H(187),u={},l="undefined"==typeof window?H(906).default:window.fetch;if("undefined"==typeof window){var f=H(854).Agent,h=H(697).Agent;u.agent=function(t){return"http:"===t.protocol?new f({keepAlive:!0}):new h({keepAlive:!0})}}!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"}(a||(a={}));var p,d,g={name:"TypeScript"},y="https://decision.flagship.io/v2/",v="v3",m="ready",k="Key {0} must not be null. Default value is returned.",b="{0} must be a {1}",j="visitorId must not be null or empty",I="Method {0} is deactivated while SDK status is: {1}.",O="INITIALIZATION",_="UPDATE CONTEXT",x="GET MODIFICATION",w="GET MODIFICATION INFO",C="ACTIVE MODIFICATION",E="SEND HIT",S="cid",A="x-api-key",M="Content-Type",N="x-sdk-client",R="x-sdk-version",D="application/json";!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"}(p||(p={})),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"}(d||(d={}));var P,T=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this)).visitorDelegate=t,e.visitorDelegate.on(m,(function(t){e.emit(m,t)})),e}return n(c,[{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()}}]),c}(c.EventEmitter);function L(t){for(var e=t,n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];e=e.replace(new RegExp("\\{".concat(n,"\\}"),"g"),r)}return e}function V(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<a.ERROR)&&t.logManager.error(e,n)}function F(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<a.INFO)&&t.logManager.info(e,n)}function B(){return"undefined"!=typeof window&&!("Deno"in window)}function G(e,n){return t(e)===t(n)&&("object"!==t(e)||"object"!==t(n)||Array.isArray(e)===Array.isArray(n))}H(274),H(536),H(404),H(426),H(244),function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(P||(P={}));var K=function(){function t(t){var e=t.envId,n=t.apiKey,r=t.timeout,i=t.logLevel,o=t.logManager,s=t.statusChangedCallback,c=t.fetchNow,u=t.decisionMode,l=t.enableClientCache,f=t.initialBucketing,h=t.decisionApiUrl,p=t.activateDeduplicationTime,d=t.hitDeduplicationTime,v=t.visitorCacheImplementation,m=t.hitCacheImplementation,k=t.disableCache;switch(t.language){case 1:g.name="ReactJS";break;case 2:g.name="React-Native";break;default:g.name="undefined"!=typeof window&&"Deno"in window?"Deno":"Typescript"}this.decisionApiUrl=h||y,this._envId=e,this._apiKey=n,this.logLevel=null!=i?i:a.ALL,this.timeout=r||2,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===l||l,this._decisionMode=u||P.DECISION_API,this._initialBucketing=f,this.activateDeduplicationTime=null!=p?p:2.5,this.hitDeduplicationTime=null!=d?d:2.5,this.disableCache=!!k,v&&(this.visitorCacheImplementation=v),m&&(this.hitCacheImplementation=m),o&&(this.logManager=o),this.statusChangedCallback=s}return n(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:V(this,L(b,"activateDeduplicationTime","number"),"activateDeduplicationTime")}},{key:"hitDeduplicationTime",get:function(){return this._hitDeduplicationTime},set:function(t){"number"==typeof t?this._hitDeduplicationTime=t:V(this,L(b,"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:V(this,"statusChangedCallback must be a function","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:V(this,L(b,"decisionApiUrl","string"),"decisionApiUrl")}}]),t}();function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(891),H(146),H(938),H(736),H(491),H(16);var Q=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){return a.call(this,Y(Y({},t),{},{decisionMode:P.DECISION_API}))}return n(c)}(K),J=function(){function t(t,e,n){this._config=t,this._decisionManager=e,this._trackingManager=n}return n(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}();function z(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function Z(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){z(o,r,i,s,a,"next",t)}function a(t){z(o,r,i,s,a,"throw",t)}s(void 0)}))}}var X=H(687),$=H.n(X),tt=(H(186),H(810),H(969),H(849),H(731),function(){function t(t,e){U(this,"_panic",!1),this._config=e,this._httpClient=t}return n(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?p.READY_PANIC_ON:p.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 n=t.variation.modifications.value;for(var r in n){var i=n[r];e.set(r,{key:r,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}());var et,nt=function(t){i(u,t);var e,r,a,c=(r=u,a=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}}(),function(){var t,e=s(r);if(a){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function u(){return c.apply(this,arguments)}return n(u,[{key:"getCampaignsAsync",value:(e=Z($().mark((function t(e){var n,r,i,o,s=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(n={},A,"".concat(this.config.apiKey)),U(n,N,g.name),U(n,R,v),U(n,M,D),r=n,i={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},o="".concat(this.config.decisionApiUrl||y).concat(this.config.envId).concat("/campaigns","?").concat("exposeAllKeys","=true"),e.hasConsented||(o+="&".concat("sendContextEvent","=false")),t.abrupt("return",this._httpClient.postAsync(o,{headers:r,timeout:this.config.timeout,body:i}).then((function(t){s.panic=!!t.body.panic;var e=null;return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return V(s.config,t.message||t,"GET CAMPAIGNS"),null})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),u}(tt),rt=(H(125),H(82),H(629),H(13),H(101),function(){function t(t){var e=t.type,n=t.userIp,r=t.screenResolution,i=t.locale,o=t.sessionNumber;this._type=e,n&&(this.userIp=n),r&&(this.screenResolution=r),i&&(this.locale=i),o&&(this.sessionNumber=o),this._anonymousId=null}return n(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)||(V(this.config,L(b,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||(V(this.config,L(b,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return!!Number.isInteger(t)||(V(this.config,L(b,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e,n=(U(e={},"vid",this.visitorId),U(e,"ds",this.ds),U(e,S,"".concat(null==(t=this.config)?void 0:t.envId)),U(e,"t",this.type),e);return this.userIp&&(n.uip=this.userIp),this.screenResolution&&(n.sr=this.screenResolution),this.locale&&(n.ul=this.locale),this.sessionNumber&&(n.sn=this.sessionNumber),this.visitorId&&this._anonymousId?(n.vid=this._anonymousId,n.cuid=this.visitorId):(n.vid=this._anonymousId||this.visitorId,n.cuid=null),n}},{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}());function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}!function(t){t.ACTION_TRACKING="Action Tracking",t.USER_ENGAGEMENT="User Engagement"}(et||(et={}));var st=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.action,i=t.label,o=t.value;return e.category=n,e.action=r,i&&(e.label=i),o&&(e.value=o),e}return n(c,[{key:"category",get:function(){return this._category},set:function(t){Object.values(et).includes(t)?this._category=t:V(this.config,"The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING","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){!Number.isInteger(t)||t<0?V(this.config,"value must be an integer and be >= 0","value"):this._value=t}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.ec=this.category,e.ea=this.action,this.label&&(e.el=this.label),this.value&&(e.ev=this.value),e}},{key:"toObject",value:function(){return ot(ot({},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"event category and event action are required"}}]),c}(rt);function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?at(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(414);var ut=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.productName,i=t.productSku,o=t.itemCategory,s=t.itemPrice,c=t.itemQuantity;return e.transactionId=n,e.productName=r,e.productSku=i,o&&(e.itemCategory=o),s&&(e.itemPrice=s),c&&(e.itemQuantity=c),e}return n(c,[{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.tid=this.transactionId,e.in=this.productName,e.ic=this.productSku,this.itemPrice&&(e.ip=this.itemPrice),this.itemQuantity&&(e.iq=this.itemQuantity),this.itemCategory&&(e.iv=this.itemCategory),e}},{key:"toObject",value:function(){return ct(ct({},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"Transaction Id, Item name and item code are required"}}]),c}(rt);function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ht=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,{type:d.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,e}return n(c,[{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.dl=this.documentLocation,e}},{key:"toObject",value:function(){return ft(ft({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return"documentLocation url is required"}}]),c}(rt);function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var gt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,{type:d.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,e}return n(c,[{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.dl=this.documentLocation,e}},{key:"toObject",value:function(){return dt(dt({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return"Screen name is required"}}]),c}(rt);function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var mt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.affiliation,i=t.taxes,o=t.currency,s=t.couponCode,c=t.itemCount,u=t.shippingMethod,l=t.paymentMethod,f=t.totalRevenue,h=t.shippingCosts;return e.transactionId=n,e.affiliation=r,i&&(e.taxes=i),o&&(e.currency=o),s&&(e.couponCode=s),c&&(e.itemCount=c),u&&(e.shippingMethod=u),l&&(e.paymentMethod=l),f&&(e.totalRevenue=f),h&&(e.shippingCosts=h),e}return n(c,[{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:V(this.config,L("{0} must be a string and have exactly 3 letters","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.tid=this.transactionId,e.ta=this.affiliation,this.taxes&&(e.tt=this.taxes),this.currency&&(e.tc=this.currency),this.couponCode&&(e.tcc=this.couponCode),this.itemCount&&(e.icn=this.itemCount),this.shippingMethod&&(e.sm=this.shippingMethod),this.paymentMethod&&(e.pm=this.paymentMethod),this.totalRevenue&&(e.tr=this.totalRevenue),this.shippingCosts&&(e.ts=this.shippingCosts),e}},{key:"toObject",value:function(){return vt(vt({},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"Transaction Id and Transaction affiliation are required"}}]),c}(rt);var kt=function(t){i(f,t);var e,r,a,c,u,l=(c=f,u=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}}(),function(){var t,e=s(c);if(u){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function f(){return l.apply(this,arguments)}return n(f,[{key:"sendConsentHit",value:(a=Z($().mark((function t(e){var n,r,i;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(n={},"t",d.EVENT),U(n,"el","".concat(g.name,":").concat(e.hasConsented)),U(n,"ea","fs_consent"),U(n,"ec",et.USER_ENGAGEMENT),U(n,S,this.config.envId),U(n,"ds","APP"),r=n,e.visitorId&&e.anonymousId?(r.vid=e.anonymousId,r.cuid=e.visitorId):(r.vid=e.anonymousId||e.visitorId,r.cuid=null),i=U({},M,D),t.next=5,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:i,timeout:this.config.timeout,body:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"sendActive",value:(r=Z($().mark((function t(e,n){var r,i,o,s,a;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(r={},A,"".concat(this.config.apiKey)),U(r,N,g.name),U(r,R,v),U(r,M,D),o=r,s="".concat(y).concat("activate"),U(i={},"vid",e.visitorId),U(i,"vaid",n.variationId),U(i,"caid",n.variationGroupId),U(i,S,"".concat(this.config.envId)),a=i,e.visitorId&&e.anonymousId?(a.vid=e.visitorId,a.aid=e.anonymousId):(a.vid=e.anonymousId||e.visitorId,a.aid=null),t.next=6,this.httpClient.postAsync(s,{headers:o,timeout:this.config.timeout,body:a});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"sendHit",value:(e=Z($().mark((function t(e){var n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=U({},M,D),t.next=3,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:n,timeout:this.config.timeout,body:e.toApiKeys()});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),f}(function(){function t(t,e){this._httpClient=t,this._config=e}return n(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()),bt=function(){function t(){}return n(t,[{key:"emergency",value:function(t,e){console.error(this.formatOutput(a.EMERGENCY,t,e))}},{key:"alert",value:function(t,e){console.error(this.formatOutput(a.ALERT,t,e))}},{key:"critical",value:function(t,e){console.error(this.formatOutput(a.CRITICAL,t,e))}},{key:"error",value:function(t,e){console.error(this.formatOutput(a.ERROR,t,e))}},{key:"warning",value:function(t,e){console.warn(this.formatOutput(a.WARNING,t,e))}},{key:"notice",value:function(t,e){this.log(a.NOTICE,t,e)}},{key:"info",value:function(t,e){console.info(this.formatOutput(a.INFO,t,e))}},{key:"debug",value:function(t,e){console.debug(this.formatOutput(a.DEBUG,t,e))}},{key:"log",value:function(t,e,n){console.log(this.formatOutput(t,e,n))}},{key:"formatOutput",value:function(t,e,n){var r=new Date,i=function(t){return 1===t.toString().length?"0".concat(t):t};return"[".concat(i(r.getFullYear()),"-").concat(i(r.getMonth()),"-").concat(i(r.getDay())," ").concat(i(r.getHours()),":").concat(i(r.getMinutes()),"] [").concat("Flagship SDK","] [").concat(a[t],"] [").concat(n,"] : ").concat(e)}}]),t}();function jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(t,e):void 0}}(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 Ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(523),H(740);var xt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e,n;return(n=a.call(this,_t(_t({},t),{},{decisionMode:P.BUCKETING}))).pollingInterval=null!=(e=null==t?void 0:t.pollingInterval)?e:1,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 n(c)}(K);function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(248),H(979),H(208);var Et,St=function(){function t(t){this.visitor=t}var e,r,i,o,s,a;return n(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){V(this.config,t.message||t,"updateCampaigns")}}},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||V(this.config,L("trackerManager must not be null."),t),!!e}},{key:"setConsent",value:function(t){var e=this,n="setConsent";this.visitor.hasConsented=t,t||(this.flushHits(),this.flushVisitor()),this.hasTrackingManager(n)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){V(e.config,t.message||t,n)}))}},{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?(F(this.config,L("Visitor ID mismatch: {0} vs {1}",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:(a=Z($().mark((function t(){var e,n;return $().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(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(this.checKLookupVisitorData(n)){t.next=11;break}throw new Error("JSON DATA must fit the type VisitorCacheDTO");case 11:this.visitor.visitorCache=n,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"lookupVisitor");case 17:case"end":return t.stop()}}),t,this,[[0,14]])}))),function(){return a.apply(this,arguments)})},{key:"cacheVisitor",value:(s=Z($().mark((function t(){var e,n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r=this.config.visitorCacheImplementation,!this.config.disableCache&&r&&"function"==typeof r.cacheVisitor){t.next=4;break}return t.abrupt("return");case 4:return i={},(o={version:1,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=Ct(Ct({},null==(e=this.visitor.visitorCache)||null==(n=e.data)?void 0:n.assignmentsHistory),i),t.next=9,r.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),V(this.config,t.t0.message||t.t0,"cacheVisitor");case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return s.apply(this,arguments)})},{key:"flushVisitor",value:(o=Z($().mark((function t(){var e;return $().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),V(this.config,t.t0.message||t.t0,"flushVisitor");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return o.apply(this,arguments)})},{key:"checKLookupHitData",value:function(t){return!!(t&&1===t.version&&t.data&&t.data.type&&t.data.visitorId)||(V(this.config,"JSON DATA must fit the type HitCacheDTO","lookupHits"),!1)}},{key:"lookupHits",value:(i=Z($().mark((function t(){var e,n,r,i,o,s=this;return $().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(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(Array.isArray(n)){t.next=11;break}throw Error("JSON DATA must be an array of object");case 11:if(r=function(t){return(Date.now()-t)/1e3<=144e5},i=[{type:"BATCH",hits:[]}],o=0,n.filter((function(t){return s.checKLookupHitData(t)&&r(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),V(this.config,t.t0.message||t.t0,"lookupHits");case 24:case"end":return t.stop()}}),t,this,[[0,21]])}))),function(){return i.apply(this,arguments)})},{key:"cacheHit",value:(r=Z($().mark((function t(e){var n,r;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.config.hitCacheImplementation,!this.config.disableCache&&n&&"function"==typeof n.cacheHit){t.next=4;break}return t.abrupt("return");case 4:return r={version:1,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,type:e instanceof rt?e.type:"ACTIVATE",content:e instanceof rt?e.toObject():e,time:Date.now()}},t.next=7,n.cacheHit(this.visitor.visitorId,r);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"cacheHit");case 12:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t){return r.apply(this,arguments)})},{key:"flushHits",value:(e=Z($().mark((function t(){var e;return $().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),V(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}(),At="sdk_deviceLanguage",Mt="sdk_deviceType",Nt="sdk_deviceModel",Rt="sdk_city",Dt="sdk_region",Pt="sdk_country",Tt="sdk_lat",Lt="sdk_long",Vt="sdk_ip",Ft="sdk_osName",Ht="sdk_osVersionName",qt="sdk_osVersionCode",Bt="sdk_carrierName",Gt="sdk_internetConnection",Kt="sdk_versionName",Ut="sdk_versionCode",Wt="sdk_interfaceName",Yt="fs_client",Qt="fs_version",Jt="fs_users",zt=(U(Et={},At,"string"),U(Et,Mt,"string"),U(Et,Nt,"string"),U(Et,Rt,"string"),U(Et,Dt,"string"),U(Et,Pt,"string"),U(Et,Tt,"number"),U(Et,Lt,"number"),U(Et,Vt,"string"),U(Et,Ft,"string"),U(Et,Ht,"string"),U(Et,qt,"string"),U(Et,Bt,"string"),U(Et,Gt,"string"),U(Et,Kt,"string"),U(Et,Ut,"string"),U(Et,Wt,"string"),U(Et,Yt,"string"),U(Et,Qt,"string"),U(Et,Jt,"string"),Et);function Zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var $t="BATCH",te=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,Xt(Xt({},t),{},{type:$t}))).hits=t.hits,e}return n(c,[{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.vid,delete e.cid,delete e.uip,delete e.sr,delete e.ul,delete e.sn,delete e.vid,delete e.cuid,e})),e}},{key:"toObject",value:function(){return Xt(Xt({},t.prototype.toObject.call(this)),{},{hits:this.hits.map((function(t){return t.toObject()}))})}},{key:"getErrorMessage",value:function(){return"Please check required fields"}}]),c}(rt),ee=function(){function t(t){var e=t.campaignId,n=t.variationGroupId,r=t.variationId,i=t.isReference,o=t.campaignType,s=t.slug;this.campaignId=e,this.variationGroupId=n,this.variationId=r,this.isReference=i,this.campaignType=o,this.slug=s}return n(t,null,[{key:"Empty",value:function(){return new t({campaignId:"",campaignType:"",variationId:"",variationGroupId:"",isReference:!1,slug:null})}}]),t}();function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ie="property type is required and must ",oe=function(e){i(T,e);var r,a,c,u,l,f,h,p,g,y,v,b,I,O,S,A,M,N,R,D=(N=T,R=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}}(),function(){var t,e=s(N);if(R){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function T(){return D.apply(this,arguments)}return n(T,[{key:"checkPredefinedContext",value:function(t,e){var n=zt[t];if(!n)return null;var r=!1;return"string"===n?r="string"==typeof e:"number"===n&&(r="number"==typeof e),r||V(this.config,L("Predefined Context {0} must be type of {1}",t,n),_),r}},{key:"updateContextKeyValue",value:function(e,n){var r=t(n);if("string"!=typeof e||""===e||"string"!==r&&"number"!==r&&"boolean"!==r)V(this.visitor.config,L("params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",e),_);else if(!e.match(/^fs_/i)){var i=this.checkPredefinedContext(e,n);("boolean"!=typeof i||i)&&(this.visitor.context[e]=n)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var n=t[e];this.updateContextKeyValue(e,n)}else V(this.visitor.config,"Context must not to be null",_)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(e,n){var r=this,i=e.key,o=e.defaultValue,s=e.activate;if(!i||"string"!=typeof i)return V(this.config,L(k,i),x),o;var a=this.visitor.flagsData.get(i);if(!a)return F(this.config,L("No modification for key {0}. Default value is returned.",i),x),o;return"object"===t(a.value)&&"object"===t(o)&&Array.isArray(a.value)!==Array.isArray(o)||t(a.value)!==t(o)?(V(r.config,L("Modification for key {0} has a different type. Default value is returned.",i),x),a.value||!s&&!n||r.activateModification(i),o):((s||n)&&this.activateModification(i),a.value)}},{key:"getModifications",value:(M=Z($().mark((function t(e,n){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationsSync(e,n));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return M.apply(this,arguments)})},{key:"getModificationsSync",value:function(t,e){var n=this,r={};return t.forEach((function(t){r[t.key]=n.checkAndGetModification(t,e)})),r}},{key:"getModification",value:(A=Z($().mark((function t(e){return $().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 A.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(S=Z($().mark((function t(e){return $().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 S.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return t&&"string"==typeof t?this.visitor.flagsData.get(t)||(V(this.visitor.config,L("No modification for key {0}.",t),w),null):(V(this.visitor.config,L(k,t),w),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}}}}))):null}},{key:"globalFetchFlags",value:(O=Z($().mark((function t(e){var n;return $().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:if((n=t.sent)||(n=this.fetchVisitorCampaigns(this.visitor)),n){t.next=7;break}return t.abrupt("return");case 7:this.visitor.campaigns=n,this.visitor.flagsData=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(m),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),this.visitor.emit(m,t.t0),V(this.config,t.t0.message||t.t0,e);case 16:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(t){return O.apply(this,arguments)})},{key:"synchronizeModifications",value:(I=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags("SYNCHRONIZED MODIFICATION"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return I.apply(this,arguments)})},{key:"activateModification",value:(b=Z($().mark((function t(e){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return V(this.config,L("Key {0} must not be null, no activate will be sent.",e),C),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"activateModifications",value:(v=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return V(this.config,L(k,e),C),t.abrupt("return");case 3:e.forEach((function(t){"string"==typeof t?n.activate(t):n.activate(t.key)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"isDeDuplicated",value:function(t,e){if(0===e)return!1;var n=this.visitor.deDuplicationCache[t];return!!(n&&Date.now()-n<=1e3*e)||(this.visitor.deDuplicationCache[t]=Date.now(),this.visitor.clearDeDuplicationCache(e),!1)}},{key:"sendActivate",value:(y=Z($().mark((function t(e){var n,r=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:C,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),V(this.config,t.t0.message||t.t0,n),this.cacheHit(e);case 10:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(t){return y.apply(this,arguments)})},{key:"activate",value:(g=Z($().mark((function t(e){var n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.visitor.flagsData.get(e)){t.next=4;break}return V(this.visitor.config,L("No modification for key {0}, no activate will be sent.",e),C),t.abrupt("return");case 4:if(!this.isDeDuplicated(n.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=6;break}return t.abrupt("return");case 6:if(this.hasTrackingManager(C)){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,this.sendActivate(n);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(E)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(p=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(E)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){return n.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getHitLegacy",value:function(t){var e=null;if(!t||!t.type)return null;var n={type:{Screen:d.SCREEN_VIEW,ScreenView:d.SCREEN_VIEW,Transaction:d.TRANSACTION,Page:d.PAGE_VIEW,PageView:d.PAGE_VIEW,Item:d.ITEM,Event:d.EVENT}[t.type]},r=re(re({},n),t.data);switch(n.type.toUpperCase()){case d.EVENT:e=new st(r);break;case d.ITEM:var i=t.data;e=new ut(re(re({},r),{},{productName:i.name,productSku:i.code,transactionId:i.transactionId,itemCategory:i.category,itemPrice:i.price,itemQuantity:i.quantity}));break;case d.PAGE_VIEW:e=new ht(r);break;case d.SCREEN_VIEW:e=new gt(r);break;case d.TRANSACTION:e=new mt(t.data)}return e}},{key:"getHit",value:function(t){var e,n=this,r=null;if(!t||!t.type)return r;switch(t.type.toUpperCase()){case d.EVENT:r=new st(t);break;case d.ITEM:r=new ut(t);break;case d.PAGE_VIEW:r=new ht(t);break;case d.SCREEN_VIEW:r=new gt(t);break;case d.TRANSACTION:r=new mt(t);break;case $t:r=new te({hits:null==t||null==(e=t.hits)?void 0:e.map((function(t){return n.getHit(t)})).filter((function(t){return t}))})}return r}},{key:"prepareAndSendHit",value:(h=Z($().mark((function t(e){var n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof rt)){t.next=4;break}n=e,t.next=18;break;case 4:if(!("data"in e)){t.next=13;break}if(r=e,i=this.getHitLegacy(r)){t.next=10;break}return V(this.config,ie,E),t.abrupt("return");case 10:n=i,t.next=18;break;case 13:if(o=this.getHit(e)){t.next=17;break}return V(this.config,ie,E),t.abrupt("return");case 17:n=o;case 18:if(n.visitorId=this.visitor.visitorId,n.ds="APP",n.config=this.config,n.anonymousId=this.visitor.anonymousId,!this.isDeDuplicated(JSON.stringify(n),this.config.hitDeduplicationTime)){t.next=24;break}return t.abrupt("return");case 24:if(n.isReady()){t.next=27;break}return V(this.config,n.getErrorMessage(),E),t.abrupt("return");case 27:return t.prev=27,t.next=30,this.trackingManager.sendHit(n);case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(27),V(this.config,t.t0.message||t.t0,E),this.cacheHit(n);case 36:case"end":return t.stop()}}),t,this,[[27,32]])}))),function(t){return h.apply(this,arguments)})},{key:"getAllModifications",value:(f=Z($().mark((function t(){var e,n=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]&&n[0],t.abrupt("return",this.getAllFlagsData(e));case 2:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getAllFlagsData",value:(l=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.visitor.flagsData.forEach((function(t,e){n.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 l.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(u=Z($().mark((function t(e){var n,r=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],t.abrupt("return",this.getFlatsDataForCampaign(e,n));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getFlatsDataForCampaign",value:(c=Z($().mark((function t(e,n){var r=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n&&this.visitor.flagsData.forEach((function(t){t.campaignId===e&&r.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 c.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==P.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):V(this.config,j,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==P.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):V(this.config,"Visitor is not authenticated yet",t):this.logDeactivateOnBucketing(t)}},{key:"fetchFlags",value:(a=Z($().mark((function t(){return $().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 a.apply(this,arguments)})},{key:"userExposed",value:(r=Z($().mark((function t(e){var n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.key,r=e.flag,i=e.defaultValue,o="userExposed",r){t.next=5;break}return F(this.visitor.config,L("No flag for key {0}, no activate will be sent",n),o),t.abrupt("return");case 5:if(null==i||!r.value||G(r.value,i)){t.next=8;break}return F(this.visitor.config,L("Flag for key {0} has a different type with defaultValue, no activate will be sent",n),o),t.abrupt("return");case 8:if(!this.isDeDuplicated(r.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(r,o));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"getFlagValue",value:function(t){var e=t.key,n=t.defaultValue,r=t.flag,i=t.userExposed,o="getFlag value";return r?null===r.value?(i&&this.userExposed({key:e,flag:r,defaultValue:n}),n):null==n||G(r.value,n)?(i&&this.userExposed({key:e,flag:r,defaultValue:n}),r.value):(F(this.config,L("Flag for key {0} has a different type. Default value is returned.",e),o),n):(F(this.config,L("No Flag for key {0}. Default value is returned.",e),o),n)}},{key:"getFlagMetadata",value:function(t){var e=t.metadata,n=t.hasSameType,r=t.key;return n?e:(F(this.visitor.config,L("Flag for key {0} has a different type with defaultValue, an empty metadata object is returned",r),"flag.metadata"),ee.Empty())}},{key:"logDeactivateOnBucketing",value:function(t){V(this.config,L("Method {0} is deactivated on Bucketing mode.",t),t)}}]),T}(St);var se=function(t){i(v,t);var e,r,a,c,u,l,f,h,d,g,y=(d=v,g=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}}(),function(){var t,e=s(d);if(g){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function v(){return y.apply(this,arguments)}return n(v,[{key:"synchronizeModifications",value:(h=Z($().mark((function t(){return $().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 h.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"lookupHits",value:(f=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"lookupVisitor",value:(l=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"cacheVisitor",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(e){return $().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 c.apply(this,arguments)})},{key:"activateModifications",value:(a=Z($().mark((function t(e){return $().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 a.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=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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"),ee.Empty()}},{key:"log",value:function(t){V(this.config,L(I,t,p[p.NOT_INITIALIZED]),t)}}]),v}(oe);var ae=function(t){i(y,t);var e,r,a,c,u,l,f,h,d,g=(h=y,d=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}}(),function(){var t,e=s(h);if(d){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function y(){return g.apply(this,arguments)}return n(y,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,V(this.config,L("Send consent hit is deactivated while SDK status is: {1}.",p[p.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:(f=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"lookupVisitor",value:(l=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"cacheVisitor",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(a=Z($().mark((function t(e){return $().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:(r=Z($().mark((function t(e){return $().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=Z($().mark((function t(){return $().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"),ee.Empty()}},{key:"log",value:function(t){V(this.config,L(I,t,p[p.READY_PANIC_ON]),t)}}]),y}(oe);var ce=function(t){i(g,t);var e,r,a,c,u,l,f,h,p,d=(h=g,p=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}}(),function(){var t,e=s(h);if(p){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function g(){return d.apply(this,arguments)}return n(g,[{key:"activateModification",value:(f=Z($().mark((function t(e){return $().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 f.apply(this,arguments)})},{key:"activateModifications",value:(l=Z($().mark((function t(e){return $().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 l.apply(this,arguments)})},{key:"lookupHits",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"cacheVisitor",value:(a=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"cacheHit",value:(r=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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){V(this.config,L("Method {0} is deactivated for visitor {1} : visitor did not consent.",t,this.visitor.visitorId),t)}}]),g}(oe),ue="FS_CLIENT_VISITOR";var le=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e,n=t.visitorId,r=t.configManager,i=t.context,o=t.isAuthenticated,s=t.hasConsented,c=t.initialModifications,u=t.initialFlagsData,l=t.initialCampaigns;(e=a.call(this))._isCleaningDeDuplicationCache=!1,e.deDuplicationCache={},e._context={},e._configManager=r;var f=e.config.enableClientCache?function(){var t=null;try{t=localStorage.getItem(ue)}catch(t){}return t?JSON.parse(t):null}():null;return e.visitorId=n||(!o&&null!=f&&f.anonymousId?null==f?void 0:f.anonymousId:null==f?void 0:f.visitorId)||e.uuidV4(),e.setConsent(null==s||s),e.campaigns=[],e.updateContext(i),e._anonymousId=o&&null!=f&&f.anonymousId?null==f?void 0:f.anonymousId:null,e.loadPredefinedContext(),!e._anonymousId&&o&&e.config.decisionMode===P.DECISION_API&&(e._anonymousId=e.uuidV4()),e.updateCache(),e.setInitialFlags(u||c),e.setInitializeCampaigns(l,!!c),e}return n(c,[{key:"clearDeDuplicationCache",value:function(t){if(!this._isCleaningDeDuplicationCache){this._isCleaningDeDuplicationCache=!0;for(var e=0,n=Object.entries(this.deDuplicationCache);e<n.length;e++){var r=It(n[e],2),i=r[0],o=r[1];Date.now()-o>1e3*t&&delete this.deDuplicationCache[i]}this._isCleaningDeDuplicationCache=!1}}},{key:"getModificationsArray",value:function(){return Array.from(this._flags,(function(t){var e=It(t,2);return e[0],e[1]}))}},{key:"getFlagsDataArray",value:function(){return Array.from(this._flags,(function(t){var e=It(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(){!function(t){try{localStorage.setItem(ue,JSON.stringify(t))}catch(t){}}({visitorId:this.visitorId,anonymousId:this.anonymousId})}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=g.name,this.context.fs_version=v,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):V(this.config,j,"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 _e.getStatus()&&_e.getStatus()!==p.NOT_INITIALIZED?_e.getStatus()===p.READY_PANIC_ON?new ae(this):this.hasConsented?new oe(this):new ce(this):new se(this)}}]),c}(c.EventEmitter),fe=function(){function t(t){var e=t.key,n=t.visitor,r=t.defaultValue;this._key=e,this._visitor=n,this._defaultValue=r}return n(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 ee({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||G(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}();var he=function(t){i(l,t);var e,r,a,c,u=(a=l,c=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}}(),function(){var t,e=s(a);if(c){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function l(){return u.apply(this,arguments)}return n(l,[{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 fe({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=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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)}}]),l}(le);function pe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}H(102),H(760),H(665),H(431),H(113),H(51);var ge=function(e){i(d,e);var r,a,c,u,l,f,h=(l=d,f=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}}(),function(){var t,e=s(l);if(f){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function d(t,e,n){var r;return(r=h.call(this,t,e))._murmurHash=n,r._isFirstPooling=!0,e.initialBucketing&&(r._bucketingContent=e.initialBucketing),r}return n(d,[{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(p.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:(u=Z($().mark((function t(){var e,n,r=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=1e3*(null!=(e=this.config.pollingInterval)?e:2),F(this.config,"Bucketing polling starts","startPolling"),t.next=4,this.polling();case 4:if(0!==n){t.next=6;break}return t.abrupt("return");case 6:this._intervalID=setInterval((function(){r.polling()}),n);case 7:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"polling",value:(c=Z($().mark((function t(){var e,n,r,i;return $().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(p.POLLING),t.prev=4,n=L("https://cdn.flagship.io/{0}/bucketing.json",this.config.envId),U(e={},A,"".concat(this.config.apiKey)),U(e,N,g.name),U(e,R,v),U(e,M,D),r=e,this._lastModified&&(r["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(n,{headers:r,timeout:this.config.timeout});case 10:i=t.sent,this.finishLoop(i),t.next=20;break;case 14:t.prev=14,t.t0=t.catch(4),this._isPooling=!1,V(this.config,t.t0,"startPolling"),this._isFirstPooling&&this.updateFlagshipStatus(p.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 c.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,F(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(a=Z($().mark((function t(e){var n,r,i,o;return $().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 r=L("https://decision.flagship.io/v2/{0}/events",this.config.envId),U(n={},A,"".concat(this.config.apiKey)),U(n,N,g.name),U(n,R,v),U(n,M,D),i=n,o={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=8,this._httpClient.postAsync(r,{headers:i,body:o,timeout:this.config.timeout});case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"sendContext");case 13:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return a.apply(this,arguments)})},{key:"getCampaignsAsync",value:(r=Z($().mark((function t(e){var n,r=this;return $().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),n=[],this._bucketingContent.campaigns.forEach((function(t){var i=r.getVisitorCampaigns(t.variationGroups,t.id,t.type,e);i&&(i.slug=t.slug,n.push(i))})),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,n,r){var i,o=pe(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(this.isMatchTargeting(s,r)){var a=this.getVariation(s,r);return a?{id:e,variation:a,variationGroupId:s.id,type:n}:null}}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"getVariation",value:function(e,n){var r,i=this._murmurHash.murmurHash3Int32(e.id+n.visitorId)%100,o=0,s=pe(e.variations);try{var a=function(){var t,s,a=r.value,c=null==(t=n.visitorCache)||null==(s=t.data)?void 0:s.assignmentsHistory,u=c?c[e.id]:null;if(u){var l=e.variations.find((function(t){return t.id===u}));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 c=a();if("continue"!==c&&"object"===t(c))return c.v}}catch(t){s.e(t)}finally{s.f()}return null}},{key:"isMatchTargeting",value:function(t,e){var n=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return n.checkAndTargeting(t.targetings,e)}))}},{key:"isANDListOperator",value:function(t){return["NOT_EQUALS","NOT_CONTAINS"].includes(t)}},{key:"checkAndTargeting",value:function(t,e){var n,r,i=!1,o=pe(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.key,c=s.value,u=s.operator;if("fs_all_users"!==a){if("fs_users"===a)n=e.visitorId;else{if(!(a in e.context)){i=!1;break}n=e.context[a]}if(!(i=this.testOperator(u,n,c)))break}else i=!0}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"testListOperatorLoop",value:function(t,e,n,r){var i,o=r,s=pe(n);try{for(s.s();!(i=s.n()).done;){var a=i.value;if((o=this.testOperator(t,e,a))!==r)break}}catch(t){s.e(t)}finally{s.f()}return o}},{key:"testListOperator",value:function(t,e,n){return this.isANDListOperator(t)?this.testListOperatorLoop(t,e,n,!0):this.testListOperatorLoop(t,e,n,!1)}},{key:"testOperator",value:function(t,e,n){var r;if(Array.isArray(n))return this.testListOperator(t,e,n);switch(t){case"EQUALS":r=e===n;break;case"NOT_EQUALS":r=e!==n;break;case"CONTAINS":r=e.toString().includes(n.toString());break;case"NOT_CONTAINS":r=!e.toString().includes(n.toString());break;case"GREATER_THAN":r=e>n;break;case"LOWER_THAN":r=e<n;break;case"GREATER_THAN_OR_EQUALS":r=e>=n;break;case"LOWER_THAN_OR_EQUALS":r=e<=n;break;case"STARTS_WITH":r=e.toString().startsWith(n.toString());break;case"ENDS_WITH":r=e.toString().endsWith(n.toString());break;default:r=!1}return r}}]),d}(tt),ye=function(){function t(){}return n(t,[{key:"murmurHash3Int32",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=3&t.length,a=t.length-s;e=o;var c=3432918353,u=461845907;for(i=0;i<a;)r=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,e=27492+(65535&(n=5*(65535&(e=(e^=r=(65535&(r=(r=(65535&r)*c+(((r>>>16)*c&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&65535)<<16)&4294967295)<<13|e>>>19))+((5*(e>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(r=0,s){case 3:r^=(255&t.charCodeAt(i+2))<<16;case 2:r^=(255&t.charCodeAt(i+1))<<8;case 1:e^=r=(65535&(r=(r=(65535&(r^=255&t.charCodeAt(i)))*c+(((r>>>16)*c&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&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}();function ve(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function me(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(123);var ke=function(){function t(){}var e;return n(t,[{key:"getResponse",value:(e=Z($().mark((function t(e){var n,r,i,o,s;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.headers.get("Content-Type"),r="application/json"===n,t.next=4,e.text();case 4:if((i=t.sent)&&r&&(o=JSON.parse(i)),!(e.status>=400)){t.next=8;break}throw new Error(i||e.statusText);case 8:return s={},e.headers.forEach((function(t,e){s[e]=t})),t.abrupt("return",{status:e.status,body:o,headers:s});case 11:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var n=new AbortController,r=setTimeout((function(){return n.abort()}),1e3*(null!=e&&e.timeout?e.timeout:2));return l(t,me(me({},u),{},{method:"GET",headers:null==e?void 0:e.headers,signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}},{key:"postAsync",value:function(t,e){var n=new AbortController,r=setTimeout((function(){return n.abort()}),e.timeout?1e3*e.timeout:2e3);return l(t,me(me({},u),{},{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}}]),t}(),be="FS_DEFAULT_HIT_CACHE_",je=function(){function t(){}return n(t,[{key:"cacheHit",value:function(t,e){var n=localStorage.getItem(be+t),r="";if(n){var i=n.slice(0,-1);r="".concat(i,",").concat(JSON.stringify(e),"]")}else r="[".concat(JSON.stringify(e),"]");return localStorage.setItem(be+t,r),Promise.resolve()}},{key:"lookupHits",value:function(t){var e=localStorage.getItem(be+t);return localStorage.removeItem(be+t),Promise.resolve(e?JSON.parse(e):null)}},{key:"flushHits",value:function(t){return localStorage.removeItem(be+t),Promise.resolve()}}]),t}(),Ie="FS_VISITOR_CACHE_",Oe=function(){function t(){}return n(t,[{key:"cacheVisitor",value:function(t,e){return localStorage.setItem(Ie+t,JSON.stringify(e)),Promise.resolve()}},{key:"lookupVisitor",value:function(t){var e=localStorage.getItem(Ie+t);return Promise.resolve(e?JSON.parse(e):null)}},{key:"flushVisitor",value:function(t){return localStorage.removeItem(Ie+t),Promise.resolve()}}]),t}(),_e=function(){function e(){}return n(e,[{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 K?t:(null==t?void 0:t.decisionMode)===P.BUCKETING?new xt(t):new Q(t)}},{key:"buildDecisionManager",value:function(t,e,n){var r,i=function(e){t.setStatus(e)};if(e.decisionMode===P.BUCKETING){var o=r=new ge(n,e,new ye);r.statusChangedCallback(i),o.startPolling()}else(r=new nt(n,e)).statusChangedCallback(i);return r}},{key:"newVisitor",value:function(t,n){return e.newVisitor(t,n)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new this),this._instance}},{key:"isReady",value:function(){var t,e,n,r,i,o=null==(t=this._instance)||null==(e=t.getConfig())?void 0:e.apiKey,s=null==(n=this._instance)||null==(r=n.getConfig())?void 0:r.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(e,n,r){var i,o=this.getInstance();(r=o.buildConfig(r)).envId=e,r.apiKey=n,o._config=r,o.setStatus(p.STARTING),r.logManager||(r.logManager=new bt);var s=null==(i=o.configManager)?void 0:i.decisionManager;"object"===t(s)&&s instanceof ge&&s.stopPolling();var a=new ke;s=o.buildDecisionManager(o,r,a);var c=new kt(a,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=s,o.configManager.trackingManager=c):o.configManager=new J(r,s,c),e&&n?(!r.hitCacheImplementation&&B()&&(r.hitCacheImplementation=new je),!r.visitorCacheImplementation&&B()&&(r.visitorCacheImplementation=new Oe),this.isReady()?(o._status===p.STARTING&&o.setStatus(p.READY),F(r,L("Flagship SDK (version: {0}) READY",v),O),o):(o.setStatus(p.NOT_INITIALIZED),o)):(o.setStatus(p.NOT_INITIALIZED),V(r,"Params 'envId' and 'apiKey' must not be null or empty.",O),o)}},{key:"newVisitor",value:function(t,e){var n,r,i,o,s,a,c=!1,u=!0,l=!B();"string"==typeof t||null===t?(n=t||void 0,r=e||{}):(n=null==t?void 0:t.visitorId,r=(null==t?void 0:t.context)||{},c=!(null==t||!t.isAuthenticated),u=null==(s=null==t?void 0:t.hasConsented)||s,i=(null==t?void 0:t.initialFlagsData)||(null==t?void 0:t.initialModifications),o=null==t?void 0:t.initialCampaigns,l=null!=(a=null==t?void 0:t.isNewInstance)?a:l);var f=new he({visitorId:n,context:r,isAuthenticated:c,hasConsented:u,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:o,initialFlagsData:i}),h=new T(f);return this.getInstance()._visitorInstance=l?void 0:h,this.getConfig().fetchNow&&h.fetchFlags(),h}}]),e}();const xe=_e})(),q})()));
22
+ !function(t,e){if(true)module.exports=e(__webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js"),__webpack_require__(/*! node-fetch */ "node-fetch"),__webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js"),__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js"),__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js"),__webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__(/*! core-js/modules/es.map.js */ "./node_modules/core-js/modules/es.map.js"),__webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js"),__webpack_require__(/*! core-js/modules/es.number.is-integer.js */ "./node_modules/core-js/modules/es.number.is-integer.js"),__webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__(/*! core-js/modules/es.math.trunc.js */ "./node_modules/core-js/modules/es.math.trunc.js"),__webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js"),__webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js"),__webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js"),__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ "./node_modules/core-js/modules/es.regexp.flags.js"),__webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js"),__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__(/*! core-js/modules/es.string.ends-with.js */ "./node_modules/core-js/modules/es.string.ends-with.js"),__webpack_require__(/*! core-js/modules/es.promise.finally.js */ "./node_modules/core-js/modules/es.promise.finally.js"));else { var r, n; }}(self,((t,e,n,r,i,o,s,a,c,u,l,f,h,p,d,g,y,v,m,k,b,j,I,_,O,x,w,C,E,S,A,M,N,R,D,P,T,L)=>(()=>{var V={187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.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(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)}))},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 c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,n,r){var i,o,s,u;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(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,u=l,console&&console.warn&&console.warn(u)}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,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function h(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);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){r.once&&t.removeEventListener(e,i),n(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 c(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);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 c=o[t];if(void 0===c)return!1;if("function"==typeof c)r(c,this,e);else{var u=c.length,l=d(c,u);for(n=0;n<u;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(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 n,r,i,o,s;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return h(this,t,!0)},o.prototype.rawListeners=function(t){return h(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):[]}},186:t=>{"use strict";t.exports=g},938:t=>{"use strict";t.exports=f},431:t=>{"use strict";t.exports=D},740:t=>{"use strict";t.exports=C},125:t=>{"use strict";t.exports=b},810:t=>{"use strict";t.exports=y},979:t=>{"use strict";t.exports=S},102:t=>{"use strict";t.exports=M},274:t=>{"use strict";t.exports=i},969:t=>{"use strict";t.exports=v},414:t=>{"use strict";t.exports=x},101:t=>{"use strict";t.exports=O},13:t=>{"use strict";t.exports=_},523:t=>{"use strict";t.exports=w},736:t=>{"use strict";t.exports=h},16:t=>{"use strict";t.exports=d},891:t=>{"use strict";t.exports=u},816:e=>{"use strict";e.exports=t},629:t=>{"use strict";t.exports=I},123:t=>{"use strict";t.exports=L},671:t=>{"use strict";t.exports=n},182:t=>{"use strict";t.exports=e},426:t=>{"use strict";t.exports=a},536:t=>{"use strict";t.exports=o},208:t=>{"use strict";t.exports=A},244:t=>{"use strict";t.exports=c},51:t=>{"use strict";t.exports=T},82:t=>{"use strict";t.exports=j},849:t=>{"use strict";t.exports=m},248:t=>{"use strict";t.exports=E},404:t=>{"use strict";t.exports=s},113:t=>{"use strict";t.exports=P},760:t=>{"use strict";t.exports=N},665:t=>{"use strict";t.exports=R},146:t=>{"use strict";t.exports=l},491:t=>{"use strict";t.exports=p},731:t=>{"use strict";t.exports=k},906:t=>{"use strict";t.exports=r},854:()=>{},697:()=>{},61:(t,e,n)=>{var r=n(698).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),s=new w(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=h(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p={};function d(){}function g(){}function y(){}var v={};l(v,a,(function(){return this}));var m=Object.getPrototypeOf,k=m&&m(m(C([])));k&&k!==n&&o.call(k,a)&&(v=k);var b=y.prototype=d.prototype=Object.create(v);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,s,a,c){var u=h(t[i],t,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=h(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function O(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function C(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}return g.prototype=y,l(b,"constructor",y),l(y,"constructor",g),g.displayName=l(y,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},j(I.prototype),l(I.prototype,c,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new I(f(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},j(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(n){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,n)=>{var r=n(61)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},F={};function H(t){var e=F[t];if(void 0!==e)return e.exports;var n=F[t]={exports:{}};return V[t](n,n.exports,H),n.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 n in e)H.o(e,n)&&!H.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},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 G={};return(()=>{"use strict";function t(e){return t="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(e)}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}function o(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}H.r(G),H.d(G,{APP_VERSION_CODE:()=>Ut,APP_VERSION_NAME:()=>Kt,CARRIER_NAME:()=>qt,DEVICE_LOCALE:()=>At,DEVICE_MODEL:()=>Nt,DEVICE_TYPE:()=>Mt,DecisionApiConfig:()=>Q,DecisionMode:()=>P,Event:()=>st,EventCategory:()=>et,FLAGSHIP_CLIENT:()=>Yt,FLAGSHIP_CONTEXT:()=>zt,FLAGSHIP_VERSION:()=>Qt,FLAGSHIP_VISITOR:()=>Jt,Flag:()=>fe,FlagMetadata:()=>ee,Flagship:()=>Oe,FlagshipStatus:()=>p,HitAbstract:()=>rt,HitType:()=>d,INTERFACE_NAME:()=>Wt,INTERNET_CONNECTION:()=>Bt,IP:()=>Vt,Item:()=>ut,LOCATION_CITY:()=>Rt,LOCATION_COUNTRY:()=>Pt,LOCATION_LAT:()=>Tt,LOCATION_LONG:()=>Lt,LOCATION_REGION:()=>Dt,LogLevel:()=>a,OS_NAME:()=>Ft,OS_VERSION_CODE:()=>Gt,OS_VERSION_NAME:()=>Ht,Page:()=>ht,Screen:()=>gt,Transaction:()=>mt,Visitor:()=>T,default:()=>xe}),H(816),H(182),H(671);var a,c=H(187),u={},l="undefined"==typeof window?H(906).default:window.fetch;if("undefined"==typeof window){var f=H(854).Agent,h=H(697).Agent;u.agent=function(t){return"http:"===t.protocol?new f({keepAlive:!0}):new h({keepAlive:!0})}}!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"}(a||(a={}));var p,d,g={name:"TypeScript"},y="https://decision.flagship.io/v2/",v="v3",m="ready",k="Key {0} must not be null. Default value is returned.",b="{0} must be a {1}",j="visitorId must not be null or empty",I="Method {0} is deactivated while SDK status is: {1}.",_="INITIALIZATION",O="UPDATE CONTEXT",x="GET MODIFICATION",w="GET MODIFICATION INFO",C="ACTIVE MODIFICATION",E="SEND HIT",S="cid",A="x-api-key",M="Content-Type",N="x-sdk-client",R="x-sdk-version",D="application/json";!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"}(p||(p={})),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"}(d||(d={}));var P,T=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this)).visitorDelegate=t,e.visitorDelegate.on(m,(function(t){e.emit(m,t)})),e}return n(c,[{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()}}]),c}(c.EventEmitter);function L(t){for(var e=t,n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];e=e.replace(new RegExp("\\{".concat(n,"\\}"),"g"),r)}return e}function V(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<a.ERROR)&&t.logManager.error(e,n)}function F(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<a.INFO)&&t.logManager.info(e,n)}function q(){return"undefined"!=typeof window&&!("Deno"in window)}function B(e,n){return t(e)===t(n)&&("object"!==t(e)||"object"!==t(n)||Array.isArray(e)===Array.isArray(n))}H(274),H(536),H(404),H(426),H(244),function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(P||(P={}));var K=function(){function t(t){var e=t.envId,n=t.apiKey,r=t.timeout,i=t.logLevel,o=t.logManager,s=t.statusChangedCallback,c=t.fetchNow,u=t.decisionMode,l=t.enableClientCache,f=t.initialBucketing,h=t.decisionApiUrl,p=t.activateDeduplicationTime,d=t.hitDeduplicationTime,v=t.visitorCacheImplementation,m=t.hitCacheImplementation,k=t.disableCache,b=t.language,j=t.onUserExposure;switch(b){case 1:g.name="ReactJS";break;case 2:g.name="React-Native";break;default:g.name="undefined"!=typeof window&&"Deno"in window?"Deno":"Typescript"}this.decisionApiUrl=h||y,this._envId=e,this._apiKey=n,this.logLevel=null!=i?i:a.ALL,this.timeout=r||2,this.fetchNow=void 0===c||c,this.enableClientCache=void 0===l||l,this._decisionMode=u||P.DECISION_API,this._initialBucketing=f,this.activateDeduplicationTime=null!=p?p:2.5,this.hitDeduplicationTime=null!=d?d:2.5,this.disableCache=!!k,v&&(this.visitorCacheImplementation=v),m&&(this.hitCacheImplementation=m),o&&(this.logManager=o),this.statusChangedCallback=s,this._onUserExposure=j}return n(t,[{key:"onUserExposure",get:function(){return this._onUserExposure}},{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:V(this,L(b,"activateDeduplicationTime","number"),"activateDeduplicationTime")}},{key:"hitDeduplicationTime",get:function(){return this._hitDeduplicationTime},set:function(t){"number"==typeof t?this._hitDeduplicationTime=t:V(this,L(b,"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:V(this,"statusChangedCallback must be a function","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:V(this,L(b,"decisionApiUrl","string"),"decisionApiUrl")}}]),t}();function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(891),H(146),H(938),H(736),H(491),H(16);var Q=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){return a.call(this,Y(Y({},t),{},{decisionMode:P.DECISION_API}))}return n(c)}(K),J=function(){function t(t,e,n){this._config=t,this._decisionManager=e,this._trackingManager=n}return n(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}();function z(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function Z(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){z(o,r,i,s,a,"next",t)}function a(t){z(o,r,i,s,a,"throw",t)}s(void 0)}))}}var X=H(687),$=H.n(X),tt=(H(186),H(810),H(969),H(849),H(731),function(){function t(t,e){U(this,"_panic",!1),this._config=e,this._httpClient=t}return n(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?p.READY_PANIC_ON:p.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 n=t.variation.modifications.value;for(var r in n){var i=n[r];e.set(r,{key:r,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}());var et,nt=function(t){i(u,t);var e,r,a,c=(r=u,a=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}}(),function(){var t,e=s(r);if(a){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function u(){return c.apply(this,arguments)}return n(u,[{key:"getCampaignsAsync",value:(e=Z($().mark((function t(e){var n,r,i,o,s=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(n={},A,"".concat(this.config.apiKey)),U(n,N,g.name),U(n,R,v),U(n,M,D),r=n,i={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},o="".concat(this.config.decisionApiUrl||y).concat(this.config.envId).concat("/campaigns","?").concat("exposeAllKeys","=true"),e.hasConsented||(o+="&".concat("sendContextEvent","=false")),t.abrupt("return",this._httpClient.postAsync(o,{headers:r,timeout:this.config.timeout,body:i}).then((function(t){s.panic=!!t.body.panic;var e=null;return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return V(s.config,t.message||t,"GET CAMPAIGNS"),null})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),u}(tt),rt=(H(125),H(82),H(629),H(13),H(101),function(){function t(t){var e=t.type,n=t.userIp,r=t.screenResolution,i=t.locale,o=t.sessionNumber;this._type=e,n&&(this.userIp=n),r&&(this.screenResolution=r),i&&(this.locale=i),o&&(this.sessionNumber=o),this._anonymousId=null}return n(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)||(V(this.config,L(b,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||(V(this.config,L(b,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return!!Number.isInteger(t)||(V(this.config,L(b,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e,n=(U(e={},"vid",this.visitorId),U(e,"ds",this.ds),U(e,S,"".concat(null==(t=this.config)?void 0:t.envId)),U(e,"t",this.type),e);return this.userIp&&(n.uip=this.userIp),this.screenResolution&&(n.sr=this.screenResolution),this.locale&&(n.ul=this.locale),this.sessionNumber&&(n.sn=this.sessionNumber),this.visitorId&&this._anonymousId?(n.vid=this._anonymousId,n.cuid=this.visitorId):(n.vid=this._anonymousId||this.visitorId,n.cuid=null),n}},{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}());function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}!function(t){t.ACTION_TRACKING="Action Tracking",t.USER_ENGAGEMENT="User Engagement"}(et||(et={}));var st=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.action,i=t.label,o=t.value;return e.category=n,e.action=r,i&&(e.label=i),o&&(e.value=o),e}return n(c,[{key:"category",get:function(){return this._category},set:function(t){Object.values(et).includes(t)?this._category=t:V(this.config,"The category value must be either EventCategory::ACTION_TRACKING or EventCategory::ACTION_TRACKING","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){!Number.isInteger(t)||t<0?V(this.config,"value must be an integer and be >= 0","value"):this._value=t}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.ec=this.category,e.ea=this.action,this.label&&(e.el=this.label),this.value&&(e.ev=this.value),e}},{key:"toObject",value:function(){return ot(ot({},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"event category and event action are required"}}]),c}(rt);function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?at(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(414);var ut=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.productName,i=t.productSku,o=t.itemCategory,s=t.itemPrice,c=t.itemQuantity;return e.transactionId=n,e.productName=r,e.productSku=i,o&&(e.itemCategory=o),s&&(e.itemPrice=s),c&&(e.itemQuantity=c),e}return n(c,[{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.tid=this.transactionId,e.in=this.productName,e.ic=this.productSku,this.itemPrice&&(e.ip=this.itemPrice),this.itemQuantity&&(e.iq=this.itemQuantity),this.itemCategory&&(e.iv=this.itemCategory),e}},{key:"toObject",value:function(){return ct(ct({},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"Transaction Id, Item name and item code are required"}}]),c}(rt);function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ht=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,{type:d.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,e}return n(c,[{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.dl=this.documentLocation,e}},{key:"toObject",value:function(){return ft(ft({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return"documentLocation url is required"}}]),c}(rt);function pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var gt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,{type:d.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,e}return n(c,[{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.dl=this.documentLocation,e}},{key:"toObject",value:function(){return dt(dt({},t.prototype.toObject.call(this)),{},{documentLocation:this.documentLocation})}},{key:"getErrorMessage",value:function(){return"Screen name is required"}}]),c}(rt);function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var mt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;e=a.call(this,{type:d.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,r=t.affiliation,i=t.taxes,o=t.currency,s=t.couponCode,c=t.itemCount,u=t.shippingMethod,l=t.paymentMethod,f=t.totalRevenue,h=t.shippingCosts;return e.transactionId=n,e.affiliation=r,i&&(e.taxes=i),o&&(e.currency=o),s&&(e.couponCode=s),c&&(e.itemCount=c),u&&(e.shippingMethod=u),l&&(e.paymentMethod=l),f&&(e.totalRevenue=f),h&&(e.shippingCosts=h),e}return n(c,[{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:V(this.config,L("{0} must be a string and have exactly 3 letters","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.tid=this.transactionId,e.ta=this.affiliation,this.taxes&&(e.tt=this.taxes),this.currency&&(e.tc=this.currency),this.couponCode&&(e.tcc=this.couponCode),this.itemCount&&(e.icn=this.itemCount),this.shippingMethod&&(e.sm=this.shippingMethod),this.paymentMethod&&(e.pm=this.paymentMethod),this.totalRevenue&&(e.tr=this.totalRevenue),this.shippingCosts&&(e.ts=this.shippingCosts),e}},{key:"toObject",value:function(){return vt(vt({},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"Transaction Id and Transaction affiliation are required"}}]),c}(rt);var kt=function(t){i(f,t);var e,r,a,c,u,l=(c=f,u=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}}(),function(){var t,e=s(c);if(u){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function f(){return l.apply(this,arguments)}return n(f,[{key:"sendConsentHit",value:(a=Z($().mark((function t(e){var n,r,i;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(n={},"t",d.EVENT),U(n,"el","".concat(g.name,":").concat(e.hasConsented)),U(n,"ea","fs_consent"),U(n,"ec",et.USER_ENGAGEMENT),U(n,S,this.config.envId),U(n,"ds","APP"),r=n,e.visitorId&&e.anonymousId?(r.vid=e.anonymousId,r.cuid=e.visitorId):(r.vid=e.anonymousId||e.visitorId,r.cuid=null),i=U({},M,D),t.next=5,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:i,timeout:this.config.timeout,body:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"sendActive",value:(r=Z($().mark((function t(e,n){var r,i,o,s,a;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return U(r={},A,"".concat(this.config.apiKey)),U(r,N,g.name),U(r,R,v),U(r,M,D),o=r,s="".concat(y).concat("activate"),U(i={},"vid",e.visitorId),U(i,"vaid",n.variationId),U(i,"caid",n.variationGroupId),U(i,S,"".concat(this.config.envId)),a=i,e.visitorId&&e.anonymousId?(a.vid=e.visitorId,a.aid=e.anonymousId):(a.vid=e.anonymousId||e.visitorId,a.aid=null),t.next=6,this.httpClient.postAsync(s,{headers:o,timeout:this.config.timeout,body:a});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"sendHit",value:(e=Z($().mark((function t(e){var n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=U({},M,D),t.next=3,this.httpClient.postAsync("https://ariane.abtasty.com",{headers:n,timeout:this.config.timeout,body:e.toApiKeys()});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),f}(function(){function t(t,e){this._httpClient=t,this._config=e}return n(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()),bt=function(){function t(){}return n(t,[{key:"emergency",value:function(t,e){console.error(this.formatOutput(a.EMERGENCY,t,e))}},{key:"alert",value:function(t,e){console.error(this.formatOutput(a.ALERT,t,e))}},{key:"critical",value:function(t,e){console.error(this.formatOutput(a.CRITICAL,t,e))}},{key:"error",value:function(t,e){console.error(this.formatOutput(a.ERROR,t,e))}},{key:"warning",value:function(t,e){console.warn(this.formatOutput(a.WARNING,t,e))}},{key:"notice",value:function(t,e){this.log(a.NOTICE,t,e)}},{key:"info",value:function(t,e){console.info(this.formatOutput(a.INFO,t,e))}},{key:"debug",value:function(t,e){console.debug(this.formatOutput(a.DEBUG,t,e))}},{key:"log",value:function(t,e,n){console.log(this.formatOutput(t,e,n))}},{key:"formatOutput",value:function(t,e,n){var r=new Date,i=function(t){return 1===t.toString().length?"0".concat(t):t};return"[".concat(i(r.getFullYear()),"-").concat(i(r.getMonth()),"-").concat(i(r.getDay())," ").concat(i(r.getHours()),":").concat(i(r.getMinutes()),"] [").concat("Flagship SDK","] [").concat(a[t],"] [").concat(n,"] : ").concat(e)}}]),t}();function jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function It(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return jt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(t,e):void 0}}(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 _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(523),H(740);var xt=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e,n;return(n=a.call(this,Ot(Ot({},t),{},{decisionMode:P.BUCKETING}))).pollingInterval=null!=(e=null==t?void 0:t.pollingInterval)?e:1,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 n(c)}(K);function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(248),H(979),H(208);var Et,St=function(){function t(t){this.visitor=t}var e,r,i,o,s,a;return n(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){V(this.config,t.message||t,"updateCampaigns")}}},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||V(this.config,L("trackerManager must not be null."),t),!!e}},{key:"setConsent",value:function(t){var e=this,n="setConsent";this.visitor.hasConsented=t,t||(this.flushHits(),this.flushVisitor()),this.hasTrackingManager(n)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){V(e.config,t.message||t,n)}))}},{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?(F(this.config,L("Visitor ID mismatch: {0} vs {1}",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:(a=Z($().mark((function t(){var e,n;return $().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(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(this.checKLookupVisitorData(n)){t.next=11;break}throw new Error("JSON DATA must fit the type VisitorCacheDTO");case 11:this.visitor.visitorCache=n,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"lookupVisitor");case 17:case"end":return t.stop()}}),t,this,[[0,14]])}))),function(){return a.apply(this,arguments)})},{key:"cacheVisitor",value:(s=Z($().mark((function t(){var e,n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r=this.config.visitorCacheImplementation,!this.config.disableCache&&r&&"function"==typeof r.cacheVisitor){t.next=4;break}return t.abrupt("return");case 4:return i={},(o={version:1,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=Ct(Ct({},null==(e=this.visitor.visitorCache)||null==(n=e.data)?void 0:n.assignmentsHistory),i),t.next=9,r.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),V(this.config,t.t0.message||t.t0,"cacheVisitor");case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return s.apply(this,arguments)})},{key:"flushVisitor",value:(o=Z($().mark((function t(){var e;return $().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),V(this.config,t.t0.message||t.t0,"flushVisitor");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(){return o.apply(this,arguments)})},{key:"checKLookupHitData",value:function(t){return!!(t&&1===t.version&&t.data&&t.data.type&&t.data.visitorId)||(V(this.config,"JSON DATA must fit the type HitCacheDTO","lookupHits"),!1)}},{key:"lookupHits",value:(i=Z($().mark((function t(){var e,n,r,i,o,s=this;return $().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(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:if(Array.isArray(n)){t.next=11;break}throw Error("JSON DATA must be an array of object");case 11:if(r=function(t){return(Date.now()-t)/1e3<=144e5},i=[{type:"BATCH",hits:[]}],o=0,n.filter((function(t){return s.checKLookupHitData(t)&&r(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),V(this.config,t.t0.message||t.t0,"lookupHits");case 24:case"end":return t.stop()}}),t,this,[[0,21]])}))),function(){return i.apply(this,arguments)})},{key:"cacheHit",value:(r=Z($().mark((function t(e){var n,r;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.config.hitCacheImplementation,!this.config.disableCache&&n&&"function"==typeof n.cacheHit){t.next=4;break}return t.abrupt("return");case 4:return r={version:1,data:{visitorId:this.visitor.visitorId,anonymousId:this.visitor.anonymousId,type:e instanceof rt?e.type:"ACTIVATE",content:e instanceof rt?e.toObject():e,time:Date.now()}},t.next=7,n.cacheHit(this.visitor.visitorId,r);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"cacheHit");case 12:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t){return r.apply(this,arguments)})},{key:"flushHits",value:(e=Z($().mark((function t(){var e;return $().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),V(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}(),At="sdk_deviceLanguage",Mt="sdk_deviceType",Nt="sdk_deviceModel",Rt="sdk_city",Dt="sdk_region",Pt="sdk_country",Tt="sdk_lat",Lt="sdk_long",Vt="sdk_ip",Ft="sdk_osName",Ht="sdk_osVersionName",Gt="sdk_osVersionCode",qt="sdk_carrierName",Bt="sdk_internetConnection",Kt="sdk_versionName",Ut="sdk_versionCode",Wt="sdk_interfaceName",Yt="fs_client",Qt="fs_version",Jt="fs_users",zt=(U(Et={},At,"string"),U(Et,Mt,"string"),U(Et,Nt,"string"),U(Et,Rt,"string"),U(Et,Dt,"string"),U(Et,Pt,"string"),U(Et,Tt,"number"),U(Et,Lt,"number"),U(Et,Vt,"string"),U(Et,Ft,"string"),U(Et,Ht,"string"),U(Et,Gt,"string"),U(Et,qt,"string"),U(Et,Bt,"string"),U(Et,Kt,"string"),U(Et,Ut,"string"),U(Et,Wt,"string"),U(Et,Yt,"string"),U(Et,Qt,"string"),U(Et,Jt,"string"),Et);function Zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var $t="BATCH",te=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e;return(e=a.call(this,Xt(Xt({},t),{},{type:$t}))).hits=t.hits,e}return n(c,[{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.vid,delete e.cid,delete e.uip,delete e.sr,delete e.ul,delete e.sn,delete e.vid,delete e.cuid,e})),e}},{key:"toObject",value:function(){return Xt(Xt({},t.prototype.toObject.call(this)),{},{hits:this.hits.map((function(t){return t.toObject()}))})}},{key:"getErrorMessage",value:function(){return"Please check required fields"}}]),c}(rt),ee=function(){function t(t){var e=t.campaignId,n=t.variationGroupId,r=t.variationId,i=t.isReference,o=t.campaignType,s=t.slug;this.campaignId=e,this.variationGroupId=n,this.variationId=r,this.isReference=i,this.campaignType=o,this.slug=s}return n(t,null,[{key:"Empty",value:function(){return new t({campaignId:"",campaignType:"",variationId:"",variationGroupId:"",isReference:!1,slug:null})}}]),t}();function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ie="property type is required and must ",oe=function(e){i(T,e);var r,a,c,u,l,f,h,p,g,y,v,b,I,_,S,A,M,N,R,D=(N=T,R=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}}(),function(){var t,e=s(N);if(R){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function T(){return D.apply(this,arguments)}return n(T,[{key:"checkPredefinedContext",value:function(t,e){var n=zt[t];if(!n)return null;var r=!1;return"string"===n?r="string"==typeof e:"number"===n&&(r="number"==typeof e),r||V(this.config,L("Predefined Context {0} must be type of {1}",t,n),O),r}},{key:"updateContextKeyValue",value:function(e,n){var r=t(n);if("string"!=typeof e||""===e||"string"!==r&&"number"!==r&&"boolean"!==r)V(this.visitor.config,L("params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",e),O);else if(!e.match(/^fs_/i)){var i=this.checkPredefinedContext(e,n);("boolean"!=typeof i||i)&&(this.visitor.context[e]=n)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var n=t[e];this.updateContextKeyValue(e,n)}else V(this.visitor.config,"Context must not to be null",O)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(e,n){var r=this,i=e.key,o=e.defaultValue,s=e.activate;if(!i||"string"!=typeof i)return V(this.config,L(k,i),x),o;var a=this.visitor.flagsData.get(i);if(!a)return F(this.config,L("No modification for key {0}. Default value is returned.",i),x),o;return"object"===t(a.value)&&"object"===t(o)&&Array.isArray(a.value)!==Array.isArray(o)||t(a.value)!==t(o)?(V(r.config,L("Modification for key {0} has a different type. Default value is returned.",i),x),a.value||!s&&!n||r.activateModification(i),o):((s||n)&&this.activateModification(i),a.value)}},{key:"getModifications",value:(M=Z($().mark((function t(e,n){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getModificationsSync(e,n));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return M.apply(this,arguments)})},{key:"getModificationsSync",value:function(t,e){var n=this,r={};return t.forEach((function(t){r[t.key]=n.checkAndGetModification(t,e)})),r}},{key:"getModification",value:(A=Z($().mark((function t(e){return $().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 A.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(S=Z($().mark((function t(e){return $().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 S.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return t&&"string"==typeof t?this.visitor.flagsData.get(t)||(V(this.visitor.config,L("No modification for key {0}.",t),w),null):(V(this.visitor.config,L(k,t),w),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}}}}))):null}},{key:"globalFetchFlags",value:(_=Z($().mark((function t(e){var n;return $().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:if((n=t.sent)||(n=this.fetchVisitorCampaigns(this.visitor)),n){t.next=7;break}return t.abrupt("return");case 7:this.visitor.campaigns=n,this.visitor.flagsData=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(m),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(0),this.visitor.emit(m,t.t0),V(this.config,t.t0.message||t.t0,e);case 16:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(t){return _.apply(this,arguments)})},{key:"synchronizeModifications",value:(I=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.globalFetchFlags("SYNCHRONIZED MODIFICATION"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return I.apply(this,arguments)})},{key:"activateModification",value:(b=Z($().mark((function t(e){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return V(this.config,L("Key {0} must not be null, no activate will be sent.",e),C),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"activateModifications",value:(v=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return V(this.config,L(k,e),C),t.abrupt("return");case 3:e.forEach((function(t){"string"==typeof t?n.activate(t):n.activate(t.key)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"isDeDuplicated",value:function(t,e){if(0===e)return!1;var n=this.visitor.deDuplicationCache[t];return!!(n&&Date.now()-n<=1e3*e)||(this.visitor.deDuplicationCache[t]=Date.now(),this.visitor.clearDeDuplicationCache(e),!1)}},{key:"sendActivate",value:(y=Z($().mark((function t(e){var n,r=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:C,t.prev=1,t.next=4,this.trackingManager.sendActive(this.visitor,e);case 4:this.onUserExposedCallback({flag:e,visitor:this.visitor}),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(1),V(this.config,t.t0.message||t.t0,n),this.cacheHit(e);case 11:case"end":return t.stop()}}),t,this,[[1,7]])}))),function(t){return y.apply(this,arguments)})},{key:"activate",value:(g=Z($().mark((function t(e){var n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.visitor.flagsData.get(e)){t.next=4;break}return V(this.visitor.config,L("No modification for key {0}, no activate will be sent.",e),C),t.abrupt("return");case 4:if(!this.isDeDuplicated(n.variationGroupId+this.visitor.visitorId,this.config.activateDeduplicationTime)){t.next=6;break}return t.abrupt("return");case 6:if(this.hasTrackingManager(C)){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,this.sendActivate(n);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(E)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(p=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(E)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){return n.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getHitLegacy",value:function(t){var e=null;if(!t||!t.type)return null;var n={type:{Screen:d.SCREEN_VIEW,ScreenView:d.SCREEN_VIEW,Transaction:d.TRANSACTION,Page:d.PAGE_VIEW,PageView:d.PAGE_VIEW,Item:d.ITEM,Event:d.EVENT}[t.type]},r=re(re({},n),t.data);switch(n.type.toUpperCase()){case d.EVENT:e=new st(r);break;case d.ITEM:var i=t.data;e=new ut(re(re({},r),{},{productName:i.name,productSku:i.code,transactionId:i.transactionId,itemCategory:i.category,itemPrice:i.price,itemQuantity:i.quantity}));break;case d.PAGE_VIEW:e=new ht(r);break;case d.SCREEN_VIEW:e=new gt(r);break;case d.TRANSACTION:e=new mt(t.data)}return e}},{key:"getHit",value:function(t){var e,n=this,r=null;if(!t||!t.type)return r;switch(t.type.toUpperCase()){case d.EVENT:r=new st(t);break;case d.ITEM:r=new ut(t);break;case d.PAGE_VIEW:r=new ht(t);break;case d.SCREEN_VIEW:r=new gt(t);break;case d.TRANSACTION:r=new mt(t);break;case $t:r=new te({hits:null==t||null==(e=t.hits)?void 0:e.map((function(t){return n.getHit(t)})).filter((function(t){return t}))})}return r}},{key:"prepareAndSendHit",value:(h=Z($().mark((function t(e){var n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof rt)){t.next=4;break}n=e,t.next=18;break;case 4:if(!("data"in e)){t.next=13;break}if(r=e,i=this.getHitLegacy(r)){t.next=10;break}return V(this.config,ie,E),t.abrupt("return");case 10:n=i,t.next=18;break;case 13:if(o=this.getHit(e)){t.next=17;break}return V(this.config,ie,E),t.abrupt("return");case 17:n=o;case 18:if(n.visitorId=this.visitor.visitorId,n.ds="APP",n.config=this.config,n.anonymousId=this.visitor.anonymousId,!this.isDeDuplicated(JSON.stringify(n),this.config.hitDeduplicationTime)){t.next=24;break}return t.abrupt("return");case 24:if(n.isReady()){t.next=27;break}return V(this.config,n.getErrorMessage(),E),t.abrupt("return");case 27:return t.prev=27,t.next=30,this.trackingManager.sendHit(n);case 30:t.next=36;break;case 32:t.prev=32,t.t0=t.catch(27),V(this.config,t.t0.message||t.t0,E),this.cacheHit(n);case 36:case"end":return t.stop()}}),t,this,[[27,32]])}))),function(t){return h.apply(this,arguments)})},{key:"getAllModifications",value:(f=Z($().mark((function t(){var e,n=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]&&n[0],t.abrupt("return",this.getAllFlagsData(e));case 2:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getAllFlagsData",value:(l=Z($().mark((function t(e){var n=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.visitor.flagsData.forEach((function(t,e){n.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 l.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(u=Z($().mark((function t(e){var n,r=arguments;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],t.abrupt("return",this.getFlatsDataForCampaign(e,n));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getFlatsDataForCampaign",value:(c=Z($().mark((function t(e,n){var r=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n&&this.visitor.flagsData.forEach((function(t){t.campaignId===e&&r.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 c.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==P.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):V(this.config,j,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==P.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):V(this.config,"Visitor is not authenticated yet",t):this.logDeactivateOnBucketing(t)}},{key:"fetchFlags",value:(a=Z($().mark((function t(){return $().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 a.apply(this,arguments)})},{key:"onUserExposedCallback",value:function(t){var e=t.flag,n=t.visitor;"function"==typeof this.config.onUserExposure&&this.config.onUserExposure({flagData:{metadata:{campaignId:e.campaignId,campaignType:e.campaignType,slug:e.slug,isReference:!!e.isReference,variationGroupId:e.variationGroupId,variationId:e.variationId},key:e.key,value:e.value},visitorData:{visitorId:n.visitorId,anonymousId:n.anonymousId,context:n.context}})}},{key:"userExposed",value:(r=Z($().mark((function t(e){var n,r,i,o;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.key,r=e.flag,i=e.defaultValue,o="userExposed",r){t.next=5;break}return F(this.visitor.config,L("No flag for key {0}, no activate will be sent",n),o),t.abrupt("return");case 5:if(null==i||null===r.value||B(r.value,i)){t.next=8;break}return F(this.visitor.config,L("Flag for key {0} has a different type with defaultValue, no activate will be sent",n),o),t.abrupt("return");case 8:if(!this.isDeDuplicated(r.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.next=14,this.sendActivate(r,o);case 14:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"getFlagValue",value:function(t){var e=t.key,n=t.defaultValue,r=t.flag,i=t.userExposed,o="getFlag value";return r?null===r.value?(i&&this.userExposed({key:e,flag:r,defaultValue:n}),n):null==n||B(r.value,n)?(i&&this.userExposed({key:e,flag:r,defaultValue:n}),r.value):(F(this.config,L("Flag for key {0} has a different type. Default value is returned.",e),o),n):(F(this.config,L("No Flag for key {0}. Default value is returned.",e),o),n)}},{key:"getFlagMetadata",value:function(t){var e=t.metadata,n=t.hasSameType,r=t.key;return n?e:(F(this.visitor.config,L("Flag for key {0} has a different type with defaultValue, an empty metadata object is returned",r),"flag.metadata"),ee.Empty())}},{key:"logDeactivateOnBucketing",value:function(t){V(this.config,L("Method {0} is deactivated on Bucketing mode.",t),t)}}]),T}(St);var se=function(t){i(v,t);var e,r,a,c,u,l,f,h,d,g,y=(d=v,g=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}}(),function(){var t,e=s(d);if(g){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function v(){return y.apply(this,arguments)}return n(v,[{key:"synchronizeModifications",value:(h=Z($().mark((function t(){return $().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 h.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.log("getModification"),t.defaultValue}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"lookupHits",value:(f=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"lookupVisitor",value:(l=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"cacheVisitor",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(e){return $().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 c.apply(this,arguments)})},{key:"activateModifications",value:(a=Z($().mark((function t(e){return $().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 a.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=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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"),ee.Empty()}},{key:"log",value:function(t){V(this.config,L(I,t,p[p.NOT_INITIALIZED]),t)}}]),v}(oe);var ae=function(t){i(y,t);var e,r,a,c,u,l,f,h,d,g=(h=y,d=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}}(),function(){var t,e=s(h);if(d){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function y(){return g.apply(this,arguments)}return n(y,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,V(this.config,L("Send consent hit is deactivated while SDK status is: {1}.",p[p.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:(f=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"lookupVisitor",value:(l=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"cacheVisitor",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"fetchVisitorCampaigns",value:function(){return[]}},{key:"getModificationsSync",value:function(t,e){this.log("getModifications");var n={};return t.forEach((function(t){n[t.key]=t.defaultValue})),n}},{key:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(a=Z($().mark((function t(e){return $().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:(r=Z($().mark((function t(e){return $().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=Z($().mark((function t(){return $().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"),ee.Empty()}},{key:"log",value:function(t){V(this.config,L(I,t,p[p.READY_PANIC_ON]),t)}}]),y}(oe);var ce=function(t){i(g,t);var e,r,a,c,u,l,f,h,p,d=(h=g,p=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}}(),function(){var t,e=s(h);if(p){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function g(){return d.apply(this,arguments)}return n(g,[{key:"activateModification",value:(f=Z($().mark((function t(e){return $().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 f.apply(this,arguments)})},{key:"activateModifications",value:(l=Z($().mark((function t(e){return $().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 l.apply(this,arguments)})},{key:"lookupHits",value:(u=Z($().mark((function t(){return $().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:(c=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"cacheVisitor",value:(a=Z($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"cacheHit",value:(r=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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){V(this.config,L("Method {0} is deactivated for visitor {1} : visitor did not consent.",t,this.visitor.visitorId),t)}}]),g}(oe),ue="FS_CLIENT_VISITOR";var le=function(t){i(c,t);var e,r,a=(e=c,r=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}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)});function c(t){var e,n=t.visitorId,r=t.configManager,i=t.context,o=t.isAuthenticated,s=t.hasConsented,c=t.initialModifications,u=t.initialFlagsData,l=t.initialCampaigns;(e=a.call(this))._isCleaningDeDuplicationCache=!1,e.deDuplicationCache={},e._context={},e._configManager=r;var f=e.config.enableClientCache?function(){var t=null;try{t=localStorage.getItem(ue)}catch(t){}return t?JSON.parse(t):null}():null;return e.visitorId=n||(!o&&null!=f&&f.anonymousId?null==f?void 0:f.anonymousId:null==f?void 0:f.visitorId)||e.uuidV4(),e.setConsent(null==s||s),e.campaigns=[],e.updateContext(i),e._anonymousId=o&&null!=f&&f.anonymousId?null==f?void 0:f.anonymousId:null,e.loadPredefinedContext(),!e._anonymousId&&o&&e.config.decisionMode===P.DECISION_API&&(e._anonymousId=e.uuidV4()),e.updateCache(),e.setInitialFlags(u||c),e.setInitializeCampaigns(l,!!c),e}return n(c,[{key:"clearDeDuplicationCache",value:function(t){if(!this._isCleaningDeDuplicationCache){this._isCleaningDeDuplicationCache=!0;for(var e=0,n=Object.entries(this.deDuplicationCache);e<n.length;e++){var r=It(n[e],2),i=r[0],o=r[1];Date.now()-o>1e3*t&&delete this.deDuplicationCache[i]}this._isCleaningDeDuplicationCache=!1}}},{key:"getModificationsArray",value:function(){return Array.from(this._flags,(function(t){var e=It(t,2);return e[0],e[1]}))}},{key:"getFlagsDataArray",value:function(){return Array.from(this._flags,(function(t){var e=It(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(){!function(t){try{localStorage.setItem(ue,JSON.stringify(t))}catch(t){}}({visitorId:this.visitorId,anonymousId:this.anonymousId})}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=g.name,this.context.fs_version=v,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):V(this.config,j,"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 Oe.getStatus()&&Oe.getStatus()!==p.NOT_INITIALIZED?Oe.getStatus()===p.READY_PANIC_ON?new ae(this):this.hasConsented?new oe(this):new ce(this):new se(this)}}]),c}(c.EventEmitter),fe=function(){function t(t){var e=t.key,n=t.visitor,r=t.defaultValue;this._key=e,this._visitor=n,this._defaultValue=r}return n(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 ee({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:null===t.value||null===this._defaultValue||void 0===this._defaultValue||B(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}();var he=function(t){i(l,t);var e,r,a,c,u=(a=l,c=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}}(),function(){var t,e=s(a);if(c){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function l(){return u.apply(this,arguments)}return n(l,[{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 fe({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=Z($().mark((function t(){return $().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=Z($().mark((function t(){return $().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)}}]),l}(le);function pe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return de(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}H(102),H(760),H(665),H(431),H(113),H(51);var ge=function(e){i(d,e);var r,a,c,u,l,f,h=(l=d,f=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}}(),function(){var t,e=s(l);if(f){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return o(this,t)});function d(t,e,n){var r;return(r=h.call(this,t,e))._murmurHash=n,r._isFirstPooling=!0,e.initialBucketing&&(r._bucketingContent=e.initialBucketing),r}return n(d,[{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(p.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:(u=Z($().mark((function t(){var e,n,r=this;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=1e3*(null!=(e=this.config.pollingInterval)?e:2),F(this.config,"Bucketing polling starts","startPolling"),t.next=4,this.polling();case 4:if(0!==n){t.next=6;break}return t.abrupt("return");case 6:this._intervalID=setInterval((function(){r.polling()}),n);case 7:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"polling",value:(c=Z($().mark((function t(){var e,n,r,i;return $().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(p.POLLING),t.prev=4,n=L("https://cdn.flagship.io/{0}/bucketing.json",this.config.envId),U(e={},A,"".concat(this.config.apiKey)),U(e,N,g.name),U(e,R,v),U(e,M,D),r=e,this._lastModified&&(r["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(n,{headers:r,timeout:this.config.timeout});case 10:i=t.sent,this.finishLoop(i),t.next=20;break;case 14:t.prev=14,t.t0=t.catch(4),this._isPooling=!1,V(this.config,t.t0,"startPolling"),this._isFirstPooling&&this.updateFlagshipStatus(p.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 c.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,F(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(a=Z($().mark((function t(e){var n,r,i,o;return $().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 r=L("https://decision.flagship.io/v2/{0}/events",this.config.envId),U(n={},A,"".concat(this.config.apiKey)),U(n,N,g.name),U(n,R,v),U(n,M,D),i=n,o={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=8,this._httpClient.postAsync(r,{headers:i,body:o,timeout:this.config.timeout});case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),V(this.config,t.t0.message||t.t0,"sendContext");case 13:case"end":return t.stop()}}),t,this,[[0,10]])}))),function(t){return a.apply(this,arguments)})},{key:"getCampaignsAsync",value:(r=Z($().mark((function t(e){var n,r=this;return $().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),n=[],this._bucketingContent.campaigns.forEach((function(t){var i=r.getVisitorCampaigns(t.variationGroups,t.id,t.type,e);i&&(i.slug=t.slug,n.push(i))})),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,n,r){var i,o=pe(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(this.isMatchTargeting(s,r)){var a=this.getVariation(s,r);return a?{id:e,variation:a,variationGroupId:s.id,type:n}:null}}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"getVariation",value:function(e,n){var r,i=this._murmurHash.murmurHash3Int32(e.id+n.visitorId)%100,o=0,s=pe(e.variations);try{var a=function(){var t,s,a=r.value,c=null==(t=n.visitorCache)||null==(s=t.data)?void 0:s.assignmentsHistory,u=c?c[e.id]:null;if(u){var l=e.variations.find((function(t){return t.id===u}));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 c=a();if("continue"!==c&&"object"===t(c))return c.v}}catch(t){s.e(t)}finally{s.f()}return null}},{key:"isMatchTargeting",value:function(t,e){var n=this;return!!(t&&t.targeting&&t.targeting.targetingGroups)&&t.targeting.targetingGroups.some((function(t){return n.checkAndTargeting(t.targetings,e)}))}},{key:"isANDListOperator",value:function(t){return["NOT_EQUALS","NOT_CONTAINS"].includes(t)}},{key:"checkAndTargeting",value:function(t,e){var n,r,i=!1,o=pe(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.key,c=s.value,u=s.operator;if("fs_all_users"!==a){if("fs_users"===a)n=e.visitorId;else{if(!(a in e.context)){i=!1;break}n=e.context[a]}if(!(i=this.testOperator(u,n,c)))break}else i=!0}}catch(t){o.e(t)}finally{o.f()}return i}},{key:"testListOperatorLoop",value:function(t,e,n,r){var i,o=r,s=pe(n);try{for(s.s();!(i=s.n()).done;){var a=i.value;if((o=this.testOperator(t,e,a))!==r)break}}catch(t){s.e(t)}finally{s.f()}return o}},{key:"testListOperator",value:function(t,e,n){return this.isANDListOperator(t)?this.testListOperatorLoop(t,e,n,!0):this.testListOperatorLoop(t,e,n,!1)}},{key:"testOperator",value:function(t,e,n){var r;if(Array.isArray(n))return this.testListOperator(t,e,n);switch(t){case"EQUALS":r=e===n;break;case"NOT_EQUALS":r=e!==n;break;case"CONTAINS":r=e.toString().includes(n.toString());break;case"NOT_CONTAINS":r=!e.toString().includes(n.toString());break;case"GREATER_THAN":r=e>n;break;case"LOWER_THAN":r=e<n;break;case"GREATER_THAN_OR_EQUALS":r=e>=n;break;case"LOWER_THAN_OR_EQUALS":r=e<=n;break;case"STARTS_WITH":r=e.toString().startsWith(n.toString());break;case"ENDS_WITH":r=e.toString().endsWith(n.toString());break;default:r=!1}return r}}]),d}(tt),ye=function(){function t(){}return n(t,[{key:"murmurHash3Int32",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=3&t.length,a=t.length-s;e=o;var c=3432918353,u=461845907;for(i=0;i<a;)r=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24,++i,e=27492+(65535&(n=5*(65535&(e=(e^=r=(65535&(r=(r=(65535&r)*c+(((r>>>16)*c&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&65535)<<16)&4294967295)<<13|e>>>19))+((5*(e>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(r=0,s){case 3:r^=(255&t.charCodeAt(i+2))<<16;case 2:r^=(255&t.charCodeAt(i+1))<<8;case 1:e^=r=(65535&(r=(r=(65535&(r^=255&t.charCodeAt(i)))*c+(((r>>>16)*c&65535)<<16)&4294967295)<<15|r>>>17))*u+(((r>>>16)*u&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}();function ve(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function me(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ve(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}H(123);var ke=function(){function t(){}var e;return n(t,[{key:"getResponse",value:(e=Z($().mark((function t(e){var n,r,i,o,s;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.headers.get("Content-Type"),r="application/json"===n,t.next=4,e.text();case 4:if((i=t.sent)&&r&&(o=JSON.parse(i)),!(e.status>=400)){t.next=8;break}throw new Error(i||e.statusText);case 8:return s={},e.headers.forEach((function(t,e){s[e]=t})),t.abrupt("return",{status:e.status,body:o,headers:s});case 11:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var n=new AbortController,r=setTimeout((function(){return n.abort()}),1e3*(null!=e&&e.timeout?e.timeout:2));return l(t,me(me({},u),{},{method:"GET",headers:null==e?void 0:e.headers,signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}},{key:"postAsync",value:function(t,e){var n=new AbortController,r=setTimeout((function(){return n.abort()}),e.timeout?1e3*e.timeout:2e3);return l(t,me(me({},u),{},{method:"POST",headers:e.headers,body:JSON.stringify(e.body),signal:n.signal,keepalive:!0})).then(this.getResponse).catch((function(t){throw t})).finally((function(){clearInterval(r)}))}}]),t}(),be="FS_DEFAULT_HIT_CACHE_",je=function(){function t(){}return n(t,[{key:"cacheHit",value:function(t,e){var n=localStorage.getItem(be+t),r="";if(n){var i=n.slice(0,-1);r="".concat(i,",").concat(JSON.stringify(e),"]")}else r="[".concat(JSON.stringify(e),"]");return localStorage.setItem(be+t,r),Promise.resolve()}},{key:"lookupHits",value:function(t){var e=localStorage.getItem(be+t);return localStorage.removeItem(be+t),Promise.resolve(e?JSON.parse(e):null)}},{key:"flushHits",value:function(t){return localStorage.removeItem(be+t),Promise.resolve()}}]),t}(),Ie="FS_VISITOR_CACHE_",_e=function(){function t(){}return n(t,[{key:"cacheVisitor",value:function(t,e){return localStorage.setItem(Ie+t,JSON.stringify(e)),Promise.resolve()}},{key:"lookupVisitor",value:function(t){var e=localStorage.getItem(Ie+t);return Promise.resolve(e?JSON.parse(e):null)}},{key:"flushVisitor",value:function(t){return localStorage.removeItem(Ie+t),Promise.resolve()}}]),t}(),Oe=function(){function e(){}return n(e,[{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 K?t:(null==t?void 0:t.decisionMode)===P.BUCKETING?new xt(t):new Q(t)}},{key:"buildDecisionManager",value:function(t,e,n){var r,i=function(e){t.setStatus(e)};if(e.decisionMode===P.BUCKETING){var o=r=new ge(n,e,new ye);r.statusChangedCallback(i),o.startPolling()}else(r=new nt(n,e)).statusChangedCallback(i);return r}},{key:"newVisitor",value:function(t,n){return e.newVisitor(t,n)}}],[{key:"getInstance",value:function(){return this._instance||(this._instance=new this),this._instance}},{key:"isReady",value:function(){var t,e,n,r,i,o=null==(t=this._instance)||null==(e=t.getConfig())?void 0:e.apiKey,s=null==(n=this._instance)||null==(r=n.getConfig())?void 0:r.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(e,n,r){var i,o=this.getInstance();(r=o.buildConfig(r)).envId=e,r.apiKey=n,o._config=r,o.setStatus(p.STARTING),r.logManager||(r.logManager=new bt);var s=null==(i=o.configManager)?void 0:i.decisionManager;"object"===t(s)&&s instanceof ge&&s.stopPolling();var a=new ke;s=o.buildDecisionManager(o,r,a);var c=new kt(a,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=s,o.configManager.trackingManager=c):o.configManager=new J(r,s,c),e&&n?(!r.hitCacheImplementation&&q()&&(r.hitCacheImplementation=new je),!r.visitorCacheImplementation&&q()&&(r.visitorCacheImplementation=new _e),this.isReady()?(o._status===p.STARTING&&o.setStatus(p.READY),F(r,L("Flagship SDK (version: {0}) READY",v),_),o):(o.setStatus(p.NOT_INITIALIZED),o)):(o.setStatus(p.NOT_INITIALIZED),V(r,"Params 'envId' and 'apiKey' must not be null or empty.",_),o)}},{key:"newVisitor",value:function(t,e){var n,r,i,o,s,a,c=!1,u=!0,l=!q();"string"==typeof t||null===t?(n=t||void 0,r=e||{}):(n=null==t?void 0:t.visitorId,r=(null==t?void 0:t.context)||{},c=!(null==t||!t.isAuthenticated),u=null==(s=null==t?void 0:t.hasConsented)||s,i=(null==t?void 0:t.initialFlagsData)||(null==t?void 0:t.initialModifications),o=null==t?void 0:t.initialCampaigns,l=null!=(a=null==t?void 0:t.isNewInstance)?a:l);var f=new he({visitorId:n,context:r,isAuthenticated:c,hasConsented:u,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:o,initialFlagsData:i}),h=new T(f);return this.getInstance()._visitorInstance=l?void 0:h,this.getConfig().fetchNow&&h.fetchFlags(),h}}]),e}();const xe=Oe})(),G})()));
23
23
  //# sourceMappingURL=index.browser.js.map
24
24
 
25
25
  /***/ }),
@@ -162,64 +162,69 @@ __webpack_require__.r(__webpack_exports__);
162
162
  /* harmony export */ "FlagshipContext": () => (/* binding */ FlagshipContext),
163
163
  /* harmony export */ "FlagshipProvider": () => (/* binding */ FlagshipProvider)
164
164
  /* harmony export */ });
165
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
166
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_0__);
167
- /* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.map.js */ "./node_modules/core-js/modules/es.map.js");
168
- /* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_1__);
169
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
170
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__);
171
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
172
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_3__);
173
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
174
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
175
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
176
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
177
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
178
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6__);
179
- /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
180
- /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
181
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
182
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_8__);
183
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
184
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
185
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
186
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_10__);
187
- /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
188
- /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11__);
189
- /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
190
- /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
191
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
192
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_13__);
193
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
194
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14__);
195
- /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
196
- /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_15__);
197
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! react */ "react");
198
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);
199
- /* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @flagship.io/js-sdk */ "./node_modules/@flagship.io/js-sdk/dist/index.browser.js");
200
- /* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__);
201
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils */ "./src/utils.tsx");
202
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
165
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
166
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_0__);
167
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
168
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__);
169
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
170
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_2__);
171
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
172
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_3__);
173
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
174
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_4__);
175
+ /* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
176
+ /* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_5__);
177
+ /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
178
+ /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__);
179
+ /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
180
+ /* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
181
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
182
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_8__);
183
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
184
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__);
185
+ /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
186
+ /* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_10__);
187
+ /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
188
+ /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
189
+ /* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.map.js */ "./node_modules/core-js/modules/es.map.js");
190
+ /* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_12__);
191
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
192
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);
193
+ /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
194
+ /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
195
+ /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
196
+ /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
197
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
198
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_16__);
199
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react */ "react");
200
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_17__);
201
+ /* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @flagship.io/js-sdk */ "./node_modules/@flagship.io/js-sdk/dist/index.browser.js");
202
+ /* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__);
203
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./utils */ "./src/utils.tsx");
203
204
 
204
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
205
205
 
206
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
207
206
 
208
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
209
207
 
210
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
211
208
 
212
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
213
209
 
214
210
 
215
211
 
216
212
 
217
213
 
218
214
 
215
+ var _excluded = ["children", "fetchNow", "envId", "apiKey", "decisionMode", "visitorData", "onInitStart", "onInitDone", "loadingComponent", "statusChangedCallback", "onBucketingUpdated", "onUpdate", "initialCampaigns", "initialModifications", "initialFlagsData", "fetchFlagsOnBucketingUpdated"];
219
216
 
217
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
220
218
 
219
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
221
220
 
221
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
222
222
 
223
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
224
+
225
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
226
+
227
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
223
228
 
224
229
 
225
230
 
@@ -228,6 +233,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
228
233
 
229
234
 
230
235
 
236
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
237
+
238
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
239
+
231
240
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
232
241
 
233
242
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -244,7 +253,7 @@ var initStat = {
244
253
  isSdkReady: false
245
254
  }
246
255
  };
247
- var FlagshipContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.createContext)({
256
+ var FlagshipContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_17__.createContext)({
248
257
  state: _objectSpread({}, initStat)
249
258
  });
250
259
  var FlagshipProvider = function FlagshipProvider(_ref) {
@@ -253,32 +262,19 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
253
262
  envId = _ref.envId,
254
263
  apiKey = _ref.apiKey,
255
264
  decisionMode = _ref.decisionMode,
256
- decisionApiUrl = _ref.decisionApiUrl,
257
- timeout = _ref.timeout,
258
- logLevel = _ref.logLevel,
259
- statusChangedCallback = _ref.statusChangedCallback,
260
- logManager = _ref.logManager,
261
- pollingInterval = _ref.pollingInterval,
262
265
  visitorData = _ref.visitorData,
263
266
  onInitStart = _ref.onInitStart,
264
267
  onInitDone = _ref.onInitDone,
265
- onBucketingSuccess = _ref.onBucketingSuccess,
266
- onBucketingFail = _ref.onBucketingFail,
267
268
  loadingComponent = _ref.loadingComponent,
269
+ statusChangedCallback = _ref.statusChangedCallback,
268
270
  onBucketingUpdated = _ref.onBucketingUpdated,
269
271
  onUpdate = _ref.onUpdate,
270
- enableClientCache = _ref.enableClientCache,
271
- initialBucketing = _ref.initialBucketing,
272
272
  initialCampaigns = _ref.initialCampaigns,
273
273
  initialModifications = _ref.initialModifications,
274
274
  initialFlagsData = _ref.initialFlagsData,
275
275
  fetchFlagsOnBucketingUpdated = _ref.fetchFlagsOnBucketingUpdated,
276
- activateDeduplicationTime = _ref.activateDeduplicationTime,
277
- hitDeduplicationTime = _ref.hitDeduplicationTime,
278
- visitorCacheImplementation = _ref.visitorCacheImplementation,
279
- hitCacheImplementation = _ref.hitCacheImplementation,
280
- disableCache = _ref.disableCache,
281
- language = _ref.language;
276
+ props = _objectWithoutProperties(_ref, _excluded);
277
+
282
278
  var modifications = new Map();
283
279
 
284
280
  if (initialFlagsData && initialFlagsData.forEach) {
@@ -290,34 +286,34 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
290
286
  modifications.set(modification.key, modification);
291
287
  });
292
288
  } else if (initialCampaigns) {
293
- modifications = (0,_utils__WEBPACK_IMPORTED_MODULE_18__.getModificationsFromCampaigns)(initialCampaigns);
289
+ modifications = (0,_utils__WEBPACK_IMPORTED_MODULE_19__.getModificationsFromCampaigns)(initialCampaigns);
294
290
  }
295
291
 
296
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(_objectSpread(_objectSpread({}, initStat), {}, {
292
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)(_objectSpread(_objectSpread({}, initStat), {}, {
297
293
  modifications: modifications
298
294
  })),
299
295
  _useState2 = _slicedToArray(_useState, 2),
300
296
  state = _useState2[0],
301
297
  setState = _useState2[1];
302
298
 
303
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(),
299
+ var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)(),
304
300
  _useState4 = _slicedToArray(_useState3, 2),
305
301
  lastModified = _useState4[0],
306
302
  setLastModified = _useState4[1];
307
303
 
308
- var stateRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)();
304
+ var stateRef = (0,react__WEBPACK_IMPORTED_MODULE_17__.useRef)();
309
305
  stateRef.current = state;
310
- (0,_utils__WEBPACK_IMPORTED_MODULE_18__.useNonInitialEffect)(function () {
306
+ (0,_utils__WEBPACK_IMPORTED_MODULE_19__.useNonInitialEffect)(function () {
311
307
  if (fetchFlagsOnBucketingUpdated) {
312
308
  var _state$visitor;
313
309
 
314
310
  (_state$visitor = state.visitor) === null || _state$visitor === void 0 ? void 0 : _state$visitor.fetchFlags();
315
311
  }
316
312
  }, [lastModified]);
317
- (0,_utils__WEBPACK_IMPORTED_MODULE_18__.useNonInitialEffect)(function () {
313
+ (0,_utils__WEBPACK_IMPORTED_MODULE_19__.useNonInitialEffect)(function () {
318
314
  createVisitor(true);
319
315
  }, [JSON.stringify(visitorData)]);
320
- (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {
316
+ (0,react__WEBPACK_IMPORTED_MODULE_17__.useEffect)(function () {
321
317
  initSdk();
322
318
  }, [envId, apiKey, decisionMode]);
323
319
 
@@ -336,7 +332,7 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
336
332
  return _objectSpread(_objectSpread({}, currentState), {}, {
337
333
  visitor: param.fsVisitor,
338
334
  modifications: param.fsVisitor.modifications,
339
- config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.getConfig(),
335
+ config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.getConfig(),
340
336
  status: _objectSpread(_objectSpread({}, currentState.status), newStatus)
341
337
  });
342
338
  });
@@ -346,7 +342,7 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
346
342
 
347
343
  var onVisitorReady = function onVisitorReady(fsVisitor, error) {
348
344
  if (error) {
349
- (0,_utils__WEBPACK_IMPORTED_MODULE_18__.logError)(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.getConfig(), error.message || error, 'onReady');
345
+ (0,_utils__WEBPACK_IMPORTED_MODULE_19__.logError)(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.getConfig(), error.message || error, 'onReady');
350
346
  return;
351
347
  }
352
348
 
@@ -359,7 +355,7 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
359
355
  if (onUpdate) {
360
356
  onUpdate({
361
357
  fsModifications: fsVisitor.modifications,
362
- config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.getConfig(),
358
+ config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.getConfig(),
363
359
  status: newStatus
364
360
  });
365
361
  }
@@ -372,7 +368,7 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
372
368
  return;
373
369
  }
374
370
 
375
- var fsVisitor = _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.newVisitor({
371
+ var fsVisitor = _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.newVisitor({
376
372
  visitorId: visitorData.id,
377
373
  context: visitorData.context,
378
374
  isAuthenticated: visitorData.isAuthenticated,
@@ -404,15 +400,15 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
404
400
  }
405
401
 
406
402
  switch (status) {
407
- case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.FlagshipStatus.STARTING:
408
- if (status === _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.FlagshipStatus.STARTING && onInitStart) {
403
+ case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.FlagshipStatus.STARTING:
404
+ if (status === _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.FlagshipStatus.STARTING && onInitStart) {
409
405
  onInitStart();
410
406
  }
411
407
 
412
408
  break;
413
409
 
414
- case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.FlagshipStatus.READY_PANIC_ON:
415
- case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.FlagshipStatus.READY:
410
+ case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.FlagshipStatus.READY_PANIC_ON:
411
+ case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.FlagshipStatus.READY:
416
412
  if (onInitDone) {
417
413
  onInitDone();
418
414
  }
@@ -420,10 +416,10 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
420
416
  createVisitor();
421
417
  break;
422
418
 
423
- case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.FlagshipStatus.NOT_INITIALIZED:
419
+ case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.FlagshipStatus.NOT_INITIALIZED:
424
420
  setState(function (prev) {
425
421
  return _objectSpread(_objectSpread({}, prev), {}, {
426
- config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.getConfig()
422
+ config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.getConfig()
427
423
  });
428
424
  });
429
425
  break;
@@ -439,40 +435,25 @@ var FlagshipProvider = function FlagshipProvider(_ref) {
439
435
  };
440
436
 
441
437
  var initSdk = function initSdk() {
442
- _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_17__.Flagship.start(envId, apiKey, {
438
+ _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_18__.Flagship.start(envId, apiKey, _objectSpread({
443
439
  decisionMode: decisionMode,
444
440
  fetchNow: fetchNow,
445
- timeout: timeout,
446
- logLevel: logLevel,
447
441
  statusChangedCallback: statusChanged,
448
- logManager: logManager,
449
- pollingInterval: pollingInterval,
450
- onBucketingFail: onBucketingFail,
451
- onBucketingSuccess: onBucketingSuccess,
452
- enableClientCache: enableClientCache,
453
- decisionApiUrl: decisionApiUrl,
454
- onBucketingUpdated: onBucketingLastModified,
455
- initialBucketing: initialBucketing,
456
- activateDeduplicationTime: activateDeduplicationTime,
457
- hitDeduplicationTime: hitDeduplicationTime,
458
- visitorCacheImplementation: visitorCacheImplementation,
459
- hitCacheImplementation: hitCacheImplementation,
460
- disableCache: disableCache,
461
- language: language
462
- });
442
+ onBucketingUpdated: onBucketingLastModified
443
+ }, props));
463
444
  };
464
445
 
465
446
  var handleDisplay = function handleDisplay() {
466
447
  var isFirstInit = !state.visitor;
467
448
 
468
449
  if (state.status.isLoading && loadingComponent && isFirstInit && fetchNow) {
469
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, loadingComponent);
450
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement((react__WEBPACK_IMPORTED_MODULE_17___default().Fragment), null, loadingComponent);
470
451
  }
471
452
 
472
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, children);
453
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement((react__WEBPACK_IMPORTED_MODULE_17___default().Fragment), null, children);
473
454
  };
474
455
 
475
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(FlagshipContext.Provider, {
456
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(FlagshipContext.Provider, {
476
457
  value: {
477
458
  state: state,
478
459
  setState: setState
@@ -6377,6 +6358,40 @@ $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
6377
6358
  addToUnscopables('includes');
6378
6359
 
6379
6360
 
6361
+ /***/ }),
6362
+
6363
+ /***/ "./node_modules/core-js/modules/es.array.index-of.js":
6364
+ /*!***********************************************************!*\
6365
+ !*** ./node_modules/core-js/modules/es.array.index-of.js ***!
6366
+ \***********************************************************/
6367
+ /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
6368
+
6369
+ "use strict";
6370
+
6371
+ /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
6372
+ var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
6373
+ var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
6374
+ var $IndexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
6375
+ var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
6376
+
6377
+ var un$IndexOf = uncurryThis([].indexOf);
6378
+
6379
+ var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
6380
+ var STRICT_METHOD = arrayMethodIsStrict('indexOf');
6381
+
6382
+ // `Array.prototype.indexOf` method
6383
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
6384
+ $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
6385
+ indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
6386
+ var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
6387
+ return NEGATIVE_ZERO
6388
+ // convert -0 to +0
6389
+ ? un$IndexOf(this, searchElement, fromIndex) || 0
6390
+ : $IndexOf(this, searchElement, fromIndex);
6391
+ }
6392
+ });
6393
+
6394
+
6380
6395
  /***/ }),
6381
6396
 
6382
6397
  /***/ "./node_modules/core-js/modules/es.array.iterator.js":