@statsig/js-on-device-eval-client 3.25.0 → 3.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>(()=>{"use strict";var n={1845:(t,n,e)=>{var i;$Q2(n,"__esModule",{value:!0}),n.t=n.i=n.l=void 0;const r=e(7512);n.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:u}catch(t){return u}},n.i=t=>(0,n.l)()[t];n.t=t=>{var e=(0,n.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var s="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},l="undefined"!=typeof globalThis?globalThis:{};const u=null!=(i=null!=(i=null!=(i=o[s])?i:e[s])?i:l[s])?i:{instance:n.t};o[s]=u,e[s]=u,l[s]=u},2137:(t,e,n)=>{$Q(e),e.o=e.u=void 0;const r=n(1406);function i(t,e,n){if(n)return n(t,e);const i=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(n=null==e?void 0:e.userID)?n:""),"cids:"+Object.keys(i).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+i[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=i,e.o=function(t,e,n){return e?i(t,e,n):(0,r.h)("k:"+t)}},6427:(t,e)=>{$Q(e)},694:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.v=e.DataAdapterCore=void 0;const u=n(7512),a=n(9122),s=n(8578),o=n(4534),c=n(3401);function h(t,e,n,i){return{source:t,data:e,receivedAt:Date.now(),stableID:n,fullUserHash:(0,s._)(i)}}e.DataAdapterCore=class{constructor(t,e){this.p=t,this.m=e,this.O=null,this.j=null,this.gn=10,this.S="statsig.last_modified_time."+e,this.k=new i}attach(t,e,n){this.j=t,this.O=e}getDataSync(t){var t=t&&(0,s.D)(t,this.O),e=this.I(t),n=this.k.get(e,t);return n&&this.M(n)?n:(n=this.T(e))&&this.M(n)?(this.k.add(e,n,this.gn),this.k.get(e,t)):null}setData(t,e){var e=e&&(0,s.D)(e,this.O),n=this.I(e);this.k.add(n,h("Bootstrap",t,null,e),this.gn)}M(t){return null==t.stableID||t.stableID===a.StableID.get(this.N())}C(e,n,i){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(n),t=[this.R(t,n,i)];return null!=i&&i.timeoutMs&&t.push(new Promise(t=>setTimeout(t,i.timeoutMs)).then(()=>(u.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}U(n,i){return r(this,void 0,void 0,function*(){var t=n&&(0,s.D)(n,this.O),e=this.I(t),t=yield this.C(null,t,i);t&&this.k.add(e,$P($P({},t),{source:"Prefetch"}),this.gn)})}R(s,o,l){return r(this,void 0,void 0,function*(){var t=null!=(t=null==s?void 0:s.data)?t:null,e=null!=s&&this.A(s,o),e=yield this.F(t,o,l,e);if(!e)return u.Log.debug("No response returned for latest value"),null;var n=(0,c.P)(e,"has_updates","Response"),i=this.N(),i=a.StableID.get(i);let r=null;if(!0===(null==n?void 0:n.has_updates))r=h("Network",e,i,o);else{if(!t||!1!==(null==n?void 0:n.has_updates))return null;r=h("NetworkNotModified",t,i,o)}e=this.I(o);return this.k.add(e,r,this.gn),this.L(e,r),r})}N(){return null!=this.j?this.j:(u.Log.error(this.p+" is not attached to a Client"),"")}T(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,c.P)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}L(e,t){var n=JSON.stringify(t);for(let t=0;t<8;t++)try{o.Storage.setItem(e,n);break}catch(t){if(!(t instanceof Error)||"QuotaExceededError"!==t.name||this.gn<=1)throw t;this.gn=Math.ceil(this.gn/2),this.q(e,this.gn-1)}this.q(e)}q(t,e=this.gn){var n=null!=(i=(0,o.K)(this.S))?i:{},i=(n[t]=Date.now(),l(n,e));for(const r of i)delete n[r],o.Storage.removeItem(r);(0,o.B)(this.S,n)}},e.v=h;class i{constructor(){this.$={}}get(t,e){var t=this.$[t],n=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&n&&e!==n?(u.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e,n){for(const i of l(this.$,n-1))delete this.$[i];this.$[t]=e}merge(t){this.$=$P($P({},this.$),t)}}function l(n,t){var e=Object.keys(n);return e.length<=t?[]:0===t?e:e.sort((t,e)=>{t=n[t],e=n[e];return"object"==typeof t&&"object"==typeof e?t.receivedAt-e.receivedAt:t-e}).slice(0,e.length-t)}},8962:(t,o)=>{$Q2(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const i=new Map,n="start";function r(t,e,n,i){return $P({key:n,action:e,step:i,timestamp:Date.now()},t)}function s(t,e){var n=null!=(n=i.get(t))?n:[];n.push(e),i.set(t,n)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={V:t=>i.get(t),G:t=>{s(t,r({},n,"overall"))},J:(t,e,n)=>{s(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},"end","overall"))},W:(t,e)=>{s(t,r(e,n,"initialize","network_request"))},Y:(t,e)=>{s(t,r(e,"end","initialize","network_request"))},X:t=>{s(t,r({},n,"initialize","process"))},H:(t,e)=>{s(t,r(e,"end","initialize","process"))},Z:t=>{i.delete(t)},tt(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},et(t,e,n,i){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.tt(i)}},it(t,e,n,i){var r,s=o.Diagnostics.V(n);return null==s||s.length<=0?-1:(r=s[s.length-1].timestamp-s[0].timestamp,o.Diagnostics.Z(n),n=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:s.slice(),statsigOptions:i}),e.enqueue(n),r)}}},8809:function(t,e){var n=this&&this.__awaiter||$A();$Q(e),e.nt=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),s="https://cloudflare-dns.com/dns-query",o=["i","e","d"],l=200;e.nt=function(e){return n(this,void 0,void 0,function*(){var n=yield e(s,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(n.ok){var t,n=yield n.arrayBuffer(),n=new Uint8Array(n);{var i=n,n=i.findIndex((t,e)=>e<l&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(i[e-1])));if(-1===n)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=n-1;t<i.length;t++)e+=String.fromCharCode(i[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{$Q(e)},5542:function(t,l,e){var n=this&&this.__awaiter||$A();$Q2(l,"__esModule",{value:!0}),l.ErrorBoundary=l.EXCEPTION_ENDPOINT=void 0;const i=e(7512),u=e(5902),a=e(8e3),c=(l.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}l.ErrorBoundary=class{constructor(t,e,n,i){this.j=t,this.O=e,this.st=n,this.rt=i,this.lt=new Set}wrap(i,r){try{const t=i;!function(t){const e=new Set;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(t=>"function"==typeof(null===n||void 0===n?void 0:n[t])).forEach(t=>e.add(t)),n=Object.getPrototypeOf(n);return Array.from(e)}(t).forEach(e=>{const n=t[e];"$EB"in n||(t[e]=(...t)=>this.ot(r?r+":"+e:e,()=>n.apply(i,t)),t[e].$EB=!0)})}catch(t){this.ut("eb:wrap",t)}}logError(t,e){this.ut(t,e)}getLastSeenErrorAndReset(){var t=this.rt;return this.rt=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.rt||(this.rt=h(t))}ot(e,t){try{var n=t();return n&&n instanceof Promise?n.catch(t=>this.ut(e,t)):n}catch(t){return this.ut(e,t),null}}ut(s,o){try{i.Log.warn("Caught error in "+s,{error:o});n(this,void 0,void 0,function*(){var t,e=o||Error(c),n=e instanceof Error,i=n?e.name:"No Name",r=h(e);this.rt=r,this.lt.has(i)||(this.lt.add(i),null!=(r=null==(r=this.O)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.st)&&r.call(this,{name:"error",error:o,tag:s}):(r=u.SDKType.ct(this.j),t=a.StatsigMetadataProvider.get(),n=n?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(e),e=$P({tag:s,exception:i,info:n,statsigOptions:function(i){if(!i)return{};const r={};return Object.keys(i).forEach(t=>{var e=t,n=i[e];switch(typeof n){case"number":case"bigint":case"boolean":r[String(e)]=n;break;case"string":n.length<50?r[String(e)]=n:r[String(e)]="set";break;case"object":"environment"===e?r.environment=n:"networkConfig"===e?r.networkConfig=n:r[String(e)]=null!=n?"set":"unset"}}),r}(this.O)},$P($P({},t),{sdkType:r})),yield(null!=(i=null==(n=null==(i=this.O)?void 0:i.networkConfig)?void 0:n.networkOverrideFunc)?i:fetch)(l.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.j,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(n=this.st)&&n.call(this,{name:"error",error:o,tag:s})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{$Q(e)},2417:(t,e)=>{$Q(e)},7770:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=n(2137),s=n(1406),o=n(7512),l=n(7410),u=n(6830),a=n(1637),c=n(586),h=n(4534),d=n(1881),v=n(2397),f={},_={Startup:"startup",GainedFocus:"gained_focus"};class g{static ht(t){null!=(t=f[t])&&t.flush().catch(()=>{})}static dt(t){null!=(t=f[t])&&t.vt(_.GainedFocus)}constructor(t,e,n,i){this.j=t,this.st=e,this.ft=n,this.O=i,this.gt=[],this._t={},this.bt={},this.yt=!1,this.Ot=Date.now(),this.jt=null!=(t=null==i?void 0:i.loggingEnabled)?t:!0===(null==i?void 0:i.disableLogging)?c.LoggingEnabledOption.disabled:c.LoggingEnabledOption.browserOnly,null!=i&&i.loggingEnabled&&void 0!==i.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.St=null!=(e=null==i?void 0:i.loggingBufferMaxSize)?e:100;n=null==i?void 0:i.networkConfig;this.wt=new d.UrlConfiguration(l.Endpoint.kt,null==n?void 0:n.logEventUrl,null==n?void 0:n.api,null==n?void 0:n.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ft.setLogEventCompressionMode(t)}setLoggingEnabled(t){var e,n;"disabled"===this.jt&&"disabled"!==t&&(e=this.o(),(n=(0,h.K)(e))&&this.gt.push(...n),h.Storage.removeItem(e)),this.jt=t}enqueue(t){this.Et(t)&&(this.Dt(t),this.It(),this.gt.length>this.St)&&g.ht(this.j)}incrementNonExposureCount(t){var e=null!=(e=this.bt[t])?e:0;this.bt[t]=e+1}reset(){this.flush().catch(()=>{}),this._t={}}start(){var t,e=(0,u.Mt)();e&&"always"!==(null==(t=this.O)?void 0:t.loggingEnabled)||(f[this.j]=this,e||(0,v.xt)(t=>{"background"===t?g.ht(this.j):"foreground"===t&&g.dt(this.j)}),this.vt(_.Startup),this.Tt())}stop(){return i(this,void 0,void 0,function*(){this.Nt&&(clearInterval(this.Nt),this.Nt=null),delete f[this.j],yield this.flush()})}flush(){return i(this,void 0,void 0,function*(){var t;this.Ct(),0!==this.gt.length&&(t=this.gt,this.gt=[],yield this.Rt(t))})}It(){this.yt||(this.yt=!0,200<Date.now()-this.Ot)||setTimeout(()=>g.ht(this.j),200)}Et(t){if("always"!==(null==(e=this.O)?void 0:e.loggingEnabled)&&(0,u.Mt)())return!1;if((0,a.Ut)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.j,e),n=t.metadata||{},t=[t.eventName,e,n.gate,n.config,n.ruleID,n.allocatedExperiment,n.parameterName,String(n.isExplicitParameter),n.reason].join("|"),e=this._t[t],n=Date.now();if(e&&n-e<6e5)return!1;1e3<Object.keys(this._t).length&&(this._t={}),this._t[t]=n}return!0}Rt(r){return i(this,void 0,void 0,function*(){var t,e;if("disabled"===this.jt)return this.At(r),!1;try{var n=(0,v.Ft)()&&this.ft.isBeaconSupported()&&null==(null==(e=null==(t=this.O)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),i=(this.st({name:"pre_logs_flushed",events:r}),n?this.Pt(r):yield this.Lt(r));return i.success?(this.st({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.At(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Lt(e){return i(this,void 0,void 0,function*(){var t=yield this.ft.post(this.zt(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ft.beacon(this.zt(t))}}zt(t){return{sdkKey:this.j,data:{events:t},urlConfig:this.wt,retries:3,isCompressable:!0,params:{[l.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}At(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,h.B)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}vt(e){const n=this.o();i(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var t=(0,h.K)(n);t&&(e===_.Startup&&h.Storage.removeItem(n),yield this.Rt(t))&&e===_.GainedFocus&&h.Storage.removeItem(n)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,s.h)(this.j)}Dt(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},n=this.qt(),n=(n&&(e.statsigMetadata={currentPage:n}),$P($P({},t),e));o.Log.debug("Enqueued Event:",n),this.gt.push(n)}Ct(){0!==Object.keys(this.bt).length&&(this.Dt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.bt)}}),this.bt={})}qt(){var t;if(!1!==(null==(t=this.O)?void 0:t.includeCurrentPageUrlWithEvents))return(0,u.Kt)()}Tt(){var t=null!=(t=null==(t=this.O)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=f[this.j];t&&t.Nt===e?g.ht(this.j):clearInterval(e)},t);this.Nt=e}}e.EventLogger=g},1406:(t,s,e)=>{$Q2(s,"__esModule",{value:!0}),s.Bt=s.$t=s.h=void 0;const o=e(6634);s.h=e=>{let n=0;for(let t=0;t<e.length;t++){var i=e.charCodeAt(t);n=(n<<5)-n+i,n&=n}return String(n>>>0)},s.$t=(t,e)=>(0,s.h)(JSON.stringify((0,s.Bt)(t,e)));s.Bt=(n,i)=>{if(null==n)return null;var t=Object.keys(n).sort();const r={};return t.forEach(t=>{var e=n[t];0===i||"object"!==(0,o.Vt)(e)?r[t]=e:r[t]=(0,s.Bt)(e,null!=i?i-1:i)}),r}},1333:(t,e)=>{$Q(e)},7512:(t,e)=>{$Q(e),e.Log=e.LogLevel=void 0;function n(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class i{static info(...t){i.level>=e.LogLevel.Info&&console.info(" INFO ",...n(t))}static debug(...t){i.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...n(t))}static warn(...t){i.level>=e.LogLevel.Warn&&console.warn(" WARN ",...n(t))}static error(...t){i.level>=e.LogLevel.Error&&console.error(" ERROR ",...n(t))}}(e.Log=i).level=e.LogLevel.Warn},7787:(t,e)=>{$Q(e),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Gt:"g",Jt:"c",Wt:"e",Yt:"cl",Xt:"l",Ht:"p"};const s=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,n){let i=t+"|"+e;if(n)for(const r of Object.keys(n)){if(o.has(r))return;s.has(r)?i+=`|${r}=true`:i+=`|${r}=`+n[r]}return i}},7410:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={Qt:"initialize",kt:"rgstr",Zt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.kt]:"https://prodregistryv2.org/v1",[e.Endpoint.Qt]:"https://featureassets.org/v1",[e.Endpoint.Zt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,n){var m=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,n(1845);const v=n(1845),O=n(8962),j=n(7512),w=n(7410),i=n(308),f=n(3091),o=n(5902),r=n(6830),l=n(4143),u=n(9122),S=n(2636),a=n(8e3),_=n(586),k=n(2397),x=500,D=3e4;const E=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.st=e,this.te=null,this.ee=1e4,this.ie={},this.O={},this.ne={},this.se=null,t&&(this.O=t),this.O.networkConfig&&(this.ie=this.O.networkConfig),this.ie.networkTimeoutMs&&(this.ee=this.ie.networkTimeoutMs),this.re=new i.NetworkFallbackResolver(this.O),this.setLogEventCompressionMode(this.le(t))}setLogEventCompressionMode(t){this.O.logEventCompressionMode=t}setErrorBoundary(t){this.te=t,this.te.wrap(this),this.te.wrap(this.re),this.re.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.se;return this.se=null,t}beacon(t){var e,n;return!!I(t)&&(t=this.oe("POST",t),e=this.ue(t),(n=navigator).sendBeacon.bind(n)(e,t.body))}post(e){return m(this,void 0,void 0,function*(){var t=this.oe("POST",e);return this.ae(t),yield this.ce(t),this.he(t)})}get(t){t=this.oe("GET",t);return this.he(t)}he(y){return m(this,void 0,void 0,function*(){var e;if(!I(y))return null;if(this.ie.preventAllNetworkTraffic)return null;var{method:n,body:i,retries:r,attempt:s}=y,o=y.urlConfig.endpoint;if(this.de(o))return j.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;s=null!=s?s:1;const l="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==l&&void 0!==l&&l.abort(`Timeout of ${this.ee}ms expired.`)},this.ee),u=this.ue(y);let a=null;var c,h=(0,k.Ft)();try{var d,v,f,_={method:n,body:i,headers:$P({},y.headers),signal:null===l||void 0===l?void 0:l.signal,priority:y.priority,keepalive:h},g=(c=s,(b=y).urlConfig.endpoint===w.Endpoint.Qt&&O.Diagnostics.W(b.sdkKey,{attempt:c}),this.ne[o]),p=(g&&(g.lastRequestTime=Date.now(),this.ne[o]=g),null!=(e=this.ie.networkOverrideFunc)?e:fetch);if(a=yield p(u,_),clearTimeout(t),a.ok)return f=yield a.text(),M(y,a,s,f),this.re.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:f,code:a.status};throw d=yield a.text().catch(()=>"No Text"),(v=new Error(`NetworkError: ${u} `+d)).name="NetworkError",v}catch(t){var i=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(l,t),h=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(l),b=(M(y,a,s,"",t),yield this.re.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,i,h));return(b&&(y.fallbackUrl=this.re.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<s||!E.has(null!=(c=null===a||void 0===a?void 0:a.status)?c:500))?(null!=(o=this.st)&&o.call(this,{name:"error",error:t,tag:S.ErrorTag.NetworkError,requestArgs:y}),g=`A networking error occurred during ${n} request to ${u}.`,j.Log.error(g,i,t),null!=(e=this.te)&&e.attachErrorIfNoneExists(g),null):(yield function(e){return m(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(x*(e*e),D)))})}(s),this.he($P($P({},y),{retries:r,attempt:s+1})))}})}le(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:_.LogEventCompressionMode.Disabled)||_.LogEventCompressionMode.Enabled}de(t){var e=Date.now(),n=null!=(n=this.ne[t])?n:{count:0,lastRequestTime:e},i=e-n.lastRequestTime,i=Math.floor(.05*i);return n.count=Math.max(0,n.count-i),50<=n.count||(n.count+=1,n.lastRequestTime=e,this.ne[t]=n,!1)}ue(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==w.Endpoint.Qt&&t.urlConfig.endpoint!==w.Endpoint.Zt||(this.se=e);const n=$P({[w.NetworkParam.SdkKey]:t.sdkKey,[w.NetworkParam.SdkType]:o.SDKType.ct(t.sdkKey),[w.NetworkParam.SdkVersion]:a.SDK_VERSION,[w.NetworkParam.Time]:String(Date.now()),[w.NetworkParam.SessionID]:l.SessionID.get(t.sdkKey)},t.params);t=Object.keys(n).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(n[t])).join("&");return e+(t?"?"+t:"")}ae(e){var t,n=(0,r.ve)(),i=e.body;if(e.isStatsigEncodable&&!this.O.disableStatsigEncoding&&"string"==typeof i&&null==(0,v.i)("no-encode")&&null!=n&&n.btoa)try{e.body=n.btoa(i).split("").reverse().join(""),e.params=$P($P({},null!=(t=e.params)?t:{}),{[w.NetworkParam.StatsigEncoded]:"1"})}catch(t){j.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}ce(d){return m(this,void 0,void 0,function*(){var e,n=d.body;if("string"==typeof n&&function(t,e){if(!t.isCompressable)return;if(null!=(0,v.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var n=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,i=!0===f.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case _.LogEventCompressionMode.Disabled:return;case _.LogEventCompressionMode.Enabled:return n&&!i?void 0:1;case _.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.O))try{for(var i,r=(new TextEncoder).encode(n),s=new CompressionStream("gzip"),o=s.writable.getWriter(),l=(o.write(r).catch(j.Log.error),o.close().catch(j.Log.error),s.readable.getReader()),u=[];!(i=yield l.read()).done;)u.push(i.value);var a=u.reduce((t,e)=>t+e.length,0),c=new Uint8Array(a);let t=0;for(const h of u)c.set(h,t),t+=h.length;d.body=c,d.params=$P($P({},null!=(e=d.params)?e:{}),{[w.NetworkParam.IsGzipped]:"1"})}catch(t){j.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}oe(t,e){var n=this.re.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=$P($P({},e),{method:t,fallbackUrl:n});return"data"in e&&s(t,e.data),t}};const I=t=>!!t.sdkKey||(j.Log.warn("Unable to make request without an SDK key"),!1),s=(t,e)=>{var{sdkKey:n,fallbackUrl:i}=t,r=u.StableID.get(n),s=l.SessionID.get(n),n=o.SDKType.ct(n);t.body=JSON.stringify($P($P({},e),{statsigMetadata:$P($P({},a.StatsigMetadataProvider.get()),{stableID:r,sessionID:s,sdkType:n,fallbackUrl:i})}))};function M(t,e,n,i,r){t.urlConfig.endpoint===w.Endpoint.Qt&&O.Diagnostics.Y(t.sdkKey,O.Diagnostics.et(e,n,i,r))}},308:function(t,e,n){var l=this&&this.__awaiter||$A();$Q(e),e.fe=e.NetworkFallbackResolver=void 0;const o=n(8809),i=n(1406),s=n(7512),u=n(4534);function a(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function c(t){return"statsig.network_fallback."+(0,i.h)(t)}function h(t,e){t=c(t);e&&0!==Object.keys(e).length?u.Storage.setItem(t,JSON.stringify(e)):u.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ge=null,this.te=null,this._e={},this.pe=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.te=t}tryBumpExpiryTime(t,e){var n=null==(n=this.ge)?void 0:n[e.endpoint];n&&(n.expiryTime=Date.now()+6048e5,h(t,$P($P({},this.ge),{[e.endpoint]:n})))}getActiveFallbackUrl(t,e){var n;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let i=this.ge;null==i&&(i=null!=(r=function(t){t=c(t),t=u.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return s.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ge=i);var r=i[e.endpoint];return!r||Date.now()>(null!=(n=r.expiryTime)?n:0)||e.getChecksum()!==r.urlConfigChecksum?(delete i[e.endpoint],this.ge=i,h(t,this.ge),null):r.url||null}tryFetchUpdatedFallbackInfo(i,r,s,o){return l(this,void 0,void 0,function*(){var e,t,n;try{return a(s,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.be(r):r.fallbackUrls,!!(n=this.ye(null==(e=this.ge)?void 0:e[r.endpoint],t))&&(this.me(i,r,n),!0)):!1}catch(t){return null!=(e=this.te)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}me(t,e,n){var n={urlConfigChecksum:e.getChecksum(),url:n,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,i=null==(i=this.ge)?void 0:i[e],i=(i&&n.previous.push(...i.previous),10<n.previous.length&&(n.previous=[]),null==(i=null==(i=this.ge)?void 0:i[e])?void 0:i.url);null!=i&&n.previous.push(i),this.ge=$P($P({},this.ge),{[e]:n}),h(t,this.ge)}be(s){return l(this,void 0,void 0,function*(){var t=this._e[s.endpoint];if(t&&Date.now()<t)return null;this._e[s.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.nt)(null!=(t=this.pe)?t:fetch),n=function(t){try{return new URL(t).pathname}catch(t){return null}}(s.defaultUrl);for(const r of t)if(r.startsWith(s.endpointDnsKey+"=")){var i=r.split("=");if(1<i.length){let t=i[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+n)}}return e})}ye(t,e){var n;if(null==e)return null;var i=new Set(null!=(n=null==t?void 0:t.previous)?n:[]),r=null==t?void 0:t.url;let s=null;for(const l of e){var o=l.endsWith("/")?l.slice(0,-1):l;if(!i.has(l)&&o!==r){s=o;break}}return s}},e.fe=a},1405:(t,e)=>{$Q(e)},1361:(t,e)=>{$Q(e)},3091:(t,e)=>{$Q(e),e.SDKFlags=void 0;const n={};e.SDKFlags={setFlags:(t,e)=>{n[t]=e},get:(t,e)=>{return null!=(t=null==(t=n[t])?void 0:t[e])&&t}}},5902:(t,e)=>{$Q(e),e.SDKType=void 0;const n={};let i;e.SDKType={ct:t=>{return(null!=(t=n[t])?t:"js-mono")+(null!==i&&void 0!==i?i:"")},Oe(t,e){n[t]=e},je(t){i&&"-react"!==i||(i="-"+t)}}},6830:(t,i)=>{$Q2(i,"__esModule",{value:!0}),i.Se=i.Kt=i.we=i.ke=i.Mt=i.Ee=i.ve=void 0;i.ve=()=>"undefined"!=typeof window?window:null,i.Ee=()=>{var t=(0,i.ve)();return null!=(t=null==t?void 0:t.document)?t:null},i.Mt=()=>{var t;return null===(0,i.Ee)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},i.ke=(t,e)=>{var n=(0,i.ve)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.we=(t,e)=>{var n=(0,i.Ee)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.Kt=()=>{var t;try{return null==(t=(0,i.ve)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};i.Se=()=>{var t=(0,i.ve)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,n)=>{$Q(e),e.StatsigSession=e.SessionID=void 0;const i=n(1845),r=n(2137),l=n(7512),u=n(4534),a=n(8023),c=18e5,h=144e5,d={};function v(e,t){return setTimeout(()=>{var t=null==(t=(0,i.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function f(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=f(t);return(0,u.K)(t)}(t);var n=Date.now();e=e||{sessionID:(0,a.getUUID)(),startTime:n,lastUpdate:n};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),n=t.data,i=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>c}(n)||function({startTime:t}){return Date.now()-t>h}(n))&&(n.sessionID=(0,a.getUUID)(),n.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(i))&&o.$emt({name:"session_expired"}),n.lastUpdate=e,n),s=t.sdkKey;s=f(s);try{(0,u.B)(s,r)}catch(t){l.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-n.startTime;return t.idleTimeoutID=v(i,c),t.ageTimeoutID=v(i,h-o),t},overrideInitialSessionID:(t,e)=>{var n;d[e]=(t=t,e=e,n=Date.now(),{data:{sessionID:t,startTime:n,lastUpdate:n},sdkKey:e})}}},2176:(t,l)=>{$Q2(l,"__esModule",{value:!0}),l.De=void 0;l.De=(e,n)=>{let i=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var s=r[t],o=e[s];if((i=(i+=s.length)+("object"==typeof o&&null!==o?(0,l.De)(o,n)+2:String(o).length+1))>=n)return i}return i}},9122:(t,e,n)=>{$Q(e),e.getCookieName=e.StableID=void 0;const i=n(2137),r=n(7512),s=n(6830),o=n(4534),l=n(8023),u={},a={},c={};function h(t){return"statsig.stable_id."+(0,i.o)(t)}function d(t,e){e=h(e);try{(0,o.B)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function v(t,e){var n;a[e]&&null!=(0,s.Ee)()&&((n=new Date).setFullYear(n.getFullYear()+1),document.cookie=`${f(e)}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/`)}function f(t){return"statsig.stable_id."+(0,i.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(c[t])return null;if(null!=u[t])return u[t];let e=null;return null!=(e=function(t){if(a[t]&&null!=(0,s.Ee)())for(const i of document.cookie.split(";")){var[e,n]=i.trim().split("=");if(e===f(t))return decodeURIComponent(n)}return null}(t))?d(u[t]=e,t):(d(e=null==(e=function(t){t=h(t);return(0,o.K)(t)}(t))?(0,l.getUUID)():e,t),v(e,t),u[t]=e),e},setOverride:(t,e)=>{d(u[e]=t,e),v(t,e)},Ie:(t,e)=>{a[t]=e},Me:(t,e)=>{c[t]=e}},e.getCookieName=f},1375:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,n(1845);const o=n(1845),l=n(5542),u=n(7770),a=n(7512),s=n(7787),c=n(6830),h=n(4143),d=n(9122),r=n(586),v=n(4534);e.StatsigClientBase=class{constructor(t,e,n,i){this.loadingStatus="Uninitialized",this.xe=null,this.Te={};var r,s=this.$emt.bind(this);null!=(null==i?void 0:i.logLevel)&&(a.Log.level=i.logLevel),null!=i&&i.disableStorage&&v.Storage.Me(!0),null!=i&&i.initialSessionID&&h.StatsigSession.overrideInitialSessionID(i.initialSessionID,t),null!=i&&i.storageProvider&&v.Storage.Ne(i.storageProvider),null!=i&&i.enableCookies&&d.StableID.Ie(t,i.enableCookies),null!=i&&i.disableStableID&&d.StableID.Me(t,!0),this.j=t,this.O=null!=i?i:{},this.Ce={},this.overrideAdapter=null!=(r=null==i?void 0:i.overrideAdapter)?r:null,this.Re=new u.EventLogger(t,s,n,i),this.te=new l.ErrorBoundary(t,i,s),this.te.wrap(this),this.te.wrap(e),this.te.wrap(this.Re),n.setErrorBoundary(this.te),this.dataAdapter=e,this.dataAdapter.attach(t,i,n),this.storageProvider=v.Storage,null!=(e=null==(s=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:s.call(r))&&e.catch(t=>this.te.logError("OA::loadFromStorage",t)),this.Ue(),i=t,n=this,(0,c.Mt)()||(s=(0,o.l)(),r=null!=(r=s.instances)?r:{},n=n,null!=r[i]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[i]=n,s.firstInstance||(s.firstInstance=n),s.instances=r,__STATSIG__=s)}updateRuntimeOptions(t){t.loggingEnabled?(this.O.loggingEnabled=t.loggingEnabled,this.Re.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.O.disableLogging=t.disableLogging,this.Re.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.O.disableStorage=t.disableStorage,v.Storage.Me(t.disableStorage)),null!=t.enableCookies&&(this.O.enableCookies=t.enableCookies,d.StableID.Ie(this.j,t.enableCookies)),t.logEventCompressionMode?this.Re.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.Re.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.Re.flush()}shutdown(){return i(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.Ae("Uninitialized",null),this.xe=null,yield this.Re.stop()})}on(t,e){this.Te[t]||(this.Te[t]=[]),this.Te[t].push(e)}off(t,e){this.Te[t]&&-1!==(e=this.Te[t].indexOf(e))&&this.Te[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(n){var t;const e=e=>{try{e(n)}catch(t){!0===e.__isInternal?this.te.logError("__emit:"+n.name,t):a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",n)}};this.Te[n.name]&&this.Te[n.name].forEach(t=>e(t)),null!=(t=this.Te["*"])&&t.forEach(e)}Ae(t,e){this.loadingStatus=t,this.Ce={},this.$emt({name:"values_updated",status:t,values:e})}Fe(t,e,n){!0===(null==n?void 0:n.disableExposureLog)?this.Re.incrementNonExposureCount(t):this.Re.enqueue(e)}Pe(i,r){return(t,e)=>{var n;return!this.O.disableEvaluationMemoization&&(n=(0,s.createMemoKey)(i,t,e))?(n in this.Ce||(3e3<=Object.keys(this.Ce).length&&(this.Ce={}),this.Ce[n]=r(t,e)),this.Ce[n]):r(t,e)}}}},2636:(t,e)=>{$Q(e),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{$Q(e),e.Le=e.ze=e.qe=e.Ke=e.Ut=void 0;const s="statsig::config_exposure",o="statsig::gate_exposure",a="statsig::layer_exposure",c=(t,e,n,i,r)=>(n.bootstrapMetadata&&(i.bootstrapMetadata=n.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:l(n,i),secondaryExposures:r,time:Date.now()});e.Ut=({eventName:t})=>t===o||t===s||t===a;function h(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Ke=(t,e,n)=>{var i,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(r.configVersion=e.__evaluation.version),c(o,t,e.details,r,h(null!=(t=null==(i=e.__evaluation)?void 0:i.secondary_exposures)?t:[],n))},e.qe=h;e.ze=(t,e,n)=>{var i,r={config:e.name,ruleID:e.ruleID};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(i=e.__evaluation)?void 0:i.passed)&&(r.rulePassed=String(e.__evaluation.passed)),c(s,t,e.details,r,h(null!=(t=null==(i=e.__evaluation)?void 0:i.secondary_exposures)?t:[],n))};e.Le=(t,e,n,i)=>{var r=e.__evaluation,s=!0===(null==(s=null==r?void 0:r.explicit_parameters)?void 0:s.includes(n));let o="",l=null!=(u=null==r?void 0:r.undelegated_secondary_exposures)?u:[];s&&(o=null!=(u=r.allocated_experiment_name)?u:"",l=null!=(u=r.secondary_exposures)?u:[]);var u=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,u={config:e.name,parameterName:n,ruleID:null!=(r=null==u?void 0:u[n])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(s)};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(u.configVersion=e.__evaluation.version),c(a,t,e.details,u,h(l,i))};const l=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.25.0";let n={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>n,add:t=>{n=$P($P({},n),t)}}},586:(t,e)=>{$Q(e),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{$Q(e)},2059:(t,e,n)=>{$Q(e),e.Be=e.$e=e.Ve=e.Ge=e.Je=e.We=void 0;const o=n(7512),l=n(6634);function r(t,e,n,i){return{name:t,details:e,ruleID:null!=(t=null==n?void 0:n.rule_id)?t:"",__evaluation:n,value:i}}function i(t,e,n){var i=null!=(i=null==n?void 0:n.value)?i:{};return $P($P({},r(t,e,n,i)),{get:s(t,null==n?void 0:n.value)})}function s(i,r,s){return(t,e)=>{var n=null!=(n=null==r?void 0:r[t])?n:null;return null==n?null!=e?e:null:null==e||(0,l.Ye)(n,e)?(null!=s&&s(t),n):(o.Log.warn(`Parameter type mismatch. '${i}.${t}' was found to be type '${typeof n}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.We=function(t,e,n){return $P($P({},r(t,e,n,!0===(null==n?void 0:n.value))),{idType:null!=(t=null==n?void 0:n.id_type)?t:null})},e.Je=i,e.Ge=function(t,e,n){return t=i(t,e,n),$P($P({},t),{groupName:null!=(e=null==n?void 0:n.group_name)?e:null})},e.Ve=function(t,e,n,i){return $P($P({},r(t,e,n,void 0)),{get:s(t,null==n?void 0:n.value,i),groupName:null!=(e=null==n?void 0:n.group_name)?e:null,__value:null!=(t=null==n?void 0:n.value)?t:{}})},e.$e=function(t,e,n,i){return $P($P($P({},t),e),{get:s(t.name,n,i)})},e.Be=s},1812:(t,e)=>{$Q(e)},3932:(t,e)=>{$Q(e),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,n,i,r,s)=>({duration:n,source:e,success:t,error:i,sourceUrl:r,warnings:s}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,n)=>{$Q(e),e._=e.D=void 0;const i=n(1406),r=n(7512);e.D=function(t,e,n){try{var i=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?i.statsigEnvironment=e.environment:null!=n&&(i.statsigEnvironment={tier:n}),i}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e._=function(t){return t?(0,i.$t)(t):null}},4534:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.B=n.K=n.Storage=void 0;var i=e(7512),e=e(6830);const r={},s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const c=(0,e.ve)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>c.localStorage.getItem(t),setItem:(t,e)=>c.localStorage.setItem(t,e),removeItem:t=>c.localStorage.removeItem(t),getAllKeys:()=>Object.keys(c.localStorage)})}catch(t){i.Log.warn("Failed to setup localStorageProvider.")}let l=null!==o&&void 0!==o?o:s,u=l;function a(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return n.Storage.Ne(s),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=n.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}n.Storage={isReady:()=>u.isReady(),isReadyResolver:()=>u.isReadyResolver(),getProviderName:()=>u.getProviderName(),getItem:t=>a(()=>u.getItem(t)),setItem:(t,e)=>a(()=>u.setItem(t,e)),removeItem:t=>u.removeItem(t),getAllKeys:()=>u.getAllKeys(),Ne:t=>{l=t,u=t},Me:t=>{u=t?s:l}},n.K=function(t){return t=n.Storage.getItem(t),JSON.parse(null!=t?t:"null")},n.B=function(t,e){n.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,n)=>{$Q(e),e.P=void 0;const r=n(7512);e.P=function(t,e,n){try{var i=JSON.parse(t);if(i&&"object"==typeof i&&e in i)return i}catch(t){}return r.Log.error("Failed to parse "+n),null}},6634:(t,e)=>{$Q(e),e.Ye=e.Vt=void 0,e.Vt=function(t){return Array.isArray(t)?"array":typeof t},e.Ye=function(t,e){var n=t=>Array.isArray(t)?"array":null===t?"null":typeof t;return n(t)===n(e)}},8023:(t,e)=>{$Q(e),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let n=(new Date).getTime(),i="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<n?(e=(n+e)%16|0,n=Math.floor(n/16)):(e=(i+e)%16|0,i=Math.floor(i/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,n)=>{$Q(e),e.UrlConfiguration=void 0;const i=n(1406),r=n(7410),s={[r.Endpoint.Qt]:"i",[r.Endpoint.kt]:"e",[r.Endpoint.Zt]:"d"};e.UrlConfiguration=class{constructor(t,e,n,i){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=s[t],e&&(this.customUrl=e),!e&&n&&(this.customUrl=n.endsWith("/")?""+n+t:n+"/"+t),i&&(this.fallbackUrls=i);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,i.h)(this.customUrl+t)}}},2397:(t,e,n)=>{$Q(e),e.Xe=e.xt=e.Ft=e.He=void 0;n=n(6830);const i="foreground",r="background",s=[];let o=i,l=!1;e.He=()=>o===i,e.Ft=()=>l,e.xt=t=>{s.unshift(t)};e.Xe=e=>{e!==o&&(o=e,s.forEach(t=>t(e)))},(0,n.ke)("focus",()=>{(l=!1,e.Xe)(i)}),(0,n.ke)("blur",()=>(0,e.Xe)(r)),(0,n.we)("visibilitychange",()=>{(0,e.Xe)("visible"===document.visibilityState?i:r)}),(0,n.ke)((0,n.Se)(),()=>{l=!0,(0,e.Xe)(r)})},6914:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)},s=($Q(e),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,n(1845),n(1845));const o=n(8962),l=($Q2(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),n(7770)),u=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return l.EventLogger}}),n(7512));$Q2(e,"Log",{enumerable:!0,get:function(){return u.Log}});var a=n(8e3);const c=n(4534);$Q2(e,"Storage",{enumerable:!0,get:function(){return c.Storage}}),r(n(1845),e),r(n(2137),e),r(n(6427),e),r(n(694),e),r(n(8962),e),r(n(3539),e),r(n(5542),e),r(n(2922),e),r(n(2417),e),r(n(1406),e),r(n(1333),e),r(n(7512),e),r(n(7787),e),r(n(7410),e),r(n(7023),e),r(n(1405),e),r(n(1361),e),r(n(6830),e),r(n(5902),e),r(n(4143),e),r(n(2176),e),r(n(9122),e),r(n(1375),e),r(n(2636),e),r(n(3206),e),r(n(1637),e),r(n(8e3),e),r(n(586),e),r(n(1098),e),r(n(2059),e),r(n(1812),e),r(n(8578),e),r(n(4534),e),r(n(3401),e),r(n(6634),e),r(n(1881),e),r(n(8023),e),r(n(2397),e),r(n(3932),e),r(n(3091),e),$P((0,s.l)(),{Log:u.Log,SDK_VERSION:a.SDK_VERSION})},9638:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=($Q(e),s(n(600)));r(n(600),e),e.default=s.default},8494:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const r=n(6914);class s extends r.NetworkCore{constructor(t=null){super(t);t=null==t?void 0:t.networkConfig;this.tn=new r.UrlConfiguration(r.Endpoint.Zt,null==t?void 0:t.downloadConfigSpecsUrl,null==t?void 0:t.api,null==t?void 0:t.downloadConfigSpecsFallbackUrls)}fetchConfigSpecs(e,n){return i(this,void 0,void 0,function*(){var t=yield this.get({sdkKey:e,urlConfig:this.tn,priority:n});return null!=(t=null==t?void 0:t.body)?t:null})}}e.default=s},6217:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const o=n(6914),r=n(3066),s=n(8494),l=n(2660);class u extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof u?e:(o.Log.warn((0,o.Mt)()?"StatsigOnDeviceEvalClient.instance is not supported in server environments":"Unable to find StatsigOnDeviceEvalClient instance"),new u(null!=t?t:""))}constructor(t,e=null){o.SDKType.Oe(t,"js-on-device-eval-client");var n=new s.default(e);super(t,null!=(t=null==e?void 0:e.dataAdapter)?t:new l.StatsigSpecsDataAdapter,n,e),this.ft=n,this.Oi=new r.SpecStore,this.en=new r.Evaluator(this.Oi),this.wi=(0,o.getUUID)()}initializeSync(t){return"Uninitialized"!==this.loadingStatus?{success:!0,duration:0,source:this.Oi.getSource(),sourceUrl:null,error:null}:(this.Re.start(),this.updateSync(t))}initializeAsync(t){return i(this,void 0,void 0,function*(){return this.xe||(this.xe=this.ki(t)),this.xe})}updateSync(t){var e=performance.now(),n=(this.Oi.reset(),this.dataAdapter.getDataSync());return this.Oi.setValuesFromDataAdapter(n),this.Oi.finalize(),this.Ae("Ready",n),null!=t&&t.disableBackgroundCacheRefresh||this.xi(n),(0,o.createUpdateDetails)(!0,this.Oi.getSource(),performance.now()-e,this.te.getLastSeenErrorAndReset(),this.ft.getLastUsedInitUrlAndReset())}updateAsync(n){return i(this,void 0,void 0,function*(){var t=performance.now(),e=(this.Oi.reset(),this.Ae("Loading",null),this.dataAdapter.getDataSync());return this.Oi.setValuesFromDataAdapter(e),e=yield this.dataAdapter.getDataAsync(e,n),this.Oi.setValuesFromDataAdapter(e),this.Oi.finalize(),this.Ae("Ready",e),(0,o.createUpdateDetails)(!0,this.Oi.getSource(),performance.now()-t,this.te.getLastSeenErrorAndReset(),this.ft.getLastUsedInitUrlAndReset())})}getContext(){return{sdkKey:this.j,options:this.O,values:this.Oi.getValues(),errorBoundary:this.te,session:o.StatsigSession.get(this.j),stableID:o.StableID.get(this.j),sdkInstanceID:this.wi}}checkGate(t,e,n){return this.getFeatureGate(t,e,n).value}getFeatureGate(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateGate(t,e),r=(0,o.We)(t,r,i);return this.Fe(t,(0,o.Ke)(e,r),n),this.$emt({name:"gate_evaluation",gate:r}),r}getDynamicConfig(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateConfig(t,e),r=(0,o.Je)(t,r,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:s.call(i,r,e,n),i=null!=s?s:r;return this.Fe(t,(0,o.ze)(e,i),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}getExperiment(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateConfig(t,e),r=(0,o.Ge)(t,r,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:s.call(i,r,e,n),i=null!=s?s:r;return this.Fe(t,(0,o.ze)(e,i),n),this.$emt({name:"experiment_evaluation",experiment:i}),i}getLayer(e,t,n){const i=this.D(t);var{evaluation:t,details:r}=this.en.evaluateLayer(e,i);const s=(0,o.Ve)(e,r,t,t=>{this.Fe(e,(0,o.Le)(i,s,t),n)});t=null==(t=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:t.call(r,s,i,n),r=null!=t?t:s;return this.$emt({name:"layer_evaluation",layer:r}),r}logEvent(t,e,n,i){this.Re.enqueue($P($P({},"string"==typeof t?{eventName:t,value:n,metadata:i}:t),{user:this.D(e),time:Date.now()}))}Ue(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Mi(null)})}ki(t){return i(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.Re.start(),this.updateAsync(t)})}Mi(t){this.Oi.finalize(),this.Ae("Ready",t)}D(t){return(0,o.D)(t,this.O,this.Oi.getDefaultEnvironment())}xi(t){this.dataAdapter.getDataAsync(t,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}}e.default=u},2660:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigSpecsDataAdapter=void 0;const r=n(6914),s=n(8494);class o extends r.DataAdapterCore{constructor(){super("SpecsDataAdapter","specs"),this.ft=null}attach(t,e,n){super.attach(t,e,n),null!==n&&n instanceof s.default?this.ft=n:this.ft=new s.default(null!=e?e:{})}getDataAsync(t,e){return this.C(t,void 0,e)}prefetchData(t){return this.U(void 0,t)}F(t,e,n){return i(this,void 0,void 0,function*(){var t;return null!=(t=yield null==(t=this.ft)?void 0:t.fetchConfigSpecs(this.N(),null==n?void 0:n.priority))?t:null})}I(){var t=(0,r.o)(this.N());return`${r.DataAdapterCachePrefix}.${this.m}.`+t}A(t,e){return 0<t.data.length}}e.StatsigSpecsDataAdapter=o},600:(t,e,n)=>{$Q(e),e.StatsigSpecsDataAdapter=e.StatsigOnDeviceEvalClient=void 0;var i=n(6914),r=n(6217);e.StatsigOnDeviceEvalClient=r.default;const s=n(2660);$Q2(e,"StatsigSpecsDataAdapter",{enumerable:!0,get:function(){return s.StatsigSpecsDataAdapter}});n=$P((0,i.l)(),{StatsigSpecsDataAdapter:s.StatsigSpecsDataAdapter,StatsigOnDeviceEvalClient:r.default});e.default=n},6535:(t,e)=>{function l(t){return t.setUTCHours(0,0,0,0),t.getTime()}$Q(e),e.default={compareNumbers(t,e,n){if(null==t||null==e)return!1;var i=Number(t),r=Number(e);if(isNaN(i)||isNaN(r))return!1;switch(n){case"gt":return e<t;case"gte":return e<=t;case"lt":return t<e;case"lte":return t<=e;default:return!1}},compareVersions(t,e,n){if(null==t||null==e)return!1;var t=String(t),e=String(e),i=t=>{var e=t.indexOf("-");return-1!==e?t.substring(0,e):t},r=((t,e)=>{var n=t.split(".").map(t=>parseInt(t)),i=e.split(".").map(t=>parseInt(t));let r=0;for(;r<Math.max(n.length,i.length);){var s=r<n.length?n[r]:0,o=r<i.length?i[r]:0;if(s<o)return-1;if(o<s)return 1;r++}return 0})(i(t),i(e));switch(n){case"version_gt":return 0<r;case"version_gte":return 0<=r;case"version_lt":return r<0;case"version_lte":return r<=0;case"version_eq":return 0===r;case"version_neq":return 0!==r;default:return!1}},compareStringInArray(r,t,s){if(!Array.isArray(t))return!1;const o="any_case_sensitive"!==s&&"none_case_sensitive"!==s;var e=-1!==t.findIndex(t=>{var e=String(r),t=String(t),n=o?e.toLowerCase():e,i=o?t.toLowerCase():t;switch(s){case"any":case"none":case"any_case_sensitive":case"none_case_sensitive":return n===i;case"str_starts_with_any":return n.startsWith(i);case"str_ends_with_any":return n.endsWith(i);case"str_contains_any":case"str_contains_none":return n.includes(i);default:return!1}});switch(s){case"none":case"none_case_sensitive":case"str_contains_none":return!e;default:return e}},compareStringWithRegEx(t,e){try{var n=String(t);if(n.length<1e3)return new RegExp(String(e)).test(n)}catch(t){}return!1},compareTime(n,i,r){if(null==n||null==i)return!1;try{let t=new Date(String(n)),e=(isNaN(t.getTime())&&(t=new Date(Number(n))),new Date(String(i)));isNaN(e.getTime())&&(e=new Date(Number(i)));var s=t.getTime(),o=e.getTime();if(isNaN(s)||isNaN(o))return!1;switch(r){case"before":return s<o;case"after":return o<s;case"on":return l(t)===l(e);default:return!1}}catch(t){return!1}},arrayHasValue(t,e){var n=new Set(t);for(let t=0;t<e.length;t++)if(n.has(e[t])||n.has(parseFloat(e[t])))return!0;return!1},arrayHasAllValues(t,e){var n=new Set(t);for(let t=0;t<e.length;t++)if(!n.has(e[t])&&!n.has(parseFloat(e[t])))return!1;return!0}}},5079:(t,e)=>{$Q(e),e.resultToLayerEval=e.resultToConfigEval=e.resultToGateEval=e.makeEvalResult=void 0,e.makeEvalResult=function(t){return $P($P({},{unsupported:!1,bool_value:!1,rule_id:"",secondary_exposures:[],json_value:{},explicit_parameters:null,allocated_experiment_name:null,is_experiment_group:!1,group_name:null,undelegated_secondary_exposures:void 0}),t)},e.resultToGateEval=function(t,e){return{name:t.name,id_type:t.idType,rule_id:e.rule_id,value:e.bool_value,secondary_exposures:e.secondary_exposures,version:null==(e=t.version)?void 0:e.toString()}},e.resultToConfigEval=function(t,e){var n;return{name:t.name,id_type:t.idType,rule_id:e.rule_id,value:e.json_value,secondary_exposures:e.secondary_exposures,group:null!=(n=e.group_name)?n:"",group_name:null!=(n=e.group_name)?n:void 0,is_device_based:!1,is_experiment_active:t.isActive,is_user_in_experiment:e.is_experiment_group,version:null==(n=t.version)?void 0:n.toString(),passed:e.bool_value}},e.resultToLayerEval=function(t,e,n){var i;return{name:t.name,rule_id:n.rule_id,value:n.json_value,secondary_exposures:n.secondary_exposures,undelegated_secondary_exposures:n.undelegated_secondary_exposures,allocated_experiment_name:null!=(i=n.allocated_experiment_name)?i:"",explicit_parameters:null!=(i=n.explicit_parameters)?i:[],group:null!=(i=n.group_name)?i:"",group_name:null!=(i=n.group_name)?i:void 0,is_device_based:!1,is_experiment_active:null==e?void 0:e.isActive,is_user_in_experiment:n.is_experiment_group,version:null==(i=t.version)?void 0:i.toString()}}},5007:(t,e,n)=>{$Q(e),e.Evaluator=void 0;const i=n(5680),h=n(6535),d=n(5079);function v(t,e){var n;return"string"==typeof e&&"userid"!==e.toLowerCase()?null!=(n=null==(n=t.customIDs)?void 0:n[e])?n:null==(n=null==t?void 0:t.customIDs)?void 0:n[e.toLowerCase()]:t.userID}function f(t){return(0,i.SHA256)(t).dataView().getBigUint64(0,!1)}function l(t){return null!=t&&"object"==typeof t}e.Evaluator=class{constructor(t){this.Oi=t}evaluateGate(t,e){var{spec:t,details:n}=this.nn("gate",t);return t?(e=this.rn(t,e),t=(0,d.resultToGateEval)(t,e),this.sn(e,n),{evaluation:t,details:n}):{evaluation:null,details:n}}evaluateConfig(t,e){var{spec:t,details:n}=this.nn("config",t);return t?(e=this.rn(t,e),t=(0,d.resultToConfigEval)(t,e),this.sn(e,n),{evaluation:t,details:n}):{evaluation:null,details:n}}evaluateLayer(t,e){var n,{spec:t,details:i}=this.nn("layer",t);return t?(n=null!=(n=null==(e=this.rn(t,e))?void 0:e.allocated_experiment_name)?n:"",n=this.Oi.getSpecAndSourceInfo("config",n).spec,t=(0,d.resultToLayerEval)(t,n,e),this.sn(e,i),{evaluation:t,details:i}):{evaluation:null,details:i}}sn(t,e){t.unsupported&&(e.reason="Unsupported")}getParamStoreConfig(t){var t=this.Oi.getParamStoreAndSourceInfo(t),e=this.ln(t);return{config:null!=(t=t.paramStoreConfig)?t:null,details:e}}nn(t,e){t=this.Oi.getSpecAndSourceInfo(t,e);return{details:this.ln(t),spec:t.spec}}ln(t){var{source:e,lcut:n,receivedAt:i}=t;return"Uninitialized"===e||"NoValues"===e?{reason:e}:{reason:e+":"+(null==("spec"in t?t.spec:t.paramStoreConfig)?"Unrecognized":"Recognized"),lcut:n,receivedAt:i}}rn(t,e){var n=l(t.defaultValue)?t.defaultValue:void 0;if(!t.enabled)return(0,d.makeEvalResult)({json_value:n,rule_id:"disabled"});var i=[];for(const o of t.rules){var r,s=this.un(o,e);if(s.unsupported)return s;if(i.push(...s.secondary_exposures),s.bool_value)return this.an(o.configDelegate,e,i)||(r=function(t,e,n){if(100===t.passPercentage)return!0;if(0===t.passPercentage)return!1;e=f(n.salt+"."+(null!=(n=t.salt)?n:t.id)+"."+(null!=(n=v(e,t.idType))?n:""));return Number(e%BigInt(1e4))<100*t.passPercentage}(o,e,t),(0,d.makeEvalResult)({rule_id:s.rule_id,bool_value:r,json_value:r?s.json_value:n,secondary_exposures:i,undelegated_secondary_exposures:i,is_experiment_group:s.is_experiment_group,group_name:s.group_name}))}return(0,d.makeEvalResult)({json_value:n,secondary_exposures:i,undelegated_secondary_exposures:i,rule_id:"default"})}un(t,e){var n=[];let i=!0;for(const s of t.conditions){var r=this.cn(s,e);if(r.unsupported)return r;n.push(...r.secondary_exposures),r.bool_value||(i=!1)}return(0,d.makeEvalResult)({rule_id:t.id,bool_value:i,json_value:l(t.returnValue)?t.returnValue:void 0,secondary_exposures:n,is_experiment_group:!0===t.isExperimentGroup,group_name:t.groupName})}cn(t,e){let n=null,i=!1;var r=t.field,s=t.targetValue,o=t.idType,l=t.type;switch(l){case"public":return(0,d.makeEvalResult)({bool_value:!0});case"pass_gate":case"fail_gate":var u=String(s),u=this.hn(u,e);return(0,d.makeEvalResult)({bool_value:"fail_gate"===l?!u.bool_value:u.bool_value,secondary_exposures:u.secondary_exposures});case"multi_pass_gate":case"multi_fail_gate":return this.dn(s,l,e);case"user_field":case"ip_based":case"ua_based":n=function(t,e){var n;if(null==e||"object"!=typeof t||null==t)return null;var i=t;return null!=(n=null!=(n=null!=(n=null!=(n=null!=(n=i[e])?n:i[e.toLowerCase()])?n:null==(i=null==t?void 0:t.custom)?void 0:i[e])?n:null==(i=null==t?void 0:t.custom)?void 0:i[e.toLowerCase()])?n:null==(i=null==t?void 0:t.privateAttributes)?void 0:i[e])?n:null==(i=null==t?void 0:t.privateAttributes)?void 0:i[e.toLowerCase()]}(e,r);break;case"environment_field":n=function(t,e){if(null==e)return null;t=t.statsigEnvironment;if(null!=t){const n=e.toLowerCase(),i=Object.keys(t).find(t=>t.toLowerCase()===n);return void 0!==i?t[i]:void 0}}(e,r);break;case"current_time":n=Date.now();break;case"user_bucket":u=f(String(null!=(u=null==(u=t.additionalValues)?void 0:u.salt)?u:"")+"."+(null!=(u=v(e,o))?u:""));n=Number(u%BigInt(1e3));break;case"unit_id":n=v(e,o);break;default:return(0,d.makeEvalResult)({unsupported:!0})}var a,c=t.operator;switch(c){case"gt":case"gte":case"lt":case"lte":i=h.default.compareNumbers(n,s,c);break;case"version_gt":case"version_gte":case"version_lt":case"version_lte":case"version_eq":case"version_neq":i=h.default.compareVersions(n,s,c);break;case"any":case"none":case"str_starts_with_any":case"str_ends_with_any":case"str_contains_any":case"str_contains_none":case"any_case_sensitive":case"none_case_sensitive":i=h.default.compareStringInArray(n,s,c);break;case"str_matches":i=h.default.compareStringWithRegEx(n,s);break;case"before":case"after":case"on":i=h.default.compareTime(n,s,c);break;case"eq":i=n==s;break;case"neq":i=n!=s;break;case"in_segment_list":case"not_in_segment_list":return(0,d.makeEvalResult)({unsupported:!0});case"array_contains_any":case"array_contains_none":Array.isArray(s)?i=!!Array.isArray(n)&&(a=h.default.arrayHasValue(n,s),"array_contains_any"===c?a:!a):i=!1;break;case"array_contains_all":case"not_array_contains_all":Array.isArray(s)?i=!!Array.isArray(n)&&(a=h.default.arrayHasAllValues(n,s),"array_contains_all"===c?a:!a):i=!1}return(0,d.makeEvalResult)({bool_value:i})}an(t,e,n){var i;return t&&(i=this.Oi.getSpecAndSourceInfo("config",t).spec,i)?(e=this.rn(i,e),(0,d.makeEvalResult)($P($P({},e),{allocated_experiment_name:t,explicit_parameters:i.explicitParameters,secondary_exposures:n.concat(e.secondary_exposures),undelegated_secondary_exposures:n}))):null}hn(t,e){var n=[];let i=!1;var r=this.Oi.getSpecAndSourceInfo("gate",t)["spec"];if(r){r=this.rn(r,e);if(r.unsupported)return r;i=r.bool_value,n.push(...r.secondary_exposures),n.push({gate:t,gateValue:String(i),ruleID:r.rule_id})}return(0,d.makeEvalResult)({bool_value:i,secondary_exposures:n})}dn(t,e,n){if(!Array.isArray(t))return(0,d.makeEvalResult)({unsupported:!0});var i="multi_pass_gate"===e,r=[];let s=!1;for(const l of t){if("string"!=typeof l)return(0,d.makeEvalResult)({unsupported:!0});var o=this.hn(l,n);if(o.unsupported)return o;if(r.push(...o.secondary_exposures),i?!0===o.bool_value:!1===o.bool_value){s=!0;break}}return(0,d.makeEvalResult)({bool_value:s,secondary_exposures:r})}}},8313:(t,e,n)=>{$Q(e),e.SpecStore=void 0;const i=n(6914);function r(t){return(0,i.P)(t,"has_updates","DownloadConfigSpecsResponse")}e.SpecStore=class{constructor(){this.Ze=null,this.ti=null,this.ei="Uninitialized",this.ii=0,this.ni=0,this.vn=null}getValues(){return this.Ze?r(this.Ze):null}getSource(){return this.ei}getDefaultEnvironment(){return this.vn}setValuesFromDataAdapter(t){var e;t&&!0===(null==(e=r(t.data))?void 0:e.has_updates)&&(this.ii=e.time,this.ni=t.receivedAt,this.ei=t.source,this.ti=e,this.Ze=t.data,this.vn=null!=(t=e.default_environment)?t:null)}reset(){this.ti=null,this.Ze=null,this.ei="Loading"}finalize(){this.ti||(this.ei="NoValues")}getSpecAndSourceInfo(t,e){var t=this.fn(t);return{spec:null!=(t=null==t?void 0:t.find(t=>t.name===e))?t:null,source:this.ei,lcut:this.ii,receivedAt:this.ni}}getParamStoreAndSourceInfo(t){var e=null==(e=this.ti)?void 0:e.param_stores;return{paramStoreConfig:null!=(t=null==(e=null==e?void 0:e[t])?void 0:e.parameters)?t:null,source:this.ei,lcut:this.ii,receivedAt:this.ni}}fn(t){var e;switch(t){case"gate":return null==(e=this.ti)?void 0:e.feature_gates;case"config":return null==(e=this.ti)?void 0:e.dynamic_configs;case"layer":return null==(e=this.ti)?void 0:e.layer_configs}}}},3066:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};$Q(e),r(n(5007),e),r(n(8313),e)},5680:(t,e,n)=>{$Q(e),e.SHA256=void 0;const i=n(7485);$Q2(e,"SHA256",{enumerable:!0,get:function(){return i.SHA256}})},7485:(t,e)=>{$Q(e),e.SHA256=void 0,e.SHA256=function(t){return(new i).update(t)};const n=[-2147483648,8388608,32768,128],o=[24,16,8,0],m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];class i{constructor(){this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.lastByteIndex=-1}update(n){if(!this.finalized){if("string"!=typeof n)throw new Error('Must be of type "string"');var i;let t=0,e;for(var r=n.length,s=this.blocks;t<r;){for(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),e=this.start;t<r&&e<64;++t)(i=n.charCodeAt(t))<128?s[e>>2]|=i<<o[3&e++]:(i<2048?s[e>>2]|=(192|i>>6)<<o[3&e++]:(i<55296||57344<=i?s[e>>2]|=(224|i>>12)<<o[3&e++]:(i=65536+((1023&i)<<10|1023&n.charCodeAt(++t)),s[e>>2]|=(240|i>>18)<<o[3&e++],s[e>>2]|=(128|i>>12&63)<<o[3&e++]),s[e>>2]|=(128|i>>6&63)<<o[3&e++]),s[e>>2]|=(128|63&i)<<o[3&e++]);this.lastByteIndex=e,this.bytes+=e-this.start,64<=e?(this.block=s[16],this.start=e-64,this.hash(),this.hashed=!0):this.start=e}4294967295<this.bytes&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296)}return this}finalize(){var t,e;this.finalized||(this.finalized=!0,t=this.blocks,e=this.lastByteIndex,t[16]=this.block,t[e>>2]|=n[3&e],this.block=t[16],56<=e&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash())}hash(){var t=this.blocks;let e=this.h0,n=this.h1,i=this.h2,r=this.h3,s=this.h4,o=this.h5,l=this.h6,u=this.h7,a,c,h,d,v,f,_,g,p,b,y;for(a=16;a<64;++a)v=t[a-15],c=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3,v=t[a-2],h=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,t[a]=t[a-16]+c+t[a-7]+h<<0;for(y=n&i,a=0;a<64;a+=4)this.first?(g=704751109,v=t[0]-210244248,u=v-1521486534<<0,r=v+143694565<<0,this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),h=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),g=e&n,d=g^e&i^y,_=s&o^~s&l,v=u+h+_+m[a]+t[a],f=c+d,u=r+v<<0,r=v+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),h=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),p=r&e,d=p^r&n^g,_=u&s^~u&o,v=l+h+_+m[a+1]+t[a+1],f=c+d,l=i+v<<0,i=v+f<<0,c=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),h=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),b=i&r,d=b^i&e^p,_=l&u^~l&s,v=o+h+_+m[a+2]+t[a+2],f=c+d,o=n+v<<0,n=v+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),h=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&i,d=y^n&r^b,_=o&l^~o&u,v=s+h+_+m[a+3]+t[a+3],f=c+d,s=e+v<<0,e=v+f<<0;this.h0=this.h0+e<<0,this.h1=this.h1+n<<0,this.h2=this.h2+i<<0,this.h3=this.h3+r<<0,this.h4=this.h4+s<<0,this.h5=this.h5+o<<0,this.h6=this.h6+l<<0,this.h7=this.h7+u<<0}arrayBuffer(){return this._n().buffer}dataView(){return this._n().dataView}_n(){this.finalize();var t=new ArrayBuffer(32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),e.setUint32(28,this.h7),{dataView:e,buffer:t}}}}},i={};function r(t){var e=i[t];return void 0!==e||(e=i[t]={exports:{}},n[t].call(e.exports,e,e.exports,r)),e.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(9638).default})());
|
|
1
|
+
var $Q=(e)=>Object.defineProperty(e,"__esModule",{value:!0});var $Q2=(a,b,c)=>Object.defineProperty(a,b,c);var $P=(a,b)=>Object.assign(a,b);var $A=()=>((t,r,u,l)=>{return new(u=u||Promise)(function(n,e){function i(t){try{s(l.next(t))}catch(t){e(t)}}function o(t){try{s(l.throw(t))}catch(t){e(t)}}function s(t){var e;t.done?n(t.value):((e=t.value)instanceof u?e:new u(function(t){t(e)})).then(i,o)}s((l=l.apply(t,r||[])).next())})});!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Statsig=e():t.Statsig=e()}(this,()=>(()=>{"use strict";var n={1845:(t,n,e)=>{var i;$Q2(n,"__esModule",{value:!0}),n.t=n.i=n.l=void 0;const r=e(7512);n.l=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:u}catch(t){return u}},n.i=t=>(0,n.l)()[t];n.t=t=>{var e=(0,n.l)();return t?e.instances&&e.instances[t]:(e.instances&&1<Object.keys(e.instances).length&&r.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),e.firstInstance)};var s="__STATSIG__",o="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},l="undefined"!=typeof globalThis?globalThis:{};const u=null!=(i=null!=(i=null!=(i=o[s])?i:e[s])?i:l[s])?i:{instance:n.t};o[s]=u,e[s]=u,l[s]=u},2137:(t,e,n)=>{$Q(e),e.o=e.u=void 0;const r=n(1406);function i(t,e,n){if(n)return n(t,e);const i=e&&e.customIDs?e.customIDs:{};e=["uid:"+(null!=(n=null==e?void 0:e.userID)?n:""),"cids:"+Object.keys(i).sort((t,e)=>t.localeCompare(e)).map(t=>t+"-"+i[t]).join(","),"k:"+t];return(0,r.h)(e.join("|"))}e.u=i,e.o=function(t,e,n){return e?i(t,e,n):(0,r.h)("k:"+t)}},6427:(t,e)=>{$Q(e)},694:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.v=e.DataAdapterCore=void 0;const u=n(7512),a=n(9122),s=n(8578),o=n(4534),c=n(3401);function h(t,e,n,i){return{source:t,data:e,receivedAt:Date.now(),stableID:n,fullUserHash:(0,s._)(i)}}e.DataAdapterCore=class{constructor(t,e){this.p=t,this.m=e,this.O=null,this.j=null,this.gn=10,this.S="statsig.last_modified_time."+e,this.k=new i}attach(t,e,n){this.j=t,this.O=e}getDataSync(t){var t=t&&(0,s.D)(t,this.O),e=this.I(t),n=this.k.get(e,t);return n&&this.M(n)?n:(n=this.T(e))&&this.M(n)?(this.k.add(e,n,this.gn),this.k.get(e,t)):null}setData(t,e){var e=e&&(0,s.D)(e,this.O),n=this.I(e);this.k.add(n,h("Bootstrap",t,null,e),this.gn)}M(t){return null==t.stableID||t.stableID===a.StableID.get(this.N())}C(e,n,i){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());var t=null!=e?e:this.getDataSync(n),t=[this.R(t,n,i)];return null!=i&&i.timeoutMs&&t.push(new Promise(t=>setTimeout(t,i.timeoutMs)).then(()=>(u.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}U(n,i){return r(this,void 0,void 0,function*(){var t=n&&(0,s.D)(n,this.O),e=this.I(t),t=yield this.C(null,t,i);t&&this.k.add(e,$P($P({},t),{source:"Prefetch"}),this.gn)})}R(s,o,l){return r(this,void 0,void 0,function*(){var t=null!=(t=null==s?void 0:s.data)?t:null,e=null!=s&&this.A(s,o),e=yield this.F(t,o,l,e);if(!e)return u.Log.debug("No response returned for latest value"),null;var n=(0,c.P)(e,"has_updates","Response"),i=this.N(),i=a.StableID.get(i);let r=null;if(!0===(null==n?void 0:n.has_updates))r=h("Network",e,i,o);else{if(!t||!1!==(null==n?void 0:n.has_updates))return null;r=h("NetworkNotModified",t,i,o)}e=this.I(o);return this.k.add(e,r,this.gn),this.L(e,r),r})}N(){return null!=this.j?this.j:(u.Log.error(this.p+" is not attached to a Client"),"")}T(t){var e=null==(e=o.Storage.getItem)?void 0:e.call(o.Storage,t);return null!=e&&(t=(0,c.P)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}L(e,t){var n=JSON.stringify(t);for(let t=0;t<8;t++)try{o.Storage.setItem(e,n);break}catch(t){if(!(t instanceof Error)||"QuotaExceededError"!==t.name||this.gn<=1)throw t;this.gn=Math.ceil(this.gn/2),this.q(e,this.gn-1)}this.q(e)}q(t,e=this.gn){var n=null!=(i=(0,o.K)(this.S))?i:{},i=(n[t]=Date.now(),l(n,e));for(const r of i)delete n[r],o.Storage.removeItem(r);(0,o.B)(this.S,n)}},e.v=h;class i{constructor(){this.$={}}get(t,e){var t=this.$[t],n=null==t?void 0:t.stableID,e=null==(e=null==e?void 0:e.customIDs)?void 0:e.stableID;return e&&n&&e!==n?(u.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e,n){for(const i of l(this.$,n-1))delete this.$[i];this.$[t]=e}merge(t){this.$=$P($P({},this.$),t)}}function l(n,t){var e=Object.keys(n);return e.length<=t?[]:0===t?e:e.sort((t,e)=>{t=n[t],e=n[e];return"object"==typeof t&&"object"==typeof e?t.receivedAt-e.receivedAt:t-e}).slice(0,e.length-t)}},8962:(t,o)=>{$Q2(o,"__esModule",{value:!0}),o.Diagnostics=void 0;const i=new Map,n="start";function r(t,e,n,i){return $P({key:n,action:e,step:i,timestamp:Date.now()},t)}function s(t,e){var n=null!=(n=i.get(t))?n:[];n.push(e),i.set(t,n)}function e(t,e){if(e in t)return t[e]}o.Diagnostics={V:t=>i.get(t),G:t=>{s(t,r({},n,"overall"))},J:(t,e,n)=>{s(t,r({success:e,error:e?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},"end","overall"))},W:(t,e)=>{s(t,r(e,n,"initialize","network_request"))},Y:(t,e)=>{s(t,r(e,"end","initialize","network_request"))},X:t=>{s(t,r({},n,"initialize","process"))},H:(t,e)=>{s(t,r(e,"end","initialize","process"))},Z:t=>{i.delete(t)},tt(t){if(t&&"object"==typeof t)return{code:e(t,"code"),name:e(t,"name"),message:e(t,"message")}},et(t,e,n,i){return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null==(t=null==t?void 0:t.headers)?void 0:t.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:e,error:o.Diagnostics.tt(i)}},it(t,e,n,i){var r,s=o.Diagnostics.V(n);return null==s||s.length<=0?-1:(r=s[s.length-1].timestamp-s[0].timestamp,o.Diagnostics.Z(n),n=function(t,e){t={eventName:"statsig::diagnostics",user:t,value:null,metadata:e,time:Date.now()};return t}(t,{context:"initialize",markers:s.slice(),statsigOptions:i}),e.enqueue(n),r)}}},8809:function(t,e){var n=this&&this.__awaiter||$A();$Q(e),e.nt=void 0;const r=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),s="https://cloudflare-dns.com/dns-query",o=["i","e","d"],l=200;e.nt=function(e){return n(this,void 0,void 0,function*(){var n=yield e(s,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(n.ok){var t,n=yield n.arrayBuffer(),n=new Uint8Array(n);{var i=n,n=i.findIndex((t,e)=>e<l&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(i[e-1])));if(-1===n)throw(t=new Error("Failed to parse TXT records from DNS")).name="DnsTxtParseError",t;let e="";for(let t=n-1;t<i.length;t++)e+=String.fromCharCode(i[t]);return e.split(",")}}throw(t=new Error("Failed to fetch TXT records from DNS")).name="DnsTxtFetchError",t})}},3539:(t,e)=>{$Q(e)},5542:function(t,l,e){var n=this&&this.__awaiter||$A();$Q2(l,"__esModule",{value:!0}),l.ErrorBoundary=l.EXCEPTION_ENDPOINT=void 0;const i=e(7512),u=e(5902),a=e(8e3),c=(l.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");function h(t){return t instanceof Error?t:"string"==typeof t?new Error(t):new Error("An unknown error occurred.")}l.ErrorBoundary=class{constructor(t,e,n,i){this.j=t,this.O=e,this.st=n,this.rt=i,this.lt=new Set}wrap(i,r){try{const t=i;!function(t){const e=new Set;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(t=>"function"==typeof(null===n||void 0===n?void 0:n[t])).forEach(t=>e.add(t)),n=Object.getPrototypeOf(n);return Array.from(e)}(t).forEach(e=>{const n=t[e];"$EB"in n||(t[e]=(...t)=>this.ot(r?r+":"+e:e,()=>n.apply(i,t)),t[e].$EB=!0)})}catch(t){this.ut("eb:wrap",t)}}logError(t,e){this.ut(t,e)}getLastSeenErrorAndReset(){var t=this.rt;return this.rt=void 0,null!=t?t:null}attachErrorIfNoneExists(t){this.rt||(this.rt=h(t))}ot(e,t){try{var n=t();return n&&n instanceof Promise?n.catch(t=>this.ut(e,t)):n}catch(t){return this.ut(e,t),null}}ut(s,o){try{i.Log.warn("Caught error in "+s,{error:o});n(this,void 0,void 0,function*(){var t,e=o||Error(c),n=e instanceof Error,i=n?e.name:"No Name",r=h(e);this.rt=r,this.lt.has(i)||(this.lt.add(i),null!=(r=null==(r=this.O)?void 0:r.networkConfig)&&r.preventAllNetworkTraffic?null!=(r=this.st)&&r.call(this,{name:"error",error:o,tag:s}):(r=u.SDKType.ct(this.j),t=a.StatsigMetadataProvider.get(),n=n?e.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(e),e=$P({tag:s,exception:i,info:n,statsigOptions:function(i){if(!i)return{};const r={};return Object.keys(i).forEach(t=>{var e=t,n=i[e];switch(typeof n){case"number":case"bigint":case"boolean":r[String(e)]=n;break;case"string":n.length<50?r[String(e)]=n:r[String(e)]="set";break;case"object":"environment"===e?r.environment=n:"networkConfig"===e?r.networkConfig=n:r[String(e)]=null!=n?"set":"unset"}}),r}(this.O)},$P($P({},t),{sdkType:r})),yield(null!=(i=null==(n=null==(i=this.O)?void 0:i.networkConfig)?void 0:n.networkOverrideFunc)?i:fetch)(l.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this.j,"STATSIG-SDK-TYPE":String(r),"STATSIG-SDK-VERSION":String(t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(e)}),null!=(n=this.st)&&n.call(this,{name:"error",error:o,tag:s})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},2922:(t,e)=>{$Q(e)},2417:(t,e)=>{$Q(e)},7770:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=n(2137),s=n(1406),o=n(7512),l=n(7410),u=n(6830),a=n(1637),c=n(586),h=n(4534),d=n(1881),v=n(2397),f={},_={Startup:"startup",GainedFocus:"gained_focus"};class g{static ht(t){null!=(t=f[t])&&t.flush().catch(()=>{})}static dt(t){null!=(t=f[t])&&t.vt(_.GainedFocus)}constructor(t,e,n,i){this.j=t,this.st=e,this.ft=n,this.O=i,this.gt=[],this._t={},this.bt={},this.yt=!1,this.Ot=Date.now(),this.jt=null!=(t=null==i?void 0:i.loggingEnabled)?t:!0===(null==i?void 0:i.disableLogging)?c.LoggingEnabledOption.disabled:c.LoggingEnabledOption.browserOnly,null!=i&&i.loggingEnabled&&void 0!==i.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this.St=null!=(e=null==i?void 0:i.loggingBufferMaxSize)?e:100;n=null==i?void 0:i.networkConfig;this.wt=new d.UrlConfiguration(l.Endpoint.kt,null==n?void 0:n.logEventUrl,null==n?void 0:n.api,null==n?void 0:n.logEventFallbackUrls)}setLogEventCompressionMode(t){this.ft.setLogEventCompressionMode(t)}setLoggingEnabled(t){var e,n;"disabled"===this.jt&&"disabled"!==t&&(e=this.o(),(n=(0,h.K)(e))&&this.gt.push(...n),h.Storage.removeItem(e)),this.jt=t}enqueue(t){this.Et(t)&&(this.Dt(t),this.It(),this.gt.length>this.St)&&g.ht(this.j)}incrementNonExposureCount(t){var e=null!=(e=this.bt[t])?e:0;this.bt[t]=e+1}reset(){this.flush().catch(()=>{}),this._t={}}start(){var t,e=(0,u.Mt)();e&&"always"!==(null==(t=this.O)?void 0:t.loggingEnabled)||(f[this.j]=this,e||(0,v.xt)(t=>{"background"===t?g.ht(this.j):"foreground"===t&&g.dt(this.j)}),this.vt(_.Startup),this.Tt())}stop(){return i(this,void 0,void 0,function*(){this.Nt&&(clearInterval(this.Nt),this.Nt=null),delete f[this.j],yield this.flush()})}flush(){return i(this,void 0,void 0,function*(){var t;this.Ct(),0!==this.gt.length&&(t=this.gt,this.gt=[],yield this.Rt(t))})}It(){this.yt||(this.yt=!0,200<Date.now()-this.Ot)||setTimeout(()=>g.ht(this.j),200)}Et(t){if("always"!==(null==(e=this.O)?void 0:e.loggingEnabled)&&(0,u.Mt)())return!1;if((0,a.Ut)(t)){var e=t.user||{statsigEnvironment:void 0},e=(0,r.u)(this.j,e),n=t.metadata||{},t=[t.eventName,e,n.gate,n.config,n.ruleID,n.allocatedExperiment,n.parameterName,String(n.isExplicitParameter),n.reason].join("|"),e=this._t[t],n=Date.now();if(e&&n-e<6e5)return!1;1e3<Object.keys(this._t).length&&(this._t={}),this._t[t]=n}return!0}Rt(r){return i(this,void 0,void 0,function*(){var t,e;if("disabled"===this.jt)return this.At(r),!1;try{var n=(0,v.Ft)()&&this.ft.isBeaconSupported()&&null==(null==(e=null==(t=this.O)?void 0:t.networkConfig)?void 0:e.networkOverrideFunc),i=(this.st({name:"pre_logs_flushed",events:r}),n?this.Pt(r):yield this.Lt(r));return i.success?(this.st({name:"logs_flushed",events:r}),!0):(o.Log.warn("Failed to flush events."),this.At(r),!1)}catch(t){return o.Log.warn("Failed to flush events."),!1}})}Lt(e){return i(this,void 0,void 0,function*(){var t=yield this.ft.post(this.zt(e)),t=null!=(t=null==t?void 0:t.code)?t:-1;return{success:200<=t&&t<300}})}Pt(t){return{success:this.ft.beacon(this.zt(t))}}zt(t){return{sdkKey:this.j,data:{events:t},urlConfig:this.wt,retries:3,isCompressable:!0,params:{[l.NetworkParam.EventCount]:String(t.length)},credentials:"same-origin"}}At(t){for(;500<t.length;)t.shift();var e=this.o();try{(0,h.B)(e,t)}catch(t){o.Log.warn("Unable to save failed logs to storage")}}vt(e){const n=this.o();i(this,void 0,void 0,function*(){h.Storage.isReady()||(yield h.Storage.isReadyResolver());var t=(0,h.K)(n);t&&(e===_.Startup&&h.Storage.removeItem(n),yield this.Rt(t))&&e===_.GainedFocus&&h.Storage.removeItem(n)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,s.h)(this.j)}Dt(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},n=this.qt(),n=(n&&(e.statsigMetadata={currentPage:n}),$P($P({},t),e));o.Log.debug("Enqueued Event:",n),this.gt.push(n)}Ct(){0!==Object.keys(this.bt).length&&(this.Dt({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.bt)}}),this.bt={})}qt(){var t;if(!1!==(null==(t=this.O)?void 0:t.includeCurrentPageUrlWithEvents))return(0,u.Kt)()}Tt(){var t=null!=(t=null==(t=this.O)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{var t=f[this.j];t&&t.Nt===e?g.ht(this.j):clearInterval(e)},t);this.Nt=e}}e.EventLogger=g},1406:(t,s,e)=>{$Q2(s,"__esModule",{value:!0}),s.Bt=s.$t=s.h=void 0;const o=e(6634);s.h=e=>{let n=0;for(let t=0;t<e.length;t++){var i=e.charCodeAt(t);n=(n<<5)-n+i,n&=n}return String(n>>>0)},s.$t=(t,e)=>(0,s.h)(JSON.stringify((0,s.Bt)(t,e)));s.Bt=(n,i)=>{if(null==n)return null;var t=Object.keys(n).sort();const r={};return t.forEach(t=>{var e=n[t];0===i||"object"!==(0,o.Vt)(e)?r[t]=e:r[t]=(0,s.Bt)(e,null!=i?i-1:i)}),r}},1333:(t,e)=>{$Q(e)},7512:(t,e)=>{$Q(e),e.Log=e.LogLevel=void 0;function n(t){return t.unshift("[Statsig]"),t}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class i{static info(...t){i.level>=e.LogLevel.Info&&console.info(" INFO ",...n(t))}static debug(...t){i.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...n(t))}static warn(...t){i.level>=e.LogLevel.Warn&&console.warn(" WARN ",...n(t))}static error(...t){i.level>=e.LogLevel.Error&&console.error(" ERROR ",...n(t))}}(e.Log=i).level=e.LogLevel.Warn},7787:(t,e)=>{$Q(e),e.createMemoKey=e.MemoPrefix=void 0,e.MemoPrefix={Gt:"g",Jt:"c",Wt:"e",Yt:"cl",Xt:"l",Ht:"p"};const s=new Set([]),o=new Set(["userPersistedValues"]);e.createMemoKey=function(t,e,n){let i=t+"|"+e;if(n)for(const r of Object.keys(n)){if(o.has(r))return;s.has(r)?i+=`|${r}=true`:i+=`|${r}=`+n[r]}return i}},7410:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={Qt:"initialize",kt:"rgstr",Zt:"download_config_specs"},e.NetworkDefault={[e.Endpoint.kt]:"https://prodregistryv2.org/v1",[e.Endpoint.Qt]:"https://featureassets.org/v1",[e.Endpoint.Zt]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7023:function(t,e,n){var m=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,n(1845);const v=n(1845),O=n(8962),j=n(7512),w=n(7410),i=n(308),f=n(3091),o=n(5902),r=n(6830),l=n(4143),u=n(9122),S=n(2636),a=n(8e3),_=n(586),k=n(2397),x=500,D=3e4;const E=new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(t,e){this.st=e,this.te=null,this.ee=1e4,this.ie={},this.O={},this.ne={},this.se=null,t&&(this.O=t),this.O.networkConfig&&(this.ie=this.O.networkConfig),this.ie.networkTimeoutMs&&(this.ee=this.ie.networkTimeoutMs),this.re=new i.NetworkFallbackResolver(this.O),this.setLogEventCompressionMode(this.le(t))}setLogEventCompressionMode(t){this.O.logEventCompressionMode=t}setErrorBoundary(t){this.te=t,this.te.wrap(this),this.te.wrap(this.re),this.re.setErrorBoundary(t)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){var t=this.se;return this.se=null,t}beacon(t){var e,n;return!!I(t)&&(t=this.oe("POST",t),e=this.ue(t),(n=navigator).sendBeacon.bind(n)(e,t.body))}post(e){return m(this,void 0,void 0,function*(){var t=this.oe("POST",e);return this.ae(t),yield this.ce(t),this.he(t)})}get(t){t=this.oe("GET",t);return this.he(t)}he(y){return m(this,void 0,void 0,function*(){var e;if(!I(y))return null;if(this.ie.preventAllNetworkTraffic)return null;var{method:n,body:i,retries:r,attempt:s}=y,o=y.urlConfig.endpoint;if(this.de(o))return j.Log.warn(`Request to ${o} was blocked because you are making requests too frequently.`),null;s=null!=s?s:1;const l="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>{null!==l&&void 0!==l&&l.abort(`Timeout of ${this.ee}ms expired.`)},this.ee),u=this.ue(y);let a=null;var c,h=(0,k.Ft)();try{var d,v,f,_={method:n,body:i,headers:$P({},y.headers),signal:null===l||void 0===l?void 0:l.signal,priority:y.priority,keepalive:h},g=(c=s,(b=y).urlConfig.endpoint===w.Endpoint.Qt&&O.Diagnostics.W(b.sdkKey,{attempt:c}),this.ne[o]),p=(g&&(g.lastRequestTime=Date.now(),this.ne[o]=g),null!=(e=this.ie.networkOverrideFunc)?e:fetch);if(a=yield p(u,_),clearTimeout(t),a.ok)return f=yield a.text(),M(y,a,s,f),this.re.tryBumpExpiryTime(y.sdkKey,y.urlConfig),{body:f,code:a.status};throw d=yield a.text().catch(()=>"No Text"),(v=new Error(`NetworkError: ${u} `+d)).name="NetworkError",v}catch(t){var i=function(t,e){if(null!=t&&t.signal.aborted&&"string"==typeof t.signal.reason)return t.signal.reason;if("string"==typeof e)return e;if(e instanceof Error)return e.name+": "+e.message;return"Unknown Error"}(l,t),h=function(t){t=(null==t?void 0:t.signal.aborted)&&"string"==typeof t.signal.reason&&t.signal.reason.includes("Timeout");return t||!1}(l),b=(M(y,a,s,"",t),yield this.re.tryFetchUpdatedFallbackInfo(y.sdkKey,y.urlConfig,i,h));return(b&&(y.fallbackUrl=this.re.getActiveFallbackUrl(y.sdkKey,y.urlConfig)),!r||r<s||!E.has(null!=(c=null===a||void 0===a?void 0:a.status)?c:500))?(null!=(o=this.st)&&o.call(this,{name:"error",error:t,tag:S.ErrorTag.NetworkError,requestArgs:y}),g=`A networking error occurred during ${n} request to ${u}.`,j.Log.error(g,i,t),null!=(e=this.te)&&e.attachErrorIfNoneExists(g),null):(yield function(e){return m(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(x*(e*e),D)))})}(s),this.he($P($P({},y),{retries:r,attempt:s+1})))}})}le(t){let e=null==t?void 0:t.logEventCompressionMode;return e=(e=e||!0!==(null==t?void 0:t.disableCompression)?e:_.LogEventCompressionMode.Disabled)||_.LogEventCompressionMode.Enabled}de(t){var e=Date.now(),n=null!=(n=this.ne[t])?n:{count:0,lastRequestTime:e},i=e-n.lastRequestTime,i=Math.floor(.05*i);return n.count=Math.max(0,n.count-i),50<=n.count||(n.count+=1,n.lastRequestTime=e,this.ne[t]=n,!1)}ue(t){var e=null!=(e=t.fallbackUrl)?e:t.urlConfig.getUrl();t.urlConfig.endpoint!==w.Endpoint.Qt&&t.urlConfig.endpoint!==w.Endpoint.Zt||(this.se=e);const n=$P({[w.NetworkParam.SdkKey]:t.sdkKey,[w.NetworkParam.SdkType]:o.SDKType.ct(t.sdkKey),[w.NetworkParam.SdkVersion]:a.SDK_VERSION,[w.NetworkParam.Time]:String(Date.now()),[w.NetworkParam.SessionID]:l.SessionID.get(t.sdkKey)},t.params);t=Object.keys(n).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(n[t])).join("&");return e+(t?"?"+t:"")}ae(e){var t,n=(0,r.ve)(),i=e.body;if(e.isStatsigEncodable&&!this.O.disableStatsigEncoding&&"string"==typeof i&&null==(0,v.i)("no-encode")&&null!=n&&n.btoa)try{e.body=n.btoa(i).split("").reverse().join(""),e.params=$P($P({},null!=(t=e.params)?t:{}),{[w.NetworkParam.StatsigEncoded]:"1"})}catch(t){j.Log.warn("Request encoding failed for "+e.urlConfig.getUrl(),t)}}ce(d){return m(this,void 0,void 0,function*(){var e,n=d.body;if("string"==typeof n&&function(t,e){if(!t.isCompressable)return;if(null!=(0,v.i)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return;var n=null!=t.urlConfig.customUrl||null!=t.urlConfig.fallbackUrls,i=!0===f.SDKFlags.get(t.sdkKey,"enable_log_event_compression");switch(e.logEventCompressionMode){case _.LogEventCompressionMode.Disabled:return;case _.LogEventCompressionMode.Enabled:return n&&!i?void 0:1;case _.LogEventCompressionMode.Forced:return 1;default:return}}(d,this.O))try{for(var i,r=(new TextEncoder).encode(n),s=new CompressionStream("gzip"),o=s.writable.getWriter(),l=(o.write(r).catch(j.Log.error),o.close().catch(j.Log.error),s.readable.getReader()),u=[];!(i=yield l.read()).done;)u.push(i.value);var a=u.reduce((t,e)=>t+e.length,0),c=new Uint8Array(a);let t=0;for(const h of u)c.set(h,t),t+=h.length;d.body=c,d.params=$P($P({},null!=(e=d.params)?e:{}),{[w.NetworkParam.IsGzipped]:"1"})}catch(t){j.Log.warn("Request compression failed for "+d.urlConfig.getUrl(),t)}})}oe(t,e){var n=this.re.getActiveFallbackUrl(e.sdkKey,e.urlConfig),t=$P($P({},e),{method:t,fallbackUrl:n});return"data"in e&&s(t,e.data),t}};const I=t=>!!t.sdkKey||(j.Log.warn("Unable to make request without an SDK key"),!1),s=(t,e)=>{var{sdkKey:n,fallbackUrl:i}=t,r=u.StableID.get(n),s=l.SessionID.get(n),n=o.SDKType.ct(n);t.body=JSON.stringify($P($P({},e),{statsigMetadata:$P($P({},a.StatsigMetadataProvider.get()),{stableID:r,sessionID:s,sdkType:n,fallbackUrl:i})}))};function M(t,e,n,i,r){t.urlConfig.endpoint===w.Endpoint.Qt&&O.Diagnostics.Y(t.sdkKey,O.Diagnostics.et(e,n,i,r))}},308:function(t,e,n){var l=this&&this.__awaiter||$A();$Q(e),e.fe=e.NetworkFallbackResolver=void 0;const o=n(8809),i=n(1406),s=n(7512),u=n(4534);function a(t,e){t=null!=(t=null==t?void 0:t.toLowerCase())?t:"";return e||t.includes("uncaught exception")||t.includes("failed to fetch")||t.includes("networkerror when attempting to fetch resource")}function c(t){return"statsig.network_fallback."+(0,i.h)(t)}function h(t,e){t=c(t);e&&0!==Object.keys(e).length?u.Storage.setItem(t,JSON.stringify(e)):u.Storage.removeItem(t)}e.NetworkFallbackResolver=class{constructor(t){this.ge=null,this.te=null,this._e={},this.pe=null==(t=t.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(t){this.te=t}tryBumpExpiryTime(t,e){var n=null==(n=this.ge)?void 0:n[e.endpoint];n&&(n.expiryTime=Date.now()+6048e5,h(t,$P($P({},this.ge),{[e.endpoint]:n})))}getActiveFallbackUrl(t,e){var n;if(null!=e.customUrl&&null!=e.fallbackUrls)return null;let i=this.ge;null==i&&(i=null!=(r=function(t){t=c(t),t=u.Storage.getItem(t);if(!t)return null;try{return JSON.parse(t)}catch(t){return s.Log.error("Failed to parse FallbackInfo"),null}}(t))?r:{},this.ge=i);var r=i[e.endpoint];return!r||Date.now()>(null!=(n=r.expiryTime)?n:0)||e.getChecksum()!==r.urlConfigChecksum?(delete i[e.endpoint],this.ge=i,h(t,this.ge),null):r.url||null}tryFetchUpdatedFallbackInfo(i,r,s,o){return l(this,void 0,void 0,function*(){var e,t,n;try{return a(s,o)?(t=null==r.customUrl&&null==r.fallbackUrls?yield this.be(r):r.fallbackUrls,!!(n=this.ye(null==(e=this.ge)?void 0:e[r.endpoint],t))&&(this.me(i,r,n),!0)):!1}catch(t){return null!=(e=this.te)&&e.logError("tryFetchUpdatedFallbackInfo",t),!1}})}me(t,e,n){var n={urlConfigChecksum:e.getChecksum(),url:n,expiryTime:Date.now()+6048e5,previous:[]},e=e.endpoint,i=null==(i=this.ge)?void 0:i[e],i=(i&&n.previous.push(...i.previous),10<n.previous.length&&(n.previous=[]),null==(i=null==(i=this.ge)?void 0:i[e])?void 0:i.url);null!=i&&n.previous.push(i),this.ge=$P($P({},this.ge),{[e]:n}),h(t,this.ge)}be(s){return l(this,void 0,void 0,function*(){var t=this._e[s.endpoint];if(t&&Date.now()<t)return null;this._e[s.endpoint]=Date.now()+144e5;var e=[],t=yield(0,o.nt)(null!=(t=this.pe)?t:fetch),n=function(t){try{return new URL(t).pathname}catch(t){return null}}(s.defaultUrl);for(const r of t)if(r.startsWith(s.endpointDnsKey+"=")){var i=r.split("=");if(1<i.length){let t=i[1];t.endsWith("/")&&(t=t.slice(0,-1)),e.push("https://"+t+n)}}return e})}ye(t,e){var n;if(null==e)return null;var i=new Set(null!=(n=null==t?void 0:t.previous)?n:[]),r=null==t?void 0:t.url;let s=null;for(const l of e){var o=l.endsWith("/")?l.slice(0,-1):l;if(!i.has(l)&&o!==r){s=o;break}}return s}},e.fe=a},1405:(t,e)=>{$Q(e)},1361:(t,e)=>{$Q(e)},3091:(t,e)=>{$Q(e),e.SDKFlags=void 0;const n={};e.SDKFlags={setFlags:(t,e)=>{n[t]=e},get:(t,e)=>{return null!=(t=null==(t=n[t])?void 0:t[e])&&t}}},5902:(t,e)=>{$Q(e),e.SDKType=void 0;const n={};let i;e.SDKType={ct:t=>{return(null!=(t=n[t])?t:"js-mono")+(null!==i&&void 0!==i?i:"")},Oe(t,e){n[t]=e},je(t){i&&"-react"!==i||(i="-"+t)}}},6830:(t,i)=>{$Q2(i,"__esModule",{value:!0}),i.Se=i.Kt=i.we=i.ke=i.Mt=i.Ee=i.ve=void 0;i.ve=()=>"undefined"!=typeof window?window:null,i.Ee=()=>{var t=(0,i.ve)();return null!=(t=null==t?void 0:t.document)?t:null},i.Mt=()=>{var t;return null===(0,i.Ee)()&&(t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,"string"==typeof EdgeRuntime||t)},i.ke=(t,e)=>{var n=(0,i.ve)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.we=(t,e)=>{var n=(0,i.Ee)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.Kt=()=>{var t;try{return null==(t=(0,i.ve)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}};i.Se=()=>{var t=(0,i.ve)();return t&&"onpagehide"in t?"pagehide":"beforeunload"}},4143:(t,e,n)=>{$Q(e),e.StatsigSession=e.SessionID=void 0;const i=n(1845),r=n(2137),l=n(7512),u=n(4534),a=n(8023),c=18e5,h=144e5,d={};function v(e,t){return setTimeout(()=>{var t=null==(t=(0,i.l)())?void 0:t.instance(e);t&&t.$emt({name:"session_expired"})},t)}function f(t){return"statsig.session_id."+(0,r.o)(t)}e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:t=>{null==d[t]&&(d[t]=function(t){let e=function(t){t=f(t);return(0,u.K)(t)}(t);var n=Date.now();e=e||{sessionID:(0,a.getUUID)(),startTime:n,lastUpdate:n};return{data:e,sdkKey:t}}(t));var t=d[t],e=Date.now(),n=t.data,i=t.sdkKey,r=((function({lastUpdate:t}){return Date.now()-t>c}(n)||function({startTime:t}){return Date.now()-t>h}(n))&&(n.sessionID=(0,a.getUUID)(),n.startTime=e,o=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(i))&&o.$emt({name:"session_expired"}),n.lastUpdate=e,n),s=t.sdkKey;s=f(s);try{(0,u.B)(s,r)}catch(t){l.Log.warn("Failed to save SessionID")}clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID);var o=e-n.startTime;return t.idleTimeoutID=v(i,c),t.ageTimeoutID=v(i,h-o),t},overrideInitialSessionID:(t,e)=>{var n;d[e]=(t=t,e=e,n=Date.now(),{data:{sessionID:t,startTime:n,lastUpdate:n},sdkKey:e})}}},2176:(t,l)=>{$Q2(l,"__esModule",{value:!0}),l.De=void 0;l.De=(e,n)=>{let i=0;var r=Object.keys(e);for(let t=0;t<r.length;t++){var s=r[t],o=e[s];if((i=(i+=s.length)+("object"==typeof o&&null!==o?(0,l.De)(o,n)+2:String(o).length+1))>=n)return i}return i}},9122:(t,e,n)=>{$Q(e),e.getCookieName=e.StableID=void 0;const i=n(2137),r=n(7512),s=n(6830),o=n(4534),l=n(8023),u={},a={},c={};function h(t){return"statsig.stable_id."+(0,i.o)(t)}function d(t,e){e=h(e);try{(0,o.B)(e,t)}catch(t){r.Log.warn("Failed to save StableID to storage")}}function v(t,e){var n;a[e]&&null!=(0,s.Ee)()&&((n=new Date).setFullYear(n.getFullYear()+1),document.cookie=`${f(e)}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/`)}function f(t){return"statsig.stable_id."+(0,i.o)(t)}e.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:t=>{if(c[t])return null;if(null!=u[t])return u[t];let e=null;return null!=(e=function(t){if(a[t]&&null!=(0,s.Ee)())for(const i of document.cookie.split(";")){var[e,n]=i.trim().split("=");if(e===f(t))return decodeURIComponent(n)}return null}(t))?d(u[t]=e,t):(d(e=null==(e=function(t){t=h(t);return(0,o.K)(t)}(t))?(0,l.getUUID)():e,t),v(e,t),u[t]=e),e},setOverride:(t,e)=>{d(u[e]=t,e),v(t,e)},Ie:(t,e)=>{a[t]=e},Me:(t,e)=>{c[t]=e}},e.getCookieName=f},1375:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,n(1845);const o=n(1845),l=n(5542),u=n(7770),a=n(7512),s=n(7787),c=n(6830),h=n(4143),d=n(9122),r=n(586),v=n(4534);e.StatsigClientBase=class{constructor(t,e,n,i){this.loadingStatus="Uninitialized",this.xe=null,this.Te={};var r,s=this.$emt.bind(this);null!=(null==i?void 0:i.logLevel)&&(a.Log.level=i.logLevel),null!=i&&i.disableStorage&&v.Storage.Me(!0),null!=i&&i.initialSessionID&&h.StatsigSession.overrideInitialSessionID(i.initialSessionID,t),null!=i&&i.storageProvider&&v.Storage.Ne(i.storageProvider),null!=i&&i.enableCookies&&d.StableID.Ie(t,i.enableCookies),null!=i&&i.disableStableID&&d.StableID.Me(t,!0),this.j=t,this.O=null!=i?i:{},this.Ce={},this.overrideAdapter=null!=(r=null==i?void 0:i.overrideAdapter)?r:null,this.Re=new u.EventLogger(t,s,n,i),this.te=new l.ErrorBoundary(t,i,s),this.te.wrap(this),this.te.wrap(e),this.te.wrap(this.Re),n.setErrorBoundary(this.te),this.dataAdapter=e,this.dataAdapter.attach(t,i,n),this.storageProvider=v.Storage,null!=(e=null==(s=null==(r=this.overrideAdapter)?void 0:r.loadFromStorage)?void 0:s.call(r))&&e.catch(t=>this.te.logError("OA::loadFromStorage",t)),this.Ue(),i=t,n=this,(0,c.Mt)()||(s=(0,o.l)(),r=null!=(r=s.instances)?r:{},n=n,null!=r[i]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),r[i]=n,s.firstInstance||(s.firstInstance=n),s.instances=r,__STATSIG__=s)}updateRuntimeOptions(t){t.loggingEnabled?(this.O.loggingEnabled=t.loggingEnabled,this.Re.setLoggingEnabled(t.loggingEnabled)):null!=t.disableLogging&&(this.O.disableLogging=t.disableLogging,this.Re.setLoggingEnabled(t.disableLogging?"disabled":"browser-only")),null!=t.disableStorage&&(this.O.disableStorage=t.disableStorage,v.Storage.Me(t.disableStorage)),null!=t.enableCookies&&(this.O.enableCookies=t.enableCookies,d.StableID.Ie(this.j,t.enableCookies)),t.logEventCompressionMode?this.Re.setLogEventCompressionMode(t.logEventCompressionMode):t.disableCompression&&this.Re.setLogEventCompressionMode(r.LogEventCompressionMode.Disabled)}flush(){return this.Re.flush()}shutdown(){return i(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this.Ae("Uninitialized",null),this.xe=null,yield this.Re.stop()})}on(t,e){this.Te[t]||(this.Te[t]=[]),this.Te[t].push(e)}off(t,e){this.Te[t]&&-1!==(e=this.Te[t].indexOf(e))&&this.Te[t].splice(e,1)}$on(t,e){e.__isInternal=!0,this.on(t,e)}$emt(n){var t;const e=e=>{try{e(n)}catch(t){!0===e.__isInternal?this.te.logError("__emit:"+n.name,t):a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",n)}};this.Te[n.name]&&this.Te[n.name].forEach(t=>e(t)),null!=(t=this.Te["*"])&&t.forEach(e)}Ae(t,e){this.loadingStatus=t,this.Ce={},this.$emt({name:"values_updated",status:t,values:e})}Fe(t,e,n){!0===(null==n?void 0:n.disableExposureLog)?this.Re.incrementNonExposureCount(t):this.Re.enqueue(e)}Pe(i,r){return(t,e)=>{var n;return!this.O.disableEvaluationMemoization&&(n=(0,s.createMemoKey)(i,t,e))?(n in this.Ce||(3e3<=Object.keys(this.Ce).length&&(this.Ce={}),this.Ce[n]=r(t,e)),this.Ce[n]):r(t,e)}}}},2636:(t,e)=>{$Q(e),e.ErrorTag=void 0,e.ErrorTag={NetworkError:"NetworkError"}},3206:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},1637:(t,e)=>{$Q(e),e.Le=e.ze=e.qe=e.Ke=e.Ut=void 0;const s="statsig::config_exposure",o="statsig::gate_exposure",a="statsig::layer_exposure",c=(t,e,n,i,r)=>(n.bootstrapMetadata&&(i.bootstrapMetadata=n.bootstrapMetadata),{eventName:t,user:e,value:null,metadata:l(n,i),secondaryExposures:r,time:Date.now()});e.Ut=({eventName:t})=>t===o||t===s||t===a;function h(t,e){return t.map(t=>"string"==typeof t?(null!=e?e:{})[t]:t).filter(t=>null!=t)}e.Ke=(t,e,n)=>{var i,r={gate:e.name,gateValue:String(e.value),ruleID:e.ruleID};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(r.configVersion=e.__evaluation.version),c(o,t,e.details,r,h(null!=(t=null==(i=e.__evaluation)?void 0:i.secondary_exposures)?t:[],n))},e.qe=h;e.ze=(t,e,n)=>{var i,r={config:e.name,ruleID:e.ruleID};return null!=(null==(i=e.__evaluation)?void 0:i.version)&&(r.configVersion=e.__evaluation.version),null!=(null==(i=e.__evaluation)?void 0:i.passed)&&(r.rulePassed=String(e.__evaluation.passed)),c(s,t,e.details,r,h(null!=(t=null==(i=e.__evaluation)?void 0:i.secondary_exposures)?t:[],n))};e.Le=(t,e,n,i)=>{var r=e.__evaluation,s=!0===(null==(s=null==r?void 0:r.explicit_parameters)?void 0:s.includes(n));let o="",l=null!=(u=null==r?void 0:r.undelegated_secondary_exposures)?u:[];s&&(o=null!=(u=r.allocated_experiment_name)?u:"",l=null!=(u=r.secondary_exposures)?u:[]);var u=null==(r=e.__evaluation)?void 0:r.parameter_rule_ids,u={config:e.name,parameterName:n,ruleID:null!=(r=null==u?void 0:u[n])?r:e.ruleID,allocatedExperiment:o,isExplicitParameter:String(s)};return null!=(null==(n=e.__evaluation)?void 0:n.version)&&(u.configVersion=e.__evaluation.version),c(a,t,e.details,u,h(l,i))};const l=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},8e3:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.25.1";let n={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>n,add:t=>{n=$P($P({},n),t)}}},586:(t,e)=>{$Q(e),e.LoggingEnabledOption=e.LogEventCompressionMode=void 0,e.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},e.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1098:(t,e)=>{$Q(e)},2059:(t,e,n)=>{$Q(e),e.Be=e.$e=e.Ve=e.Ge=e.Je=e.We=void 0;const o=n(7512),l=n(6634);function r(t,e,n,i){return{name:t,details:e,ruleID:null!=(t=null==n?void 0:n.rule_id)?t:"",__evaluation:n,value:i}}function i(t,e,n){var i=null!=(i=null==n?void 0:n.value)?i:{};return $P($P({},r(t,e,n,i)),{get:s(t,null==n?void 0:n.value)})}function s(i,r,s){return(t,e)=>{var n=null!=(n=null==r?void 0:r[t])?n:null;return null==n?null!=e?e:null:null==e||(0,l.Ye)(n,e)?(null!=s&&s(t),n):(o.Log.warn(`Parameter type mismatch. '${i}.${t}' was found to be type '${typeof n}' but fallback/return type is '${typeof e}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=e?e:null)}}e.We=function(t,e,n){return $P($P({},r(t,e,n,!0===(null==n?void 0:n.value))),{idType:null!=(t=null==n?void 0:n.id_type)?t:null})},e.Je=i,e.Ge=function(t,e,n){return t=i(t,e,n),$P($P({},t),{groupName:null!=(e=null==n?void 0:n.group_name)?e:null})},e.Ve=function(t,e,n,i){return $P($P({},r(t,e,n,void 0)),{get:s(t,null==n?void 0:n.value,i),groupName:null!=(e=null==n?void 0:n.group_name)?e:null,__value:null!=(t=null==n?void 0:n.value)?t:{}})},e.$e=function(t,e,n,i){return $P($P($P({},t),e),{get:s(t.name,n,i)})},e.Be=s},1812:(t,e)=>{$Q(e)},3932:(t,e)=>{$Q(e),e.UPDATE_DETAIL_ERROR_MESSAGES=e.createUpdateDetails=void 0;e.createUpdateDetails=(t,e,n,i,r,s)=>({duration:n,source:e,success:t,error:i,sourceUrl:r,warnings:s}),e.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},8578:(t,e,n)=>{$Q(e),e._=e.D=void 0;const i=n(1406),r=n(7512);e.D=function(t,e,n){try{var i=JSON.parse(JSON.stringify(t));return null!=e&&null!=e.environment?i.statsigEnvironment=e.environment:null!=n&&(i.statsigEnvironment={tier:n}),i}catch(t){return r.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},e._=function(t){return t?(0,i.$t)(t):null}},4534:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.B=n.K=n.Storage=void 0;var i=e(7512),e=e(6830);const r={},s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:t=>r[t]||null,setItem:(t,e)=>{r[t]=e},removeItem:t=>{delete r[t]},getAllKeys:()=>Object.keys(r)};let o=null;try{const c=(0,e.ve)();c&&c.localStorage&&"function"==typeof c.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>c.localStorage.getItem(t),setItem:(t,e)=>c.localStorage.setItem(t,e),removeItem:t=>c.localStorage.removeItem(t),getAllKeys:()=>Object.keys(c.localStorage)})}catch(t){i.Log.warn("Failed to setup localStorageProvider.")}let l=null!==o&&void 0!==o?o:s,u=l;function a(e){try{return e()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return n.Storage.Ne(s),null;throw t instanceof Error&&"QuotaExceededError"===t.name&&(e=n.Storage.getAllKeys().filter(t=>t.startsWith("statsig.")),t.message=t.message+". Statsig Keys: "+e.length),t}}n.Storage={isReady:()=>u.isReady(),isReadyResolver:()=>u.isReadyResolver(),getProviderName:()=>u.getProviderName(),getItem:t=>a(()=>u.getItem(t)),setItem:(t,e)=>a(()=>u.setItem(t,e)),removeItem:t=>u.removeItem(t),getAllKeys:()=>u.getAllKeys(),Ne:t=>{l=t,u=t},Me:t=>{u=t?s:l}},n.K=function(t){return t=n.Storage.getItem(t),JSON.parse(null!=t?t:"null")},n.B=function(t,e){n.Storage.setItem(t,JSON.stringify(e))}},3401:(t,e,n)=>{$Q(e),e.P=void 0;const r=n(7512);e.P=function(t,e,n){try{var i=JSON.parse(t);if(i&&"object"==typeof i&&e in i)return i}catch(t){}return r.Log.error("Failed to parse "+n),null}},6634:(t,e)=>{$Q(e),e.Ye=e.Vt=void 0,e.Vt=function(t){return Array.isArray(t)?"array":typeof t},e.Ye=function(t,e){var n=t=>Array.isArray(t)?"array":null===t?"null":typeof t;return n(t)===n(e)}},8023:(t,e)=>{$Q(e),e.getUUID=void 0,e.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let n=(new Date).getTime(),i="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,t=>{let e=16*Math.random();return 0<n?(e=(n+e)%16|0,n=Math.floor(n/16)):(e=(i+e)%16|0,i=Math.floor(i/16)),("x"===t?e:7&e|8).toString(16)})}},1881:(t,e,n)=>{$Q(e),e.UrlConfiguration=void 0;const i=n(1406),r=n(7410),s={[r.Endpoint.Qt]:"i",[r.Endpoint.kt]:"e",[r.Endpoint.Zt]:"d"};e.UrlConfiguration=class{constructor(t,e,n,i){this.customUrl=null,this.fallbackUrls=null,this.endpoint=t,this.endpointDnsKey=s[t],e&&(this.customUrl=e),!e&&n&&(this.customUrl=n.endsWith("/")?""+n+t:n+"/"+t),i&&(this.fallbackUrls=i);e=r.NetworkDefault[t];this.defaultUrl=e+"/"+t}getUrl(){var t;return null!=(t=this.customUrl)?t:this.defaultUrl}getChecksum(){var t=(null!=(t=this.fallbackUrls)?t:[]).sort().join(",");return(0,i.h)(this.customUrl+t)}}},2397:(t,e,n)=>{$Q(e),e.Xe=e.xt=e.Ft=e.He=void 0;n=n(6830);const i="foreground",r="background",s=[];let o=i,l=!1;e.He=()=>o===i,e.Ft=()=>l,e.xt=t=>{s.unshift(t)};e.Xe=e=>{e!==o&&(o=e,s.forEach(t=>t(e)))},(0,n.ke)("focus",()=>{(l=!1,e.Xe)(i)}),(0,n.ke)("blur",()=>(0,e.Xe)(r)),(0,n.we)("visibilitychange",()=>{(0,e.Xe)("visible"===document.visibilityState?i:r)}),(0,n.ke)((0,n.Se)(),()=>{l=!0,(0,e.Xe)(r)})},6914:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)},s=($Q(e),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,n(1845),n(1845));const o=n(8962),l=($Q2(e,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}}),n(7770)),u=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return l.EventLogger}}),n(7512));$Q2(e,"Log",{enumerable:!0,get:function(){return u.Log}});var a=n(8e3);const c=n(4534);$Q2(e,"Storage",{enumerable:!0,get:function(){return c.Storage}}),r(n(1845),e),r(n(2137),e),r(n(6427),e),r(n(694),e),r(n(8962),e),r(n(3539),e),r(n(5542),e),r(n(2922),e),r(n(2417),e),r(n(1406),e),r(n(1333),e),r(n(7512),e),r(n(7787),e),r(n(7410),e),r(n(7023),e),r(n(1405),e),r(n(1361),e),r(n(6830),e),r(n(5902),e),r(n(4143),e),r(n(2176),e),r(n(9122),e),r(n(1375),e),r(n(2636),e),r(n(3206),e),r(n(1637),e),r(n(8e3),e),r(n(586),e),r(n(1098),e),r(n(2059),e),r(n(1812),e),r(n(8578),e),r(n(4534),e),r(n(3401),e),r(n(6634),e),r(n(1881),e),r(n(8023),e),r(n(2397),e),r(n(3932),e),r(n(3091),e),$P((0,s.l)(),{Log:u.Log,SDK_VERSION:a.SDK_VERSION})},9638:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=($Q(e),s(n(600)));r(n(600),e),e.default=s.default},8494:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const r=n(6914);class s extends r.NetworkCore{constructor(t=null){super(t);t=null==t?void 0:t.networkConfig;this.tn=new r.UrlConfiguration(r.Endpoint.Zt,null==t?void 0:t.downloadConfigSpecsUrl,null==t?void 0:t.api,null==t?void 0:t.downloadConfigSpecsFallbackUrls)}fetchConfigSpecs(e,n){return i(this,void 0,void 0,function*(){var t=yield this.get({sdkKey:e,urlConfig:this.tn,priority:n});return null!=(t=null==t?void 0:t.body)?t:null})}}e.default=s},6217:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const o=n(6914),r=n(3066),s=n(8494),l=n(2660);class u extends o.StatsigClientBase{static instance(t){var e=(0,o.l)().instance(t);return e instanceof u?e:(o.Log.warn((0,o.Mt)()?"StatsigOnDeviceEvalClient.instance is not supported in server environments":"Unable to find StatsigOnDeviceEvalClient instance"),new u(null!=t?t:""))}constructor(t,e=null){o.SDKType.Oe(t,"js-on-device-eval-client");var n=new s.default(e);super(t,null!=(t=null==e?void 0:e.dataAdapter)?t:new l.StatsigSpecsDataAdapter,n,e),this.ft=n,this.Oi=new r.SpecStore,this.en=new r.Evaluator(this.Oi),this.wi=(0,o.getUUID)()}initializeSync(t){return"Uninitialized"!==this.loadingStatus?{success:!0,duration:0,source:this.Oi.getSource(),sourceUrl:null,error:null}:(this.Re.start(),this.updateSync(t))}initializeAsync(t){return i(this,void 0,void 0,function*(){return this.xe||(this.xe=this.ki(t)),this.xe})}updateSync(t){var e=performance.now(),n=(this.Oi.reset(),this.dataAdapter.getDataSync());return this.Oi.setValuesFromDataAdapter(n),this.Oi.finalize(),this.Ae("Ready",n),null!=t&&t.disableBackgroundCacheRefresh||this.xi(n),(0,o.createUpdateDetails)(!0,this.Oi.getSource(),performance.now()-e,this.te.getLastSeenErrorAndReset(),this.ft.getLastUsedInitUrlAndReset())}updateAsync(n){return i(this,void 0,void 0,function*(){var t=performance.now(),e=(this.Oi.reset(),this.Ae("Loading",null),this.dataAdapter.getDataSync());return this.Oi.setValuesFromDataAdapter(e),e=yield this.dataAdapter.getDataAsync(e,n),this.Oi.setValuesFromDataAdapter(e),this.Oi.finalize(),this.Ae("Ready",e),(0,o.createUpdateDetails)(!0,this.Oi.getSource(),performance.now()-t,this.te.getLastSeenErrorAndReset(),this.ft.getLastUsedInitUrlAndReset())})}getContext(){return{sdkKey:this.j,options:this.O,values:this.Oi.getValues(),errorBoundary:this.te,session:o.StatsigSession.get(this.j),stableID:o.StableID.get(this.j),sdkInstanceID:this.wi}}checkGate(t,e,n){return this.getFeatureGate(t,e,n).value}getFeatureGate(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateGate(t,e),r=(0,o.We)(t,r,i);return this.Fe(t,(0,o.Ke)(e,r),n),this.$emt({name:"gate_evaluation",gate:r}),r}getDynamicConfig(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateConfig(t,e),r=(0,o.Je)(t,r,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getDynamicConfigOverride)?void 0:s.call(i,r,e,n),i=null!=s?s:r;return this.Fe(t,(0,o.ze)(e,i),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:i}),i}getExperiment(t,e,n){var e=this.D(e),{evaluation:i,details:r}=this.en.evaluateConfig(t,e),r=(0,o.Ge)(t,r,i),s=null==(s=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:s.call(i,r,e,n),i=null!=s?s:r;return this.Fe(t,(0,o.ze)(e,i),n),this.$emt({name:"experiment_evaluation",experiment:i}),i}getLayer(e,t,n){const i=this.D(t);var{evaluation:t,details:r}=this.en.evaluateLayer(e,i);const s=(0,o.Ve)(e,r,t,t=>{this.Fe(e,(0,o.Le)(i,s,t),n)});t=null==(t=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:t.call(r,s,i,n),r=null!=t?t:s;return this.$emt({name:"layer_evaluation",layer:r}),r}logEvent(t,e,n,i){this.Re.enqueue($P($P({},"string"==typeof t?{eventName:t,value:n,metadata:i}:t),{user:this.D(e),time:Date.now()}))}Ue(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.Mi(null)})}ki(t){return i(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this.Re.start(),this.updateAsync(t)})}Mi(t){this.Oi.finalize(),this.Ae("Ready",t)}D(t){return(0,o.D)(t,this.O,this.Oi.getDefaultEnvironment())}xi(t){this.dataAdapter.getDataAsync(t,{priority:"low"}).catch(t=>{o.Log.error("An error occurred after update.",t)})}}e.default=u},2660:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigSpecsDataAdapter=void 0;const r=n(6914),s=n(8494);class o extends r.DataAdapterCore{constructor(){super("SpecsDataAdapter","specs"),this.ft=null}attach(t,e,n){super.attach(t,e,n),null!==n&&n instanceof s.default?this.ft=n:this.ft=new s.default(null!=e?e:{})}getDataAsync(t,e){return this.C(t,void 0,e)}prefetchData(t){return this.U(void 0,t)}F(t,e,n){return i(this,void 0,void 0,function*(){var t;return null!=(t=yield null==(t=this.ft)?void 0:t.fetchConfigSpecs(this.N(),null==n?void 0:n.priority))?t:null})}I(){var t=(0,r.o)(this.N());return`${r.DataAdapterCachePrefix}.${this.m}.`+t}A(t,e){return 0<t.data.length}}e.StatsigSpecsDataAdapter=o},600:(t,e,n)=>{$Q(e),e.StatsigSpecsDataAdapter=e.StatsigOnDeviceEvalClient=void 0;var i=n(6914),r=n(6217);e.StatsigOnDeviceEvalClient=r.default;const s=n(2660);$Q2(e,"StatsigSpecsDataAdapter",{enumerable:!0,get:function(){return s.StatsigSpecsDataAdapter}});n=$P((0,i.l)(),{StatsigSpecsDataAdapter:s.StatsigSpecsDataAdapter,StatsigOnDeviceEvalClient:r.default});e.default=n},6535:(t,e)=>{function l(t){return t.setUTCHours(0,0,0,0),t.getTime()}$Q(e),e.default={compareNumbers(t,e,n){if(null==t||null==e)return!1;var i=Number(t),r=Number(e);if(isNaN(i)||isNaN(r))return!1;switch(n){case"gt":return e<t;case"gte":return e<=t;case"lt":return t<e;case"lte":return t<=e;default:return!1}},compareVersions(t,e,n){if(null==t||null==e)return!1;var t=String(t),e=String(e),i=t=>{var e=t.indexOf("-");return-1!==e?t.substring(0,e):t},r=((t,e)=>{var n=t.split(".").map(t=>parseInt(t)),i=e.split(".").map(t=>parseInt(t));let r=0;for(;r<Math.max(n.length,i.length);){var s=r<n.length?n[r]:0,o=r<i.length?i[r]:0;if(s<o)return-1;if(o<s)return 1;r++}return 0})(i(t),i(e));switch(n){case"version_gt":return 0<r;case"version_gte":return 0<=r;case"version_lt":return r<0;case"version_lte":return r<=0;case"version_eq":return 0===r;case"version_neq":return 0!==r;default:return!1}},compareStringInArray(r,t,s){if(!Array.isArray(t))return!1;const o="any_case_sensitive"!==s&&"none_case_sensitive"!==s;var e=-1!==t.findIndex(t=>{var e=String(r),t=String(t),n=o?e.toLowerCase():e,i=o?t.toLowerCase():t;switch(s){case"any":case"none":case"any_case_sensitive":case"none_case_sensitive":return n===i;case"str_starts_with_any":return n.startsWith(i);case"str_ends_with_any":return n.endsWith(i);case"str_contains_any":case"str_contains_none":return n.includes(i);default:return!1}});switch(s){case"none":case"none_case_sensitive":case"str_contains_none":return!e;default:return e}},compareStringWithRegEx(t,e){try{var n=String(t);if(n.length<1e3)return new RegExp(String(e)).test(n)}catch(t){}return!1},compareTime(n,i,r){if(null==n||null==i)return!1;try{let t=new Date(String(n)),e=(isNaN(t.getTime())&&(t=new Date(Number(n))),new Date(String(i)));isNaN(e.getTime())&&(e=new Date(Number(i)));var s=t.getTime(),o=e.getTime();if(isNaN(s)||isNaN(o))return!1;switch(r){case"before":return s<o;case"after":return o<s;case"on":return l(t)===l(e);default:return!1}}catch(t){return!1}},arrayHasValue(t,e){var n=new Set(t);for(let t=0;t<e.length;t++)if(n.has(e[t])||n.has(parseFloat(e[t])))return!0;return!1},arrayHasAllValues(t,e){var n=new Set(t);for(let t=0;t<e.length;t++)if(!n.has(e[t])&&!n.has(parseFloat(e[t])))return!1;return!0}}},5079:(t,e)=>{$Q(e),e.resultToLayerEval=e.resultToConfigEval=e.resultToGateEval=e.makeEvalResult=void 0,e.makeEvalResult=function(t){return $P($P({},{unsupported:!1,bool_value:!1,rule_id:"",secondary_exposures:[],json_value:{},explicit_parameters:null,allocated_experiment_name:null,is_experiment_group:!1,group_name:null,undelegated_secondary_exposures:void 0}),t)},e.resultToGateEval=function(t,e){return{name:t.name,id_type:t.idType,rule_id:e.rule_id,value:e.bool_value,secondary_exposures:e.secondary_exposures,version:null==(e=t.version)?void 0:e.toString()}},e.resultToConfigEval=function(t,e){var n;return{name:t.name,id_type:t.idType,rule_id:e.rule_id,value:e.json_value,secondary_exposures:e.secondary_exposures,group:null!=(n=e.group_name)?n:"",group_name:null!=(n=e.group_name)?n:void 0,is_device_based:!1,is_experiment_active:t.isActive,is_user_in_experiment:e.is_experiment_group,version:null==(n=t.version)?void 0:n.toString(),passed:e.bool_value}},e.resultToLayerEval=function(t,e,n){var i;return{name:t.name,rule_id:n.rule_id,value:n.json_value,secondary_exposures:n.secondary_exposures,undelegated_secondary_exposures:n.undelegated_secondary_exposures,allocated_experiment_name:null!=(i=n.allocated_experiment_name)?i:"",explicit_parameters:null!=(i=n.explicit_parameters)?i:[],group:null!=(i=n.group_name)?i:"",group_name:null!=(i=n.group_name)?i:void 0,is_device_based:!1,is_experiment_active:null==e?void 0:e.isActive,is_user_in_experiment:n.is_experiment_group,version:null==(i=t.version)?void 0:i.toString()}}},5007:(t,e,n)=>{$Q(e),e.Evaluator=void 0;const i=n(5680),h=n(6535),d=n(5079);function v(t,e){var n;return"string"==typeof e&&"userid"!==e.toLowerCase()?null!=(n=null==(n=t.customIDs)?void 0:n[e])?n:null==(n=null==t?void 0:t.customIDs)?void 0:n[e.toLowerCase()]:t.userID}function f(t){return(0,i.SHA256)(t).dataView().getBigUint64(0,!1)}function l(t){return null!=t&&"object"==typeof t}e.Evaluator=class{constructor(t){this.Oi=t}evaluateGate(t,e){var{spec:t,details:n}=this.nn("gate",t);return t?(e=this.rn(t,e),t=(0,d.resultToGateEval)(t,e),this.sn(e,n),{evaluation:t,details:n}):{evaluation:null,details:n}}evaluateConfig(t,e){var{spec:t,details:n}=this.nn("config",t);return t?(e=this.rn(t,e),t=(0,d.resultToConfigEval)(t,e),this.sn(e,n),{evaluation:t,details:n}):{evaluation:null,details:n}}evaluateLayer(t,e){var n,{spec:t,details:i}=this.nn("layer",t);return t?(n=null!=(n=null==(e=this.rn(t,e))?void 0:e.allocated_experiment_name)?n:"",n=this.Oi.getSpecAndSourceInfo("config",n).spec,t=(0,d.resultToLayerEval)(t,n,e),this.sn(e,i),{evaluation:t,details:i}):{evaluation:null,details:i}}sn(t,e){t.unsupported&&(e.reason="Unsupported")}getParamStoreConfig(t){var t=this.Oi.getParamStoreAndSourceInfo(t),e=this.ln(t);return{config:null!=(t=t.paramStoreConfig)?t:null,details:e}}nn(t,e){t=this.Oi.getSpecAndSourceInfo(t,e);return{details:this.ln(t),spec:t.spec}}ln(t){var{source:e,lcut:n,receivedAt:i}=t;return"Uninitialized"===e||"NoValues"===e?{reason:e}:{reason:e+":"+(null==("spec"in t?t.spec:t.paramStoreConfig)?"Unrecognized":"Recognized"),lcut:n,receivedAt:i}}rn(t,e){var n=l(t.defaultValue)?t.defaultValue:void 0;if(!t.enabled)return(0,d.makeEvalResult)({json_value:n,rule_id:"disabled"});var i=[];for(const o of t.rules){var r,s=this.un(o,e);if(s.unsupported)return s;if(i.push(...s.secondary_exposures),s.bool_value)return this.an(o.configDelegate,e,i)||(r=function(t,e,n){if(100===t.passPercentage)return!0;if(0===t.passPercentage)return!1;e=f(n.salt+"."+(null!=(n=t.salt)?n:t.id)+"."+(null!=(n=v(e,t.idType))?n:""));return Number(e%BigInt(1e4))<100*t.passPercentage}(o,e,t),(0,d.makeEvalResult)({rule_id:s.rule_id,bool_value:r,json_value:r?s.json_value:n,secondary_exposures:i,undelegated_secondary_exposures:i,is_experiment_group:s.is_experiment_group,group_name:s.group_name}))}return(0,d.makeEvalResult)({json_value:n,secondary_exposures:i,undelegated_secondary_exposures:i,rule_id:"default"})}un(t,e){var n=[];let i=!0;for(const s of t.conditions){var r=this.cn(s,e);if(r.unsupported)return r;n.push(...r.secondary_exposures),r.bool_value||(i=!1)}return(0,d.makeEvalResult)({rule_id:t.id,bool_value:i,json_value:l(t.returnValue)?t.returnValue:void 0,secondary_exposures:n,is_experiment_group:!0===t.isExperimentGroup,group_name:t.groupName})}cn(t,e){let n=null,i=!1;var r=t.field,s=t.targetValue,o=t.idType,l=t.type;switch(l){case"public":return(0,d.makeEvalResult)({bool_value:!0});case"pass_gate":case"fail_gate":var u=String(s),u=this.hn(u,e);return(0,d.makeEvalResult)({bool_value:"fail_gate"===l?!u.bool_value:u.bool_value,secondary_exposures:u.secondary_exposures});case"multi_pass_gate":case"multi_fail_gate":return this.dn(s,l,e);case"user_field":case"ip_based":case"ua_based":n=function(t,e){var n;if(null==e||"object"!=typeof t||null==t)return null;var i=t;return null!=(n=null!=(n=null!=(n=null!=(n=null!=(n=i[e])?n:i[e.toLowerCase()])?n:null==(i=null==t?void 0:t.custom)?void 0:i[e])?n:null==(i=null==t?void 0:t.custom)?void 0:i[e.toLowerCase()])?n:null==(i=null==t?void 0:t.privateAttributes)?void 0:i[e])?n:null==(i=null==t?void 0:t.privateAttributes)?void 0:i[e.toLowerCase()]}(e,r);break;case"environment_field":n=function(t,e){if(null==e)return null;t=t.statsigEnvironment;if(null!=t){const n=e.toLowerCase(),i=Object.keys(t).find(t=>t.toLowerCase()===n);return void 0!==i?t[i]:void 0}}(e,r);break;case"current_time":n=Date.now();break;case"user_bucket":u=f(String(null!=(u=null==(u=t.additionalValues)?void 0:u.salt)?u:"")+"."+(null!=(u=v(e,o))?u:""));n=Number(u%BigInt(1e3));break;case"unit_id":n=v(e,o);break;default:return(0,d.makeEvalResult)({unsupported:!0})}var a,c=t.operator;switch(c){case"gt":case"gte":case"lt":case"lte":i=h.default.compareNumbers(n,s,c);break;case"version_gt":case"version_gte":case"version_lt":case"version_lte":case"version_eq":case"version_neq":i=h.default.compareVersions(n,s,c);break;case"any":case"none":case"str_starts_with_any":case"str_ends_with_any":case"str_contains_any":case"str_contains_none":case"any_case_sensitive":case"none_case_sensitive":i=h.default.compareStringInArray(n,s,c);break;case"str_matches":i=h.default.compareStringWithRegEx(n,s);break;case"before":case"after":case"on":i=h.default.compareTime(n,s,c);break;case"eq":i=n==s;break;case"neq":i=n!=s;break;case"in_segment_list":case"not_in_segment_list":return(0,d.makeEvalResult)({unsupported:!0});case"array_contains_any":case"array_contains_none":Array.isArray(s)?i=!!Array.isArray(n)&&(a=h.default.arrayHasValue(n,s),"array_contains_any"===c?a:!a):i=!1;break;case"array_contains_all":case"not_array_contains_all":Array.isArray(s)?i=!!Array.isArray(n)&&(a=h.default.arrayHasAllValues(n,s),"array_contains_all"===c?a:!a):i=!1}return(0,d.makeEvalResult)({bool_value:i})}an(t,e,n){var i;return t&&(i=this.Oi.getSpecAndSourceInfo("config",t).spec,i)?(e=this.rn(i,e),(0,d.makeEvalResult)($P($P({},e),{allocated_experiment_name:t,explicit_parameters:i.explicitParameters,secondary_exposures:n.concat(e.secondary_exposures),undelegated_secondary_exposures:n}))):null}hn(t,e){var n=[];let i=!1;var r=this.Oi.getSpecAndSourceInfo("gate",t)["spec"];if(r){r=this.rn(r,e);if(r.unsupported)return r;i=r.bool_value,n.push(...r.secondary_exposures),n.push({gate:t,gateValue:String(i),ruleID:r.rule_id})}return(0,d.makeEvalResult)({bool_value:i,secondary_exposures:n})}dn(t,e,n){if(!Array.isArray(t))return(0,d.makeEvalResult)({unsupported:!0});var i="multi_pass_gate"===e,r=[];let s=!1;for(const l of t){if("string"!=typeof l)return(0,d.makeEvalResult)({unsupported:!0});var o=this.hn(l,n);if(o.unsupported)return o;if(r.push(...o.secondary_exposures),i?!0===o.bool_value:!1===o.bool_value){s=!0;break}}return(0,d.makeEvalResult)({bool_value:s,secondary_exposures:r})}}},8313:(t,e,n)=>{$Q(e),e.SpecStore=void 0;const i=n(6914);function r(t){return(0,i.P)(t,"has_updates","DownloadConfigSpecsResponse")}e.SpecStore=class{constructor(){this.Ze=null,this.ti=null,this.ei="Uninitialized",this.ii=0,this.ni=0,this.vn=null}getValues(){return this.Ze?r(this.Ze):null}getSource(){return this.ei}getDefaultEnvironment(){return this.vn}setValuesFromDataAdapter(t){var e;t&&!0===(null==(e=r(t.data))?void 0:e.has_updates)&&(this.ii=e.time,this.ni=t.receivedAt,this.ei=t.source,this.ti=e,this.Ze=t.data,this.vn=null!=(t=e.default_environment)?t:null)}reset(){this.ti=null,this.Ze=null,this.ei="Loading"}finalize(){this.ti||(this.ei="NoValues")}getSpecAndSourceInfo(t,e){var t=this.fn(t);return{spec:null!=(t=null==t?void 0:t.find(t=>t.name===e))?t:null,source:this.ei,lcut:this.ii,receivedAt:this.ni}}getParamStoreAndSourceInfo(t){var e=null==(e=this.ti)?void 0:e.param_stores;return{paramStoreConfig:null!=(t=null==(e=null==e?void 0:e[t])?void 0:e.parameters)?t:null,source:this.ei,lcut:this.ii,receivedAt:this.ni}}fn(t){var e;switch(t){case"gate":return null==(e=this.ti)?void 0:e.feature_gates;case"config":return null==(e=this.ti)?void 0:e.dynamic_configs;case"layer":return null==(e=this.ti)?void 0:e.layer_configs}}}},3066:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&("get"in r?e.__esModule:!r.writable&&!r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),$Q2(t,i,r)}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};$Q(e),r(n(5007),e),r(n(8313),e)},5680:(t,e,n)=>{$Q(e),e.SHA256=void 0;const i=n(7485);$Q2(e,"SHA256",{enumerable:!0,get:function(){return i.SHA256}})},7485:(t,e)=>{$Q(e),e.SHA256=void 0,e.SHA256=function(t){return(new i).update(t)};const n=[-2147483648,8388608,32768,128],o=[24,16,8,0],m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];class i{constructor(){this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.lastByteIndex=-1}update(n){if(!this.finalized){if("string"!=typeof n)throw new Error('Must be of type "string"');var i;let t=0,e;for(var r=n.length,s=this.blocks;t<r;){for(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),e=this.start;t<r&&e<64;++t)(i=n.charCodeAt(t))<128?s[e>>2]|=i<<o[3&e++]:(i<2048?s[e>>2]|=(192|i>>6)<<o[3&e++]:(i<55296||57344<=i?s[e>>2]|=(224|i>>12)<<o[3&e++]:(i=65536+((1023&i)<<10|1023&n.charCodeAt(++t)),s[e>>2]|=(240|i>>18)<<o[3&e++],s[e>>2]|=(128|i>>12&63)<<o[3&e++]),s[e>>2]|=(128|i>>6&63)<<o[3&e++]),s[e>>2]|=(128|63&i)<<o[3&e++]);this.lastByteIndex=e,this.bytes+=e-this.start,64<=e?(this.block=s[16],this.start=e-64,this.hash(),this.hashed=!0):this.start=e}4294967295<this.bytes&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296)}return this}finalize(){var t,e;this.finalized||(this.finalized=!0,t=this.blocks,e=this.lastByteIndex,t[16]=this.block,t[e>>2]|=n[3&e],this.block=t[16],56<=e&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash())}hash(){var t=this.blocks;let e=this.h0,n=this.h1,i=this.h2,r=this.h3,s=this.h4,o=this.h5,l=this.h6,u=this.h7,a,c,h,d,v,f,_,g,p,b,y;for(a=16;a<64;++a)v=t[a-15],c=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3,v=t[a-2],h=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,t[a]=t[a-16]+c+t[a-7]+h<<0;for(y=n&i,a=0;a<64;a+=4)this.first?(g=704751109,v=t[0]-210244248,u=v-1521486534<<0,r=v+143694565<<0,this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),h=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),g=e&n,d=g^e&i^y,_=s&o^~s&l,v=u+h+_+m[a]+t[a],f=c+d,u=r+v<<0,r=v+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),h=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),p=r&e,d=p^r&n^g,_=u&s^~u&o,v=l+h+_+m[a+1]+t[a+1],f=c+d,l=i+v<<0,i=v+f<<0,c=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),h=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),b=i&r,d=b^i&e^p,_=l&u^~l&s,v=o+h+_+m[a+2]+t[a+2],f=c+d,o=n+v<<0,n=v+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),h=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&i,d=y^n&r^b,_=o&l^~o&u,v=s+h+_+m[a+3]+t[a+3],f=c+d,s=e+v<<0,e=v+f<<0;this.h0=this.h0+e<<0,this.h1=this.h1+n<<0,this.h2=this.h2+i<<0,this.h3=this.h3+r<<0,this.h4=this.h4+s<<0,this.h5=this.h5+o<<0,this.h6=this.h6+l<<0,this.h7=this.h7+u<<0}arrayBuffer(){return this._n().buffer}dataView(){return this._n().dataView}_n(){this.finalize();var t=new ArrayBuffer(32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),e.setUint32(28,this.h7),{dataView:e,buffer:t}}}}},i={};function r(t){var e=i[t];return void 0!==e||(e=i[t]={exports:{}},n[t].call(e.exports,e,e.exports,r)),e.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(9638).default})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/js-on-device-eval-client",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"homepage": "https://github.com/statsig-io/js-client-monorepo",
|
|
6
6
|
"repository": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"directory": "packages/js-on-device-eval-client"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@statsig/client-core": "3.25.
|
|
13
|
-
"@statsig/on-device-eval-core": "3.25.
|
|
12
|
+
"@statsig/client-core": "3.25.1",
|
|
13
|
+
"@statsig/on-device-eval-core": "3.25.1"
|
|
14
14
|
},
|
|
15
15
|
"jsdelivr": "./build/statsig-js-on-device-eval-client.min.js",
|
|
16
16
|
"type": "commonjs",
|