@flagship.io/react-sdk 2.2.0-alpha.5 → 2.2.0-alpha.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.
- package/dist/es/FlagshipContext.js +229 -0
- package/dist/es/FlagshipHooks.js +363 -0
- package/dist/es/index.js +3 -0
- package/dist/es/utils.js +46 -0
- package/dist/esm/FlagshipContext.js +251 -0
- package/dist/esm/FlagshipHooks.js +538 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/utils.js +46 -0
- package/dist/index.browser.js +2 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{FlagshipContext.d.ts → types/FlagshipContext.d.ts} +1 -1
- package/dist/{FlagshipHooks.d.ts → types/FlagshipHooks.d.ts} +2 -19
- package/dist/{index.d.ts → types/index.d.ts} +0 -0
- package/dist/{utils.d.ts → types/utils.d.ts} +0 -0
- package/package.json +20 -7
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t={n:i=>{var e=i&&i.__esModule?()=>i.default:()=>i;return t.d(e,{a:e}),e},d:(i,e)=>{for(var n in e)t.o(e,n)&&!t.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:e[n]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{DecisionMode:()=>o.DecisionMode,FlagshipContext:()=>f,FlagshipProvider:()=>l,noVisitorDefault:()=>F,noVisitorMessage:()=>x,useFlagship:()=>k,useFsActivate:()=>C,useFsModification:()=>p,useFsModificationInfo:()=>S,useFsModificationInfoSync:()=>m,useFsModificationSync:()=>M,useFsModifications:()=>g,useFsModificationsSync:()=>h,useFsSynchronizeModifications:()=>b});const e=require("react");var n=t.n(e);const o=require("@flagship.io/js-sdk");function a(t,i,e){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<o.LogLevel.ERROR)&&t.logManager.error(i,e)}function r(t,i,e){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<o.LogLevel.WARNING)&&t.logManager.warning(i,e)}var s=function(){return s=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var o in i=arguments[e])Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o]);return t},s.apply(this,arguments)},u=function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),r=[];try{for(;(void 0===i||i-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return r},c={status:{isLoading:!0,isSdkReady:!1}},f=(0,e.createContext)({state:s({},c)}),l=function(t){var i=t.children,r=t.fetchNow,l=t.envId,d=t.apiKey,v=t.decisionMode,g=t.timeout,y=t.logLevel,h=t.statusChangedCallback,p=t.logManager,M=t.pollingInterval,S=t.visitorData,m=t.onInitStart,b=t.onInitDone,C=t.onBucketingSuccess,k=t.onBucketingFail,x=t.loadingComponent,F=t.onBucketingUpdated,w=t.onUpdate,I=t.enableClientCache,R=t.initialBucketing,A=t.initialCampaigns,L=t.initialModifications,V=t.synchronizeOnBucketingUpdated,E=new Map;L?L.forEach((function(t){E.set(t.key,t)})):A&&(E=function(t){var i=new Map;return t&&Array.isArray(t)?(t.forEach((function(t){var e=t.variation.modifications.value;for(var n in e){var o=e[n];i.set(n,{key:n,campaignId:t.id,variationGroupId:t.variationGroupId,variationId:t.variation.id,isReference:t.variation.reference,value:o})}})),i):i}(A));var O=u((0,e.useState)(s(s({},c),{modifications:E})),2),P=O[0],z=O[1],D=u((0,e.useState)(),2),j=D[0],B=D[1];(0,e.useEffect)((function(){var t;V&&(null===(t=P.visitor)||void 0===t||t.synchronizeModifications())}),[j]),(0,e.useEffect)((function(){N()}),[S]),(0,e.useEffect)((function(){U()}),[l,d,v]);var N=function(){P.visitor&&(S.context&&(P.visitor.clearContext(),P.visitor.updateContext(S.context)),P.visitor.setConsent(!!S.hasConsented),P.visitor.anonymousId&&!S.isAuthenticated?P.visitor.unauthenticate():!P.visitor.anonymousId&&S.isAuthenticated&&P.visitor.authenticate(S.id),S.id&&(P.visitor.visitorId=S.id),P.visitor.synchronizeModifications())};function _(t){var i={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return z((function(e){return e.status.firstInitSuccess||(i.firstInitSuccess=(new Date).toISOString()),s(s({},e),{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:o.Flagship.getConfig(),status:s(s({},e.status),i)})})),i}var G,T=function(t){if(h&&h(t),t===o.FlagshipStatus.STARTING&&m)m();else if(t===o.FlagshipStatus.READY_PANIC_ON||t===o.FlagshipStatus.READY)if(b&&b(),P.visitor)P.visitor.synchronizeModifications();else{var i=o.Flagship.newVisitor({visitorId:S.id,context:S.context,isAuthenticated:S.isAuthenticated,hasConsented:S.hasConsented,initialCampaigns:A,initialModifications:L});null==i||i.on("ready",(function(t){!function(t,i){if(i)a(o.Flagship.getConfig(),i.message||i,"onReady");else{var e=_({fsVisitor:t,isSdkReady:!0,isLoading:!1});w&&w({fsModifications:t.modifications,config:o.Flagship.getConfig(),status:e})}}(i,t)})),!r&&i&&_({fsVisitor:i,isSdkReady:!0,isLoading:!1})}},H=function(t){F&&F(t),B(t)},U=function(){o.Flagship.start(l,d,{decisionMode:v,fetchNow:r,timeout:g,logLevel:y,statusChangedCallback:T,logManager:p,pollingInterval:M,onBucketingFail:k,onBucketingSuccess:C,enableClientCache:I,onBucketingUpdated:H,initialBucketing:R})};return n().createElement(f.Provider,{value:{state:P,setState:z}},(G=!P.visitor,P.status.isLoading&&x&&G?n().createElement(n().Fragment,null,x):n().createElement(n().Fragment,null,i)))};l.defaultProps={nodeEnv:"production"};var d=function(t,i,e,n){return new(e||(e=Promise))((function(o,a){function r(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var i;t.done?o(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(r,s)}u((n=n.apply(t,i||[])).next())}))},v=function(t,i){var e,n,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;r;)try{if(e=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,n=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((o=(o=r.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(t,r)}catch(t){a=[6,t],n=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},g=function(t,i){return d(void 0,void 0,void 0,(function(){return v(this,(function(e){return[2,h(t,i)]}))}))},y=function(t,i){return"object"==typeof t&&"object"==typeof i&&Array.isArray(t)===Array.isArray(i)||typeof t==typeof i},h=function(t,i){var n=(0,e.useContext)(f).state,o=n.visitor,a=n.config;if(o)return o.getModificationsSync(t,i);var s=!n.status.isSdkReady&&!!n.modifications&&n.modifications.size>0,u={};return s?(t.forEach((function(t){var i,e=null===(i=n.modifications)||void 0===i?void 0:i.get(t.key);e&&y(null==e?void 0:e.value,t.defaultValue)?u[t.key]=e.value:u[t.key]=t.defaultValue})),u):(r(a,F,"useFsModifications"),t.forEach((function(t){u[t.key]=t.defaultValue})),u)},p=function(t){return d(void 0,void 0,void 0,(function(){return v(this,(function(i){return[2,M(t)]}))}))},M=function(t){var i,n=(0,e.useContext)(f).state,o=n.visitor,a=n.config;if(o)return o.getModificationSync(t);var s=null===(i=n.modifications)||void 0===i?void 0:i.get(t.key);return!n.status.isSdkReady&&s&&y(null==s?void 0:s.value,t.defaultValue)?s.value:(r(a,F,"useFsModifications"),t.defaultValue)},S=function(t){return d(void 0,void 0,void 0,(function(){return v(this,(function(i){return[2,m(t)]}))}))},m=function(t){var i,n=(0,e.useContext)(f).state,o=n.visitor;if(o)return o.getModificationInfoSync(t);var a=null===(i=n.modifications)||void 0===i?void 0:i.get(t);return!n.status.isSdkReady&&a?a:null},b=function(){return d(void 0,void 0,void 0,(function(){var t,i,n,o,r;return v(this,(function(s){switch(s.label){case 0:t=(0,e.useContext)(f).state,i=t.visitor,n=t.config,o="useFsSynchronizeModifications",s.label=1;case 1:return s.trys.push([1,3,,4]),i?[4,i.synchronizeModifications()]:(w(n,o),[2]);case 2:return s.sent(),[3,4];case 3:return r=s.sent(),a(n,r.message||r,o),[3,4];case 4:return[2]}}))}))},C=function(t){return d(void 0,void 0,void 0,(function(){var i,n,o,a,s;return v(this,(function(u){switch(u.label){case 0:i=(0,e.useContext)(f).state,n=i.visitor,o=i.config,a="useFsModifications",u.label=1;case 1:return u.trys.push([1,3,,4]),n?[4,n.activateModifications(t)]:(r(o,x,a),[2]);case 2:return u.sent(),[3,4];case 3:return s=u.sent(),r(o,s.message||s,a),[3,4];case 4:return[2]}}))}))},k=function(){var t=(0,e.useContext)(f).state,i=t.visitor,n=t.config,o=null==i?void 0:i.getModificationsArray();return!t.status.isSdkReady&&t.modifications&&(o=Array.from(t.modifications,(function(t){var i=function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),r=[];try{for(;(void 0===i||i-- >0)&&!(n=a.next()).done;)r.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return r}(t,2);return i[0],i[1]}))),{updateContext:function(t){i?(i.clearContext(),i.updateContext(t)):a(n,x,"updateContext")},clearContext:function(){i?i.clearContext():a(n,x,"cleanContext")},authenticate:function(t){i?i.authenticate(t):a(n,x,"authenticate")},unauthenticate:function(){i?i.unauthenticate():a(n,x,"unauthenticate")},status:t.status,activateModification:C,synchronizeModifications:b,getModificationsSync:h,getModifications:g,modifications:o||[],getModificationInfo:S,getModificationInfoSync:m,hit:{send:function(t){return i?i.sendHit(t):(a(n,x,"sendHit"),Promise.resolve())},sendMultiple:function(t){return i?i.sendHits(t):(a(n,x,"sendHits"),Promise.resolve())}}}},x="sdk not correctly initialized... Make sure fsVisitor is ready.",F="fsVisitor not initialized, returns default value",w=function(t,i){a(t,x,i)};module.exports=i})();
|
|
1
|
+
(()=>{var t={6968:(t,e,n)=>{(()=>{"use strict";var e={271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=n(834);class i extends r.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const t=o.get(this);if("boolean"!=typeof t)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return t}}r.defineEventAttribute(i.prototype,"abort");const o=new WeakMap;Object.defineProperties(i.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(i.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class a{constructor(){s.set(this,function(){const t=Object.create(i.prototype);return r.EventTarget.call(t),o.set(t,!1),t}())}get signal(){return c(this)}abort(){var t;t=c(this),!1===o.get(t)&&(o.set(t,!0),t.dispatchEvent({type:"abort"}))}}const s=new WeakMap;function c(t){const e=s.get(t);if(null==e)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===t?"null":typeof t));return e}Object.defineProperties(a.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(a.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),e.AbortController=a,e.AbortSignal=i,e.default=a,t.exports=a,t.exports.AbortController=t.exports.default=a,t.exports.AbortSignal=i},505:(t,e,r)=>{r.d(e,{ZP:()=>Y});const i=n(2781);var o=r(605);const a=n(7310);var s=r(211);const c=n(9796),u=i.Readable,f=Symbol("buffer"),l=Symbol("type");class h{constructor(){this[l]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,i=Number(e.length);for(let t=0;t<i;t++){const i=e[t];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof h?i[f]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[f]=Buffer.concat(n);let i=e&&void 0!==e.type&&String(e.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[l]=i)}get size(){return this[f].length}get type(){return this[l]}text(){return Promise.resolve(this[f].toString())}arrayBuffer(){const t=this[f],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new u;return t._read=function(){},t.push(this[f]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,i;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),i=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const o=Math.max(i-r,0),a=this[f].slice(r,r+o),s=new h([],{type:arguments[2]});return s[f]=a,s}}function p(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let d;Object.defineProperties(h.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(h.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.name="FetchError";try{d=n(9657).convert}catch(t){}const v=Symbol("Body internals"),g=i.PassThrough;function y(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var a=n.timeout;let s=void 0===a?0:a;null==t?t=null:b(t)?t=Buffer.from(t.toString()):x(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof i||(t=Buffer.from(String(t)))),this[v]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=s,t instanceof i&&t.on("error",(function(t){const n="AbortError"===t.name?t:new p(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[v].error=n}))}function m(){var t=this;if(this[v].disturbed)return y.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[v].disturbed=!0,this[v].error)return y.Promise.reject(this[v].error);let e=this.body;if(null===e)return y.Promise.resolve(Buffer.alloc(0));if(x(e)&&(e=e.stream()),Buffer.isBuffer(e))return y.Promise.resolve(e);if(!(e instanceof i))return y.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new y.Promise((function(i,a){let s;t.timeout&&(s=setTimeout((function(){o=!0,a(new p(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,a(e)):a(new p(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&r+e.length>t.size)return o=!0,void a(new p(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(s);try{i(Buffer.concat(n,r))}catch(e){a(new p(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function b(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function x(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function k(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof i&&"function"!=typeof r.getBoundary&&(e=new g,n=new g,r.pipe(e),r.pipe(n),t[v].body=e,r=n),r}function w(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":b(t)?"application/x-www-form-urlencoded;charset=UTF-8":x(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof i?null:"text/plain;charset=UTF-8"}function S(t){const e=t.body;return null===e?0:x(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}y.prototype={get body(){return this[v].body},get bodyUsed(){return this[v].disturbed},arrayBuffer(){return m.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return m.call(this).then((function(e){return Object.assign(new h([],{type:t.toLowerCase()}),{[f]:e})}))},json(){var t=this;return m.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return y.Promise.reject(new p(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return m.call(this).then((function(t){return t.toString()}))},buffer(){return m.call(this)},textConverted(){var t=this;return m.call(this).then((function(e){return function(t,e){if("function"!=typeof d)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,i,o="utf-8";return n&&(r=/charset=([^;]*)/i.exec(n)),i=t.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i)),!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop()))),!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i)),r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030")),d(t,"UTF-8",o).toString()}(e,t.headers)}))}},Object.defineProperties(y.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),y.mixIn=function(t){for(const e of Object.getOwnPropertyNames(y.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(y.prototype,e);Object.defineProperty(t,e,n)}},y.Promise=global.Promise;const I=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,E=/[^\t\x20-\x7e\x80-\xff]/;function O(t){if(t=`${t}`,I.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function C(t){if(t=`${t}`,E.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function _(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const A=Symbol("map");class M{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[A]=Object.create(null),t instanceof M){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){O(t=`${t}`);const e=_(this[A],t);return void 0===e?null:this[A][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=R(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],a=i[1];t.call(e,a,o,this),n=R(this),r++}}set(t,e){e=`${e}`,O(t=`${t}`),C(e);const n=_(this[A],t);this[A][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,O(t=`${t}`),C(e);const n=_(this[A],t);void 0!==n?this[A][n].push(e):this[A][t]=[e]}has(t){return O(t=`${t}`),void 0!==_(this[A],t)}delete(t){O(t=`${t}`);const e=_(this[A],t);void 0!==e&&delete this[A][e]}raw(){return this[A]}keys(){return P(this,"key")}values(){return P(this,"value")}[Symbol.iterator](){return P(this,"key+value")}}function R(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(t[A]).sort();return n.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[A][e].join(", ")}:function(e){return[e.toLowerCase(),t[A][e].join(", ")]})}M.prototype.entries=M.prototype[Symbol.iterator],Object.defineProperty(M.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(M.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const T=Symbol("internal");function P(t,e){const n=Object.create(N);return n[T]={target:t,kind:e,index:0},n}const N=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==N)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[T];const e=t.target,n=t.kind,r=t.index,i=R(e,n);return r>=i.length?{value:void 0,done:!0}:(this[T].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function j(t){const e=Object.assign({__proto__:null},t[A]),n=_(t[A],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(N,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const L=Symbol("Response internals"),D=o.STATUS_CODES;class B{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y.call(this,t,e);const n=e.status||200,r=new M(e.headers);if(null!=t&&!r.has("Content-Type")){const e=w(t);e&&r.append("Content-Type",e)}this[L]={url:e.url,status:n,statusText:e.statusText||D[n],headers:r,counter:e.counter}}get url(){return this[L].url||""}get status(){return this[L].status}get ok(){return this[L].status>=200&&this[L].status<300}get redirected(){return this[L].counter>0}get statusText(){return this[L].statusText}get headers(){return this[L].headers}clone(){return new B(k(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}y.mixIn(B.prototype),Object.defineProperties(B.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(B.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const F=Symbol("Request internals"),G=a.parse,V=a.format,H="destroy"in i.Readable.prototype;function U(t){return"object"==typeof t&&"object"==typeof t[F]}class z{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};U(t)?e=G(t.url):(e=t&&t.href?G(t.href):G(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||U(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:U(t)&&null!==t.body?k(t):null;y.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new M(n.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=w(i);t&&o.append("Content-Type",t)}let a=U(t)?t.signal:null;if("signal"in n&&(a=n.signal),null!=a&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(a))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[F]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:a},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[F].method}get url(){return V(this[F].parsedURL)}get headers(){return this[F].headers}get redirect(){return this[F].redirect}get signal(){return this[F].signal}clone(){return new z(this)}}function $(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}y.mixIn(z.prototype),Object.defineProperty(z.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(z.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),$.prototype=Object.create(Error.prototype),$.prototype.constructor=$,$.prototype.name="AbortError";const K=i.PassThrough,q=a.resolve;function W(t,e){if(!W.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return y.Promise=W.Promise,new W.Promise((function(n,r){const a=new z(t,e),u=function(t){const e=t[F].parsedURL,n=new M(t[F].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof i.Readable&&!H)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=S(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:j(n),agent:o})}(a),f=("https:"===u.protocol?s:o).request,l=a.signal;let h=null;const d=function(){let t=new $("The user aborted a request.");r(t),a.body&&a.body instanceof i.Readable&&a.body.destroy(t),h&&h.body&&h.body.emit("error",t)};if(l&&l.aborted)return void d();const v=function(){d(),m()},g=f(u);let y;function m(){g.abort(),l&&l.removeEventListener("abort",v),clearTimeout(y)}l&&l.addEventListener("abort",v),a.timeout&&g.once("socket",(function(t){y=setTimeout((function(){r(new p(`network timeout at: ${a.url}`,"request-timeout")),m()}),a.timeout)})),g.on("error",(function(t){r(new p(`request to ${a.url} failed, reason: ${t.message}`,"system",t)),m()})),g.on("response",(function(t){clearTimeout(y);const e=function(t){const e=new M;for(const n of Object.keys(t))if(!I.test(n))if(Array.isArray(t[n]))for(const r of t[n])E.test(r)||(void 0===e[A][n]?e[A][n]=[r]:e[A][n].push(r));else E.test(t[n])||(e[A][n]=[t[n]]);return e}(t.headers);if(W.isRedirect(t.statusCode)){const i=e.get("Location"),o=null===i?null:q(a.url,i);switch(a.redirect){case"error":return r(new p(`uri requested responds with a redirect, redirect mode is set to error: ${a.url}`,"no-redirect")),void m();case"manual":if(null!==o)try{e.set("Location",o)}catch(t){r(t)}break;case"follow":if(null===o)break;if(a.counter>=a.follow)return r(new p(`maximum redirect reached at: ${a.url}`,"max-redirect")),void m();const i={headers:new M(a.headers),follow:a.follow,counter:a.counter+1,agent:a.agent,compress:a.compress,method:a.method,body:a.body,signal:a.signal,timeout:a.timeout,size:a.size};return 303!==t.statusCode&&a.body&&null===S(a)?(r(new p("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void m()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==a.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(W(new z(o,i))),void m())}}t.once("end",(function(){l&&l.removeEventListener("abort",v)}));let i=t.pipe(new K);const o={url:a.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:a.size,timeout:a.timeout,counter:a.counter},s=e.get("Content-Encoding");if(!a.compress||"HEAD"===a.method||null===s||204===t.statusCode||304===t.statusCode)return h=new B(i,o),void n(h);const u={flush:c.Z_SYNC_FLUSH,finishFlush:c.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return i=i.pipe(c.createGunzip(u)),h=new B(i,o),void n(h);if("deflate"!=s&&"x-deflate"!=s){if("br"==s&&"function"==typeof c.createBrotliDecompress)return i=i.pipe(c.createBrotliDecompress()),h=new B(i,o),void n(h);h=new B(i,o),n(h)}else t.pipe(new K).once("data",(function(t){i=8==(15&t[0])?i.pipe(c.createInflate()):i.pipe(c.createInflateRaw()),h=new B(i,o),n(h)}))})),function(t,e){const n=e.body;null===n?t.end():x(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(g,a)}))}W.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},W.Promise=global.Promise;const Y=W},834:t=>{t.exports=n(5254)},605:t=>{t.exports=n(3685)},211:t=>{t.exports=n(5687)}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{i.r(o),i.d(o,{APP_VERSION_CODE:()=>Dt,APP_VERSION_NAME:()=>Lt,CARRIER_NAME:()=>Nt,DEVICE_LOCALE:()=>wt,DEVICE_MODEL:()=>It,DEVICE_TYPE:()=>St,DecisionApiConfig:()=>X,DecisionMode:()=>H,Event:()=>ct,EventCategory:()=>at,FLAGSHIP_CLIENT:()=>Ft,FLAGSHIP_CONTEXT:()=>Ht,FLAGSHIP_VERSION:()=>Gt,FLAGSHIP_VISITOR:()=>Vt,Flagship:()=>ie,FlagshipStatus:()=>b,HitAbstract:()=>st,HitType:()=>x,INTERFACE_NAME:()=>Bt,INTERNET_CONNECTION:()=>jt,IP:()=>Mt,Item:()=>ut,LOCATION_CITY:()=>Et,LOCATION_COUNTRY:()=>Ct,LOCATION_LAT:()=>_t,LOCATION_LONG:()=>At,LOCATION_REGION:()=>Ot,LogLevel:()=>d,OS_NAME:()=>Rt,OS_VERSION_CODE:()=>Pt,OS_VERSION_NAME:()=>Tt,Page:()=>ft,Screen:()=>lt,Transaction:()=>ht,Visitor:()=>U,default:()=>oe});const t=n(9293);var e=i.n(t);const r=n(8765);var a=i.n(r);n(2419);const s=n(5370);var c=i.n(s);const u=n(9548);var f=i.n(u);const l=n(3761);var h=i.n(l);n(1539),n(8674);const p=n(1239);var d,v={},g="undefined"==typeof window?i(505).ZP:window.fetch;if("undefined"==typeof window){var y=i(605).Agent,m=i(211).Agent;v.agent=function(t){return"http:"===t.protocol?new y({keepAlive:!0}):new m({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"}(d||(d={}));var b,x,k="TypeScript",w="https://decision.flagship.io/v2/",S="v2",I="ready",E="Key {0} must not be null. Default value is returned.",O="No modification for key {0}.",C="{0} must be a {1}",_="visitorId must not be null or empty",A="Method {0} is deactivated while SDK status is: {1}.",M="INITIALIZATION",R="UPDATE CONTEXT",T="GET MODIFICATION",P="GET MODIFICATION INFO",N="ACTIVE MODIFICATION",j="SEND HIT",L="cid",D="x-api-key",B="Content-Type",F="x-sdk-client",G="x-sdk-version",V="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"}(b||(b={})),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"}(x||(x={}));var H,U=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this)).visitorDelegate=t,n.visitorDelegate.on(I,(function(t){n.emit(I,t)})),n}return a()(n,[{key:"getModificationsArray",value:function(){return this.visitorDelegate.getModificationsArray()}},{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:"modifications",get:function(){return this.visitorDelegate.modifications}},{key:"updateContext",value:function(t){this.visitorDelegate.updateContext(t)}},{key:"clearContext",value:function(){this.visitorDelegate.clearContext()}},{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:"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:"authenticate",value:function(t){this.visitorDelegate.authenticate(t)}},{key:"unauthenticate",value:function(){this.visitorDelegate.unauthenticate()}}]),n}(p.EventEmitter);function z(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 $(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<d.ERROR)&&t.logManager.error(e,n)}function K(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.info&&t.logLevel&&!(t.logLevel<d.INFO)&&t.logManager.info(e,n)}n(4916),n(5306),n(4603),n(9714),function(t){t.DECISION_API="API",t.BUCKETING="BUCKETING"}(H||(H={}));var q=function(){function t(t){var e=t.envId,n=t.apiKey,r=t.timeout,i=t.logLevel,o=t.logManager,a=t.statusChangedCallback,s=t.fetchNow,c=t.decisionMode,u=t.enableClientCache,f=t.initialBucketing;this._envId=e,this._apiKey=n,this.logLevel=i||d.ALL,this.timeout=r||2,this.fetchNow=void 0===s||s,this.enableClientCache=void 0===u||u,this._decisionMode=c||H.DECISION_API,this._initialBucketing=f,o&&(this.logManager=o),this.statusChangedCallback=a}return a()(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:"statusChangedCallback",get:function(){return this._statusChangedCallback},set:function(t){"function"==typeof t?this._statusChangedCallback=t:$(this,"statusChangedCallback must be a function","statusChangedCallback")}},{key:"logManager",get:function(){return this._logManager},set:function(t){this._logManager=t}}]),t}();n(7941),n(2526),n(7327),n(5003),n(4747),n(9337);const W=n(8779);var Y=i.n(W);function Q(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 Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){Y()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var X=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){return e.call(this,Z(Z({},t),{},{decisionMode:H.DECISION_API}))}return n}(q),J=function(){function t(t,e,n){this._config=t,this._decisionManager=e,this._trackingManager=n}return a()(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}();const tt=n(9591);var et=i.n(tt);const nt=n(1307);var rt=i.n(nt);n(2222),n(6992),n(1532),n(8783),n(3948);var it=function(){function t(t,e){Y()(this,"_panic",!1),this._config=e,this._httpClient=t}var e;return a()(t,[{key:"config",get:function(){return this._config}},{key:"panic",set:function(t){this.updateFlagshipStatus(t?b.READY_PANIC_ON:b.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,value:i})}})),e}},{key:"getCampaignsModificationsAsync",value:(e=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.getCampaignsAsync(e).then((function(t){return n.getModifications(t)})).catch((function(t){return $(n.config,t.message||t,"getCampaignsModificationsAsync"),new Map})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"isPanic",value:function(){return this._panic}}]),t}(),ot=function(t){c()(r,t);var e,n=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(r);function r(){return n.apply(this,arguments)}return a()(r,[{key:"getCampaignsAsync",value:(e=et()(rt().mark((function t(e){var n,r,i,o,a=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},Y()(n,D,"".concat(this.config.apiKey)),Y()(n,F,k),Y()(n,G,S),Y()(n,B,V),r=n,i={visitorId:e.visitorId,anonymousId:e.anonymousId,trigger_hit:!1,context:e.context},o="".concat(w).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){a.panic=!!t.body.panic;var e=[];return t.body.campaigns&&(e=t.body.campaigns),e})).catch((function(t){return $(a.config,t.message||t,"GET CAMPAIGNS"),[]})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),r}(it);n(6699),n(2023),n(2479),n(3161),n(9653);var at,st=function(){function t(t){this.type=t,this._anonymousId=null}return a()(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},set:function(t){this._type=t}},{key:"config",get:function(){return this._config},set:function(t){this._config=t}},{key:"isNotEmptyString",value:function(t,e){return!(!t||"string"!=typeof t)||($(this.config,z(C,e,"string"),e),!1)}},{key:"isNumeric",value:function(t,e){return!(!t||"number"!=typeof t)||($(this.config,z(C,e,"number"),e),!1)}},{key:"isInteger",value:function(t,e){return t&&"number"==typeof t?(Number.isInteger(t)||$(this.config,z("value of {0} is not an {1}, it will be truncated to {1}",e,"integer"),e),!0):($(this.config,z(C,e,"integer"),e),!1)}},{key:"toApiKeys",value:function(){var t,e=(t={},Y()(t,"vid",this.visitorId),Y()(t,"ds",this.ds),Y()(t,L,"".concat(this.config.envId)),Y()(t,"t",this.type),t);return this.visitorId&&this._anonymousId?(e.vid=this._anonymousId,e.cuid=this.visitorId):(e.vid=this._anonymousId||this.visitorId,e.cuid=null),e}},{key:"isReady",value:function(){return!!(this.visitorId&&this.ds&&this.config&&this.config.envId&&this.type)}}]),t}();!function(t){t.ACTION_TRACKING="ACTION TRACKING",t.USER_ENGAGEMENT="USER ENGAGEMENT"}(at||(at={}));var ct=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.EVENT);var r=t.category,i=t.action,o=t.eventLabel,a=t.eventValue;return n.category=r,n.action=i,o&&(n.eventLabel=o),a&&(n.eventValue=a),n}return a()(n,[{key:"category",get:function(){return this._category},set:function(t){Object.values(at).includes(t)?this._category=t:$(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:"eventLabel",get:function(){return this._eventLabel},set:function(t){this.isNotEmptyString(t,"eventLabel")&&(this._eventLabel=t)}},{key:"eventValue",get:function(){return this._eventValue},set:function(t){this.isNumeric(t,"eventValue")&&(this._eventValue=t)}},{key:"toApiKeys",value:function(){var e=t.prototype.toApiKeys.call(this);return e.ec=this.category,e.ea=this.action,this.eventLabel&&(e.el=this.eventLabel),this.eventValue&&(e.ev=this.eventValue),e}},{key:"isReady",value:function(){return!!(t.prototype.isReady.call(this)&&this.category&&this.action)}},{key:"getErrorMessage",value:function(){return"event category and event action are required"}}]),n}(st);n(3689);var ut=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.ITEM);var r=t.transactionId,i=t.productName,o=t.productSku,a=t.itemCategory,s=t.itemPrice,c=t.itemQuantity;return n.transactionId=r,n.productName=i,n.productSku=o,a&&(n.itemCategory=a),s&&(n.itemPrice=s),c&&(n.itemQuantity=c),n}return a()(n,[{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(){return!!(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:"getErrorMessage",value:function(){return"Transaction Id, Item name and item code are required"}}]),n}(st),ft=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this,x.PAGE_VIEW)).documentLocation=null==t?void 0:t.documentLocation,n}return a()(n,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){return!(!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:"getErrorMessage",value:function(){return"documentLocation url is required"}}]),n}(st),lt=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;return(n=e.call(this,x.SCREEN_VIEW)).documentLocation=null==t?void 0:t.documentLocation,n}return a()(n,[{key:"documentLocation",get:function(){return this._documentLocation},set:function(t){this.isNotEmptyString(t,"documentLocation")&&(this._documentLocation=t)}},{key:"isReady",value:function(){return!(!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:"getErrorMessage",value:function(){return"Screen name is required"}}]),n}(st),ht=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n;n=e.call(this,x.TRANSACTION);var r=t.transactionId,i=t.affiliation,o=t.taxes,a=t.currency,s=t.couponCode,c=t.itemCount,u=t.shippingMethod,f=t.paymentMethod,l=t.totalRevenue,h=t.shippingCosts;return n.transactionId=r,n.affiliation=i,o&&(n.taxes=o),a&&(n.currency=a),s&&(n.couponCode=s),c&&(n.itemCount=c),u&&(n.shippingMethod=u),f&&(n.paymentMethod=f),l&&(n.totalRevenue=l),h&&(n.shippingCosts=h),n}return a()(n,[{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:$(this.config,z("{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(){return!!(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:"getErrorMessage",value:function(){return"Transaction Id and Transaction affiliation are required"}}]),n}(st),pt=function(t){c()(o,t);var e,n,r,i=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(o);function o(){return i.apply(this,arguments)}return a()(o,[{key:"sendConsentHit",value:(r=et()(rt().mark((function t(e){var n,r,i;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={},Y()(n,"t",x.EVENT),Y()(n,"el","".concat(k,":").concat(e.hasConsented)),Y()(n,"ea","fs_consent"),Y()(n,"ec",at.USER_ENGAGEMENT),Y()(n,L,this.config.envId),Y()(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=Y()({},B,V),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 r.apply(this,arguments)})},{key:"sendActive",value:(n=et()(rt().mark((function t(e,n){var r,i,o,a,s;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},Y()(r,D,"".concat(this.config.apiKey)),Y()(r,F,k),Y()(r,G,S),Y()(r,B,V),o=r,a="".concat(w).concat("activate"),i={},Y()(i,"vid",e.visitorId),Y()(i,"vaid",n.variationId),Y()(i,"caid",n.variationGroupId),Y()(i,L,"".concat(this.config.envId)),s=i,e.visitorId&&e.anonymousId?(s.vid=e.visitorId,s.aid=e.anonymousId):(s.vid=e.anonymousId||e.visitorId,s.aid=null),t.next=6,this.httpClient.postAsync(a,{headers:o,timeout:this.config.timeout,body:s});case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"sendHit",value:(e=et()(rt().mark((function t(e){var n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Y()({},B,V),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)})}]),o}(function(){function t(t,e){this._httpClient=t,this._config=e}return a()(t,[{key:"httpClient",get:function(){return this._httpClient}},{key:"config",get:function(){return this._config}}]),t}()),dt=function(){function t(){}return a()(t,[{key:"emergency",value:function(t,e){this.log(d.EMERGENCY,t,e)}},{key:"alert",value:function(t,e){this.log(d.ALERT,t,e)}},{key:"critical",value:function(t,e){this.log(d.CRITICAL,t,e)}},{key:"error",value:function(t,e){this.log(d.ERROR,t,e)}},{key:"warning",value:function(t,e){this.log(d.WARNING,t,e)}},{key:"notice",value:function(t,e){this.log(d.NOTICE,t,e)}},{key:"info",value:function(t,e){this.log(d.INFO,t,e)}},{key:"debug",value:function(t,e){this.log(d.DEBUG,t,e)}},{key:"log",value:function(t,e,n){var r=new Date,i=function(t){return 1===t.toString().length?"0".concat(t):t},o="[".concat(i(r.getFullYear()),"-").concat(i(r.getMonth()),"-").concat(i(r.getDay())," ").concat(i(r.getHours()),":").concat(i(r.getMinutes()),"] [").concat("Flagship SDK","] [").concat(d[t],"] [").concat(n,"] : ").concat(e);console.log(o)}}]),t}();const vt=n(353);var gt=i.n(vt);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 mt(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){Y()(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}n(1038);var bt=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n,r;return(r=e.call(this,mt(mt({},t),{},{decisionMode:H.BUCKETING}))).pollingInterval=null!=(n=null==t?void 0:t.pollingInterval)?n:2,r.onBucketingFail=null==t?void 0:t.onBucketingFail,r.onBucketingSuccess=null==t?void 0:t.onBucketingSuccess,r.onBucketingUpdated=null==t?void 0:t.onBucketingUpdated,r}return n}(q);n(4723);var xt,kt=function(){function t(t){this.visitor=t}return a()(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.modifications=this.decisionManager.getModifications(t)}catch(t){$(this.config,t.message||t,"updateCampaigns")}}}]),t}(),wt="sdk_deviceLanguage",St="sdk_deviceType",It="sdk_deviceModel",Et="sdk_city",Ot="sdk_region",Ct="sdk_country",_t="sdk_lat",At="sdk_long",Mt="sdk_ip",Rt="sdk_osName",Tt="sdk_osVersionName",Pt="sdk_osVersionCode",Nt="sdk_carrierName",jt="sdk_internetConnection",Lt="sdk_versionName",Dt="sdk_versionCode",Bt="sdk_interfaceName",Ft="fs_client",Gt="fs_version",Vt="fs_users",Ht=(xt={},Y()(xt,wt,"string"),Y()(xt,St,"string"),Y()(xt,It,"string"),Y()(xt,Et,"string"),Y()(xt,Ot,"string"),Y()(xt,Ct,"string"),Y()(xt,_t,"number"),Y()(xt,At,"number"),Y()(xt,Mt,"string"),Y()(xt,Rt,"string"),Y()(xt,Tt,"string"),Y()(xt,Pt,"number"),Y()(xt,Nt,"string"),Y()(xt,jt,"string"),Y()(xt,Lt,"string"),Y()(xt,Dt,"number"),Y()(xt,Bt,"string"),Y()(xt,Ft,"string"),Y()(xt,Gt,"string"),Y()(xt,Vt,"string"),xt);function Ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var zt=function(t){c()(g,t);var n,r,i,o,s,u,f,l,h,p,d,v=Ut(g);function g(){return v.apply(this,arguments)}return a()(g,[{key:"setConsent",value:function(t){var e=this,n="setConsent";this.visitor.hasConsented=t,this.hasTrackingManager(n)&&this.trackingManager.sendConsentHit(this.visitor).catch((function(t){$(e.config,t.message||t,n)}))}},{key:"checkPredefinedContext",value:function(t,e){var n=Ht[t];if(!n)return null;var r=!1;return"string"===n?r="string"==typeof e:"number"===n&&(r="number"==typeof e),r||$(this.config,z("Predefined Context {0} must be type of {1}",t,n),R),r}},{key:"updateContextKeyValue",value:function(t,n){var r=e()(n);if("string"!=typeof t||""===t||"string"!==r&&"number"!==r&&"boolean"!==r)$(this.visitor.config,z("params {0} must be a non null String, and 'value' must be one of the following types , Number, Boolean",t),R);else if(!t.match(/^fs_/i)){var i=this.checkPredefinedContext(t,n);("boolean"!=typeof i||i)&&(this.visitor.context[t]=n)}}},{key:"updateContext",value:function(t){if(t)for(var e in t){var n=t[e];this.updateContextKeyValue(e,n)}else $(this.visitor.config,"Context must not to be null",R)}},{key:"clearContext",value:function(){this.visitor.context={}}},{key:"checkAndGetModification",value:function(t,n){var r=t.key,i=t.defaultValue,o=t.activate;if(!r||"string"!=typeof r)return $(this.config,z(E,r),T),i;var a=this.visitor.modifications.get(r);return a?"object"===e()(a.value)&&"object"===e()(i)&&Array.isArray(a.value)!==Array.isArray(i)||e()(a.value)!==e()(i)?($(this.config,z("Modification for key {0} has a different type. Default value is returned.",r),T),a.value||!o&&!n||this.activateModification(r),i):((o||n)&&this.activateModification(r),a.value):(K(this.config,z("No modification for key {0}. Default value is returned.",r),T),i)}},{key:"getModifications",value:(d=et()(rt().mark((function t(e,n){return rt().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 d.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:(p=et()(rt().mark((function t(e){return rt().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 p.apply(this,arguments)})},{key:"getModificationSync",value:function(t){return this.checkAndGetModification(t)}},{key:"getModificationInfo",value:(h=et()(rt().mark((function t(e){return rt().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 h.apply(this,arguments)})},{key:"getModificationInfoSync",value:function(t){return t&&"string"==typeof t?this.visitor.modifications.get(t)||($(this.visitor.config,z(O,t),P),null):($(this.visitor.config,z(E,t),P),null)}},{key:"synchronizeModifications",value:(l=et()(rt().mark((function t(){var e;return rt().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:e=t.sent,this.visitor.campaigns=e,this.visitor.modifications=this.decisionManager.getModifications(this.visitor.campaigns),this.visitor.emit(I),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),this.visitor.emit(I,t.t0),$(this.config,t.t0.message||t.t0,"SYNCHRONIZED MODIFICATION");case 13:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(){return l.apply(this,arguments)})},{key:"activateModification",value:(f=et()(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&"string"==typeof e){t.next=3;break}return $(this.config,z(E,e),N),t.abrupt("return");case 3:return t.abrupt("return",this.activate(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"activateModifications",value:(u=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)){t.next=3;break}return $(this.config,z(E,e),N),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 u.apply(this,arguments)})},{key:"hasTrackingManager",value:function(t){var e=this.trackingManager;return e||$(this.config,z("trackerManager must not be null."),t),!!e}},{key:"activate",value:(s=et()(rt().mark((function t(e){var n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=this.visitor.modifications.get(e)){t.next=5;break}return $(this.visitor.config,z(O,e),N),t.abrupt("return");case 5:if(this.hasTrackingManager(N)){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,this.trackingManager.sendActive(this.visitor,n);case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),$(this.config,t.t0.message||t.t0,N);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(t){return s.apply(this,arguments)})},{key:"sendHit",value:function(t){return this.hasTrackingManager(j)?this.prepareAndSendHit(t):Promise.resolve()}},{key:"sendHits",value:(o=et()(rt().mark((function t(e){var n=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.hasTrackingManager(j)){t.next=2;break}return t.abrupt("return");case 2:e.forEach((function(t){n.prepareAndSendHit(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"getHit",value:function(t){var e=null;switch(t.type.toUpperCase()){case x.EVENT:e=new ct(t);break;case x.ITEM:e=new ut(t);break;case x.PAGE:case x.PAGE_VIEW:e=new ft(t);break;case x.SCREEN:case x.SCREEN_VIEW:e=new lt(t);break;case x.TRANSACTION:e=new ht(t)}return e}},{key:"prepareAndSendHit",value:(i=et()(rt().mark((function t(e){var n,r;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(e instanceof st)){t.next=5;break}n=e,t.next=10;break;case 5:if(r=this.getHit(e)){t.next=9;break}return $(this.config,"property type is required and must ",j),t.abrupt("return");case 9:n=r;case 10:if(n.visitorId=this.visitor.visitorId,n.ds="APP",n.config=this.config,n.anonymousId=this.visitor.anonymousId,n.isReady()){t.next=17;break}return $(this.config,n.getErrorMessage(),j),t.abrupt("return");case 17:return t.next=19,this.trackingManager.sendHit(n);case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(0),$(this.config,t.t0.message||t.t0,j);case 24:case"end":return t.stop()}}),t,this,[[0,21]])}))),function(t){return i.apply(this,arguments)})},{key:"getAllModifications",value:(r=et()(rt().mark((function t(){var e=this,n=arguments;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.length>0&&void 0!==n[0]&&n[0]&&this.visitor.modifications.forEach((function(t,n){e.activateModification(n)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns});case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getModificationsForCampaign",value:(n=et()(rt().mark((function t(e){var n=this,r=arguments;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.length>1&&void 0!==r[1]&&r[1]&&this.visitor.modifications.forEach((function(t){t.campaignId===e&&n.activateModification(t.key)})),t.abrupt("return",{visitorId:this.visitor.visitorId,campaigns:this.visitor.campaigns.filter((function(t){return t.id===e}))});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"authenticate",value:function(t){var e="authenticate";this.config.decisionMode!==H.BUCKETING?t?(this.visitor.anonymousId=this.visitor.visitorId,this.visitor.visitorId=t):$(this.config,_,e):this.logDeactivateOnBucketing(e)}},{key:"unauthenticate",value:function(){var t="unauthenticate";this.config.decisionMode!==H.BUCKETING?this.visitor.anonymousId?(this.visitor.visitorId=this.visitor.anonymousId,this.visitor.anonymousId=null):$(this.config,"Visitor is not authenticated yet",t):this.logDeactivateOnBucketing(t)}},{key:"logDeactivateOnBucketing",value:function(t){$(this.config,z("Method {0} is deactivated on Bucketing mode.",t),t)}}]),g}(kt),$t=function(t){c()(i,t);var e,n,r=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"synchronizeModifications",value:function(){return this.log("synchronizeModifications"),Promise.resolve()}},{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:"getModificationInfoSync",value:function(t){return this.log("getModificationInfo"),null}},{key:"activateModification",value:(n=et()(rt().mark((function t(e){return rt().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 n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().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 e.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:"log",value:function(t){$(this.config,z(A,t,b[b.NOT_INITIALIZED]),t)}}]),i}(zt),Kt=function(t){c()(i,t);var e,n,r=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"setConsent",value:function(t){this.visitor.hasConsented=t,$(this.config,z("Send consent hit is deactivated while SDK status is: {1}.",b[b.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:"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:(n=et()(rt().mark((function t(e){return rt().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 n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().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 e.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:"log",value:function(t){$(this.config,z(A,t,b[b.READY_PANIC_ON]),t)}}]),i}(zt),qt=function(t){c()(i,t);var e,n,r=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(i);function i(){return r.apply(this,arguments)}return a()(i,[{key:"activateModification",value:(n=et()(rt().mark((function t(e){return rt().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 n.apply(this,arguments)})},{key:"activateModifications",value:(e=et()(rt().mark((function t(e){return rt().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 e.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:"log",value:function(t){$(this.config,z("Method {0} is deactivated for visitor {1} : visitor did not consent.",t,this.visitor.visitorId),t)}}]),i}(zt),Wt="FS_CLIENT_VISITOR",Yt=function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(){return e.apply(this,arguments)}return a()(n,[{key:"updateContext",value:function(t){this.getStrategy().updateContext(t)}},{key:"clearContext",value:function(){this.getStrategy().clearContext()}},{key:"getModification",value:function(t){return this.getStrategy().getModification(t)}},{key:"getModificationSync",value:function(t){return this.getStrategy().getModificationSync(t)}},{key:"getModifications",value:function(t,e){return this.getStrategy().getModifications(t,e)}},{key:"getModificationsSync",value:function(t,e){return this.getStrategy().getModificationsSync(t,e)}},{key:"getModificationInfo",value:function(t){return this.getStrategy().getModificationInfo(t)}},{key:"getModificationInfoSync",value:function(t){return this.getStrategy().getModificationInfoSync(t)}},{key:"synchronizeModifications",value:function(){return this.getStrategy().synchronizeModifications()}},{key:"activateModification",value:function(t){return this.getStrategy().activateModification(t)}},{key:"activateModifications",value:function(t){return this.getStrategy().activateModifications(t)}},{key:"sendHit",value:function(t){return this.getStrategy().sendHit(t)}},{key:"sendHits",value:function(t){return this.getStrategy().sendHits(t)}},{key:"getAllModifications",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.getStrategy().getAllModifications(t)}},{key:"getModificationsForCampaign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getStrategy().getModificationsForCampaign(t,e)}},{key:"authenticate",value:function(t){this.getStrategy().authenticate(t),this.updateCache()}},{key:"unauthenticate",value:function(){this.getStrategy().unauthenticate(),this.updateCache()}}]),n}(function(t){c()(n,t);var e=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(n);function n(t){var n,r=t.visitorId,i=t.configManager,o=t.context,a=t.isAuthenticated,s=t.hasConsented,c=t.initialModifications,u=t.initialCampaigns;(n=e.call(this))._configManager=i;var f=n.config.enableClientCache?function(){var t=null;try{t=localStorage.getItem(Wt)}catch(t){}return t?JSON.parse(t):null}():null;return n.visitorId=r||(null==f?void 0:f.visitorId)||n.createVisitorId(),n.campaigns=[],n._context={},n.updateContext(o),n._anonymousId=(null==f?void 0:f.anonymousId)||null,n.loadPredefinedContext(),s||n.setConsent(!1),n.hasConsented=null==s||s,!n._anonymousId&&a&&n.config.decisionMode===H.DECISION_API&&(n._anonymousId=n.uuidV4()),n.updateCache(),n.setInitialModifications(c),n.setInitializeCampaigns(u,!!c),n}return a()(n,[{key:"getModificationsArray",value:function(){return Array.from(this._modifications,(function(t){var e=gt()(t,2);return e[0],e[1]}))}},{key:"setInitialModifications",value:function(t){var e=this;this._modifications=new Map,t&&(t instanceof Map||Array.isArray(t))&&t.forEach((function(t){e._modifications.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(Wt,JSON.stringify(t))}catch(t){}}({visitorId:this.visitorId,anonymousId:this.anonymousId})}},{key:"loadPredefinedContext",value:function(){this.context.fs_client=k,this.context.fs_version=S,this.context.fs_users=this.visitorId}},{key:"uuidV4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},{key:"createVisitorId",value:function(){var t=new Date,e=Math.floor(89999*Math.random()+1e4),n=function(t){return 1===t.toString().length?"0".concat(t):t};return"".concat(t.getFullYear()).concat(n(t.getMonth()+1)).concat(n(t.getDate())).concat(n(t.getHours())).concat(n(t.getMinutes())).concat(e)}},{key:"visitorId",get:function(){return this._visitorId},set:function(t){t&&"string"==typeof t?this._visitorId=t:$(this.config,_,"VISITOR ID")}},{key:"hasConsented",get:function(){return this._hasConsented},set:function(t){this._hasConsented=t}},{key:"setConsent",value:function(t){this.getStrategy().setConsent(t)}},{key:"context",get:function(){return this._context},set:function(t){this._context={},this.updateContext(t)}},{key:"modifications",get:function(){return this._modifications},set:function(t){this._modifications=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 ie.getStatus()&&ie.getStatus()!==b.NOT_INITIALIZED?ie.getStatus()===b.READY_PANIC_ON?new Kt(this):this.hasConsented?new zt(this):new qt(this):new $t(this)}}]),n}(p.EventEmitter));function Qt(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 Zt(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)?Zt(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,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Zt(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}n(7042),n(8309),n(1817),n(2165),n(6755),n(7852);var Xt=function(t){c()(o,t);var e,n,r,i=function(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h()(t);if(e){var i=h()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}(o);function o(t,e,n){var r;return(r=i.call(this,t,e))._murmurHash=n,r._isFirstPooling=!0,e.initialBucketing&&(r._bucketingContent=e.initialBucketing),r}return a()(o,[{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(b.READY)),"function"==typeof this.config.onBucketingSuccess&&this.config.onBucketingSuccess({status:t.status,payload:this._bucketingContent}),this._isPooling=!1}},{key:"startPolling",value:function(){var t,e=this,n=1e3*(null!=(t=this.config.pollingInterval)?t:2);K(this.config,"Bucketing polling starts","startPolling"),this.polling(),0!==n&&(this._intervalID=setInterval((function(){e.polling()}),n))}},{key:"polling",value:(r=et()(rt().mark((function t(){var e,n,r,i;return rt().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(b.POLLING),t.prev=4,n=z("https://cdn.flagship.io/{0}/bucketing.json",this.config.envId),e={},Y()(e,D,"".concat(this.config.apiKey)),Y()(e,F,k),Y()(e,G,S),Y()(e,B,V),r=e,this._lastModified&&(r["if-modified-since"]=this._lastModified),t.next=10,this._httpClient.getAsync(n,{headers:r});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,$(this.config,t.t0,"startPolling dd"),this._isFirstPooling&&this.updateFlagshipStatus(b.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 r.apply(this,arguments)})},{key:"stopPolling",value:function(){clearInterval(this._intervalID),this._isPooling=!1,K(this.config,"Bucketing polling stopped","stopPolling")}},{key:"sendContext",value:(n=et()(rt().mark((function t(e){var n,r,i,o;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=z("https://decision.flagship.io/v2/{0}/events",this.config.envId),n={},Y()(n,D,"".concat(this.config.apiKey)),Y()(n,F,k),Y()(n,G,S),Y()(n,B,V),i=n,o={visitorId:e.visitorId,type:"CONTEXT",data:e.context},t.next=6,this._httpClient.postAsync(r,{headers:i,body:o});case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),$(this.config,t.t0.message||t.t0,"sendContext");case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t){return n.apply(this,arguments)})},{key:"getCampaignsAsync",value:(e=et()(rt().mark((function t(e){var n,r=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.sendContext(e),this._bucketingContent){t.next=3;break}return t.abrupt("return",[]);case 3:if(!this._bucketingContent.panic){t.next=6;break}return this.panic=!0,t.abrupt("return",[]);case 6:if(this.panic=!1,this._bucketingContent.campaigns){t.next=9;break}return t.abrupt("return",[]);case 9:return n=[],this._bucketingContent.campaigns.forEach((function(t){var i=r.getVisitorCampaigns(t.variationGroups,t.id,e);i&&n.push(i)})),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getVisitorCampaigns",value:function(t,e,n){var r,i=Qt(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(this.isMatchTargeting(o,n)){var a=this.getVariation(o,n.visitorId);return a?{id:e,variation:a,variationGroupId:o.id}:null}}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"getVariation",value:function(t,e){var n,r=this._murmurHash.murmurHash3Int32(t.id+e)%100,i=0,o=Qt(t.variations);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(void 0!==a.allocation&&r<(i+=a.allocation))return{id:a.id,modifications:a.modifications,reference:!!a.reference}}}catch(t){o.e(t)}finally{o.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=Qt(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.key,c=a.value,u=a.operator;if("fs_all_users"!==s){if("fs_users"===s)n=e.visitorId;else{if(!(s in e.context)){i=!1;break}n=e.context[s]}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,a=Qt(n);try{for(a.s();!(i=a.n()).done;){var s=i.value;if((o=this.testOperator(t,e,s))!==r)break}}catch(t){a.e(t)}finally{a.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}}]),o}(it),Jt=function(){function t(){}return a()(t,[{key:"murmurHash3Int32",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=3&t.length,s=t.length-a;e=o;var c=3432918353,u=461845907;for(i=0;i<s;)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,a){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}();n(7727);var te=i(271);function ee(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 ne(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(n),!0).forEach((function(e){Y()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var re=function(){function t(){}var e;return a()(t,[{key:"getResponse",value:(e=et()(rt().mark((function t(e){var n,r,i;return rt().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&&(i=JSON.parse(i)),e.ok){t.next=8;break}throw new Error(i||e.statusText);case 8:return t.abrupt("return",{status:e.status,body:i});case 9:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"getAsync",value:function(t,e){var n=new te,r=setTimeout((function(){return n.abort()}),1e3*(null!=e&&e.timeout?e.timeout:2));return g(t,ne(ne({},v),{},{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 te,r=setTimeout((function(){return n.abort()}),e.timeout?1e3*e.timeout:2e3);return g(t,ne(ne({},v),{},{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}(),ie=function(){function t(){}return a()(t,[{key:"config",get:function(){return this._config}},{key:"configManager",get:function(){return this._configManger},set:function(t){this._configManger=t}},{key:"setStatus",value:function(t){var e=this.config.statusChangedCallback;if(this.config&&e&&this._status!==t)return this._status=t,void e(t);this._status=t}},{key:"buildConfig",value:function(t){return t instanceof q?t:(null==t?void 0:t.decisionMode)===H.BUCKETING?new bt(t):new X(t)}},{key:"buildDecisionManager",value:function(t,e,n){var r,i=function(e){t.setStatus(e)};if(e.decisionMode===H.BUCKETING){var o=r=new Xt(n,e,new Jt);r.statusChangedCallback(i),o.startPolling()}else(r=new ot(n,e)).statusChangedCallback(i);return r}},{key:"newVisitor",value:function(e,n){return t.newVisitor(e,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.config)?void 0:e.apiKey,a=null==(n=this._instance)||null==(r=n.config)?void 0:r.envId,s=null==(i=this._instance)?void 0:i.configManager;return!!(this._instance&&o&&a&&s)}},{key:"getStatus",value:function(){return this.getInstance()._status}},{key:"getConfig",value:function(){return this.getInstance()._config}},{key:"start",value:function(t,n,r){var i,o=this.getInstance();if((r=o.buildConfig(r)).envId=t,r.apiKey=n,o._config=r,o.setStatus(b.STARTING),r.logManager||(r.logManager=new dt),!t||!n)return o.setStatus(b.NOT_INITIALIZED),$(r,"Params 'envId' and 'apiKey' must not be null or empty.",M),null;var a=null==(i=o.configManager)?void 0:i.decisionManager;"object"===e()(a)&&a instanceof Xt&&a.stopPolling();var s=new re;a=o.buildDecisionManager(o,r,s);var c=new pt(s,r);return o.configManager?(o.configManager.config=r,o.configManager.decisionManager=a,o.configManager.trackingManager=c):o.configManager=new J(r,a,c),this.isReady()?(o._status===b.STARTING&&o.setStatus(b.READY),K(r,z("Flagship SDK (version: {0}) READY",S),M),o):(o.setStatus(b.NOT_INITIALIZED),null)}},{key:"newVisitor",value:function(t,e){if(!this.isReady())return null;var n,r,i,o,a,s=!1,c=!0;"string"==typeof t||null===t?(n=t,r=e||{}):(n=(null==t?void 0:t.visitorId)||null,r=(null==t?void 0:t.context)||{},s=!(null==t||!t.isAuthenticated),c=null==(a=null==t?void 0:t.hasConsented)||a,i=null==t?void 0:t.initialModifications,o=null==t?void 0:t.initialCampaigns);var u=new Yt({visitorId:n,context:r,isAuthenticated:s,hasConsented:c,configManager:this.getInstance().configManager,initialModifications:i,initialCampaigns:o}),f=new U(u);return this.getConfig().fetchNow&&f.synchronizeModifications(),f}}]),t}();const oe=ie})(),t.exports=o})()},9662:(t,e,n)=>{var r=n(614),i=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(i(t)+" is not a function")}},9483:(t,e,n)=>{var r=n(4411),i=n(6330);t.exports=function(t){if(r(t))return t;throw TypeError(i(t)+" is not a constructor")}},6077:(t,e,n)=>{var r=n(614);t.exports=function(t){if("object"==typeof t||r(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},1223:(t,e,n)=>{var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},1530:(t,e,n)=>{"use strict";var r=n(8710).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},5787:t=>{t.exports=function(t,e,n){if(t instanceof e)return t;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},9670:(t,e,n)=>{var r=n(111);t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},8533:(t,e,n)=>{"use strict";var r=n(2092).forEach,i=n(9341)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},8457:(t,e,n)=>{"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),s=n(4411),c=n(7466),u=n(6135),f=n(8554),l=n(1246);t.exports=function(t){var e=i(t),n=s(this),h=arguments.length,p=h>1?arguments[1]:void 0,d=void 0!==p;d&&(p=r(p,h>2?arguments[2]:void 0,2));var v,g,y,m,b,x,k=l(e),w=0;if(!k||this==Array&&a(k))for(v=c(e.length),g=n?new this(v):Array(v);v>w;w++)x=d?p(e[w],w):e[w],u(g,w,x);else for(b=(m=f(e,k)).next,g=n?new this:[];!(y=b.call(m)).done;w++)x=d?o(m,p,[y.value,w],!0):y.value,u(g,w,x);return g.length=w,g}},1318:(t,e,n)=>{var r=n(5656),i=n(7466),o=n(1400),a=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),f=o(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,e,n)=>{var r=n(9974),i=n(8361),o=n(7908),a=n(7466),s=n(5417),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(d,v,g,y){for(var m,b,x=o(d),k=i(x),w=r(v,g,3),S=a(k.length),I=0,E=y||s,O=e?E(d,S):n||h?E(d,0):void 0;S>I;I++)if((p||I in k)&&(b=w(m=k[I],I,x),t))if(e)O[I]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return I;case 2:c.call(O,m)}else switch(t){case 4:return!1;case 7:c.call(O,m)}return l?-1:u||f?f:O}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},1194:(t,e,n)=>{var r=n(7293),i=n(5112),o=n(7392),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:(t,e,n)=>{"use strict";var r=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},7475:(t,e,n)=>{var r=n(3157),i=n(4411),o=n(111),a=n(5112)("species");t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===Array||r(e.prototype))||o(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?Array:e}},5417:(t,e,n)=>{var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},3411:(t,e,n)=>{var r=n(9670),i=n(9212);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},7072:(t,e,n)=>{var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,n)=>{var r=n(1694),i=n(614),o=n(4326),a=n(5112)("toStringTag"),s="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),a))?n:s?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},5631:(t,e,n)=>{"use strict";var r=n(3070).f,i=n(30),o=n(2248),a=n(9974),s=n(5787),c=n(408),u=n(654),f=n(6340),l=n(9781),h=n(2423).fastKey,p=n(9909),d=p.set,v=p.getterFor;t.exports={getConstructor:function(t,e,n,u){var f=t((function(t,r){s(t,f,e),d(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&c(r,t[u],{that:t,AS_ENTRIES:n})})),p=v(e),g=function(t,e,n){var r,i,o=p(t),a=y(t,e);return a?a.value=n:(o.last=a={index:i=h(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),l?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},y=function(t,e){var n,r=p(t),i=h(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(f.prototype,{clear:function(){for(var t=p(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=this,n=p(e),r=y(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),l?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=p(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),o(f.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&r(f.prototype,"size",{get:function(){return p(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=v(e),o=v(r);u(t,e,(function(t,e){d(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},7710:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(4705),a=n(1320),s=n(2423),c=n(408),u=n(5787),f=n(614),l=n(111),h=n(7293),p=n(7072),d=n(8003),v=n(9587);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),m=g?"set":"add",b=i[t],x=b&&b.prototype,k=b,w={},S=function(t){var e=x[t];a(x,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,!f(b)||!(y||x.forEach&&!h((function(){(new b).entries().next()})))))k=n.getConstructor(e,t,g,m),s.enable();else if(o(t,!0)){var I=new k,E=I[m](y?{}:-0,1)!=I,O=h((function(){I.has(1)})),C=p((function(t){new b(t)})),_=!y&&h((function(){for(var t=new b,e=5;e--;)t[m](e,e);return!t.has(-0)}));C||((k=e((function(e,n){u(e,k,t);var r=v(new b,e,k);return null!=n&&c(n,r[m],{that:r,AS_ENTRIES:g}),r}))).prototype=x,x.constructor=k),(O||_)&&(S("delete"),S("has"),g&&S("get")),(_||E)&&S(m),y&&x.clear&&delete x.clear}return w[t]=k,r({global:!0,forced:k!=b},w),d(k,t),y||n.setStrong(k,t,g),k}},9920:(t,e,n)=>{var r=n(6656),i=n(3887),o=n(1236),a=n(3070);t.exports=function(t,e){for(var n=i(e),s=a.f,c=o.f,u=0;u<n.length;u++){var f=n[u];r(t,f)||s(t,f,c(e,f))}}},4964:(t,e,n)=>{var r=n(5112)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},8544:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,n)=>{"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,u,!1,!0),s[u]=c,t}},8880:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6135:(t,e,n)=>{"use strict";var r=n(4948),i=n(3070),o=n(9114);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},654:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(6530),a=n(614),s=n(4994),c=n(9518),u=n(7674),f=n(8003),l=n(8880),h=n(1320),p=n(5112),d=n(7497),v=n(3383),g=o.PROPER,y=o.CONFIGURABLE,m=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,x=p("iterator"),k="keys",w="values",S="entries",I=function(){return this};t.exports=function(t,e,n,o,p,v,E){s(n,e,o);var O,C,_,A=function(t){if(t===p&&N)return N;if(!b&&t in T)return T[t];switch(t){case k:case w:case S:return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",R=!1,T=t.prototype,P=T[x]||T["@@iterator"]||p&&T[p],N=!b&&P||A(p),j="Array"==e&&T.entries||P;if(j&&(O=c(j.call(new t)))!==Object.prototype&&O.next&&(i||c(O)===m||(u?u(O,m):a(O[x])||h(O,x,I)),f(O,M,!0,!0),i&&(d[M]=I)),g&&p==w&&P&&P.name!==w&&(!i&&y?l(T,"name",w):(R=!0,N=function(){return P.call(this)})),p)if(C={values:A(w),keys:v?N:A(k),entries:A(S)},E)for(_ in C)(b||R||!(_ in T))&&h(T,_,C[_]);else r({target:e,proto:!0,forced:b||R},C);return i&&!E||T[x]===N||h(T,x,N,{name:p}),d[e]=N,C}},7235:(t,e,n)=>{var r=n(857),i=n(6656),o=n(6061),a=n(3070).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},9781:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,n)=>{var r=n(317)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7871:t=>{t.exports="object"==typeof window},1528:(t,e,n)=>{var r=n(8113),i=n(7854);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==i.Pebble},6833:(t,e,n)=>{var r=n(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:(t,e,n)=>{var r=n(4326),i=n(7854);t.exports="process"==r(i.process)},1036:(t,e,n)=>{var r=n(8113);t.exports=/web0s(?!.*chrome)/i.test(r)},8113:(t,e,n)=>{var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:(t,e,n)=>{var r,i,o=n(7854),a=n(8113),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f?i=(r=f.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),c=n(9920),u=n(4705);t.exports=function(t,e){var n,f,l,h,p,d=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[d]||s(d,{}):(r[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=i(n,f))&&p.value:n[f],!u(v?f:d+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),a(n,f,h,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{"use strict";n(4916);var r=n(1320),i=n(2261),o=n(7293),a=n(5112),s=n(8880),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,f){var l=a(t),h=!o((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})),p=h&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[l]=/./[l]),n.exec=function(){return e=!0,null},n[l](""),!e}));if(!h||!p||n){var d=/./[l],v=e(l,""[t],(function(t,e,n,r,o){var a=e.exec;return a===i||a===u.exec?h&&!o?{done:!0,value:d.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,v[0]),r(u,l,v[1])}f&&s(u[l],"sham",!0)}},6677:(t,e,n)=>{var r=n(7293);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},9974:(t,e,n)=>{var r=n(9662);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},7065:(t,e,n)=>{"use strict";var r=n(9662),i=n(111),o=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(a.prototype=e.prototype),a}},6530:(t,e,n)=>{var r=n(9781),i=n(6656),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},5005:(t,e,n)=>{var r=n(7854),i=n(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},1246:(t,e,n)=>{var r=n(648),i=n(8173),o=n(7497),a=n(5112)("iterator");t.exports=function(t){if(null!=t)return i(t,a)||i(t,"@@iterator")||o[r(t)]}},8554:(t,e,n)=>{var r=n(9662),i=n(9670),o=n(1246);t.exports=function(t,e){var n=arguments.length<2?o(t):e;if(r(n))return i(n.call(t));throw TypeError(String(t)+" is not iterable")}},8173:(t,e,n)=>{var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},647:(t,e,n)=>{var r=n(7908),i=Math.floor,o="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,c,u,f){var l=n+t.length,h=c.length,p=s;return void 0!==u&&(u=r(u),p=a),o.call(f,p,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":a=u[o.slice(1,-1)];break;default:var s=+o;if(0===s)return r;if(s>h){var f=i(s/10);return 0===f?r:f<=h?void 0===c[f-1]?o.charAt(1):c[f-1]+o.charAt(1):r}a=c[s-1]}return void 0===a?"":a}))}},7854:t=>{var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||Function("return this")()},6656:(t,e,n)=>{var r=n(7908),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(r(t),e)}},3501:t=>{t.exports={}},842:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},490:(t,e,n)=>{var r=n(5005);t.exports=r("document","documentElement")},4664:(t,e,n)=>{var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var r=n(7293),i=n(4326),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},9587:(t,e,n)=>{var r=n(614),i=n(111),o=n(7674);t.exports=function(t,e,n){var a,s;return o&&r(a=e.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(t,s),t}},2788:(t,e,n)=>{var r=n(614),i=n(5465),o=Function.toString;r(i.inspectSource)||(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},2423:(t,e,n)=>{var r=n(2109),i=n(3501),o=n(111),a=n(6656),s=n(3070).f,c=n(8006),u=n(1156),f=n(9711),l=n(6677),h=!1,p=f("meta"),d=0,v=Object.isExtensible||function(){return!0},g=function(t){s(t,p,{value:{objectID:"O"+d++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},h=!0;var t=c.f,e=[].splice,n={};n[p]=1,t(n).length&&(c.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===p){e.call(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,p)){if(!v(t))return"F";if(!e)return"E";g(t)}return t[p].objectID},getWeakData:function(t,e){if(!a(t,p)){if(!v(t))return!0;if(!e)return!1;g(t)}return t[p].weakData},onFreeze:function(t){return l&&h&&v(t)&&!a(t,p)&&g(t),t}};i[p]=!0},9909:(t,e,n)=>{var r,i,o,a=n(8536),s=n(7854),c=n(111),u=n(8880),f=n(6656),l=n(5465),h=n(6200),p=n(3501),d="Object already initialized",v=s.WeakMap;if(a||l.state){var g=l.state||(l.state=new v),y=g.get,m=g.has,b=g.set;r=function(t,e){if(m.call(g,t))throw new TypeError(d);return e.facade=t,b.call(g,t,e),e},i=function(t){return y.call(g,t)||{}},o=function(t){return m.call(g,t)}}else{var x=h("state");p[x]=!0,r=function(t,e){if(f(t,x))throw new TypeError(d);return e.facade=t,u(t,x,e),e},i=function(t){return f(t,x)?t[x]:{}},o=function(t){return f(t,x)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},3157:(t,e,n)=>{var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:t=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,n)=>{var r=n(7293),i=n(614),o=n(648),a=n(5005),s=n(2788),c=[],u=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,l=f.exec,h=!f.exec((function(){})),p=function(t){if(!i(t))return!1;try{return u(Object,c,t),!0}catch(t){return!1}};t.exports=!u||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!l.call(f,s(t))}:p},4705:(t,e,n)=>{var r=n(7293),i=n(614),o=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n==f||n!=u&&(i(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},8730:(t,e,n)=>{var r=n(111),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},111:(t,e,n)=>{var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:t=>{t.exports=!1},7850:(t,e,n)=>{var r=n(111),i=n(4326),o=n(5112)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},2190:(t,e,n)=>{var r=n(614),i=n(5005),o=n(3307);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&Object(t)instanceof e}},408:(t,e,n)=>{var r=n(9670),i=n(7659),o=n(7466),a=n(9974),s=n(8554),c=n(1246),u=n(9212),f=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,h,p,d,v,g,y,m=n&&n.that,b=!(!n||!n.AS_ENTRIES),x=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),w=a(e,m,1+b+k),S=function(t){return l&&u(l,"normal",t),new f(!0,t)},I=function(t){return b?(r(t),k?w(t[0],t[1],S):w(t[0],t[1])):k?w(t,S):w(t)};if(x)l=t;else{if(!(h=c(t)))throw TypeError(String(t)+" is not iterable");if(i(h)){for(p=0,d=o(t.length);d>p;p++)if((v=I(t[p]))&&v instanceof f)return v;return new f(!1)}l=s(t,h)}for(g=l.next;!(y=g.call(l)).done;){try{v=I(y.value)}catch(t){u(l,"throw",t)}if("object"==typeof v&&v&&v instanceof f)return v}return new f(!1)}},9212:(t,e,n)=>{var r=n(9670),i=n(8173);t.exports=function(t,e,n){var o,a;r(t);try{if(!(o=i(t,"return"))){if("throw"===e)throw n;return n}o=o.call(t)}catch(t){a=!0,o=t}if("throw"===e)throw n;if(a)throw o;return r(o),n}},3383:(t,e,n)=>{"use strict";var r,i,o,a=n(7293),s=n(614),c=n(30),u=n(9518),f=n(1320),l=n(5112),h=n(1913),p=l("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=u(u(o)))!==Object.prototype&&(r=i):d=!0),null==r||a((function(){var t={};return r[p].call(t)!==t}))?r={}:h&&(r=c(r)),s(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},7497:t=>{t.exports={}},5948:(t,e,n)=>{var r,i,o,a,s,c,u,f,l=n(7854),h=n(1236).f,p=n(261).set,d=n(6833),v=n(1528),g=n(1036),y=n(5268),m=l.MutationObserver||l.WebKitMutationObserver,b=l.document,x=l.process,k=l.Promise,w=h(l,"queueMicrotask"),S=w&&w.value;S||(r=function(){var t,e;for(y&&(t=x.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?a():o=void 0,t}}o=void 0,t&&t.enter()},d||y||g||!m||!b?!v&&k&&k.resolve?((u=k.resolve(void 0)).constructor=k,f=u.then,a=function(){f.call(u,r)}):a=y?function(){x.nextTick(r)}:function(){p.call(l,r)}:(s=!0,c=b.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=S||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},3366:(t,e,n)=>{var r=n(7854);t.exports=r.Promise},133:(t,e,n)=>{var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:(t,e,n)=>{var r=n(7854),i=n(614),o=n(2788),a=r.WeakMap;t.exports=i(a)&&/native code/.test(o(a))},8523:(t,e,n)=>{"use strict";var r=n(9662),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},3929:(t,e,n)=>{var r=n(7850);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},30:(t,e,n)=>{var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),c=n(490),u=n(317),f=n(6200)("IE_PROTO"),l=function(){},h=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;d="undefined"!=typeof document?document.domain&&r?p(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):p(r);for(var n=a.length;n--;)delete d.prototype[a[n]];return d()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=i(t),n=new l,l.prototype=null,n[f]=t):n=d(),void 0===e?n:o(n,e)}},6048:(t,e,n)=>{var r=n(9781),i=n(3070),o=n(9670),a=n(1956);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,c=0;s>c;)i.f(t,n=r[c++],e[n]);return t}},3070:(t,e,n)=>{var r=n(9781),i=n(4664),o=n(9670),a=n(4948),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(4948),c=n(6656),u=n(4664),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=s(e),u)try{return f(t,e)}catch(t){}if(c(t,e))return o(!i.f.call(t,e),t[e])}},1156:(t,e,n)=>{var r=n(5656),i=n(8006).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},8006:(t,e,n)=>{var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var r=n(6656),i=n(614),o=n(7908),a=n(6200),s=n(8544),c=a("IE_PROTO"),u=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){var e=o(t);if(r(e,c))return e[c];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof Object?u:null}},6324:(t,e,n)=>{var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},1956:(t,e,n)=>{var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var r=n(9670),i=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},4699:(t,e,n)=>{var r=n(9781),i=n(1956),o=n(5656),a=n(5296).f,s=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,f=0,l=[];u>f;)n=c[f++],r&&!a.call(s,n)||l.push(t?[n,s[n]]:s[n]);return l}};t.exports={entries:s(!0),values:s(!1)}},288:(t,e,n)=>{"use strict";var r=n(1694),i=n(648);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},2140:(t,e,n)=>{var r=n(614),i=n(111);t.exports=function(t,e){var n,o;if("string"===e&&r(n=t.toString)&&!i(o=n.call(t)))return o;if(r(n=t.valueOf)&&!i(o=n.call(t)))return o;if("string"!==e&&r(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},3887:(t,e,n)=>{var r=n(5005),i=n(8006),o=n(5181),a=n(9670);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},857:(t,e,n)=>{var r=n(7854);t.exports=r},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9478:(t,e,n)=>{var r=n(9670),i=n(111),o=n(8523);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},2248:(t,e,n)=>{var r=n(1320);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},1320:(t,e,n)=>{var r=n(7854),i=n(614),o=n(6656),a=n(8880),s=n(3505),c=n(2788),u=n(9909),f=n(6530).CONFIGURABLE,l=u.get,h=u.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var u,l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet,g=c&&void 0!==c.name?c.name:e;i(n)&&("Symbol("===String(g).slice(0,7)&&(g="["+String(g).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||f&&n.name!==g)&&a(n,"name",g),(u=h(n)).source||(u.source=p.join("string"==typeof g?g:""))),t!==r?(l?!v&&t[e]&&(d=!0):delete t[e],d?t[e]=n:a(t,e,n)):d?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return i(this)&&l(this).source||c(this)}))},7651:(t,e,n)=>{var r=n(9670),i=n(614),o=n(4326),a=n(2261);t.exports=function(t,e){var n=t.exec;if(i(n)){var s=n.call(t,e);return null!==s&&r(s),s}if("RegExp"===o(t))return a.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")}},2261:(t,e,n)=>{"use strict";var r,i,o=n(1340),a=n(7066),s=n(2999),c=n(2309),u=n(30),f=n(9909).get,l=n(9441),h=n(7168),p=RegExp.prototype.exec,d=c("native-string-replace",String.prototype.replace),v=p,g=(r=/a/,i=/b*/g,p.call(r,"a"),p.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),y=s.UNSUPPORTED_Y||s.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(g||m||y||l||h)&&(v=function(t){var e,n,r,i,s,c,l,h=this,b=f(h),x=o(t),k=b.raw;if(k)return k.lastIndex=h.lastIndex,e=v.call(k,x),h.lastIndex=k.lastIndex,e;var w=b.groups,S=y&&h.sticky,I=a.call(h),E=h.source,O=0,C=x;if(S&&(-1===(I=I.replace("y","")).indexOf("g")&&(I+="g"),C=x.slice(h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==x.charAt(h.lastIndex-1))&&(E="(?: "+E+")",C=" "+C,O++),n=new RegExp("^(?:"+E+")",I)),m&&(n=new RegExp("^"+E+"$(?!\\s)",I)),g&&(r=h.lastIndex),i=p.call(S?n:h,C),S?i?(i.input=i.input.slice(O),i[0]=i[0].slice(O),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:g&&i&&(h.lastIndex=h.global?i.index+i[0].length:r),m&&i&&i.length>1&&d.call(i[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&w)for(i.groups=c=u(null),s=0;s<w.length;s++)c[(l=w[s])[0]]=i[l[1]];return i}),t.exports=v},7066:(t,e,n)=>{"use strict";var r=n(9670);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},9441:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},7168:(t,e,n)=>{var r=n(7293),i=n(7854).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3505:(t,e,n)=>{var r=n(7854);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},6340:(t,e,n)=>{"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},8003:(t,e,n)=>{var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},6200:(t,e,n)=>{var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:(t,e,n)=>{var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},2309:(t,e,n)=>{var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var r=n(9670),i=n(9483),o=n(5112)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},8710:(t,e,n)=>{var r=n(9958),i=n(1340),o=n(4488),a=function(t){return function(e,n){var a,s,c=i(o(e)),u=r(n),f=c.length;return u<0||u>=f?t?"":void 0:(a=c.charCodeAt(u))<55296||a>56319||u+1===f||(s=c.charCodeAt(u+1))<56320||s>57343?t?c.charAt(u):a:t?c.slice(u,u+2):s-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},3111:(t,e,n)=>{var r=n(4488),i=n(1340),o="["+n(1361)+"]",a=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),c=function(t){return function(e){var n=i(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},261:(t,e,n)=>{var r,i,o,a,s=n(7854),c=n(614),u=n(7293),f=n(9974),l=n(490),h=n(317),p=n(6833),d=n(5268),v=s.setImmediate,g=s.clearImmediate,y=s.process,m=s.MessageChannel,b=s.Dispatch,x=0,k={};try{r=s.location}catch(t){}var w=function(t){if(k.hasOwnProperty(t)){var e=k[t];delete k[t],e()}},S=function(t){return function(){w(t)}},I=function(t){w(t.data)},E=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};v&&g||(v=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return k[++x]=function(){(c(t)?t:Function(t)).apply(void 0,e)},i(x),x},g=function(t){delete k[t]},d?i=function(t){y.nextTick(S(t))}:b&&b.now?i=function(t){b.now(S(t))}:m&&!p?(a=(o=new m).port2,o.port1.onmessage=I,i=f(a.postMessage,a,1)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!u(E)?(i=E,s.addEventListener("message",I,!1)):i="onreadystatechange"in h("script")?function(t){l.appendChild(h("script")).onreadystatechange=function(){l.removeChild(this),w(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:v,clear:g}},1400:(t,e,n)=>{var r=n(9958),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:(t,e,n)=>{var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9958:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:(t,e,n)=>{var r=n(9958),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:(t,e,n)=>{var r=n(4488);t.exports=function(t){return Object(r(t))}},7593:(t,e,n)=>{var r=n(111),i=n(2190),o=n(8173),a=n(2140),s=n(5112)("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,c=o(t,s);if(c){if(void 0===e&&(e="default"),n=c.call(t,e),!r(n)||i(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:(t,e,n)=>{var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:String(e)}},1694:(t,e,n)=>{var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},1340:(t,e,n)=>{var r=n(648);t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},6330:t=>{t.exports=function(t){try{return String(t)}catch(t){return"Object"}}},9711:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:(t,e,n)=>{var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:(t,e,n)=>{var r=n(5112);e.f=r},5112:(t,e,n)=>{var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),c=n(3307),u=i("wks"),f=r.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return o(u,t)&&(s||"string"==typeof u[t])||(s&&o(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},1361:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},2222:(t,e,n)=>{"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),c=n(7466),u=n(6135),f=n(5417),l=n(1194),h=n(5112),p=n(7392),d=h("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",y=p>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),m=l("concat"),b=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,n,r,i,o,a=s(this),l=f(a,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(b(o=-1===e?a:arguments[e])){if(h+(i=c(o.length))>v)throw TypeError(g);for(n=0;n<i;n++,h++)n in o&&u(l,h,o[n])}else{if(h>=v)throw TypeError(g);u(l,h++,o)}return l.length=h,l}})},7327:(t,e,n)=>{"use strict";var r=n(2109),i=n(2092).filter;r({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},1038:(t,e,n)=>{var r=n(2109),i=n(8457);r({target:"Array",stat:!0,forced:!n(7072)((function(t){Array.from(t)}))},{from:i})},6699:(t,e,n)=>{"use strict";var r=n(2109),i=n(1318).includes,o=n(1223);r({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:(t,e,n)=>{"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(654),c="Array Iterator",u=a.set,f=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){u(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},7042:(t,e,n)=>{"use strict";var r=n(2109),i=n(3157),o=n(4411),a=n(111),s=n(1400),c=n(7466),u=n(5656),f=n(6135),l=n(5112),h=n(1194)("slice"),p=l("species"),d=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var n,r,l,h=u(this),g=c(h.length),y=s(t,g),m=s(void 0===e?g:e,g);if(i(h)&&(n=h.constructor,(o(n)&&(n===Array||i(n.prototype))||a(n)&&null===(n=n[p]))&&(n=void 0),n===Array||void 0===n))return d.call(h,y,m);for(r=new(void 0===n?Array:n)(v(m-y,0)),l=0;y<m;y++,l++)y in h&&f(r,l,h[y]);return r.length=l,r}})},8309:(t,e,n)=>{var r=n(9781),i=n(6530).EXISTS,o=n(3070).f,a=Function.prototype,s=a.toString,c=/^\s*function ([^ (]*)/;r&&!i&&o(a,"name",{configurable:!0,get:function(){try{return s.call(this).match(c)[1]}catch(t){return""}}})},1532:(t,e,n)=>{"use strict";var r=n(7710),i=n(5631);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},3689:(t,e,n)=>{var r=n(2109),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},9653:(t,e,n)=>{"use strict";var r=n(9781),i=n(7854),o=n(4705),a=n(1320),s=n(6656),c=n(4326),u=n(9587),f=n(2190),l=n(7593),h=n(7293),p=n(30),d=n(8006).f,v=n(1236).f,g=n(3070).f,y=n(3111).trim,m="Number",b=i.Number,x=b.prototype,k=c(p(x))==m,w=function(t){if(f(t))throw TypeError("Cannot convert a Symbol value to a number");var e,n,r,i,o,a,s,c,u=l(t,"number");if("string"==typeof u&&u.length>2)if(43===(e=(u=y(u)).charCodeAt(0))||45===e){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=u.slice(2)).length,s=0;s<a;s++)if((c=o.charCodeAt(s))<48||c>i)return NaN;return parseInt(o,r)}return+u};if(o(m,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var S,I=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof I&&(k?h((function(){x.valueOf.call(n)})):c(n)!=m)?u(new b(w(e)),n,I):w(e)},E=r?d(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;E.length>O;O++)s(b,S=E[O])&&!s(I,S)&&g(I,S,v(b,S));I.prototype=x,x.constructor=I,a(i,m,I)}},3161:(t,e,n)=>{n(2109)({target:"Number",stat:!0},{isInteger:n(8730)})},5003:(t,e,n)=>{var r=n(2109),i=n(7293),o=n(5656),a=n(1236).f,s=n(9781),c=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},9337:(t,e,n)=>{var r=n(2109),i=n(9781),o=n(3887),a=n(5656),s=n(1236),c=n(6135);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=i(r,e=u[l++]))&&c(f,e,n);return f}})},7941:(t,e,n)=>{var r=n(2109),i=n(7908),o=n(1956);r({target:"Object",stat:!0,forced:n(7293)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},1539:(t,e,n)=>{var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},2479:(t,e,n)=>{var r=n(2109),i=n(4699).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},7727:(t,e,n)=>{"use strict";var r=n(2109),i=n(1913),o=n(3366),a=n(7293),s=n(5005),c=n(614),u=n(6707),f=n(9478),l=n(1320);if(r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),n=c(t);return this.then(n?function(n){return f(e,t()).then((function(){return n}))}:t,n?function(n){return f(e,t()).then((function(){throw n}))}:t)}}),!i&&c(o)){var h=s("Promise").prototype.finally;o.prototype.finally!==h&&l(o.prototype,"finally",h,{unsafe:!0})}},8674:(t,e,n)=>{"use strict";var r,i,o,a,s=n(2109),c=n(1913),u=n(7854),f=n(5005),l=n(3366),h=n(1320),p=n(2248),d=n(7674),v=n(8003),g=n(6340),y=n(9662),m=n(614),b=n(111),x=n(5787),k=n(2788),w=n(408),S=n(7072),I=n(6707),E=n(261).set,O=n(5948),C=n(9478),_=n(842),A=n(8523),M=n(2534),R=n(9909),T=n(4705),P=n(5112),N=n(7871),j=n(5268),L=n(7392),D=P("species"),B="Promise",F=R.get,G=R.set,V=R.getterFor(B),H=l&&l.prototype,U=l,z=H,$=u.TypeError,K=u.document,q=u.process,W=A.f,Y=W,Q=!!(K&&K.createEvent&&u.dispatchEvent),Z=m(u.PromiseRejectionEvent),X="unhandledrejection",J=!1,tt=T(B,(function(){var t=k(U),e=t!==String(U);if(!e&&66===L)return!0;if(c&&!z.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new U((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(J=n.then((function(){}))instanceof r)||!e&&N&&!Z})),et=tt||!S((function(t){U.all(t).catch((function(){}))})),nt=function(t){var e;return!(!b(t)||!m(e=t.then))&&e},rt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;O((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,s,c,u=n[o++],f=i?u.ok:u.fail,l=u.resolve,h=u.reject,p=u.domain;try{f?(i||(2===t.rejection&&st(t),t.rejection=1),!0===f?a=r:(p&&p.enter(),a=f(r),p&&(p.exit(),c=!0)),a===u.promise?h($("Promise-chain cycle")):(s=nt(a))?s.call(a,l,h):l(a)):h(r)}catch(t){p&&!c&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},it=function(t,e,n){var r,i;Q?((r=K.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(i=u["on"+t])?i(r):t===X&&_("Unhandled promise rejection",n)},ot=function(t){E.call(u,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=M((function(){j?q.emit("unhandledRejection",r,n):it(X,n,r)})),t.rejection=j||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},st=function(t){E.call(u,(function(){var e=t.facade;j?q.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},ct=function(t,e,n){return function(r){t(e,r,n)}},ut=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,rt(t,!0))},ft=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw $("Promise can't be resolved itself");var r=nt(e);r?O((function(){var n={done:!1};try{r.call(e,ct(ft,n,t),ct(ut,n,t))}catch(e){ut(n,e,t)}})):(t.value=e,t.state=1,rt(t,!1))}catch(e){ut({done:!1},e,t)}}};if(tt&&(z=(U=function(t){x(this,U,B),y(t),r.call(this);var e=F(this);try{t(ct(ft,e),ct(ut,e))}catch(t){ut(e,t)}}).prototype,(r=function(t){G(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(z,{then:function(t,e){var n=V(this),r=W(I(this,U));return r.ok=!m(t)||t,r.fail=m(e)&&e,r.domain=j?q.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&rt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=F(t);this.promise=t,this.resolve=ct(ft,e),this.reject=ct(ut,e)},A.f=W=function(t){return t===U||t===o?new i(t):Y(t)},!c&&m(l)&&H!==Object.prototype)){a=H.then,J||(h(H,"then",(function(t,e){var n=this;return new U((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),h(H,"catch",z.catch,{unsafe:!0}));try{delete H.constructor}catch(t){}d&&d(H,z)}s({global:!0,wrap:!0,forced:tt},{Promise:U}),v(U,B,!1,!0),g(B),o=f(B),s({target:B,stat:!0,forced:tt},{reject:function(t){var e=W(this);return e.reject.call(void 0,t),e.promise}}),s({target:B,stat:!0,forced:c||tt},{resolve:function(t){return C(c&&this===o?U:this,t)}}),s({target:B,stat:!0,forced:et},{all:function(t){var e=this,n=W(e),r=n.resolve,i=n.reject,o=M((function(){var n=y(e.resolve),o=[],a=0,s=1;w(t,(function(t){var c=a++,u=!1;o.push(void 0),s++,n.call(e,t).then((function(t){u||(u=!0,o[c]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=W(e),r=n.reject,i=M((function(){var i=y(e.resolve);w(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},2419:(t,e,n)=>{var r=n(2109),i=n(5005),o=n(9483),a=n(9670),s=n(111),c=n(30),u=n(7065),f=n(7293),l=i("Reflect","construct"),h=f((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),p=!f((function(){l((function(){}))})),d=h||p;r({target:"Reflect",stat:!0,forced:d,sham:d},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(p&&!h)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var i=n.prototype,f=c(s(i)?i:Object.prototype),d=Function.apply.call(t,f,e);return s(d)?d:f}})},4603:(t,e,n)=>{var r=n(9781),i=n(7854),o=n(4705),a=n(9587),s=n(8880),c=n(3070).f,u=n(8006).f,f=n(7850),l=n(1340),h=n(7066),p=n(2999),d=n(1320),v=n(7293),g=n(6656),y=n(9909).enforce,m=n(6340),b=n(5112),x=n(9441),k=n(7168),w=b("match"),S=i.RegExp,I=S.prototype,E=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,O=/a/g,C=/a/g,_=new S(O)!==O,A=p.UNSUPPORTED_Y;if(o("RegExp",r&&(!_||A||x||k||v((function(){return C[w]=!1,S(O)!=O||S(C)==C||"/a/i"!=S(O,"i")}))))){for(var M=function(t,e){var n,r,i,o,c,u,p=this instanceof M,d=f(t),v=void 0===e,m=[],b=t;if(!p&&d&&v&&t.constructor===M)return t;if((d||t instanceof M)&&(t=t.source,v&&(e="flags"in b?b.flags:h.call(b))),t=void 0===t?"":l(t),e=void 0===e?"":l(e),b=t,x&&"dotAll"in O&&(r=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),n=e,A&&"sticky"in O&&(i=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),k&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],a={},s=!1,c=!1,u=0,f="";r<=n;r++){if("\\"===(e=t.charAt(r)))e+=t.charAt(++r);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:E.test(t.slice(r+1))&&(r+=2,c=!0),i+=e,u++;continue;case">"===e&&c:if(""===f||g(a,f))throw new SyntaxError("Invalid capture group name");a[f]=!0,o.push([f,u]),c=!1,f="";continue}c?f+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),c=a(S(t,e),p?this:I,M),(r||i||m.length)&&(u=y(c),r&&(u.dotAll=!0,u.raw=M(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=t.charAt(r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+t.charAt(++r);return i}(t),n)),i&&(u.sticky=!0),m.length&&(u.groups=m)),t!==b)try{s(c,"source",""===b?"(?:)":b)}catch(t){}return c},R=function(t){t in M||c(M,t,{configurable:!0,get:function(){return S[t]},set:function(e){S[t]=e}})},T=u(S),P=0;T.length>P;)R(T[P++]);I.constructor=M,M.prototype=I,d(i,"RegExp",M)}m("RegExp")},4916:(t,e,n)=>{"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:(t,e,n)=>{"use strict";var r=n(6530).PROPER,i=n(1320),o=n(9670),a=n(1340),s=n(7293),c=n(7066),u="toString",f=RegExp.prototype,l=f.toString,h=s((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),p=r&&l.name!=u;(h||p)&&i(RegExp.prototype,u,(function(){var t=o(this),e=a(t.source),n=t.flags;return"/"+e+"/"+a(void 0===n&&t instanceof RegExp&&!("flags"in f)?c.call(t):n)}),{unsafe:!0})},7852:(t,e,n)=>{"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(1340),c=n(3929),u=n(4488),f=n(4964),l=n(1913),h="".endsWith,p=Math.min,d=f("endsWith");i({target:"String",proto:!0,forced:!(!l&&!d&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||d)},{endsWith:function(t){var e=s(u(this));c(t);var n=arguments.length>1?arguments[1]:void 0,r=a(e.length),i=void 0===n?r:p(a(n),r),o=s(t);return h?h.call(e,o,i):e.slice(i-o.length,i)===o}})},2023:(t,e,n)=>{"use strict";var r=n(2109),i=n(3929),o=n(4488),a=n(1340);r({target:"String",proto:!0,forced:!n(4964)("includes")},{includes:function(t){return!!~a(o(this)).indexOf(a(i(t)),arguments.length>1?arguments[1]:void 0)}})},8783:(t,e,n)=>{"use strict";var r=n(8710).charAt,i=n(1340),o=n(9909),a=n(654),s="String Iterator",c=o.set,u=o.getterFor(s);a(String,"String",(function(t){c(this,{type:s,string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},4723:(t,e,n)=>{"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(1340),s=n(4488),c=n(8173),u=n(1530),f=n(7651);r("match",(function(t,e,n){return[function(e){var n=s(this),r=null==e?void 0:c(e,t);return r?r.call(e,n):new RegExp(e)[t](a(n))},function(t){var r=i(this),s=a(t),c=n(e,r,s);if(c.done)return c.value;if(!r.global)return f(r,s);var l=r.unicode;r.lastIndex=0;for(var h,p=[],d=0;null!==(h=f(r,s));){var v=a(h[0]);p[d]=v,""===v&&(r.lastIndex=u(s,o(r.lastIndex),l)),d++}return 0===d?null:p}]}))},5306:(t,e,n)=>{"use strict";var r=n(7007),i=n(7293),o=n(9670),a=n(614),s=n(9958),c=n(7466),u=n(1340),f=n(4488),l=n(1530),h=n(8173),p=n(647),d=n(7651),v=n(5112)("replace"),g=Math.max,y=Math.min,m="$0"==="a".replace(/./,"$0"),b=!!/./[v]&&""===/./[v]("a","$0");r("replace",(function(t,e,n){var r=b?"$":"$0";return[function(t,n){var r=f(this),i=null==t?void 0:h(t,v);return i?i.call(t,r,n):e.call(u(r),t,n)},function(t,i){var f=o(this),h=u(t);if("string"==typeof i&&-1===i.indexOf(r)&&-1===i.indexOf("$<")){var v=n(e,f,h,i);if(v.done)return v.value}var m=a(i);m||(i=u(i));var b=f.global;if(b){var x=f.unicode;f.lastIndex=0}for(var k=[];;){var w=d(f,h);if(null===w)break;if(k.push(w),!b)break;""===u(w[0])&&(f.lastIndex=l(h,c(f.lastIndex),x))}for(var S,I="",E=0,O=0;O<k.length;O++){w=k[O];for(var C=u(w[0]),_=g(y(s(w.index),h.length),0),A=[],M=1;M<w.length;M++)A.push(void 0===(S=w[M])?S:String(S));var R=w.groups;if(m){var T=[C].concat(A,_,h);void 0!==R&&T.push(R);var P=u(i.apply(void 0,T))}else P=p(C,h,_,A,R,i);_>=E&&(I+=h.slice(E,_)+P,E=_+C.length)}return I+h.slice(E)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!m||b)},6755:(t,e,n)=>{"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(1340),c=n(3929),u=n(4488),f=n(4964),l=n(1913),h="".startsWith,p=Math.min,d=f("startsWith");i({target:"String",proto:!0,forced:!(!l&&!d&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||d)},{startsWith:function(t){var e=s(u(this));c(t);var n=a(p(arguments.length>1?arguments[1]:void 0,e.length)),r=s(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},1817:(t,e,n)=>{"use strict";var r=n(2109),i=n(9781),o=n(7854),a=n(6656),s=n(614),c=n(111),u=n(3070).f,f=n(9920),l=o.Symbol;if(i&&s(l)&&(!("description"in l.prototype)||void 0!==l().description)){var h={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(h[e]=!0),e};f(p,l);var d=p.prototype=l.prototype;d.constructor=p;var v=d.toString,g="Symbol(test)"==String(l("test")),y=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=v.call(t);if(a(h,t))return"";var n=g?e.slice(7,-1):e.replace(y,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},2165:(t,e,n)=>{n(7235)("iterator")},2526:(t,e,n)=>{"use strict";var r=n(2109),i=n(7854),o=n(5005),a=n(1913),s=n(9781),c=n(133),u=n(7293),f=n(6656),l=n(3157),h=n(614),p=n(111),d=n(2190),v=n(9670),g=n(7908),y=n(5656),m=n(4948),b=n(1340),x=n(9114),k=n(30),w=n(1956),S=n(8006),I=n(1156),E=n(5181),O=n(1236),C=n(3070),_=n(5296),A=n(1320),M=n(2309),R=n(6200),T=n(3501),P=n(9711),N=n(5112),j=n(6061),L=n(7235),D=n(8003),B=n(9909),F=n(2092).forEach,G=R("hidden"),V="Symbol",H=N("toPrimitive"),U=B.set,z=B.getterFor(V),$=Object.prototype,K=i.Symbol,q=o("JSON","stringify"),W=O.f,Y=C.f,Q=I.f,Z=_.f,X=M("symbols"),J=M("op-symbols"),tt=M("string-to-symbol-registry"),et=M("symbol-to-string-registry"),nt=M("wks"),rt=i.QObject,it=!rt||!rt.prototype||!rt.prototype.findChild,ot=s&&u((function(){return 7!=k(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W($,e);r&&delete $[e],Y(t,e,n),r&&t!==$&&Y($,e,r)}:Y,at=function(t,e){var n=X[t]=k(K.prototype);return U(n,{type:V,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===$&&st(J,e,n),v(t);var r=m(e);return v(n),f(X,r)?(n.enumerable?(f(t,G)&&t[G][r]&&(t[G][r]=!1),n=k(n,{enumerable:x(0,!1)})):(f(t,G)||Y(t,G,x(1,{})),t[G][r]=!0),ot(t,r,n)):Y(t,r,n)},ct=function(t,e){v(t);var n=y(e),r=w(n).concat(ht(n));return F(r,(function(e){s&&!ut.call(n,e)||st(t,e,n[e])})),t},ut=function(t){var e=m(t),n=Z.call(this,e);return!(this===$&&f(X,e)&&!f(J,e))&&(!(n||!f(this,e)||!f(X,e)||f(this,G)&&this[G][e])||n)},ft=function(t,e){var n=y(t),r=m(e);if(n!==$||!f(X,r)||f(J,r)){var i=W(n,r);return!i||!f(X,r)||f(n,G)&&n[G][r]||(i.enumerable=!0),i}},lt=function(t){var e=Q(y(t)),n=[];return F(e,(function(t){f(X,t)||f(T,t)||n.push(t)})),n},ht=function(t){var e=t===$,n=Q(e?J:y(t)),r=[];return F(n,(function(t){!f(X,t)||e&&!f($,t)||r.push(X[t])})),r};if(c||(A((K=function(){if(this instanceof K)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,e=P(t),n=function(t){this===$&&n.call(J,t),f(this,G)&&f(this[G],e)&&(this[G][e]=!1),ot(this,e,x(1,t))};return s&&it&&ot($,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return z(this).tag})),A(K,"withoutSetter",(function(t){return at(P(t),t)})),_.f=ut,C.f=st,O.f=ft,S.f=I.f=lt,E.f=ht,j.f=function(t){return at(N(t),t)},s&&(Y(K.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||A($,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:K}),F(w(nt),(function(t){L(t)})),r({target:V,stat:!0,forced:!c},{for:function(t){var e=b(t);if(f(tt,e))return tt[e];var n=K(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!d(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(t,e){return void 0===e?k(t):ct(k(t),e)},defineProperty:st,defineProperties:ct,getOwnPropertyDescriptor:ft}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(g(t))}}),q&&r({target:"JSON",stat:!0,forced:!c||u((function(){var t=K();return"[null]"!=q([t])||"{}"!=q({a:t})||"{}"!=q(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!d(t))return l(e)||(e=function(t,e){if(h(r)&&(e=r.call(this,t,e)),!d(e))return e}),i[1]=e,q.apply(null,i)}}),!K.prototype[H]){var pt=K.prototype.valueOf;A(K.prototype,H,(function(){return pt.apply(this,arguments)}))}D(K,V),T[G]=!0},4747:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(8533),s=n(8880),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in i)i[u]&&c(r[u]&&r[u].prototype);c(o)},3948:(t,e,n)=>{var r=n(7854),i=n(8324),o=n(8509),a=n(6992),s=n(8880),c=n(5112),u=c("iterator"),f=c("toStringTag"),l=a.values,h=function(t,e){if(t){if(t[u]!==l)try{s(t,u,l)}catch(e){t[u]=l}if(t[f]||s(t,f,e),i[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in i)h(r[p]&&r[p].prototype,p);h(o,"DOMTokenList")},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new _(r||[]);return o._invoke=function(t,e,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return M()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?d:h,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function g(){}function y(){}function m(){}var b={};c(b,o,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&r.call(k,o)&&(b=k);var w=m.prototype=g.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,o,a,s){var c=f(t[i],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(c.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 E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:M}}function M(){return{value:e,done:!0}}return y.prototype=m,c(w,"constructor",m),c(m,"constructor",y),y.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},S(I.prototype),c(I.prototype,a,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new I(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(w),c(w,s,"Generator"),c(w,o,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.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}},t.values=A,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},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),v},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),C(n),v}},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;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},9591:t=>{"use strict";t.exports=require("@babel/runtime/helpers/asyncToGenerator")},8765:t=>{"use strict";t.exports=require("@babel/runtime/helpers/createClass")},8779:t=>{"use strict";t.exports=require("@babel/runtime/helpers/defineProperty")},3761:t=>{"use strict";t.exports=require("@babel/runtime/helpers/getPrototypeOf")},5370:t=>{"use strict";t.exports=require("@babel/runtime/helpers/inherits")},9548:t=>{"use strict";t.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},353:t=>{"use strict";t.exports=require("@babel/runtime/helpers/slicedToArray")},9293:t=>{"use strict";t.exports=require("@babel/runtime/helpers/typeof")},1307:t=>{"use strict";t.exports=require("@babel/runtime/regenerator")},9657:t=>{"use strict";t.exports=require("encoding")},5254:t=>{"use strict";t.exports=require("event-target-shim")},1239:t=>{"use strict";t.exports=require("events")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2781:t=>{"use strict";t.exports=require("stream")},7310:t=>{"use strict";t.exports=require("url")},9796:t=>{"use strict";t.exports=require("zlib")}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{DecisionMode:()=>i.DecisionMode,FlagshipContext:()=>p,FlagshipProvider:()=>d,noVisitorDefault:()=>R,noVisitorMessage:()=>M,useFlagship:()=>A,useFsActivate:()=>_,useFsModification:()=>w,useFsModificationInfo:()=>I,useFsModifications:()=>k,useFsSynchronizeModifications:()=>O}),n(6992),n(1532),n(1539),n(8783),n(3948),n(4747),n(7941),n(2526),n(7327),n(5003),n(9337),n(1817),n(2165),n(7042),n(8309),n(1038);const t=require("react");var e=n.n(t),i=n(6968);function o(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.error&&t.logLevel&&!(t.logLevel<i.LogLevel.ERROR)&&t.logManager.error(e,n)}function a(t,e,n){t&&t.logManager&&"function"==typeof t.logManager.warning&&t.logLevel&&!(t.logLevel<i.LogLevel.WARNING)&&t.logManager.warning(e,n)}function s(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=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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 c(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 u(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 f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={status:{isLoading:!0,isSdkReady:!1}},p=(0,t.createContext)({state:f({},h)}),d=function(n){var r=n.children,a=n.fetchNow,c=n.envId,u=n.apiKey,l=n.decisionMode,d=n.timeout,v=n.logLevel,g=n.statusChangedCallback,y=n.logManager,m=n.pollingInterval,b=n.visitorData,x=n.onInitStart,k=n.onInitDone,w=n.onBucketingSuccess,S=n.onBucketingFail,I=n.loadingComponent,E=n.onBucketingUpdated,O=n.onUpdate,C=n.enableClientCache,_=n.initialBucketing,A=n.initialCampaigns,M=n.initialModifications,R=n.synchronizeOnBucketingUpdated,T=new Map;M?M.forEach((function(t){T.set(t.key,t)})):A&&(T=function(t){var e=new Map;return t&&Array.isArray(t)?(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,value:i})}})),e):e}(A));var P=s((0,t.useState)(f(f({},h),{},{modifications:T})),2),N=P[0],j=P[1],L=s((0,t.useState)(),2),D=L[0],B=L[1],F=(0,t.useRef)();F.current=N,(0,t.useEffect)((function(){var t;R&&(null===(t=N.visitor)||void 0===t||t.synchronizeModifications())}),[D]),(0,t.useEffect)((function(){G()}),[b]),(0,t.useEffect)((function(){$()}),[c,u,l]);var G=function(){N.visitor&&(b.context&&(N.visitor.clearContext(),N.visitor.updateContext(b.context)),"boolean"==typeof b.hasConsented&&N.visitor.setConsent(b.hasConsented),N.visitor.anonymousId&&!b.isAuthenticated?N.visitor.unauthenticate():!N.visitor.anonymousId&&b.isAuthenticated&&N.visitor.authenticate(b.id),b.id&&(N.visitor.visitorId=b.id),N.visitor.synchronizeModifications())};function V(t){var e={isSdkReady:t.isSdkReady,isLoading:t.isLoading,isVisitorDefined:!!t.fsVisitor,lastRefresh:(new Date).toISOString()};return j((function(n){return n.status.firstInitSuccess||(e.firstInitSuccess=(new Date).toISOString()),f(f({},n),{},{visitor:t.fsVisitor,modifications:t.fsVisitor.modifications,config:i.Flagship.getConfig(),status:f(f({},n.status),e)})})),e}var H,U=function(t){if(g&&g(t),t===i.FlagshipStatus.STARTING&&x)x();else if(t===i.FlagshipStatus.READY_PANIC_ON||t===i.FlagshipStatus.READY){var e;if(k&&k(),null!==(e=F.current)&&void 0!==e&&e.visitor){var n;null===(n=F.current)||void 0===n||n.visitor.synchronizeModifications()}else{var r=i.Flagship.newVisitor({visitorId:b.id,context:b.context,isAuthenticated:b.isAuthenticated,hasConsented:b.hasConsented,initialCampaigns:A,initialModifications:M});null==r||r.on("ready",(function(t){!function(t,e){if(e)o(i.Flagship.getConfig(),e.message||e,"onReady");else{var n=V({fsVisitor:t,isSdkReady:!0,isLoading:!1});O&&O({fsModifications:t.modifications,config:i.Flagship.getConfig(),status:n})}}(r,t)})),!a&&r&&V({fsVisitor:r,isSdkReady:!0,isLoading:!1})}}},z=function(t){E&&E(t),B(t)},$=function(){i.Flagship.start(c,u,{decisionMode:l,fetchNow:a,timeout:d,logLevel:v,statusChangedCallback:U,logManager:y,pollingInterval:m,onBucketingFail:S,onBucketingSuccess:w,enableClientCache:C,onBucketingUpdated:z,initialBucketing:_})};return e().createElement(p.Provider,{value:{state:N,setState:j}},(H=!N.visitor,N.status.isLoading&&I&&H?e().createElement(e().Fragment,null,I):e().createElement(e().Fragment,null,r)))};function v(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 g(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){g(o,r,i,a,s,"next",t)}function s(t){g(o,r,i,a,s,"throw",t)}a(void 0)}))}}function m(t){return m="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},m(t)}d.defaultProps={nodeEnv:"production"},n(5666),n(8674);var b=function(t,e){return"object"===m(t)&&"object"===m(e)&&Array.isArray(t)===Array.isArray(e)||m(t)===m(e)},x=function(t){var e=t.visitor,n=t.params,r=t.activateAll,i=t.state,o=t.functionName,s=t.config;if(e)return e.getModificationsSync(n,r);var c=!i.status.isSdkReady&&!!i.modifications&&i.modifications.size>0,u={};return c?(n.forEach((function(t){var e,n=null===(e=i.modifications)||void 0===e?void 0:e.get(t.key);n&&b(null==n?void 0:n.value,t.defaultValue)?u[t.key]=n.value:u[t.key]=t.defaultValue})),u):(a(s,R,o),n.forEach((function(t){u[t.key]=t.defaultValue})),u)},k=function(e,n){var r=(0,t.useContext)(p).state,i=r.visitor,o=r.config;return x({functionName:"useFsModifications",state:r,visitor:i,config:o,params:e,activateAll:n})},w=function(e){var n,r=(0,t.useContext)(p).state,i=r.visitor,o=r.config;if(i)return i.getModificationSync(e);var s=null===(n=r.modifications)||void 0===n?void 0:n.get(e.key);return!r.status.isSdkReady&&s&&b(null==s?void 0:s.value,e.defaultValue)?s.value:(a(o,R,"useFsModifications"),e.defaultValue)},S=function(t){var e,n=t.key,r=t.visitor,i=t.state;if(r)return r.getModificationInfoSync(n);var o=null===(e=i.modifications)||void 0===e?void 0:e.get(n);return!i.status.isSdkReady&&o?o:null},I=function(e){var n=(0,t.useContext)(p).state,r=n.visitor;return S({key:e,state:n,visitor:r})},E=function(){var t=y(regeneratorRuntime.mark((function t(e,n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n){t.next=4;break}return T(r,e),t.abrupt("return");case 4:return t.next=6,n.synchronizeModifications();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),o(r,t.t0.message||t.t0,e);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r){return t.apply(this,arguments)}}(),O=function(){var e=y(regeneratorRuntime.mark((function e(){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,t.useContext)(p),r=n.state,i=r.visitor,o=r.config,e.next=5,E("useFsSynchronizeModifications",i,o);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var t=y(regeneratorRuntime.mark((function t(e,n,r,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return a(i,M,n),t.abrupt("return");case 4:return t.next=6,r.activateModifications(e);case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),a(i,t.t0.message||t.t0,n);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,n,r,i){return t.apply(this,arguments)}}(),_=function(){var e=y(regeneratorRuntime.mark((function e(n){var r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,t.useContext)(p),i=r.state,o=i.visitor,a=i.config,e.next=5,C(n,"useFsModifications",o,a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=(0,t.useContext)(p).state,n=e.visitor,r=e.config,i=null==n?void 0:n.getModificationsArray();!e.status.isSdkReady&&e.modifications&&(i=Array.from(e.modifications,(function(t){var e,n,r=(n=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,n)||function(t,e){if(t){if("string"==typeof t)return v(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)?v(t,e):void 0}}(e,n)||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.")}());return r[0],r[1]})));var a=function(){var t=y(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,C(e,"activateModification",n,r);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),s=function(){var t=y(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,E("synchronizeModifications",n,r);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),c=function(){var t=y(regeneratorRuntime.mark((function t(i,o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",x({functionName:"getModifications",state:e,visitor:n,config:r,params:i,activateAll:o}));case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),u=function(){var t=y(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",S({key:r,state:e,visitor:n}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return{updateContext:function(t){n?(n.clearContext(),n.updateContext(t)):o(r,M,"updateContext")},clearContext:function(){n?n.clearContext():o(r,M,"cleanContext")},authenticate:function(t){n?n.authenticate(t):o(r,M,"authenticate")},unauthenticate:function(){n?n.unauthenticate():o(r,M,"unauthenticate")},status:e.status,activateModification:a,synchronizeModifications:s,getModificationsSync:function(t,i){return x({functionName:"getModificationsSync",state:e,visitor:n,config:r,params:t,activateAll:i})},getModifications:c,modifications:i||[],getModificationInfo:u,getModificationInfoSync:function(t){return S({key:t,state:e,visitor:n})},hit:{send:function(t){return n?n.sendHit(t):(o(r,M,"sendHit"),Promise.resolve())},sendMultiple:function(t){return n?n.sendHits(t):(o(r,M,"sendHits"),Promise.resolve())}}}},M="sdk not correctly initialized... Make sure fsVisitor is ready.",R="fsVisitor not initialized, returns default value",T=function(t,e){o(t,M,e)}})(),module.exports=r})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|