@statsig/js-on-device-eval-client 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,47 @@
1
- # Statsig - On Device Evaluations Client
1
+ <h1 align="center">
2
+ <a href="https://statsig.com/?ref=gh_jsm">
3
+ <img src="https://github.com/statsig-io/js-client-monorepo/assets/95646168/ae5499ed-20ff-4584-bf21-8857f800d485" />
4
+ </a>
5
+ <div />
6
+ <a href="https://statsig.com/?ref=gh_jsm">Statsig</a>
7
+ </h1>
2
8
 
3
- The JavaScript SDK for single user client environments. If you need a SDK for another language or server environment, check out our [other SDKs](https://docs.statsig.com/#sdks).
9
+ <p align="center">
10
+ <a href="https://github.com/statsig-io/js-client-monorepo/blob/main/LICENSE">
11
+ <img src="https://img.shields.io/badge/license-ISC-blue.svg?colorA=1b2528&colorB=ccfbc7&style=for-the-badge">
12
+ </a>
13
+ <a href="https://www.npmjs.com/package/@statsig/js-client">
14
+ <img src="https://img.shields.io/npm/v/@statsig/js-client.svg?colorA=1b2528&colorB=b2d3ff&style=for-the-badge">
15
+ </a>
16
+ <a href="https://statsig.com/community?ref=gh_jsm">
17
+ <img src="https://img.shields.io/badge/slack-statsig-brightgreen.svg?logo=slack&colorA=1b2528&colorB=FFF8BA&style=for-the-badge">
18
+ </a>
19
+ </p>
4
20
 
5
- Statsig helps you move faster with feature gates (feature flags), and/or dynamic configs. It also allows you to run A/B/n tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, check out our product and create an account at [statsig.com](https://www.statsig.com).
21
+ Statsig helps you move faster with feature gates (feature flags), and/or dynamic configs. It also allows you to run A/B/n tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, check out our product and create an account at [statsig.com](https://www.statsig.com/?ref=gh_jsm).
6
22
 
7
23
  ## Getting Started
8
24
 
9
- Check out our [SDK docs](https://docs.statsig.com/client/javascript-sdk) to get started.
25
+ Read through the [Documentation](https://docs.statsig.com/client/javascript-sdk?ref=gh_jsm) or check out the [Samples](samples/).
26
+
27
+ ## Packages
28
+
29
+ Clients
30
+
31
+ - [Precomputed Evaluations (Recommended)](packages/js-client/README.md)
32
+ - [On Device Evaluations](packages/js-on-device-eval-client/README.md)
33
+
34
+ Product Bundles
35
+
36
+ - [Session Replay](packages/session-replay/README.md)
37
+ - [Web Analytics](packages/web-analytics/README.md)
38
+
39
+ Framework Specific Bindings
40
+
41
+ - [React](packages/react-bindings/README.md)
42
+ - [React Native](packages/react-native-bindings/README.md)
43
+ - [React Native (Expo)](packages/expo-bindings/README.md)
44
+
45
+ ## Community
46
+
47
+ If you need any assitance or just have a question, feel free to reach out to us on [Slack](https://statsig.com/community?ref=gh_jsm).
@@ -1 +1 @@
1
- !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 $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())})});var n={496:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.t=n.dn=n.i=void 0,n.i=()=>__STATSIG__||o,n.dn=t=>(0,n.i)()[t];n.t=t=>{var e=(0,n.i)();return t?e.instances&&e.instances[t]:e.lastInstance};var i,r="__STATSIG__",s="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},u="undefined"!=typeof globalThis?globalThis:{};const o=null!=(i=null!=(i=null!=(i=s[r])?i:e[r])?i:u[r])?i:{instance:n.t};s[r]=o,e[r]=o,u[r]=o},707:(t,e,n)=>{$Q(e),e.o=e.u=void 0;const i=n(832);function r(t,e,n){return n?n(t,e):(e=["uid:"+(null!=(n=null==e?void 0:e.userID)?n:""),"cids:"+Object.entries(null!=(n=null==e?void 0:e.customIDs)?n:{}).sort(([t],[e])=>t.localeCompare(e)).map(([t,e])=>t+"-"+e).join(","),"k:"+t],(0,i.oi)(e.join("|")))}e.u=r,e.o=function(t,e,n){return e?r(t,e,n):(0,i.oi)("k:"+t)}},856:(t,e)=>{$Q(e)},320:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.DataAdapterCore=void 0;const l=n(780),a=n(604),s=n(296),u=n(444),c=n(412);function d(t,e,n,i){return{source:t,data:e,receivedAt:Date.now(),stableID:n,fullUserHash:(0,s.vn)(i)}}e.DataAdapterCore=class{constructor(t,e){this.l=t,this.h=e,this.v=null,this._=null,this.p="statsig.last_modified_time."+e,this.S=new i}attach(t,e){this._=t,this.v=e}getDataSync(t){var e=this.m(t),n=this.S.get(e,t);return n||((n=this.O(e))?(this.S.add(e,n),this.S.get(e,t)):null)}setData(t,e){var e=e&&(0,s.T)(e,null==(e=this.v)?void 0:e.environment),n=this.m(e);this.S.add(n,d("Bootstrap",t,null,e))}__primeInMemoryCache(t){this.S.merge(t)}I(e,n,i){return r(this,void 0,void 0,function*(){var t=null!=e?e:this.getDataSync(n),t=[this.A(t,n,i)];return null!=i&&i.timeoutMs&&t.push(new Promise(t=>setTimeout(t,i.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}M(n,i){return r(this,void 0,void 0,function*(){var t=this.m(n),e=yield this.I(null,n,i);e&&this.S.add(t,$P($P({},e),{source:"Prefetch"}))})}A(s,u,o){return r(this,void 0,void 0,function*(){let t=null;s&&this.fn(s,u)&&(t=s.data);var e=yield this.D(t,u,o);if(!e)return l.Log.debug("No response returned for latest value"),null;var n=(0,c.ui)(e,"has_updates","Response"),i=this.G(),i=yield a.StableID.get(i);let r=null;if(!0===(null==n?void 0:n.has_updates))r=d("Network",e,i,u);else{if(!t||!1!==(null==n?void 0:n.has_updates))return null;r=d("NetworkNotModified",t,i,u)}e=this.m(u);return this.S.add(e,r),yield this.k(e,r),r})}G(){return null!=this._?this._:(l.Log.error(this.l+" is not attached to a Client"),"")}O(t){var e=null==(e=u.Storage.N)?void 0:e.call(u.Storage,t);return null!=e&&(t=(0,c.ui)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}k(t,e){return r(this,void 0,void 0,function*(){yield u.Storage.C(t,JSON.stringify(e)),yield this.R(t)})}R(n){var i;return r(this,void 0,void 0,function*(){var t=null!=(i=yield(0,u.P)(this.p))?i:{},e=(t[n]=Date.now(),Object.entries(t));e.length<=10||(delete t[(e=e.reduce((t,e)=>e[1]<t[1]?e:t))[0]],yield u.Storage.F(e[0])),yield(0,u.U)(this.p,t)})}};class i{constructor(){this.ii={}}get(t,e){var t=this.ii[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?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var n=Object.entries(this.ii);n.length<10||([n]=n.reduce((t,e)=>e[1]<t[1]?e:t),delete this.ii[n]),this.ii[t]=e}merge(t){this.ii=$P($P({},this.ii),t)}}},280:(t,e)=>{$Q(e),e.Diagnostics=void 0;e.Diagnostics=class{static mark(){}}},184:(t,e)=>{$Q(e)},512:function(t,o,e){var n=this&&this.__awaiter||$A();$Q2(o,"__esModule",{value:!0}),o.ErrorBoundary=o.EXCEPTION_ENDPOINT=void 0;const i=e(780),l=e(360),a=e(972),c=(o.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");o.ErrorBoundary=class{constructor(t,e,n){this._=t,this.v=e,this.K=n,this.L=new Set}wrap(i){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.ci(e,()=>n.apply(i,t)),t[e].$EB=!0)})}catch(t){this.q("eb:wrap",t)}}logError(t,e){this.q(t,e)}ci(e,t){try{var n=t();return n&&n instanceof Promise?n.catch(t=>this.q(e,t)):n}catch(t){return this.q(e,t),null}}q(s,u){try{i.Log.warn("Caught error in "+s,{error:u});n(this,void 0,void 0,function*(){var t,e,n=u||Error(c),i=n instanceof Error,r=i?n.name:"No Name";this.L.has(r)||(this.L.add(r),null!=(t=null==(t=this.v)?void 0:t.networkConfig)&&t.preventAllNetworkTraffic?null!=(t=this.K)&&t.call(this,{name:"error",error:u}):(t=l.SDKType.J(this._),e=a.StatsigMetadataProvider.get(),i=i?n.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(n),n=JSON.stringify($P({tag:s,exception:r,info:i},$P($P({},e),{sdkType:t}))),yield(null!=(r=null==(i=null==(r=this.v)?void 0:r.networkConfig)?void 0:i.networkOverrideFunc)?r:fetch)(o.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._,"STATSIG-SDK-TYPE":String(t),"STATSIG-SDK-VERSION":String(e.sdkVersion),"Content-Type":"application/json"},body:n}),null!=(i=this.K)&&i.call(this,{name:"error",error:u})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},500:(t,e)=>{$Q(e)},788:(t,e)=>{$Q(e)},728:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=n(832),s=n(780),u=n(716),o=n(48),l=n(876),a=n(444),c=n(84),d=n(100),h={},v=t=>{null!=(t=h[t])&&t.flush().catch(()=>{})};e.EventLogger=class{constructor(e,t,n,i){this._=e,this.K=t,this.V=n,this.v=i,this.B=[],this.$={},this.H={},this.W=!1,this.Y=Date.now(),(h[e]=this).X=!0===(null==i?void 0:i.disableLogging),this.Z=null!=(t=null==i?void 0:i.loggingBufferMaxSize)?t:50;n=null==i?void 0:i.networkConfig;this.et=(0,c.it)(null==n?void 0:n.logEventUrl,null==n?void 0:n.api,"/rgstr",u.NetworkDefault.eventsApi),(0,d.st)(t=>{"background"===t&&v(e)}),this.rt(),this.ni()}setLoggingDisabled(t){this.X=t}enqueue(t){this.ot(t)&&(this.ut(t),this.lt(),this.B.length>this.Z)&&v(this._)}incrementNonExposureCount(t){var e=null!=(e=this.H[t])?e:0;this.H[t]=e+1}reset(){this.$={}}shutdown(){return i(this,void 0,void 0,function*(){this.tt&&(clearInterval(this.tt),this.tt=null),yield this.flush()})}flush(){return i(this,void 0,void 0,function*(){var t;if(this.ct(),0!==this.B.length)return t=this.B,this.B=[],this.dt(t)})}lt(){this.W||(this.W=!0,200<Date.now()-this.Y)||setTimeout(()=>v(this._),200)}ot(t){if((0,l.ht)(t)){var e=t.user||{},n=t.metadata||{},t=[t.eventName,e.userID,n.gate,n.config,n.ruleID].join("|"),e=this.$[t],n=Date.now();if(e&&n-e<6e4)return!1;1e3<Object.keys(this.$).length&&(this.$={}),this.$[t]=n}return!0}dt(t){var e,n;return i(this,void 0,void 0,function*(){if(this.X)this.vt(t);else try{(!(0,d._t)()&&this.V.isBeaconSupported()&&null==(null==(n=null==(e=this.v)?void 0:e.networkConfig)?void 0:n.networkOverrideFunc)?yield this.ft(t):yield this.gt(t)).success?this.K({name:"logs_flushed",events:t}):this.vt(t)}catch(t){s.Log.warn("Failed to flush events.")}})}gt(e){var n;return i(this,void 0,void 0,function*(){var t=yield this.V.post(this.si(e)),t=null!=(n=null==t?void 0:t.code)?n:-1;return{success:200<=t&&t<300}})}ft(t){return i(this,void 0,void 0,function*(){return{success:yield this.V.beacon(this.si(t))}})}si(t){return{sdkKey:this._,data:{events:t},url:this.et,retries:3,isCompressable:!0,params:{[u.NetworkParam.EventCount]:String(t.length)}}}vt(t){for(;500<t.length;)t.shift();var e=this.o();(0,a.U)(e,t).catch(()=>{s.Log.warn("Unable to save failed logs to storage")})}rt(){const e=this.o();i(this,void 0,void 0,function*(){var t=yield(0,a.P)(e);t&&(yield a.Storage.F(e),yield this.dt(t))}).catch(()=>{s.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,r.oi)(this._)}ut(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},n=this.bt(),n=(n&&(e.statsigMetadata={currentPage:n}),$P($P({},t),e));s.Log.debug("Enqueued Event:",n),this.B.push(n)}ct(){0!==Object.keys(this.H).length&&(this.ut({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.H)}}),this.H={})}bt(){var t;if(!1!==(null==(t=this.v)?void 0:t.includeCurrentPageUrlWithEvents))return(0,o.yt)()}ni(){if((0,o.Et)()){var t=null!=(t=null==(t=this.v)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{h[this._].tt!==e?clearInterval(e):v(this._)},t);this.tt=e}}}},832:(t,e)=>{$Q(e),e.li=e.oi=void 0;e.oi=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)};e.li=t=>(0,e.oi)(JSON.stringify(r(t)));const r=n=>{if(null==n)return null;var t=Object.keys(n).sort();const i={};return t.forEach(t=>{let e=n[t];!Array.isArray(e)&&e instanceof Object&&(e=r(e)),i[t]=e}),i}},664:(t,e)=>{$Q(e)},780:(t,e)=>{function n(t){return t.unshift("[Statsig]"),t}var i,r;$Q(e),e.Log=e.LogLevel=void 0,(r=i||(e.LogLevel=i={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Info=3]="Info",r[r.Debug=4]="Debug";class s{static info(...t){this.level>=i.Info&&console.info(...n(t))}static debug(...t){this.level>=i.Debug&&console.debug(...n(t))}static warn(...t){this.level>=i.Warn&&console.warn(...n(t))}static error(...t){this.level>=i.Error&&console.error(...n(t))}}(e.Log=s).level=i.Error},716:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=void 0,e.NetworkDefault={eventsApi:"https://prodregistryv2.org/v1",initializeApi:"https://featureassets.org/v1",specsApi:"https://assetsconfigcdn.org/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},188:function(t,e,n){var u=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,n(496);const o=n(496),f=n(280),p=n(780),l=n(716),s=n(360),a=n(48),c=n(612),d=n(604),h=n(972),g=n(100);e.NetworkCore=class{constructor(t,e){this.K=e,this.St=1e4,this.ri={},this.v={},t&&(this.v=t),this.v.networkConfig&&(this.ri=this.v.networkConfig),this.ri.networkTimeoutMs&&(this.St=this.ri.networkTimeoutMs)}post(e){return u(this,void 0,void 0,function*(){let t=yield this.Ot(e);return e.isStatsigEncodable?t=this.Tt(e,t):e.isCompressable&&(t=yield this.hn(e,t)),this.jt($P({method:"POST",body:t},e))})}get(t){return this.jt($P({method:"GET"},t))}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}beacon(i){return u(this,void 0,void 0,function*(){var t,e,n;return!!y(i)&&(t=yield this.Ot(i),t=yield this.hn(i,t),e=yield this.wt(i),(n=navigator).sendBeacon.bind(n)(e,t))})}jt(h){var v,_;return u(this,void 0,void 0,function*(){if(!y(h))return null;if(this.ri.preventAllNetworkTraffic)return null;var{method:e,body:n,retries:i}=h;const r="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>null===r||void 0===r?void 0:r.abort(`Timeout of ${this.St}ms expired.`),this.St),s=yield this.wt(h),u=null,o=(0,g.ti)();try{var l,a,c,d={method:e,body:n,headers:$P({},h.headers),signal:null===r||void 0===r?void 0:r.signal,priority:h.priority,keepalive:o},u=yield(null!=(v=this.ri.networkOverrideFunc)?v:fetch)(s,d);if(clearTimeout(t),u.ok)return c=yield u.text(),f.Diagnostics.mark(),{body:c,code:u.status};throw l=yield u.text().catch(()=>"No Text"),(a=new Error(`NetworkError: ${s} `+l)).name="NetworkError",a}catch(t){n=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"}(r,t);return f.Diagnostics.mark(),!i||i<=0?(null!=(_=this.K)&&_.call(this,{name:"error",error:t}),p.Log.error(`A networking error occured during ${e} request to ${s}.`,n,t),null):this.jt($P($P({},h),{retries:i-1}))}})}wt(e){return u(this,void 0,void 0,function*(){var t=$P({[l.NetworkParam.SdkKey]:e.sdkKey,[l.NetworkParam.SdkType]:s.SDKType.J(e.sdkKey),[l.NetworkParam.SdkVersion]:h.SDK_VERSION,[l.NetworkParam.Time]:String(Date.now()),[l.NetworkParam.SessionID]:yield c.SessionID.get(e.sdkKey)},e.params),t=Object.entries(t).map(([t,e])=>encodeURIComponent(t)+"="+encodeURIComponent(e)).join("&");return e.url+(t?"?"+t:"")})}Ot(r){return u(this,void 0,void 0,function*(){var{data:t,sdkKey:e}=r,n=yield d.StableID.get(e),i=yield c.SessionID.get(e),e=s.SDKType.J(e);return JSON.stringify($P($P({},t),{statsigMetadata:$P($P({},h.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:e})}))})}Tt(t,e){var n,i,r=(0,a.It)();if(!t.isStatsigEncodable||this.v.disableStatsigEncoding||null!=(0,o.dn)("no-encode")||null==r||!r.btoa)return e;try{var s=null!=(n=r.btoa(e).split("").reverse().join(""))?n:e;return t.params=$P($P({},null!=(i=t.params)?i:{}),{[l.NetworkParam.StatsigEncoded]:"1"}),s}catch(t){return p.Log.warn("/initialize request encoding failed"),e}}hn(i,r){var s;return u(this,void 0,void 0,function*(){var t,e,n;return!i.isCompressable||this.v.disableCompression||null!=(0,o.dn)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder?r:(t=(new TextEncoder).encode(r),(n=(e=new CompressionStream("gzip")).writable.getWriter()).write(t).catch(p.Log.error),n.close().catch(p.Log.error),i.params=$P($P({},null!=(s=i.params)?s:{}),{[l.NetworkParam.IsGzipped]:"1"}),yield new Response(e.readable).arrayBuffer())})}};const y=t=>!!t.sdkKey||(p.Log.warn("Unable to make request without an SDK key"),!1)},264:(t,e)=>{$Q(e)},360:(t,e)=>{$Q(e),e.SDKType=void 0;const n={};let i;e.SDKType={J:t=>{return(null!=(t=n[t])?t:"js-mono")+(null!==i&&void 0!==i?i:"")},At(t,e){n[t]=e},Mt(t){i&&"-react"!==i||(i="-"+t)}}},48:(t,i)=>{$Q2(i,"__esModule",{value:!0}),i.yt=i.xt=i.Dt=i.Et=i.kt=i.It=void 0;i.It=()=>"undefined"!=typeof window?window:null,i.kt=()=>{var t=(0,i.It)();return null!=(t=null==t?void 0:t.document)?t:null},i.Et=()=>null!=(0,i.kt)(),i.Dt=(t,e)=>{var n=(0,i.It)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.xt=(t,e)=>{var n=(0,i.kt)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)};i.yt=()=>{var t;try{return null==(t=(0,i.It)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}}},612:function(t,e,n){var u=this&&this.__awaiter||$A();$Q(e),e.StatsigSession=e.SessionID=void 0;const i=n(707),o=n(780),l=n(444),a=n(556),c=18e5,d=144e5,h={};function v(e,t){return setTimeout(()=>{var t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e);t&&t.$emt({name:"session_expired"})},t)}function _(t){return"statsig.session_id."+(0,i.o)(t)}e.SessionID={get:t=>u(void 0,void 0,void 0,function*(){return e.StatsigSession.get(t).then(t=>t.data.sessionID)})},e.StatsigSession={get:s=>u(void 0,void 0,void 0,function*(){null==h[s]&&(h[s]=function(n){return u(this,void 0,void 0,function*(){let t=yield function(t){t=_(t);return(0,l.P)(t)}(n);var e=Date.now();return{data:t=t||{sessionID:(0,a.getUUID)(),startTime:e,lastUpdate:e},sdkKey:n}})}(s));var t=yield h[s],e=Date.now(),n=t.data,i=((function({lastUpdate:t}){return Date.now()-t>c}(n)||function({startTime:t}){return Date.now()-t>d}(n))&&(n.sessionID=(0,a.getUUID)(),n.startTime=e),n.lastUpdate=e,n),r=t.sdkKey;return r=_(r),(0,l.U)(r,i).catch(()=>{o.Log.warn("Failed to save SessionID")}),clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID),e-=n.startTime,n=t.sdkKey,t.idleTimeoutID=v(n,c),t.ageTimeoutID=v(n,d-e),t})}},604:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StableID=void 0;const r=n(707),s=n(780),u=n(444),o=n(556),l={};function a(t){return"statsig.stable_id."+(0,r.o)(t)}function c(t,e){e=a(e);(0,u.U)(e,t).catch(()=>{s.Log.warn("Failed to save StableID")})}e.StableID={get:e=>i(void 0,void 0,void 0,function*(){return null==l[e]&&(l[e]=function(t){t=a(t);return(0,u.P)(t)}(e).then(t=>{return null!=t||c(t=(0,o.getUUID)(),e),t})),l[e]}),setOverride:(t,e)=>{l[e]=Promise.resolve(t),c(t,e)}}},688:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,n(496);const u=n(496),o=n(512),l=n(728),a=n(780),c=n(48),d=n(444);e.StatsigClientBase=class{constructor(t,e,n,i){this.loadingStatus="Uninitialized",this.Gt={};var r,s=this.$emt.bind(this);null!=(null==i?void 0:i.logLevel)&&(a.Log.level=i.logLevel),null!=i&&i.disableStorage&&d.Storage.Nt(!0),this._=t,this.v=null!=i?i:{},this.Rt=null!=(r=null==i?void 0:i.overrideAdapter)?r:null,this.Pt=new l.EventLogger(t,s,n,i),this.Ct=new o.ErrorBoundary(t,i,s),this.Ct.wrap(this),this.Ct.wrap(n),this.Ct.wrap(e),this.Ct.wrap(this.Pt),(0,c.Et)()&&(null!=(n=null!=(s=(r=(0,u.i)()).instances)?s:{})[t]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),n[t]=this,r.lastInstance=this,r.instances=n,__STATSIG__=r),this.dataAdapter=e,this.dataAdapter.attach(t,i),this.Ft()}updateRuntimeOptions(t){null!=t.disableLogging&&(this.v.disableLogging=t.disableLogging,this.Pt.setLoggingDisabled(t.disableLogging)),null!=t.disableStorage&&(this.v.disableStorage=t.disableStorage,d.Storage.Nt(t.disableStorage))}flush(){return this.Pt.flush()}shutdown(){return i(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),yield this.Pt.shutdown()})}on(t,e){this.Gt[t]||(this.Gt[t]=[]),this.Gt[t].push(e)}off(t,e){this.Gt[t]&&-1!==(e=this.Gt[t].indexOf(e))&&this.Gt[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.Ct.logError("__emit:"+n.name,t):a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",n)}};this.Gt[n.name]&&this.Gt[n.name].forEach(t=>e(t)),null!=(t=this.Gt["*"])&&t.forEach(e)}Ut(t,e){this.loadingStatus=t,this.$emt({name:"values_updated",status:t,values:e})}Kt(t,e,n){!0===(null==n?void 0:n.disableExposureLog)?this.Pt.incrementNonExposureCount(t):this.Pt.enqueue(e)}}},808:(t,e)=>{$Q(e)},283:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},876:(t,e)=>{$Q(e),e.Lt=e.qt=e.Jt=e.ht=void 0;const n="statsig::config_exposure",i="statsig::gate_exposure",l=(t,e,n,i,r)=>({eventName:t,user:e,value:null,metadata:s(n,i),secondaryExposures:r,time:Date.now()});e.ht=({eventName:t})=>t===i||t===n,e.Jt=(t,e)=>{return l(i,t,e.details,{gate:e.name,gateValue:String(e.value),ruleID:e.ruleID},null!=(e=null==(t=e.__evaluation)?void 0:t.secondary_exposures)?e:[])},e.qt=(t,e)=>{return l(n,t,e.details,{config:e.name,ruleID:e.ruleID},null!=(e=null==(t=e.__evaluation)?void 0:t.secondary_exposures)?e:[])};e.Lt=(t,e,n)=>{var i,r=e.__evaluation,s=!0===(null==(s=null==r?void 0:r.explicit_parameters)?void 0:s.includes(n));let u="",o=null!=(i=null==r?void 0:r.undelegated_secondary_exposures)?i:[];return s&&(u=null!=(i=r.allocated_experiment_name)?i:"",o=r.secondary_exposures),l("statsig::layer_exposure",t,e.details,{config:e.name,parameterName:n,ruleID:e.ruleID,allocatedExperiment:u,isExplicitParameter:String(s)},o)};const s=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},972:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="1.0.0";let n={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>n,add:t=>{n=$P($P({},n),t)}}},384:(t,e)=>{$Q(e)},396:(t,e)=>{$Q(e),e.Vt=e.zt=e.Bt=e.$t=void 0;const r="default";function s(t,e,n,i){return{name:t,details:e,ruleID:null!=(t=null==n?void 0:n.rule_id)?t:r,__evaluation:n,value:i}}function u(s,u){return(t,e)=>{var n,i,r=null!=(r=null==s?void 0:s[t])?r:null;return null==r||null!=e&&(n=e,(i=t=>Array.isArray(t)?"array":typeof t)(r)!==i(n))?null!=e?e:null:(null!=u&&u(t),r)}}e.$t=function(t,e,n){return s(t,e,n,!0===(null==n?void 0:n.value))},e.Bt=function(t,e,n){return $P($P({},s(t,e,n,null!=(t=null==n?void 0:n.value)?t:{})),{groupName:null,get:u(null==n?void 0:n.value)})},e.zt=function(t,e,n,i){return $P($P({},s(t,e,n,void 0)),{get:u(null==n?void 0:n.value,i),groupName:null!=(t=null==n?void 0:n.group_name)?t:null,__value:null!=(e=null==n?void 0:n.value)?e:{}})},e.Vt=function(t,e,n,i){return $P($P($P({},t),e),{get:u(n,i)})}},136:(t,e)=>{$Q(e)},296:(t,e,n)=>{$Q(e),e.vn=e.T=void 0;const i=n(832),r=n(780);e.T=function(t,e){try{var n=JSON.parse(JSON.stringify(t));return null!=e&&(n.statsigEnvironment=e),n}catch(t){return r.Log.error("Failed to JSON.stringify user"),{}}},e.vn=function(t){return t?(0,i.li)(t):null}},444:function(t,n,e){var i=this&&this.__awaiter||$A(),r=($Q2(n,"__esModule",{value:!0}),n.U=n.P=n.Storage=void 0,e(780)),e=e(48);const s={},u=t=>Promise.resolve(t),o={Ht:()=>"InMemory",N:t=>s[t]||null,Wt:t=>u(s[t]||null),C:(t,e)=>(s[t]=e,u()),F:t=>(delete s[t],u()),Yt:()=>u(Object.keys(s))};let l=null;try{const h=(0,e.It)();h&&h.localStorage&&"function"==typeof h.localStorage.getItem&&(l={Ht:()=>"LocalStorage",N:t=>h.localStorage.getItem(t),Wt:t=>u(h.localStorage.getItem(t)),C:(t,e)=>(h.localStorage.setItem(t,e),u()),F:t=>(h.localStorage.removeItem(t),u()),Yt:()=>u(Object.keys(h.localStorage))})}catch(t){r.Log.warn("Failed to setup localStorageProvider.")}let a=null!==l&&void 0!==l?l:o,c=a;function d(t){try{return t()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return n.Storage.Qt(o),null;throw t}}n.Storage={Ht:()=>c.Ht(),Wt:t=>i(void 0,void 0,void 0,function*(){return d(()=>c.Wt(t))}),N:t=>d(()=>c.N?c.N(t):null),C:(t,e)=>c.C(t,e),F:t=>c.F(t),Yt:()=>c.Yt(),Qt:t=>{a=t,c=t},Nt:t=>{c=t?o:a}},n.P=function(e){return i(this,void 0,void 0,function*(){var t=yield n.Storage.Wt(e);return JSON.parse(null!=t?t:"null")})},n.U=function(t,e){return i(this,void 0,void 0,function*(){yield n.Storage.C(t,JSON.stringify(e))})}},412:(t,e,n)=>{$Q(e),e.ui=void 0;const r=n(780);e.ui=function(t,e,n){try{var i=JSON.parse(t);return"object"==typeof i&&0 in i,i}catch(t){}return r.Log.error("Failed to parse "+n),null}},556:(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)})}},84:(t,e)=>{$Q(e),e.it=void 0,e.it=function(t,e,n,i){return t||(e?""+e+n:""+i+n)}},539:(t,e)=>{$Q(e)},100:(t,e,n)=>{$Q(e),e.Xt=e.st=e.ti=e._t=void 0;n=n(48);const i="foreground",r="background",s=[];let u=i,o=!1;e._t=()=>u===i,e.ti=()=>o,e.st=t=>{s.unshift(t)};e.Xt=e=>{e!==u&&(u=e,s.forEach(t=>t(e)))},(0,n.Dt)("focus",()=>{(o=!1,e.Xt)(i)}),(0,n.Dt)("blur",()=>(0,e.Xt)(r)),(0,n.Dt)("beforeunload",()=>{o=!0,(0,e.Xt)(r)}),(0,n.xt)("visibilitychange",()=>{(0,e.Xt)("visible"===document.visibilityState?i:r)})},464: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),e.Log=e.Storage=e.EventLogger=void 0,n(496);const s=n(728),u=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return s.EventLogger}}),n(780));$Q2(e,"Log",{enumerable:!0,get:function(){return u.Log}});var o=n(972);const l=n(444);$Q2(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),r(n(496),e),r(n(707),e),r(n(856),e),r(n(320),e),r(n(184),e),r(n(512),e),r(n(500),e),r(n(788),e),r(n(832),e),r(n(664),e),r(n(780),e),r(n(188),e),r(n(716),e),r(n(264),e),r(n(48),e),r(n(360),e),r(n(612),e),r(n(604),e),r(n(688),e),r(n(808),e),r(n(283),e),r(n(876),e),r(n(972),e),r(n(384),e),r(n(396),e),r(n(136),e),r(n(296),e),r(n(444),e),r(n(412),e),r(n(84),e),r(n(539),e),r(n(556),e),r(n(100),e),__STATSIG__=$P($P({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{Log:u.Log,SDK_VERSION:o.SDK_VERSION})},448: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(376),e),e.default=__STATSIG__},532:(t,e)=>{function o(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,u=r<i.length?i[r]:0;if(s<u)return-1;if(u<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 u="any_case_sensitive"!==s&&"none_case_sensitive"!==s;var e=-1!==t.findIndex(t=>{var e=String(r),t=String(t),n=u?e.toLowerCase():e,i=u?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(),u=e.getTime();if(isNaN(s)||isNaN(u))return!1;switch(r){case"before":return s<u;case"after":return u<s;case"on":return o(t)===o(e);default:return!1}}catch(t){return!1}}}},947:(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}},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}},e.resultToLayerEval=function(t,e,n){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!=(t=n.allocated_experiment_name)?t:"",explicit_parameters:null!=(t=n.explicit_parameters)?t:[],group:null!=(t=n.group_name)?t:"",group_name:null!=(t=n.group_name)?t:void 0,is_device_based:!1,is_experiment_active:null==e?void 0:e.isActive,is_user_in_experiment:n.is_experiment_group}}},931:(t,e,n)=>{$Q(e);const i=n(452),c=n(532),d=n(947);function h(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 v(t){return(0,i.SHA256)(t).dataView().getBigUint64(0,!1)}function o(t){return null!=t&&"object"==typeof t}e.default=class{constructor(t){this.le=t}evaluateGate(t,e){var{spec:t,details:n}=this.Ye("gate",t);return t?{evaluation:(0,d.resultToGateEval)(t,this.Qe(t,e)),details:n}:{evaluation:null,details:n}}evaluateConfig(t,e){var{spec:t,details:n}=this.Ye("config",t);return t?{evaluation:(0,d.resultToConfigEval)(t,this.Qe(t,e)),details:n}:{evaluation:null,details:n}}evaluateLayer(t,e){var n,{spec:t,details:i}=this.Ye("layer",t);return t?(n=null!=(n=null==(e=this.Qe(t,e))?void 0:e.allocated_experiment_name)?n:"",n=this.le.getSpecAndSourceInfo("config",n).spec,{evaluation:(0,d.resultToLayerEval)(t,n,e),details:i}):{evaluation:null,details:i}}Ye(t,e){t=this.le.getSpecAndSourceInfo(t,e);return{details:this.Xe(t),spec:t.spec}}Xe(t){var{source:t,spec:e,lcut:n,receivedAt:i}=t;return"Uninitialized"===t||"NoValues"===t?{reason:t}:{reason:t+":"+(null==e?"Unrecognized":"Recognized"),lcut:n,receivedAt:i}}Qe(t,e){var n=o(t.defaultValue)?t.defaultValue:void 0;if(!t.enabled)return(0,d.makeEvalResult)({json_value:n,rule_id:"disabled"});var i=[];for(const u of t.rules){var r,s=this.Ze(u,e);if(s.unsupported)return s;if(i.push(...s.secondary_exposures),s.bool_value)return this.tn(u.configDelegate,e,i)||(r=function(t,e,n){if(100===t.passPercentage)return!0;if(0===t.passPercentage)return!1;e=v(n.salt+"."+(null!=(n=t.salt)?n:t.id)+"."+(null!=(n=h(e,t.idType))?n:""));return Number(e%BigInt(1e4))<100*t.passPercentage}(u,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"})}Ze(t,e){var n=[];let i=!0;for(const s of t.conditions){var r=this.en(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:o(t.returnValue)?t.returnValue:void 0,secondary_exposures:n,is_experiment_group:!0===t.isExperimentGroup,group_name:t.groupName})}en(t,e){let n=null,i=!1;var r=t.field,s=t.targetValue,u=t.idType,o=t.type;switch(o){case"public":return(0,d.makeEvalResult)({bool_value:!0});case"pass_gate":case"fail_gate":var l=String(s),l=this.nn(l,e);return(0,d.makeEvalResult)({bool_value:"fail_gate"===o?!l.bool_value:l.bool_value,secondary_exposures:l.secondary_exposures});case"multi_pass_gate":case"multi_fail_gate":return this.rn(s,o,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":l=v(null!==(l=String(null!=(l=null==(l=t.additionalValues)?void 0:l.salt)?l:"")+"."+h(e,u))?l:"");n=Number(l%BigInt(1e3));break;case"unit_id":n=h(e,u);break;default:return(0,d.makeEvalResult)({unsupported:!0})}var a=t.operator;switch(a){case"gt":case"gte":case"lt":case"lte":i=c.default.compareNumbers(n,s,a);break;case"version_gt":case"version_gte":case"version_lt":case"version_lte":case"version_eq":case"version_neq":i=c.default.compareVersions(n,s,a);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=c.default.compareStringInArray(n,s,a);break;case"str_matches":i=c.default.compareStringWithRegEx(n,s);break;case"before":case"after":case"on":i=c.default.compareTime(n,s,a);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})}return(0,d.makeEvalResult)({bool_value:i})}tn(t,e,n){var i;return t&&(i=this.le.getSpecAndSourceInfo("config",t).spec,i)?(e=this.Qe(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}nn(t,e){var n=[];let i=!1;var r=this.le.getSpecAndSourceInfo("gate",t)["spec"];if(r){r=this.Qe(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})}rn(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 o of t){if("string"!=typeof o)return(0,d.makeEvalResult)({unsupported:!0});var u=this.nn(o,n);if(u.unsupported)return u;if(r.push(...u.secondary_exposures),i?!0===u.bool_value:!1===u.bool_value){s=!0;break}}return(0,d.makeEvalResult)({bool_value:s,secondary_exposures:r})}}},160:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e);const i=n(464);class s extends i.NetworkCore{constructor(t=null){super(t);t=null==t?void 0:t.networkConfig;this.sn=(0,i.it)(null==t?void 0:t.downloadConfigSpecsUrl,null==t?void 0:t.api,"/download_config_specs",i.NetworkDefault.specsApi)}fetchConfigSpecs(e,n){var i;return r(this,void 0,void 0,function*(){var t=yield this.get({sdkKey:e,url:this.sn,priority:n});return null!=(i=null==t?void 0:t.body)?i:null})}}e.default=s},480:(t,e,n)=>{$Q(e);const i=n(464);function r(t){return(0,i.ui)(t,"has_updates","DownloadConfigSpecsResponse")}e.default=class{constructor(){this.Zt=null,this.te=null,this.ee="Uninitialized",this.ie=0,this.ne=0}getValues(){return this.Zt?r(this.Zt):null}setValuesFromDataAdapter(t){var e;t&&!0===(null==(e=r(t.data))?void 0:e.has_updates)&&(this.ie=e.time,this.ne=t.receivedAt,this.ee=t.source,this.te=e,this.Zt=t.data)}reset(){this.te=null,this.Zt=null,this.ee="Loading"}finalize(){this.te||(this.ee="NoValues")}getSpecAndSourceInfo(t,e){var t=this.un(t);return{spec:null!=(t=null==t?void 0:t.find(t=>t.name===e))?t:null,source:this.ee,lcut:this.ie,receivedAt:this.ne}}un(t){var e;switch(t){case"gate":return null==(e=this.te)?void 0:e.feature_gates;case"config":return null==(e=this.te)?void 0:e.dynamic_configs;case"layer":return null==(e=this.te)?void 0:e.layer_configs}}}},368:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const u=n(464),r=n(931),s=n(160),o=n(480),l=n(4);class a extends u.StatsigClientBase{static instance(t){var e=(0,u.i)().instance(t);return e instanceof a?e:(u.Log.warn((0,u.Et)()?"Unable to find StatsigOnDeviceEvalClient instance":"StatsigOnDeviceEvalClient.instance is not supported in server environments"),new a(null!=t?t:""))}constructor(t,e=null){u.SDKType.At(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.le=new o.default,this.ln=new r.default(this.le)}initializeSync(){this.updateSync()}initializeAsync(t){return i(this,void 0,void 0,function*(){return this.updateAsync(t)})}updateSync(){this.le.reset();var t=this.dataAdapter.getDataSync();this.le.setValuesFromDataAdapter(t),this.le.finalize(),this.Ut("Ready",t),this.he(t)}updateAsync(e){return i(this,void 0,void 0,function*(){this.le.reset(),this.Ut("Loading",null);var t=this.dataAdapter.getDataSync();this.le.setValuesFromDataAdapter(t),t=yield this.dataAdapter.getDataAsync(t,e),this.le.setValuesFromDataAdapter(t),this.le.finalize(),this.Ut("Ready",t)})}getContext(){return{sdkKey:this._,options:this.v,values:this.le.getValues(),errorBoundary:this.Ct}}getAsyncContext(){return i(this,void 0,void 0,function*(){return $P($P({},this.getContext()),{session:yield u.StatsigSession.get(this._),stableID:yield u.StableID.get(this._)})})}checkGate(t,e,n){return this.getFeatureGate(t,e,n).value}getFeatureGate(t,e,n){e=(0,u.T)(e,this.v.environment);var{evaluation:i,details:r}=this.ln.evaluateGate(t,e),r=(0,u.$t)(t,r,i);return this.Kt(t,(0,u.Jt)(e,r),n),this.$emt({name:"gate_evaluation",gate:r}),r}getDynamicConfig(t,e,n){t=this.ve("dynamic_config",t,e,n);return this.$emt({name:"dynamic_config_evaluation",dynamicConfig:t}),t}getExperiment(t,e,n){t=this.ve("experiment",t,e,n);return this.$emt({name:"experiment_evaluation",experiment:t}),t}getLayer(e,n,i){n=(0,u.T)(n,this.v.environment);var{evaluation:t,details:r}=this.ln.evaluateLayer(e,n);const s=(0,u.zt)(e,r,t,t=>{this.Kt(e,(0,u.Lt)(n,s,t),i)});return this.$emt({name:"layer_evaluation",layer:s}),s}logEvent(t,e,n,i){this.Pt.enqueue($P($P({},"string"==typeof t?{eventName:t,value:n,metadata:i}:t),{user:e,time:Date.now()}))}Ft(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.de(null)})}de(t){this.le.finalize(),this.Ut("Ready",t)}he(t){this.dataAdapter.getDataAsync(t,{priority:"low"}).catch(t=>{u.Log.error("An error occurred after update.",t)})}ve(t,e,n,i){n=(0,u.T)(n,this.v.environment);var{evaluation:r,details:s}=this.ln.evaluateConfig(e,n),s=(0,u.Bt)(e,s,r),r="experiment"===t?null==(t=null==(r=this.Rt)?void 0:r.getExperimentOverride)?void 0:t.call(r,s,n,i):null==(r=null==(t=this.Rt)?void 0:t.getDynamicConfigOverride)?void 0:r.call(t,s,n,i),t=null!=r?r:s;return this.Kt(e,(0,u.qt)(n,t),i),t}}e.default=a},4:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.StatsigSpecsDataAdapter=void 0;const i=n(464),s=n(160);class u extends i.DataAdapterCore{constructor(){super("SpecsDataAdapter","specs"),this.V=null}attach(t,e){super.attach(t,e),this.V=new s.default(null!=e?e:{})}getDataAsync(t,e){return this.I(t,void 0,e)}prefetchData(t){return this.M(void 0,t)}D(t,e,n){var i;return r(this,void 0,void 0,function*(){return null!=(i=yield null==(i=this.V)?void 0:i.fetchConfigSpecs(this.G(),null==n?void 0:n.priority))?i:null})}m(){var t=(0,i.o)(this.G());return`${i.DataAdapterCachePrefix}.${this.h}.`+t}fn(t,e){return 0<t.data.length}}e.StatsigSpecsDataAdapter=u},376:(t,e,n)=>{$Q(e),e.StatsigSpecsDataAdapter=e.StatsigOnDeviceEvalClient=void 0;var i=n(368);e.StatsigOnDeviceEvalClient=i.default;const r=n(4);$Q2(e,"StatsigSpecsDataAdapter",{enumerable:!0,get:function(){return r.StatsigSpecsDataAdapter}}),__STATSIG__=$P($P({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{StatsigSpecsDataAdapter:r.StatsigSpecsDataAdapter,StatsigOnDeviceEvalClient:i.default}),e.default=__STATSIG__},452:(t,e,n)=>{$Q(e),e.SHA256=void 0;const i=n(891);$Q2(e,"SHA256",{enumerable:!0,get:function(){return i.SHA256}})},891:(t,e)=>{$Q(e),e.SHA256=void 0,e.SHA256=function(t){return(new i).update(t)};const n=[-2147483648,8388608,32768,128],u=[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<<u[3&e++]:(i<2048?s[e>>2]|=(192|i>>6)<<u[3&e++]:(i<55296||57344<=i?s[e>>2]|=(224|i>>12)<<u[3&e++]:(i=65536+((1023&i)<<10|1023&n.charCodeAt(++t)),s[e>>2]|=(240|i>>18)<<u[3&e++],s[e>>2]|=(128|i>>12&63)<<u[3&e++]),s[e>>2]|=(128|i>>6&63)<<u[3&e++]),s[e>>2]|=(128|63&i)<<u[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,u=this.h5,o=this.h6,l=this.h7,a,c,d,h,v,_,f,p,g,y,b;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],d=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,t[a]=t[a-16]+c+t[a-7]+d<<0;for(b=n&i,a=0;a<64;a+=4)this.first?(p=704751109,v=t[0]-210244248,l=v-1521486534<<0,r=v+143694565<<0,this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),p=e&n,h=p^e&i^b,f=s&u^~s&o,v=l+d+f+m[a]+t[a],_=c+h,l=r+v<<0,r=v+_<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),g=r&e,h=g^r&n^p,f=l&s^~l&u,v=o+d+f+m[a+1]+t[a+1],_=c+h,o=i+v<<0,i=v+_<<0,c=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=i&r,h=y^i&e^g,f=o&l^~o&s,v=u+d+f+m[a+2]+t[a+2],_=c+h,u=n+v<<0,n=v+_<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),b=n&i,h=b^n&r^y,f=u&o^~u&l,v=s+d+f+m[a+3]+t[a+3],_=c+h,s=e+v<<0,e=v+_<<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+u<<0,this.h6=this.h6+o<<0,this.h7=this.h7+l<<0}arrayBuffer(){return this.an().buffer}dataView(){return this.an().dataView}an(){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(448).default})());
1
+ !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 $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())})});var n={496:(t,n,e)=>{$Q2(n,"__esModule",{value:!0}),n.t=n.dn=n.i=void 0,n.i=()=>__STATSIG__||o,n.dn=t=>(0,n.i)()[t];n.t=t=>{var e=(0,n.i)();return t?e.instances&&e.instances[t]:e.lastInstance};var i,r="__STATSIG__",s="undefined"!=typeof window?window:{},e=void 0!==e.g?e.g:{},u="undefined"!=typeof globalThis?globalThis:{};const o=null!=(i=null!=(i=null!=(i=s[r])?i:e[r])?i:u[r])?i:{instance:n.t};s[r]=o,e[r]=o,u[r]=o},707:(t,e,n)=>{$Q(e),e.o=e.u=void 0;const r=n(832);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.oi)(e.join("|"))}e.u=i,e.o=function(t,e,n){return e?i(t,e,n):(0,r.oi)("k:"+t)}},856:(t,e)=>{$Q(e)},320:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.DataAdapterCore=void 0;const l=n(780),a=n(604),s=n(296),u=n(444),c=n(412);function d(t,e,n,i){return{source:t,data:e,receivedAt:Date.now(),stableID:n,fullUserHash:(0,s.vn)(i)}}e.DataAdapterCore=class{constructor(t,e){this.l=t,this.h=e,this.v=null,this._=null,this.p="statsig.last_modified_time."+e,this.S=new i}attach(t,e){this._=t,this.v=e}getDataSync(t){var e=this.m(t),n=this.S.get(e,t);return n||((n=this.O(e))?(this.S.add(e,n),this.S.get(e,t)):null)}setData(t,e){var e=e&&(0,s.T)(e,null==(e=this.v)?void 0:e.environment),n=this.m(e);this.S.add(n,d("Bootstrap",t,null,e))}__primeInMemoryCache(t){this.S.merge(t)}I(e,n,i){return r(this,void 0,void 0,function*(){var t=null!=e?e:this.getDataSync(n),t=[this.A(t,n,i)];return null!=i&&i.timeoutMs&&t.push(new Promise(t=>setTimeout(t,i.timeoutMs)).then(()=>(l.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(t)})}M(n,i){return r(this,void 0,void 0,function*(){var t=this.m(n),e=yield this.I(null,n,i);e&&this.S.add(t,$P($P({},e),{source:"Prefetch"}))})}A(s,u,o){return r(this,void 0,void 0,function*(){let t=null;s&&this.fn(s,u)&&(t=s.data);var e=yield this.D(t,u,o);if(!e)return l.Log.debug("No response returned for latest value"),null;var n=(0,c.ui)(e,"has_updates","Response"),i=this.G(),i=yield a.StableID.get(i);let r=null;if(!0===(null==n?void 0:n.has_updates))r=d("Network",e,i,u);else{if(!t||!1!==(null==n?void 0:n.has_updates))return null;r=d("NetworkNotModified",t,i,u)}e=this.m(u);return this.S.add(e,r),yield this.k(e,r),r})}G(){return null!=this._?this._:(l.Log.error(this.l+" is not attached to a Client"),"")}O(t){var e=null==(e=u.Storage.N)?void 0:e.call(u.Storage,t);return null!=e&&(t=(0,c.ui)(e,"source","Cached Result"))?$P($P({},t),{source:"Cache"}):null}k(t,e){return r(this,void 0,void 0,function*(){yield u.Storage.C(t,JSON.stringify(e)),yield this.R(t)})}R(n){var i;return r(this,void 0,void 0,function*(){var t=null!=(i=yield(0,u.P)(this.p))?i:{},e=(t[n]=Date.now(),o(t,10));e&&(delete t[e],yield u.Storage.F(e)),yield(0,u.U)(this.p,t)})}};class i{constructor(){this.ii={}}get(t,e){var t=this.ii[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?(l.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):t}add(t,e){var n=o(this.ii,9);n&&delete this.ii[n],this.ii[t]=e}merge(t){this.ii=$P($P({},this.ii),t)}}function o(r,t){var e=Object.keys(r);return e.length<=t?null:e.reduce((t,e)=>{var n=r[t],i=r[e];return"object"==typeof n&&"object"==typeof i?i.receivedAt<n.receivedAt?e:t:i<n?e:t})}},280:(t,e)=>{$Q(e),e.Diagnostics=void 0;e.Diagnostics=class{static mark(){}}},184:(t,e)=>{$Q(e)},512:function(t,o,e){var n=this&&this.__awaiter||$A();$Q2(o,"__esModule",{value:!0}),o.ErrorBoundary=o.EXCEPTION_ENDPOINT=void 0;const i=e(780),l=e(360),a=e(972),c=(o.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception","[Statsig] UnknownError");o.ErrorBoundary=class{constructor(t,e,n){this._=t,this.v=e,this.K=n,this.L=new Set}wrap(i){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.ci(e,()=>n.apply(i,t)),t[e].$EB=!0)})}catch(t){this.q("eb:wrap",t)}}logError(t,e){this.q(t,e)}ci(e,t){try{var n=t();return n&&n instanceof Promise?n.catch(t=>this.q(e,t)):n}catch(t){return this.q(e,t),null}}q(s,u){try{i.Log.warn("Caught error in "+s,{error:u});n(this,void 0,void 0,function*(){var t,e,n=u||Error(c),i=n instanceof Error,r=i?n.name:"No Name";this.L.has(r)||(this.L.add(r),null!=(t=null==(t=this.v)?void 0:t.networkConfig)&&t.preventAllNetworkTraffic?null!=(t=this.K)&&t.call(this,{name:"error",error:u}):(t=l.SDKType.J(this._),e=a.StatsigMetadataProvider.get(),i=i?n.stack:function(t){try{return JSON.stringify(t)}catch(t){return c}}(n),n=JSON.stringify($P({tag:s,exception:r,info:i},$P($P({},e),{sdkType:t}))),yield(null!=(r=null==(i=null==(r=this.v)?void 0:r.networkConfig)?void 0:i.networkOverrideFunc)?r:fetch)(o.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._,"STATSIG-SDK-TYPE":String(t),"STATSIG-SDK-VERSION":String(e.sdkVersion),"Content-Type":"application/json"},body:n}),null!=(i=this.K)&&i.call(this,{name:"error",error:u})))}).then(()=>{}).catch(()=>{})}catch(t){}}}},500:(t,e)=>{$Q(e)},788:(t,e)=>{$Q(e)},728:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.EventLogger=void 0;const r=n(832),s=n(780),u=n(716),o=n(48),l=n(876),a=n(444),c=n(84),d=n(100),h={},v=t=>{null!=(t=h[t])&&t.flush().catch(()=>{})};e.EventLogger=class{constructor(e,t,n,i){this._=e,this.K=t,this.V=n,this.v=i,this.B=[],this.$={},this.H={},this.W=!1,this.Y=Date.now(),(h[e]=this).X=!0===(null==i?void 0:i.disableLogging),this.Z=null!=(t=null==i?void 0:i.loggingBufferMaxSize)?t:50;n=null==i?void 0:i.networkConfig;this.et=(0,c.it)(null==n?void 0:n.logEventUrl,null==n?void 0:n.api,"/rgstr",u.NetworkDefault.eventsApi),(0,d.st)(t=>{"background"===t&&v(e)}),this.rt(),this.ni()}setLoggingDisabled(t){this.X=t}enqueue(t){this.ot(t)&&(this.ut(t),this.lt(),this.B.length>this.Z)&&v(this._)}incrementNonExposureCount(t){var e=null!=(e=this.H[t])?e:0;this.H[t]=e+1}reset(){this.$={}}shutdown(){return i(this,void 0,void 0,function*(){this.tt&&(clearInterval(this.tt),this.tt=null),yield this.flush()})}flush(){return i(this,void 0,void 0,function*(){var t;if(this.ct(),0!==this.B.length)return t=this.B,this.B=[],this.dt(t)})}lt(){this.W||(this.W=!0,200<Date.now()-this.Y)||setTimeout(()=>v(this._),200)}ot(t){if((0,l.ht)(t)){var e=t.user||{},n=t.metadata||{},t=[t.eventName,e.userID,n.gate,n.config,n.ruleID].join("|"),e=this.$[t],n=Date.now();if(e&&n-e<6e4)return!1;1e3<Object.keys(this.$).length&&(this.$={}),this.$[t]=n}return!0}dt(t){var e,n;return i(this,void 0,void 0,function*(){if(this.X)this.vt(t);else try{(!(0,d._t)()&&this.V.isBeaconSupported()&&null==(null==(n=null==(e=this.v)?void 0:e.networkConfig)?void 0:n.networkOverrideFunc)?yield this.ft(t):yield this.gt(t)).success?this.K({name:"logs_flushed",events:t}):this.vt(t)}catch(t){s.Log.warn("Failed to flush events.")}})}gt(e){var n;return i(this,void 0,void 0,function*(){var t=yield this.V.post(this.si(e)),t=null!=(n=null==t?void 0:t.code)?n:-1;return{success:200<=t&&t<300}})}ft(t){return i(this,void 0,void 0,function*(){return{success:yield this.V.beacon(this.si(t))}})}si(t){return{sdkKey:this._,data:{events:t},url:this.et,retries:3,isCompressable:!0,params:{[u.NetworkParam.EventCount]:String(t.length)}}}vt(t){for(;500<t.length;)t.shift();var e=this.o();(0,a.U)(e,t).catch(()=>{s.Log.warn("Unable to save failed logs to storage")})}rt(){const e=this.o();i(this,void 0,void 0,function*(){var t=yield(0,a.P)(e);t&&(yield a.Storage.F(e),yield this.dt(t))}).catch(()=>{s.Log.warn("Failed to flush stored logs")})}o(){return"statsig.failed_logs."+(0,r.oi)(this._)}ut(t){t.user&&(t.user=$P({},t.user),delete t.user.privateAttributes);var e={},n=this.bt(),n=(n&&(e.statsigMetadata={currentPage:n}),$P($P({},t),e));s.Log.debug("Enqueued Event:",n),this.B.push(n)}ct(){0!==Object.keys(this.H).length&&(this.ut({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:$P({},this.H)}}),this.H={})}bt(){var t;if(!1!==(null==(t=this.v)?void 0:t.includeCurrentPageUrlWithEvents))return(0,o.yt)()}ni(){if((0,o.Et)()){var t=null!=(t=null==(t=this.v)?void 0:t.loggingIntervalMs)?t:1e4;const e=setInterval(()=>{h[this._].tt!==e?clearInterval(e):v(this._)},t);this.tt=e}}}},832:(t,e)=>{$Q(e),e.li=e.oi=void 0;e.oi=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)};e.li=t=>(0,e.oi)(JSON.stringify(r(t)));const r=n=>{if(null==n)return null;var t=Object.keys(n).sort();const i={};return t.forEach(t=>{let e=n[t];!Array.isArray(e)&&e instanceof Object&&(e=r(e)),i[t]=e}),i}},664:(t,e)=>{$Q(e)},780:(t,e)=>{function n(t){return t.unshift("[Statsig]"),t}var i,r;$Q(e),e.Log=e.LogLevel=void 0,(r=i||(e.LogLevel=i={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Info=3]="Info",r[r.Debug=4]="Debug";class s{static info(...t){this.level>=i.Info&&console.info(...n(t))}static debug(...t){this.level>=i.Debug&&console.debug(...n(t))}static warn(...t){this.level>=i.Warn&&console.warn(...n(t))}static error(...t){this.level>=i.Error&&console.error(...n(t))}}(e.Log=s).level=i.Error},716:(t,e)=>{$Q(e),e.NetworkParam=e.NetworkDefault=void 0,e.NetworkDefault={eventsApi:"https://prodregistryv2.org/v1",initializeApi:"https://featureassets.org/v1",specsApi:"https://assetsconfigcdn.org/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},188:function(t,e,n){var u=this&&this.__awaiter||$A();$Q(e),e.NetworkCore=void 0,n(496);const o=n(496),f=n(280),p=n(780),l=n(716),s=n(360),a=n(48),c=n(612),d=n(604),h=n(972),g=n(100);e.NetworkCore=class{constructor(t,e){this.K=e,this.St=1e4,this.ri={},this.v={},t&&(this.v=t),this.v.networkConfig&&(this.ri=this.v.networkConfig),this.ri.networkTimeoutMs&&(this.St=this.ri.networkTimeoutMs)}post(e){return u(this,void 0,void 0,function*(){let t=yield this.Ot(e);return e.isStatsigEncodable?t=this.Tt(e,t):e.isCompressable&&(t=yield this.hn(e,t)),this.jt($P({method:"POST",body:t},e))})}get(t){return this.jt($P({method:"GET"},t))}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}beacon(i){return u(this,void 0,void 0,function*(){var t,e,n;return!!y(i)&&(t=yield this.Ot(i),t=yield this.hn(i,t),e=yield this.wt(i),(n=navigator).sendBeacon.bind(n)(e,t))})}jt(h){var v,_;return u(this,void 0,void 0,function*(){if(!y(h))return null;if(this.ri.preventAllNetworkTraffic)return null;var{method:e,body:n,retries:i}=h;const r="undefined"!=typeof AbortController?new AbortController:null;var t=setTimeout(()=>null===r||void 0===r?void 0:r.abort(`Timeout of ${this.St}ms expired.`),this.St),s=yield this.wt(h),u=null,o=(0,g.ti)();try{var l,a,c,d={method:e,body:n,headers:$P({},h.headers),signal:null===r||void 0===r?void 0:r.signal,priority:h.priority,keepalive:o},u=yield(null!=(v=this.ri.networkOverrideFunc)?v:fetch)(s,d);if(clearTimeout(t),u.ok)return c=yield u.text(),f.Diagnostics.mark(),{body:c,code:u.status};throw l=yield u.text().catch(()=>"No Text"),(a=new Error(`NetworkError: ${s} `+l)).name="NetworkError",a}catch(t){n=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"}(r,t);return f.Diagnostics.mark(),!i||i<=0?(null!=(_=this.K)&&_.call(this,{name:"error",error:t}),p.Log.error(`A networking error occured during ${e} request to ${s}.`,n,t),null):this.jt($P($P({},h),{retries:i-1}))}})}wt(n){return u(this,void 0,void 0,function*(){const e=$P({[l.NetworkParam.SdkKey]:n.sdkKey,[l.NetworkParam.SdkType]:s.SDKType.J(n.sdkKey),[l.NetworkParam.SdkVersion]:h.SDK_VERSION,[l.NetworkParam.Time]:String(Date.now()),[l.NetworkParam.SessionID]:yield c.SessionID.get(n.sdkKey)},n.params);var t=Object.keys(e).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t])).join("&");return n.url+(t?"?"+t:"")})}Ot(r){return u(this,void 0,void 0,function*(){var{data:t,sdkKey:e}=r,n=yield d.StableID.get(e),i=yield c.SessionID.get(e),e=s.SDKType.J(e);return JSON.stringify($P($P({},t),{statsigMetadata:$P($P({},h.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:e})}))})}Tt(t,e){var n,i,r=(0,a.It)();if(!t.isStatsigEncodable||this.v.disableStatsigEncoding||null!=(0,o.dn)("no-encode")||null==r||!r.btoa)return e;try{var s=null!=(n=r.btoa(e).split("").reverse().join(""))?n:e;return t.params=$P($P({},null!=(i=t.params)?i:{}),{[l.NetworkParam.StatsigEncoded]:"1"}),s}catch(t){return p.Log.warn("/initialize request encoding failed"),e}}hn(i,r){var s;return u(this,void 0,void 0,function*(){var t,e,n;return!i.isCompressable||this.v.disableCompression||null!=(0,o.dn)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder?r:(t=(new TextEncoder).encode(r),(n=(e=new CompressionStream("gzip")).writable.getWriter()).write(t).catch(p.Log.error),n.close().catch(p.Log.error),i.params=$P($P({},null!=(s=i.params)?s:{}),{[l.NetworkParam.IsGzipped]:"1"}),yield new Response(e.readable).arrayBuffer())})}};const y=t=>!!t.sdkKey||(p.Log.warn("Unable to make request without an SDK key"),!1)},264:(t,e)=>{$Q(e)},360:(t,e)=>{$Q(e),e.SDKType=void 0;const n={};let i;e.SDKType={J:t=>{return(null!=(t=n[t])?t:"js-mono")+(null!==i&&void 0!==i?i:"")},At(t,e){n[t]=e},Mt(t){i&&"-react"!==i||(i="-"+t)}}},48:(t,i)=>{$Q2(i,"__esModule",{value:!0}),i.yt=i.xt=i.Dt=i.Et=i.kt=i.It=void 0;i.It=()=>"undefined"!=typeof window?window:null,i.kt=()=>{var t=(0,i.It)();return null!=(t=null==t?void 0:t.document)?t:null},i.Et=()=>null!=(0,i.kt)(),i.Dt=(t,e)=>{var n=(0,i.It)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)},i.xt=(t,e)=>{var n=(0,i.kt)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(t,e)};i.yt=()=>{var t;try{return null==(t=(0,i.It)())?void 0:t.location.href.split(/[?#]/)[0]}catch(t){}}},612:function(t,e,n){var u=this&&this.__awaiter||$A();$Q(e),e.StatsigSession=e.SessionID=void 0;const i=n(707),o=n(780),l=n(444),a=n(556),c=18e5,d=144e5,h={};function v(e,t){return setTimeout(()=>{var t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e);t&&t.$emt({name:"session_expired"})},t)}function _(t){return"statsig.session_id."+(0,i.o)(t)}e.SessionID={get:t=>u(void 0,void 0,void 0,function*(){return e.StatsigSession.get(t).then(t=>t.data.sessionID)})},e.StatsigSession={get:s=>u(void 0,void 0,void 0,function*(){null==h[s]&&(h[s]=function(n){return u(this,void 0,void 0,function*(){let t=yield function(t){t=_(t);return(0,l.P)(t)}(n);var e=Date.now();return{data:t=t||{sessionID:(0,a.getUUID)(),startTime:e,lastUpdate:e},sdkKey:n}})}(s));var t=yield h[s],e=Date.now(),n=t.data,i=((function({lastUpdate:t}){return Date.now()-t>c}(n)||function({startTime:t}){return Date.now()-t>d}(n))&&(n.sessionID=(0,a.getUUID)(),n.startTime=e),n.lastUpdate=e,n),r=t.sdkKey;return r=_(r),(0,l.U)(r,i).catch(()=>{o.Log.warn("Failed to save SessionID")}),clearTimeout(t.idleTimeoutID),clearTimeout(t.ageTimeoutID),e-=n.startTime,n=t.sdkKey,t.idleTimeoutID=v(n,c),t.ageTimeoutID=v(n,d-e),t})}},604:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StableID=void 0;const r=n(707),s=n(780),u=n(444),o=n(556),l={};function a(t){return"statsig.stable_id."+(0,r.o)(t)}function c(t,e){e=a(e);(0,u.U)(e,t).catch(()=>{s.Log.warn("Failed to save StableID")})}e.StableID={get:e=>i(void 0,void 0,void 0,function*(){return null==l[e]&&(l[e]=function(t){t=a(t);return(0,u.P)(t)}(e).then(t=>{return null!=t||c(t=(0,o.getUUID)(),e),t})),l[e]}),setOverride:(t,e)=>{l[e]=Promise.resolve(t),c(t,e)}}},688:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e),e.StatsigClientBase=void 0,n(496);const u=n(496),o=n(512),l=n(728),a=n(780),c=n(48),d=n(444);e.StatsigClientBase=class{constructor(t,e,n,i){this.loadingStatus="Uninitialized",this.Gt={};var r,s=this.$emt.bind(this);null!=(null==i?void 0:i.logLevel)&&(a.Log.level=i.logLevel),null!=i&&i.disableStorage&&d.Storage.Nt(!0),this._=t,this.v=null!=i?i:{},this.Rt=null!=(r=null==i?void 0:i.overrideAdapter)?r:null,this.Pt=new l.EventLogger(t,s,n,i),this.Ct=new o.ErrorBoundary(t,i,s),this.Ct.wrap(this),this.Ct.wrap(n),this.Ct.wrap(e),this.Ct.wrap(this.Pt),(0,c.Et)()&&(null!=(n=null!=(s=(r=(0,u.i)()).instances)?s:{})[t]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),n[t]=this,r.lastInstance=this,r.instances=n,__STATSIG__=r),this.dataAdapter=e,this.dataAdapter.attach(t,i),this.Ft()}updateRuntimeOptions(t){null!=t.disableLogging&&(this.v.disableLogging=t.disableLogging,this.Pt.setLoggingDisabled(t.disableLogging)),null!=t.disableStorage&&(this.v.disableStorage=t.disableStorage,d.Storage.Nt(t.disableStorage))}flush(){return this.Pt.flush()}shutdown(){return i(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),yield this.Pt.shutdown()})}on(t,e){this.Gt[t]||(this.Gt[t]=[]),this.Gt[t].push(e)}off(t,e){this.Gt[t]&&-1!==(e=this.Gt[t].indexOf(e))&&this.Gt[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.Ct.logError("__emit:"+n.name,t):a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",n)}};this.Gt[n.name]&&this.Gt[n.name].forEach(t=>e(t)),null!=(t=this.Gt["*"])&&t.forEach(e)}Ut(t,e){this.loadingStatus=t,this.$emt({name:"values_updated",status:t,values:e})}Kt(t,e,n){!0===(null==n?void 0:n.disableExposureLog)?this.Pt.incrementNonExposureCount(t):this.Pt.enqueue(e)}}},808:(t,e)=>{$Q(e)},283:(t,e)=>{$Q(e),e.DataAdapterCachePrefix=void 0,e.DataAdapterCachePrefix="statsig.cached"},876:(t,e)=>{$Q(e),e.Lt=e.qt=e.Jt=e.ht=void 0;const n="statsig::config_exposure",i="statsig::gate_exposure",l=(t,e,n,i,r)=>({eventName:t,user:e,value:null,metadata:s(n,i),secondaryExposures:r,time:Date.now()});e.ht=({eventName:t})=>t===i||t===n,e.Jt=(t,e)=>{return l(i,t,e.details,{gate:e.name,gateValue:String(e.value),ruleID:e.ruleID},null!=(e=null==(t=e.__evaluation)?void 0:t.secondary_exposures)?e:[])},e.qt=(t,e)=>{return l(n,t,e.details,{config:e.name,ruleID:e.ruleID},null!=(e=null==(t=e.__evaluation)?void 0:t.secondary_exposures)?e:[])};e.Lt=(t,e,n)=>{var i,r=e.__evaluation,s=!0===(null==(s=null==r?void 0:r.explicit_parameters)?void 0:s.includes(n));let u="",o=null!=(i=null==r?void 0:r.undelegated_secondary_exposures)?i:[];return s&&(u=null!=(i=r.allocated_experiment_name)?i:"",o=r.secondary_exposures),l("statsig::layer_exposure",t,e.details,{config:e.name,parameterName:n,ruleID:e.ruleID,allocatedExperiment:u,isExplicitParameter:String(s)},o)};const s=(t,e)=>(e.reason=t.reason,t.lcut&&(e.lcut=String(t.lcut)),t.receivedAt&&(e.receivedAt=String(t.receivedAt)),e)},972:(t,e)=>{$Q(e),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="1.1.0";let n={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>n,add:t=>{n=$P($P({},n),t)}}},384:(t,e)=>{$Q(e)},396:(t,e)=>{$Q(e),e.Vt=e.zt=e.Bt=e.$t=void 0;const r="default";function s(t,e,n,i){return{name:t,details:e,ruleID:null!=(t=null==n?void 0:n.rule_id)?t:r,__evaluation:n,value:i}}function u(s,u){return(t,e)=>{var n,i,r=null!=(r=null==s?void 0:s[t])?r:null;return null==r||null!=e&&(n=e,(i=t=>Array.isArray(t)?"array":typeof t)(r)!==i(n))?null!=e?e:null:(null!=u&&u(t),r)}}e.$t=function(t,e,n){return s(t,e,n,!0===(null==n?void 0:n.value))},e.Bt=function(t,e,n){return $P($P({},s(t,e,n,null!=(t=null==n?void 0:n.value)?t:{})),{groupName:null,get:u(null==n?void 0:n.value)})},e.zt=function(t,e,n,i){return $P($P({},s(t,e,n,void 0)),{get:u(null==n?void 0:n.value,i),groupName:null!=(t=null==n?void 0:n.group_name)?t:null,__value:null!=(e=null==n?void 0:n.value)?e:{}})},e.Vt=function(t,e,n,i){return $P($P($P({},t),e),{get:u(n,i)})}},136:(t,e)=>{$Q(e)},296:(t,e,n)=>{$Q(e),e.vn=e.T=void 0;const i=n(832),r=n(780);e.T=function(t,e){try{var n=JSON.parse(JSON.stringify(t));return null!=e&&(n.statsigEnvironment=e),n}catch(t){return r.Log.error("Failed to JSON.stringify user"),{}}},e.vn=function(t){return t?(0,i.li)(t):null}},444:function(t,n,e){var i=this&&this.__awaiter||$A(),r=($Q2(n,"__esModule",{value:!0}),n.U=n.P=n.Storage=void 0,e(780)),e=e(48);const s={},u=t=>Promise.resolve(t),o={Ht:()=>"InMemory",N:t=>s[t]||null,Wt:t=>u(s[t]||null),C:(t,e)=>(s[t]=e,u()),F:t=>(delete s[t],u()),Yt:()=>u(Object.keys(s))};let l=null;try{const h=(0,e.It)();h&&h.localStorage&&"function"==typeof h.localStorage.getItem&&(l={Ht:()=>"LocalStorage",N:t=>h.localStorage.getItem(t),Wt:t=>u(h.localStorage.getItem(t)),C:(t,e)=>(h.localStorage.setItem(t,e),u()),F:t=>(h.localStorage.removeItem(t),u()),Yt:()=>u(Object.keys(h.localStorage))})}catch(t){r.Log.warn("Failed to setup localStorageProvider.")}let a=null!==l&&void 0!==l?l:o,c=a;function d(t){try{return t()}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return n.Storage.Qt(o),null;throw t}}n.Storage={Ht:()=>c.Ht(),Wt:t=>i(void 0,void 0,void 0,function*(){return d(()=>c.Wt(t))}),N:t=>d(()=>c.N?c.N(t):null),C:(t,e)=>c.C(t,e),F:t=>c.F(t),Yt:()=>c.Yt(),Qt:t=>{a=t,c=t},Nt:t=>{c=t?o:a}},n.P=function(e){return i(this,void 0,void 0,function*(){var t=yield n.Storage.Wt(e);return JSON.parse(null!=t?t:"null")})},n.U=function(t,e){return i(this,void 0,void 0,function*(){yield n.Storage.C(t,JSON.stringify(e))})}},412:(t,e,n)=>{$Q(e),e.ui=void 0;const r=n(780);e.ui=function(t,e,n){try{var i=JSON.parse(t);return"object"==typeof i&&0 in i,i}catch(t){}return r.Log.error("Failed to parse "+n),null}},556:(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)})}},84:(t,e)=>{$Q(e),e.it=void 0,e.it=function(t,e,n,i){return t||(e?""+e+n:""+i+n)}},539:(t,e)=>{$Q(e)},100:(t,e,n)=>{$Q(e),e.Xt=e.st=e.ti=e._t=void 0;n=n(48);const i="foreground",r="background",s=[];let u=i,o=!1;e._t=()=>u===i,e.ti=()=>o,e.st=t=>{s.unshift(t)};e.Xt=e=>{e!==u&&(u=e,s.forEach(t=>t(e)))},(0,n.Dt)("focus",()=>{(o=!1,e.Xt)(i)}),(0,n.Dt)("blur",()=>(0,e.Xt)(r)),(0,n.Dt)("beforeunload",()=>{o=!0,(0,e.Xt)(r)}),(0,n.xt)("visibilitychange",()=>{(0,e.Xt)("visible"===document.visibilityState?i:r)})},464: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),e.Log=e.Storage=e.EventLogger=void 0,n(496);const s=n(728),u=($Q2(e,"EventLogger",{enumerable:!0,get:function(){return s.EventLogger}}),n(780));$Q2(e,"Log",{enumerable:!0,get:function(){return u.Log}});var o=n(972);const l=n(444);$Q2(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),r(n(496),e),r(n(707),e),r(n(856),e),r(n(320),e),r(n(184),e),r(n(512),e),r(n(500),e),r(n(788),e),r(n(832),e),r(n(664),e),r(n(780),e),r(n(188),e),r(n(716),e),r(n(264),e),r(n(48),e),r(n(360),e),r(n(612),e),r(n(604),e),r(n(688),e),r(n(808),e),r(n(283),e),r(n(876),e),r(n(972),e),r(n(384),e),r(n(396),e),r(n(136),e),r(n(296),e),r(n(444),e),r(n(412),e),r(n(84),e),r(n(539),e),r(n(556),e),r(n(100),e),__STATSIG__=$P($P({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{Log:u.Log,SDK_VERSION:o.SDK_VERSION})},448: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(376),e),e.default=__STATSIG__},532:(t,e)=>{function o(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,u=r<i.length?i[r]:0;if(s<u)return-1;if(u<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 u="any_case_sensitive"!==s&&"none_case_sensitive"!==s;var e=-1!==t.findIndex(t=>{var e=String(r),t=String(t),n=u?e.toLowerCase():e,i=u?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(),u=e.getTime();if(isNaN(s)||isNaN(u))return!1;switch(r){case"before":return s<u;case"after":return u<s;case"on":return o(t)===o(e);default:return!1}}catch(t){return!1}}}},947:(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}},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}},e.resultToLayerEval=function(t,e,n){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!=(t=n.allocated_experiment_name)?t:"",explicit_parameters:null!=(t=n.explicit_parameters)?t:[],group:null!=(t=n.group_name)?t:"",group_name:null!=(t=n.group_name)?t:void 0,is_device_based:!1,is_experiment_active:null==e?void 0:e.isActive,is_user_in_experiment:n.is_experiment_group}}},931:(t,e,n)=>{$Q(e);const i=n(452),c=n(532),d=n(947);function h(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 v(t){return(0,i.SHA256)(t).dataView().getBigUint64(0,!1)}function o(t){return null!=t&&"object"==typeof t}e.default=class{constructor(t){this.le=t}evaluateGate(t,e){var{spec:t,details:n}=this.Ye("gate",t);return t?{evaluation:(0,d.resultToGateEval)(t,this.Qe(t,e)),details:n}:{evaluation:null,details:n}}evaluateConfig(t,e){var{spec:t,details:n}=this.Ye("config",t);return t?{evaluation:(0,d.resultToConfigEval)(t,this.Qe(t,e)),details:n}:{evaluation:null,details:n}}evaluateLayer(t,e){var n,{spec:t,details:i}=this.Ye("layer",t);return t?(n=null!=(n=null==(e=this.Qe(t,e))?void 0:e.allocated_experiment_name)?n:"",n=this.le.getSpecAndSourceInfo("config",n).spec,{evaluation:(0,d.resultToLayerEval)(t,n,e),details:i}):{evaluation:null,details:i}}Ye(t,e){t=this.le.getSpecAndSourceInfo(t,e);return{details:this.Xe(t),spec:t.spec}}Xe(t){var{source:t,spec:e,lcut:n,receivedAt:i}=t;return"Uninitialized"===t||"NoValues"===t?{reason:t}:{reason:t+":"+(null==e?"Unrecognized":"Recognized"),lcut:n,receivedAt:i}}Qe(t,e){var n=o(t.defaultValue)?t.defaultValue:void 0;if(!t.enabled)return(0,d.makeEvalResult)({json_value:n,rule_id:"disabled"});var i=[];for(const u of t.rules){var r,s=this.Ze(u,e);if(s.unsupported)return s;if(i.push(...s.secondary_exposures),s.bool_value)return this.tn(u.configDelegate,e,i)||(r=function(t,e,n){if(100===t.passPercentage)return!0;if(0===t.passPercentage)return!1;e=v(n.salt+"."+(null!=(n=t.salt)?n:t.id)+"."+(null!=(n=h(e,t.idType))?n:""));return Number(e%BigInt(1e4))<100*t.passPercentage}(u,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"})}Ze(t,e){var n=[];let i=!0;for(const s of t.conditions){var r=this.en(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:o(t.returnValue)?t.returnValue:void 0,secondary_exposures:n,is_experiment_group:!0===t.isExperimentGroup,group_name:t.groupName})}en(t,e){let n=null,i=!1;var r=t.field,s=t.targetValue,u=t.idType,o=t.type;switch(o){case"public":return(0,d.makeEvalResult)({bool_value:!0});case"pass_gate":case"fail_gate":var l=String(s),l=this.nn(l,e);return(0,d.makeEvalResult)({bool_value:"fail_gate"===o?!l.bool_value:l.bool_value,secondary_exposures:l.secondary_exposures});case"multi_pass_gate":case"multi_fail_gate":return this.rn(s,o,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":l=v(null!==(l=String(null!=(l=null==(l=t.additionalValues)?void 0:l.salt)?l:"")+"."+h(e,u))?l:"");n=Number(l%BigInt(1e3));break;case"unit_id":n=h(e,u);break;default:return(0,d.makeEvalResult)({unsupported:!0})}var a=t.operator;switch(a){case"gt":case"gte":case"lt":case"lte":i=c.default.compareNumbers(n,s,a);break;case"version_gt":case"version_gte":case"version_lt":case"version_lte":case"version_eq":case"version_neq":i=c.default.compareVersions(n,s,a);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=c.default.compareStringInArray(n,s,a);break;case"str_matches":i=c.default.compareStringWithRegEx(n,s);break;case"before":case"after":case"on":i=c.default.compareTime(n,s,a);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})}return(0,d.makeEvalResult)({bool_value:i})}tn(t,e,n){var i;return t&&(i=this.le.getSpecAndSourceInfo("config",t).spec,i)?(e=this.Qe(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}nn(t,e){var n=[];let i=!1;var r=this.le.getSpecAndSourceInfo("gate",t)["spec"];if(r){r=this.Qe(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})}rn(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 o of t){if("string"!=typeof o)return(0,d.makeEvalResult)({unsupported:!0});var u=this.nn(o,n);if(u.unsupported)return u;if(r.push(...u.secondary_exposures),i?!0===u.bool_value:!1===u.bool_value){s=!0;break}}return(0,d.makeEvalResult)({bool_value:s,secondary_exposures:r})}}},160:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e);const i=n(464);class s extends i.NetworkCore{constructor(t=null){super(t);t=null==t?void 0:t.networkConfig;this.sn=(0,i.it)(null==t?void 0:t.downloadConfigSpecsUrl,null==t?void 0:t.api,"/download_config_specs",i.NetworkDefault.specsApi)}fetchConfigSpecs(e,n){var i;return r(this,void 0,void 0,function*(){var t=yield this.get({sdkKey:e,url:this.sn,priority:n});return null!=(i=null==t?void 0:t.body)?i:null})}}e.default=s},480:(t,e,n)=>{$Q(e);const i=n(464);function r(t){return(0,i.ui)(t,"has_updates","DownloadConfigSpecsResponse")}e.default=class{constructor(){this.Zt=null,this.te=null,this.ee="Uninitialized",this.ie=0,this.ne=0}getValues(){return this.Zt?r(this.Zt):null}setValuesFromDataAdapter(t){var e;t&&!0===(null==(e=r(t.data))?void 0:e.has_updates)&&(this.ie=e.time,this.ne=t.receivedAt,this.ee=t.source,this.te=e,this.Zt=t.data)}reset(){this.te=null,this.Zt=null,this.ee="Loading"}finalize(){this.te||(this.ee="NoValues")}getSpecAndSourceInfo(t,e){var t=this.un(t);return{spec:null!=(t=null==t?void 0:t.find(t=>t.name===e))?t:null,source:this.ee,lcut:this.ie,receivedAt:this.ne}}un(t){var e;switch(t){case"gate":return null==(e=this.te)?void 0:e.feature_gates;case"config":return null==(e=this.te)?void 0:e.dynamic_configs;case"layer":return null==(e=this.te)?void 0:e.layer_configs}}}},368:function(t,e,n){var i=this&&this.__awaiter||$A();$Q(e);const u=n(464),r=n(931),s=n(160),o=n(480),l=n(4);class a extends u.StatsigClientBase{static instance(t){var e=(0,u.i)().instance(t);return e instanceof a?e:(u.Log.warn((0,u.Et)()?"Unable to find StatsigOnDeviceEvalClient instance":"StatsigOnDeviceEvalClient.instance is not supported in server environments"),new a(null!=t?t:""))}constructor(t,e=null){u.SDKType.At(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.le=new o.default,this.ln=new r.default(this.le)}initializeSync(){this.updateSync()}initializeAsync(t){return i(this,void 0,void 0,function*(){return this.updateAsync(t)})}updateSync(){this.le.reset();var t=this.dataAdapter.getDataSync();this.le.setValuesFromDataAdapter(t),this.le.finalize(),this.Ut("Ready",t),this.he(t)}updateAsync(e){return i(this,void 0,void 0,function*(){this.le.reset(),this.Ut("Loading",null);var t=this.dataAdapter.getDataSync();this.le.setValuesFromDataAdapter(t),t=yield this.dataAdapter.getDataAsync(t,e),this.le.setValuesFromDataAdapter(t),this.le.finalize(),this.Ut("Ready",t)})}getContext(){return{sdkKey:this._,options:this.v,values:this.le.getValues(),errorBoundary:this.Ct}}getAsyncContext(){return i(this,void 0,void 0,function*(){return $P($P({},this.getContext()),{session:yield u.StatsigSession.get(this._),stableID:yield u.StableID.get(this._)})})}checkGate(t,e,n){return this.getFeatureGate(t,e,n).value}getFeatureGate(t,e,n){e=(0,u.T)(e,this.v.environment);var{evaluation:i,details:r}=this.ln.evaluateGate(t,e),r=(0,u.$t)(t,r,i);return this.Kt(t,(0,u.Jt)(e,r),n),this.$emt({name:"gate_evaluation",gate:r}),r}getDynamicConfig(t,e,n){t=this.ve("dynamic_config",t,e,n);return this.$emt({name:"dynamic_config_evaluation",dynamicConfig:t}),t}getExperiment(t,e,n){t=this.ve("experiment",t,e,n);return this.$emt({name:"experiment_evaluation",experiment:t}),t}getLayer(e,n,i){n=(0,u.T)(n,this.v.environment);var{evaluation:t,details:r}=this.ln.evaluateLayer(e,n);const s=(0,u.zt)(e,r,t,t=>{this.Kt(e,(0,u.Lt)(n,s,t),i)});return this.$emt({name:"layer_evaluation",layer:s}),s}logEvent(t,e,n,i){this.Pt.enqueue($P($P({},"string"==typeof t?{eventName:t,value:n,metadata:i}:t),{user:e,time:Date.now()}))}Ft(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this.de(null)})}de(t){this.le.finalize(),this.Ut("Ready",t)}he(t){this.dataAdapter.getDataAsync(t,{priority:"low"}).catch(t=>{u.Log.error("An error occurred after update.",t)})}ve(t,e,n,i){n=(0,u.T)(n,this.v.environment);var{evaluation:r,details:s}=this.ln.evaluateConfig(e,n),s=(0,u.Bt)(e,s,r),r="experiment"===t?null==(t=null==(r=this.Rt)?void 0:r.getExperimentOverride)?void 0:t.call(r,s,n,i):null==(r=null==(t=this.Rt)?void 0:t.getDynamicConfigOverride)?void 0:r.call(t,s,n,i),t=null!=r?r:s;return this.Kt(e,(0,u.qt)(n,t),i),t}}e.default=a},4:function(t,e,n){var r=this&&this.__awaiter||$A();$Q(e),e.StatsigSpecsDataAdapter=void 0;const i=n(464),s=n(160);class u extends i.DataAdapterCore{constructor(){super("SpecsDataAdapter","specs"),this.V=null}attach(t,e){super.attach(t,e),this.V=new s.default(null!=e?e:{})}getDataAsync(t,e){return this.I(t,void 0,e)}prefetchData(t){return this.M(void 0,t)}D(t,e,n){var i;return r(this,void 0,void 0,function*(){return null!=(i=yield null==(i=this.V)?void 0:i.fetchConfigSpecs(this.G(),null==n?void 0:n.priority))?i:null})}m(){var t=(0,i.o)(this.G());return`${i.DataAdapterCachePrefix}.${this.h}.`+t}fn(t,e){return 0<t.data.length}}e.StatsigSpecsDataAdapter=u},376:(t,e,n)=>{$Q(e),e.StatsigSpecsDataAdapter=e.StatsigOnDeviceEvalClient=void 0;var i=n(368);e.StatsigOnDeviceEvalClient=i.default;const r=n(4);$Q2(e,"StatsigSpecsDataAdapter",{enumerable:!0,get:function(){return r.StatsigSpecsDataAdapter}}),__STATSIG__=$P($P({},null!==__STATSIG__&&void 0!==__STATSIG__?__STATSIG__:{}),{StatsigSpecsDataAdapter:r.StatsigSpecsDataAdapter,StatsigOnDeviceEvalClient:i.default}),e.default=__STATSIG__},452:(t,e,n)=>{$Q(e),e.SHA256=void 0;const i=n(891);$Q2(e,"SHA256",{enumerable:!0,get:function(){return i.SHA256}})},891:(t,e)=>{$Q(e),e.SHA256=void 0,e.SHA256=function(t){return(new i).update(t)};const n=[-2147483648,8388608,32768,128],u=[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<<u[3&e++]:(i<2048?s[e>>2]|=(192|i>>6)<<u[3&e++]:(i<55296||57344<=i?s[e>>2]|=(224|i>>12)<<u[3&e++]:(i=65536+((1023&i)<<10|1023&n.charCodeAt(++t)),s[e>>2]|=(240|i>>18)<<u[3&e++],s[e>>2]|=(128|i>>12&63)<<u[3&e++]),s[e>>2]|=(128|i>>6&63)<<u[3&e++]),s[e>>2]|=(128|63&i)<<u[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,u=this.h5,o=this.h6,l=this.h7,a,c,d,h,v,_,f,p,g,y,b;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],d=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,t[a]=t[a-16]+c+t[a-7]+d<<0;for(b=n&i,a=0;a<64;a+=4)this.first?(p=704751109,v=t[0]-210244248,l=v-1521486534<<0,r=v+143694565<<0,this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),p=e&n,h=p^e&i^b,f=s&u^~s&o,v=l+d+f+m[a]+t[a],_=c+h,l=r+v<<0,r=v+_<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),g=r&e,h=g^r&n^p,f=l&s^~l&u,v=o+d+f+m[a+1]+t[a+1],_=c+h,o=i+v<<0,i=v+_<<0,c=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=i&r,h=y^i&e^g,f=o&l^~o&s,v=u+d+f+m[a+2]+t[a+2],_=c+h,u=n+v<<0,n=v+_<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),b=n&i,h=b^n&r^y,f=u&o^~u&l,v=s+d+f+m[a+3]+t[a+3],_=c+h,s=e+v<<0,e=v+_<<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+u<<0,this.h6=this.h6+o<<0,this.h7=this.h7+l<<0}arrayBuffer(){return this.an().buffer}dataView(){return this.an().dataView}an(){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(448).default})());
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@statsig/js-on-device-eval-client",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "dependencies": {
5
- "@statsig/client-core": "1.0.0",
6
- "@statsig/sha256": "1.0.0"
5
+ "@statsig/client-core": "1.1.0",
6
+ "@statsig/sha256": "1.1.0"
7
7
  },
8
8
  "jsdelivr": "./build/statsig-js-on-device-eval-client.min.js",
9
9
  "type": "commonjs",