PageSourceSearch

https://www.viome.com/_next/static/chunks/8808-3ac3ac594a2c7584.js

js viome.com collected 2026-10-02 04:20:45 UTC 91,555 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="05c8bd96-f426-4b48-a498-591e2ac41af9",e._sentryDebugIdIdentifier="sentry-dbid-05c8bd96-f426-4b48-a498-591e2ac41af9")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1665,1867,2141,4046,4091,4248,4522,6427,6903,7105,7345,7856,8808,8952,9284,9486],{949:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigInternalClientFactoryAsync=void 0;let r=n(6824),i=n(33346);t.useStatsigInternalClientFactoryAsync=function(e,t){let n=(0,r.useMemo)(()=>{var n;return null!=(n=(0,i._getInstance)(t.sdkKey))?n:e(t)},[]),[s,a]=(0,r.useState)("Ready"!==n.loadingStatus);return(0,r.useMemo)(()=>{"Ready"!==n.loadingStatus&&n.initializeAsync().catch(i.Log.error).finally(()=>a(!1))},[]),{client:n,isLoading:s}}},3504:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.26.0";let n={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>n,add:e=>{n=Object.assign(Object.assign({},n),e)}}},3805:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${e}'.`),s.NoopEvaluationsClient.getExperiment(e,t)):n.getExperiment(e,t),[e,n,o,...t?Object.values(t):[]])}},9427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},12206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},15742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},16181:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},17140:(e,t,n)=>{var r=n(43710);Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"undefined"!=typeof window?window:null,t._getDocumentSafe=()=>{var e;let n=(0,t._getWindowSafe)();return null!=(e=null==n?void 0:n.document)?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e=void 0!==r&&null!=r.versions&&null!=r.versions.node;return"string"==typeof EdgeRuntime||e},t._addWindowEventListenerSafe=(e,n)=>{let r=(0,t._getWindowSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,n)},t._addDocumentEventListenerSafe=(e,n)=>{let r=(0,t._getDocumentSafe)();"function"==typeof(null==r?void 0:r.addEventListener)&&r.addEventListener(e,n)},t._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,t._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},17739:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let n=new Set([]),r=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,i){let s=`${e}|${t}`;if(!i)return s;for(let e of Object.keys(i)){if(r.has(e))return;n.has(e)?s+=`|${e}=true`:s+=`|${e}=${i[e]}`}return s}},18435:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let n="statsig::config_exposure",r="statsig::gate_exposure",i="statsig::layer_exposure",s=(e,t,n,r,i)=>(n.bootstrapMetadata&&(r.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:o(n,r),secondaryExposures:i,time:Date.now()});function a(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>
1e===r||e===n||e===i,t._createGateExposure=(e,t,n)=>{var i,o,l;let u={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null==(i=t.__evaluation)?void 0:i.version)!=null&&(u.configVersion=t.__evaluation.version),s(r,e,t.details,u,a(null!=(l=null==(o=t.__evaluation)?void 0:o.secondary_exposures)?l:[],n))},t._mapExposures=a,t._createConfigExposure=(e,t,r)=>{var i,o,l,u;let d={config:t.name,ruleID:t.ruleID};return(null==(i=t.__evaluation)?void 0:i.version)!=null&&(d.configVersion=t.__evaluation.version),(null==(o=t.__evaluation)?void 0:o.passed)!=null&&(d.rulePassed=String(t.__evaluation.passed)),s(n,e,t.details,d,a(null!=(u=null==(l=t.__evaluation)?void 0:l.secondary_exposures)?u:[],r))},t._createLayerParameterExposure=(e,t,n,r)=>{var o,l,u,d,c,g,_;let h=t.__evaluation,f=(null==(o=null==h?void 0:h.explicit_parameters)?void 0:o.includes(n))===!0,p="",v=null!=(l=null==h?void 0:h.undelegated_secondary_exposures)?l:[];f&&(p=null!=(u=h.allocated_experiment_name)?u:"",v=null!=(d=h.secondary_exposures)?d:[]);let y=null==(c=t.__evaluation)?void 0:c.parameter_rule_ids,m={config:t.name,parameterName:n,ruleID:null!=(g=null==y?void 0:y[n])?g:t.ruleID,allocatedExperiment:p,isExplicitParameter:String(f)};return(null==(_=t.__evaluation)?void 0:_.version)!=null&&(m.configVersion=t.__evaluation.version),s(i,e,t.details,m,a(v,r))};let o=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},20995:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,n(43353);let i=n(43353),s=n(77778),a=n(47746),o=n(81172),l=n(17739),u=n(17140),d=n(26731),c=n(39944),g=n(30864),_=n(35270);class h{constructor(e,t,n,r){var l,g,h,f;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};let p=this.$emt.bind(this);(null==r?void 0:r.logLevel)!=null&&(o.Log.level=r.logLevel),(null==r?void 0:r.disableStorage)&&_.Storage._setDisabled(!0),(null==r?void 0:r.initialSessionID)&&d.StatsigSession.overrideInitialSessionID(r.initialSessionID,e),(null==r?void 0:r.storageProvider)&&_.Storage._setProvider(r.storageProvider),(null==r?void 0:r.enableCookies)&&c.StableID._setCookiesEnabled(e,r.enableCookies),(null==r?void 0:r.disableStableID)&&c.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=r?r:{},this._memoCache={},this.overrideAdapter=null!=(l=null==r?void 0:r.overrideAdapter)?l:null,this._logger=new a.EventLogger(e,p,n,r),this._errorBoundary=new s.ErrorBoundary(e,r,p),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),n.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,r,n),this.storageProvider=_.Storage,null==(f=null==(h=null==(g=this.overrideAdapter)?void 0:g.loadFromStorage)?void 0:h.call(g))||f.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var n;if((0,u._isServerEnv)())return;let r=(0,i._getStatsigGlobal)(),s=null!=(n=r.instances)?n:{};null!=s[e]&&o.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),s[e]=t,r.firstInstance||(r.firstInstance=t),r.instances=s,__STATSIG__=r}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,_.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,c.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(g.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return r(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){let n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;let n=t=>{try{t(e)}catch(n){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,n);o.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};
1this._listeners[e.name]&&this._listeners[e.name].forEach(e=>n(e)),null==(t=this._listeners["*"])||t.forEach(n)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,n){if((null==n?void 0:n.disableExposureLog)===!0)return void this._logger.incrementNonExposureCount(e);this._logger.enqueue(t)}_memoize(e,t){return(n,r)=>{if(this._options.disableEvaluationMemoization)return t(n,r);let i=(0,l.createMemoKey)(e,n,r);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(n,r)),this._memoCache[i]):t(n,r)}}}t.StatsigClientBase=h},22772:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let r=n(33346);function i(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var n,s,a;let o=(0,r._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!o)return{hadBadDeltaChecksum:!0};let l=(i((a=(n=e,s=o,Object.assign(Object.assign(Object.assign({},n),s),{feature_gates:Object.assign(Object.assign({},n.feature_gates),s.feature_gates),layer_configs:Object.assign(Object.assign({},n.layer_configs),s.layer_configs),dynamic_configs:Object.assign(Object.assign({},n.dynamic_configs),s.dynamic_configs)}))).deleted_gates,a.feature_gates),delete a.deleted_gates,i(a.deleted_configs,a.dynamic_configs),delete a.deleted_configs,i(a.deleted_layers,a.layer_configs),delete a.deleted_layers,a),u=(0,r._DJB2Object)({feature_gates:l.feature_gates,dynamic_configs:l.dynamic_configs,layer_configs:l.layer_configs},2);return u!==o.checksumV2?{hadBadDeltaChecksum:!0,badChecksum:u,badMergedConfigs:l,badFullResponse:o.deltas_full_response}:JSON.stringify(l)}},22886:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let r=n(74614),i=n(81172);t._normalizeUser=function(e,t,n){try{let r=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?r.statsigEnvironment=t.environment:null!=n&&(r.statsigEnvironment={tier:n}),r}catch(e){return i.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,r._DJB2Object)(e):null}},24356:(e,t,n)=>{n.d(t,{q:()=>r});let r="$inf$"},25431:(e,t,n)=>{n.d(t,{Ay:()=>h,BE:()=>_});var r=n(6824),i=n(41161),s=n(64752),a=n(44376),o=n(81703);let l=()=>{},u=l();new WeakMap;let d=r.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),c={dedupe:!0},g=Promise.resolve(s.U),_=s.O.defineProperty(s.g,"defaultValue",{value:s.d}),h=(0,o.qm)((e,t,n)=>{let{cache:l,compare:u,suspense:_,fallbackData:h,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:v,refreshWhenHidden:y,refreshWhenOffline:m,keepPreviousData:b}=n,[S,k,E,w]=s.b.get(l),[C,O]=(0,s.s)(e),D=(0,r.useRef)(!1),I=(0,r.useRef)(!1),j=(0,r.useRef)(C),P=(0,r.useRef)(t),x=(0,r.useRef)(n),L=()=>x.current.isVisible()&&x.current.isOnline(),[M,U,A,R]=(0,s.z)(l,C),F=(0,r.useRef)({}).current,T=(0,s.e)(h)?(0,s.e)(n.fallback)?s.U:n.fallback[C]:h,N=(e,t)=>{for(let n in F)if("data"===n){if(!u(e[n],t[n])&&(!(0,s.e)(e[n])||!u(J,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},K=(0,r.useMemo)(()=>{let e=!!C&&!!t&&((0,s.e)(f)?!x.current.isPaused()&&!_&&!1!==p:f),n=t=>{let n=(0,s.m)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=M(),i=R(),a=n(r),o=r===i?a:n(i),l=a;return[()=>{let e=n(M());return N(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>o]},[l,C]),B=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>A(C,(t,n)=>{N(n,t)||e()}),[l,C]),K[0],K[1]),$=!D.current,z=S[C]&&S[C].length>0,V=B.data,G=(0,s.e)(V)?T&&(0,s.B)(T)?d(T):T:V,q=B.error,W=(0,r.useRef)(G),J=b?(0,s.e)(V)?(0,s.e)(W.current)?G:W.current:V:G,H=(!z||!!(0,s.e)(q))&&($&&!(0,s.e)(f)?f:!x.current.isPaused()&&(_?!(0,s.e)(G)&&p:(0,s.e)(G)||p)),Q=!!(C&&t&&$&&H),X=(0,s.e)(B.isValidating)?Q:B.isValidating,Y=(0,s.e)(B.isLoading)?Q:B.isLoading,Z=(0,r.useCallback)(async e=>{let t,r,i=P.current;if(!C||!i||I.current||x.current.isPaused())return!1;let o=!0,l=e||{},d=!E[C]||!l.dedupe,c=()=>s.I?!I.current&&C===j.current&&D.current:C===j.current,g={isValidating:!1,isLoading:!1},_=()=>{U(g)},h=()=>{let e=E[C];e&&e[1]===r&&delete E[C]},f={isValidating:!0};(0,s.e)(M().data)&&(f.isLoading=!0);try{if(d&&(U(f),n.loadingTimeout&&(0,s.e)(M().data)&&setTimeout(()=>{o&&c()&&x.current.onLoadingSlow(C,n)},n.loadingTimeout),E[C]=[i(O),(0,s.o)()]),[t,r]=E[C],t=await t,d&&setTimeout(h,n.dedupingInterval),!E[C]||E[C][1]!==r)return d&&c()&&x.current.onDiscarded(C),!1;g.error=s.U;let e=k[C];
1if(!(0,s.e)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return _(),d&&c()&&x.current.onDiscarded(C),!1;let a=M().data;g.data=u(a,t)?a:t,d&&c()&&x.current.onSuccess(t,C,n)}catch(n){h();let e=x.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(g.error=n,d&&c()&&(e.onError(n,C,e),(!0===t||(0,s.a)(t)&&t(n))&&(!x.current.revalidateOnFocus||!x.current.revalidateOnReconnect||L())&&e.onErrorRetry(n,C,e,e=>{let t=S[C];t&&t[0]&&t[0](a.I0,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return o=!1,_(),!0},[C,l]),ee=(0,r.useCallback)((...e)=>(0,s.n)(l,j.current,...e),[]);if((0,s.u)(()=>{P.current=t,x.current=n,(0,s.e)(V)||(W.current=V)}),(0,s.u)(()=>{if(!C)return;let e=Z.bind(s.U,c),t=0;x.current.revalidateOnFocus&&(t=Date.now()+x.current.focusThrottleInterval);let n=(0,o.aw)(C,S,(n,r={})=>{if(n==a.CC){let n=Date.now();x.current.revalidateOnFocus&&n>t&&L()&&(t=n+x.current.focusThrottleInterval,e())}else if(n==a.jB)x.current.revalidateOnReconnect&&L()&&e();else if(n==a.q2)return Z();else if(n==a.I0)return Z(r)});return I.current=!1,j.current=C,D.current=!0,U({_k:O}),H&&!E[C]&&((0,s.e)(G)||s.r?e():(0,s.t)(e)),()=>{I.current=!0,n()}},[C]),(0,s.u)(()=>{let e;function t(){let t=(0,s.a)(v)?v(M().data):v;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!M().error&&(y||x.current.isVisible())&&(m||x.current.isOnline())?Z(c).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[v,y,m,C]),(0,r.useDebugValue)(J),_){let e=C&&(0,s.e)(G);if(!s.I&&s.r&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(P.current=t,x.current=n,I.current=!1);let r=w[C];if(d(!(0,s.e)(r)&&e?ee(r):g),!(0,s.e)(q)&&e)throw q;let i=e?Z(c):g;!(0,s.e)(J)&&e&&(i.status="fulfilled",i.value=!0),d(i)}return{mutate:ee,get data(){return F.data=!0,J},get error(){return F.error=!0,q},get isValidating(){return F.isValidating=!0,X},get isLoading(){return F.isLoading=!0,Y}}})},25790:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},26731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let r=n(43353),i=n(97595),s=n(81172),a=n(35270),o=n(37657),l={};function u(e,t){return setTimeout(()=>{var t;let n=null==(t=(0,r._getStatsigGlobal)())?void 0:t.instance(e);n&&n.$emt({name:"session_expired"})},t)}function d(e){return`statsig.session_id.${(0,i._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>(null==l[e]&&(l[e]=function(e){let t=function(e){let t=d(e);return(0,a._getObjectFromStorage)(t)}(e),n=Date.now();return t||(t={sessionID:(0,o.getUUID)(),startTime:n,lastUpdate:n}),{data:t,sdkKey:e}}(e)),function(e){let t=Date.now(),n=e.data,r=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>18e5}(n)||function({startTime:e}){return Date.now()-e>144e5}(n)){n.sessionID=(0,o.getUUID)(),n.startTime=t;let e=null==__STATSIG__?void 0:__STATSIG__.instance(r);e&&e.$emt({name:"session_expired"})}n.lastUpdate=t,function(e,t){let n=d(t);try{(0,a._setObjectInStorage)(n,e)}catch(e){s.Log.warn("Failed to save SessionID")}}(n,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let i=t-n.startTime;return e.idleTimeoutID=u(r,18e5),e.ageTimeoutID=u(r,144e5-i),e}(l[e])),overrideInitialSessionID:(e,t)=>{l[t]=function(e,t){let n=Date.now();return{data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t}}(e,t)}}},27225:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},29978:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let n=new Map,r="start";function i(e,t,n,r){return Object.assign({key:n,action:t,step:r,timestamp:Date.now()},e)}function s(e,t){var r;let i=null!=(r=n.get(e))?r:[];i.push(t),n.set(e,i)}function a(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>n.get(e),_markInitOverallStart:e=>{s(e,i({},r,"overall"))},_markInitOverallEnd:(e,t,n)=>{s(e,i({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{s(e,i(t,r,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{s(e,i(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{s(e,i({},r,"initialize","process"))},_markInitProcessEnd:(e,t)=>{s(e,i(t,"end","initialize","process"))},_clearMarkers:e=>{n.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:a(e,"code"),name:a(e,"name"),message:a(e,"message")}},_getDiagnosticsData(e,n,r,i){var s;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null==(s=null==e?void 0:e.headers)?void 0:s.get("x-statsig-region"),isDelta:!0===r.includes('"is_delta":true')||void 0,attempt:n,error:t.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(e,n,r,i){let s=t.Diagnostics._getMarkers(r);if(null==s||s.length<=0)return -1;let a=s[s.length-1].timestamp-s[0].timestamp;t.Diagnostics._clearMarkers(r);let o={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:s.slice(),statsigOptions:i},time:Date.now()};return n.enqueue(o),a}}},30864:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},32314:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,n)=>{let r=0,i=Object.keys(e);for(let s=0;s<i.length;s++){let a=i[s],o=e[a];if(r+=a.length,"object"==typeof o&&null!==o?r+=(0,t._fastApproxSizeOf)(o,n)+2:r+=String(o).length+1,r>=n)break}return r}},33346:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,n(43353);let s=n(43353),a=n(29978);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return a.Diagnostics}});let o=n(47746);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return o.EventLogger}});let l=n(81172);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});let u=n(3504),d=n(35270);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return d.Storage}}),i(n(43353),t),i(n(97595),t),i(n(16181),t),i(n(91818),t),i(n(29978),t),i(n(85899),t),i(n(77778),t),i(n(61874),t),i(n(27225),t),i(n(74614),t),i(n(9427),t),i(n(81172),t),i(n(17739),t),i(n(15742),t),i(n(33475),t),i(n(48517),t),i(n(12206),t),i(n(17140),t),i(n(88738),t),i(n(26731),t),i(n(32314),t),i(n(39944),t),i(n(20995),t),i(n(97140),t),i(n(73148),t),i(n(18435),t),i(n(3504),t),i(n(30864),t),i(n(25790),t),i(n(60741),t),i(n(45438),t),i(n(22886),t),i(n(35270),t),i(n(40531),t),i(n(93986),t),i(n(45279),t),i(n(37657),t),i(n(83553),t),i(n(75478),t),i(n(89941),t),Object.assign((0,s._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},33381:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${e}'.`),s.NoopEvaluationsClient.getDynamicConfig(e,t)):n.getDynamicConfig(e,t),[e,n,o,...t?Object.values(t):[]])}},33475:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,n(43353);let i=n(43353),s=n(29978),a=n(81172),o=n(15742),l=n(62648),u=n(89941),d=n(88738),c=n(17140),g=n(26731),_=n(39944),h=n(97140),f=n(3504),p=n(30864),v=n(83553),y=new Set([408,500,502,503,504,522,524,599]);class m{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!b(e))return!1;let t=this._getInternalRequestArgs("POST",e),n=this._getPopulatedURL(t),r=navigator;return r.sendBeacon.bind(r)(n,t.body)}post(e){return r(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return r(this,void 0,void 0,function*(){var t,n,i,l,u,d,c,g,_;if(!b(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:f,body:p,retries:m,attempt:S}=e,E=e.urlConfig.endpoint;if(this._isRateLimited(E))return a.Log.warn(`Request to ${E} was blocked because you are making requests too frequently.`),null;let w=null!=S?S:1,C=!1,O=this._getPopulatedURL(e),D=null,I=(0,v._isUnloading)();try{let n,r={method:f,body:p,headers:Object.assign({},e.headers),priority:e.priority,keepalive:I};u=e,d=w,u.urlConfig.endpoint===o.Endpoint._initialize&&s.Diagnostics._markInitNetworkReqStart(u.sdkKey,{attempt:d});let i=this._leakyBucket[E];
1i&&(i.lastRequestTime=Date.now(),this._leakyBucket[E]=i);let a=null!=(t=this._netConfig.networkOverrideFunc)?t:fetch;if(!(D=yield Promise.race([a(O,r).finally(()=>clearTimeout(n)),new Promise((e,t)=>{n=setTimeout(()=>{C=!0,t(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield D.text().catch(()=>"No Text"),t=Error(`NetworkError: ${O} ${e}`);throw t.name="NetworkError",t}let l=yield D.text();return k(e,D,w,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:D.status}}catch(o){let t="string"==typeof(c=o)?c:c instanceof Error?`${c.name}: ${c.message}`:"Unknown Error",s=(g=null!=t?t:"",_=C,g.includes("Timeout")||_);if(k(e,D,w,"",o),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,s))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!m||w>m||!y.has(null!=(n=null==D?void 0:D.status)?n:500)){null==(i=this._emitter)||i.call(this,{name:"error",error:o,tag:h.ErrorTag.NetworkError,requestArgs:e});let n=`A networking error occurred during ${f} request to ${O}.`;return a.Log.error(n,t,o),null==(l=this._errorBoundary)||l.attachErrorIfNoneExists(n),null}return yield function(e){return r(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(w),this._sendRequest(Object.assign(Object.assign({},e),{retries:m,attempt:w+1}))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||(null==e?void 0:e.disableCompression)!==!0||(t=p.LogEventCompressionMode.Disabled),t||(t=p.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;let n=Date.now(),r=null!=(t=this._leakyBucket[e])?t:{count:0,lastRequestTime:n},i=Math.floor((n-r.lastRequestTime)*.05);return r.count=Math.max(0,r.count-i),r.count>=50||(r.count+=1,r.lastRequestTime=n,this._leakyBucket[e]=r,!1)}_getPopulatedURL(e){var t;let n=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===o.Endpoint._initialize||e.urlConfig.endpoint===o.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=n);let r=Object.assign({[o.NetworkParam.SdkKey]:e.sdkKey,[o.NetworkParam.SdkType]:d.SDKType._get(e.sdkKey),[o.NetworkParam.SdkVersion]:f.SDK_VERSION,[o.NetworkParam.Time]:String(Date.now()),[o.NetworkParam.SessionID]:g.SessionID.get(e.sdkKey)},e.params),i=Object.keys(r).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&");return`${n}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;let n=(0,c._getWindowSafe)(),r=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof r&&null==(0,i._getStatsigGlobalFlag)("no-encode")&&(null==n?void 0:n.btoa))try{e.body=n.btoa(r).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[o.NetworkParam.StatsigEncoded]:"1"})}catch(t){a.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return r(this,void 0,void 0,function*(){var t;let n=e.body;if("string"==typeof n&&function(e,t){if(!e.isCompressable||null!=(0,i._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;let n=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,r=!0===u.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case p.LogEventCompressionMode.Disabled:return!1;case p.LogEventCompressionMode.Enabled:if(n&&!r)return!1;return!0;case p.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{let r,i=new TextEncoder().encode(n),s=new CompressionStream("gzip"),l=s.writable.getWriter();l.write(i).catch(a.Log.error),l.close().catch(a.Log.error);let u=s.readable.getReader(),d=[];for(;!(r=yield u.read()).done;)d.push(r.value);let c=d.reduce((e,t)=>e+t.length,0),g=new Uint8Array(c),_=0;for(let e of d)g.set(e,_),_+=e.length;e.body=g,e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[o.NetworkParam.IsGzipped]:"1"})}catch(t){a.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),r=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&S(r,t.data),r}}t.NetworkCore=m;let b=e=>!!e.sdkKey||(a.Log.warn("Unable to make request without an SDK key"),!1),S=(e,t)=>{let{sdkKey:n,fallbackUrl:r}=e,i=_.StableID.get(n),s=g.SessionID.get(n),a=d.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:i,sessionID:s,sdkType:a,fallbackUrl:r})}))};
1function k(e,t,n,r,i){e.urlConfig.endpoint===o.Endpoint._initialize&&s.Diagnostics._markInitNetworkReqEnd(e.sdkKey,s.Diagnostics._getDiagnosticsData(t,n,r,i))}},35270:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let r=n(81172),i=n(17140),s={},a={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>s[e]?s[e]:null,setItem:(e,t)=>{s[e]=t},removeItem:e=>{delete s[e]},getAllKeys:()=>Object.keys(s)},o=null;try{let e=(0,i._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,n)=>e.localStorage.setItem(t,n),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(e){r.Log.warn("Failed to setup localStorageProvider.")}let l=null!=o?o:a,u=l;function d(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(a),null;if(e instanceof Error&&"QuotaExceededError"===e.name){let n=t.Storage.getAllKeys().filter(e=>e.startsWith("statsig."));e.message=`${e.message}. Statsig Keys: ${n.length}`}throw e}}t.Storage={isReady:()=>u.isReady(),isReadyResolver:()=>u.isReadyResolver(),getProviderName:()=>u.getProviderName(),getItem:e=>d(()=>u.getItem(e)),setItem:(e,t)=>d(()=>u.setItem(e,t)),removeItem:e=>u.removeItem(e),getAllKeys:()=>u.getAllKeys(),_setProvider:e=>{l=e,u=e},_setDisabled:e=>{u=e?a:l}},t._getObjectFromStorage=function(e){let n=t.Storage.getItem(e);return JSON.parse(null!=n?n:"null")},t._setObjectInStorage=function(e,n){t.Storage.setItem(e,JSON.stringify(n))}},37657:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,n="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${n}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let r=16*Math.random();return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),("x"===n?r:7&r|8).toString(16)})}},39299:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useClientBootstrapInit=void 0;let r=n(56526),i=n(65915);t.useClientBootstrapInit=function(e,t,n,s=null,a){return(0,i.useStatsigInternalClientFactoryBootstrap)(e=>new r.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions),{sdkKey:e,initialUser:t,initialValues:n,statsigOptions:s,useLegacyFormat:a})}},39944:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;let r=n(97595),i=n(81172),s=n(17140),a=n(35270),o=n(37657),l={},u={},d={};function c(e){return`statsig.stable_id.${(0,r._getStorageKey)(e)}`}function g(e,t){let n=c(t);try{(0,a._setObjectInStorage)(n,e)}catch(e){i.Log.warn("Failed to save StableID to storage")}}function _(e,t){if(!u[t]||null==(0,s._getDocumentSafe)())return;let n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie=`${h(t)}=${encodeURIComponent(e)}; expires=${n.toUTCString()}; path=/`}function h(e){return`statsig.stable_id.${(0,r._getStorageKey)(e)}`}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(d[e])return null;if(null!=l[e])return l[e];let t=null;return null!=(t=function(e){if(!u[e]||null==(0,s._getDocumentSafe)())return null;for(let t of document.cookie.split(";")){let[n,r]=t.trim().split("=");if(n===h(e))return decodeURIComponent(r)}return null}(e))?(l[e]=t,g(t,e)):(null==(t=function(e){let t=c(e);return(0,a._getObjectFromStorage)(t)}(e))&&(t=(0,o.getUUID)()),g(t,e),_(t,e),l[e]=t),t},setOverride:(e,t)=>{l[t]=e,g(e,t),_(e,t)},_setCookiesEnabled:(e,t)=>{u[e]=t},_setDisabled:(e,t)=>{d[e]=t}},t.getCookieName=h},40531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let r=n(81172);t._typedJsonParse=function(e,t,n){try{let n=JSON.parse(e);if(n&&"object"==typeof n&&t in n)return n}catch(e){}return r.Log.error(`Failed to parse ${n}`),null}},43218:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigUser=void 0;let r=n(6824),i=n(48161),s=n(75790);function a(e){return e.getContext().user}t.useStatsigUser=function(){let{client:e}=(0,s.useStatsigClient)(),{renderVersion:t}=(0,r.useContext)(i.default);return{user:(0,r.useMemo)(()=>a(e),[e,t]),updateUserSync:(0,r.useCallback)(t=>("function"==typeof t&&(t=t(a(e))),e.updateUserSync(t)),[e]),updateUserAsync:(0,r.useCallback)(t=>("function"==typeof t&&(t=t(a(e))),e.updateUserAsync(t)),[e])}}},43353:(e,t,n)=>{var r,i,s;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let a=n(81172);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:c}catch(e){return c}},t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let n=(0,t._getStatsigGlobal)();return e?n.instances&&n.instances[e]:(n.instances&&Object.keys(n.instances).length>1&&a.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."),n.firstInstance)};let o="__STATSIG__",l="undefined"!=typeof window?window:{},u=void 0!==n.g?n.g:{},d="undefined"!=typeof globalThis?globalThis:{},c=null!=(s=null!=(i=null!=(r=l[o])?r:u[o])?i:d[o])?s:{instance:t._getInstance};l[o]=c,u[o]=c,d[o]=c},44376:(e,t,n)=>{n.d(t,{CC:()=>r,I0:()=>a,jB:()=>i,q2:()=>s});let r=0,i=1,s=2,a=3},45279:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let r=n(74614),i=n(15742),s={[i.Endpoint._initialize]:"i",[i.Endpoint._rgstr]:"e",[i.Endpoint._download_config_specs]:"d"};class a{constructor(e,t,n,r){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=s[e],t&&(this.customUrl=t),!t&&n&&(this.customUrl=n.endsWith("/")?`${n}${e}`:`${n}/${e}`),r&&(this.fallbackUrls=r);let a=i.NetworkDefault[e];this.defaultUrl=`${a}/${e}`}getUrl(){var e;return null!=(e=this.customUrl)?e:this.defaultUrl}getChecksum(){var e;let t=(null!=(e=this.fallbackUrls)?e:[]).sort().join(",");return(0,r._DJB2)(this.customUrl+t)}}t.UrlConfiguration=a},45438:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},47746:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let i=n(97595),s=n(74614),a=n(81172),o=n(15742),l=n(17140),u=n(18435),d=n(30864),c=n(35270),g=n(45279),_=n(83553),h={},f="startup",p="gained_focus";class v{static _safeFlushAndForget(e){var t;null==(t=h[e])||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null==(t=h[e])||t._retryFailedLogs(p)}constructor(e,t,n,r){var i,s;this._sdkKey=e,this._emitter=t,this._network=n,this._options=r,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(i=null==r?void 0:r.loggingEnabled)?i:(null==r?void 0:r.disableLogging)===!0?d.LoggingEnabledOption.disabled:d.LoggingEnabledOption.browserOnly,(null==r?void 0:r.loggingEnabled)&&void 0!==r.disableLogging&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!=(s=null==r?void 0:r.loggingBufferMaxSize)?s:100;let l=null==r?void 0:r.networkConfig;this._logEventUrlConfig=new g.UrlConfiguration(o.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){let e=this._getStorageKey(),t=(0,c._getObjectFromStorage)(e);t&&this._queue.push(...t),c.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&v._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let n=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=n+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;let t=(0,l._isServerEnv)();t&&(null==(e=this._options)?void 0:e.loggingEnabled)!=="always"||(h[this._sdkKey]=this,t||(0,_._subscribeToVisiblityChanged)(e=>{"background"===e?v._safeFlushAndForget(this._sdkKey):"foreground"===e&&v._safeRetryFailedLogs(this._sdkKey)}
1),this._retryFailedLogs(f),this._startBackgroundFlushInterval())}stop(){return r(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete h[this._sdkKey],yield this.flush()})}flush(){return r(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){!this._hasRunQuickFlush&&(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>v._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if((null==(t=this._options)?void 0:t.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,u._isExposureEvent)(e))return!0;let n=e.user?e.user:{statsigEnvironment:void 0},r=(0,i._getUserStorageKey)(this._sdkKey,n),s=e.metadata?e.metadata:{},a=[e.eventName,r,s.gate,s.config,s.ruleID,s.allocatedExperiment,s.parameterName,String(s.isExplicitParameter),s.reason].join("|"),o=this._lastExposureTimeMap[a],d=Date.now();return(!o||!(d-o<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=d,!0)}_sendEvents(e){return r(this,void 0,void 0,function*(){var t,n;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{let r=(0,_._isUnloading)()&&this._network.isBeaconSupported()&&(null==(n=null==(t=this._options)?void 0:t.networkConfig)?void 0:n.networkOverrideFunc)==null;if(this._emitter({name:"pre_logs_flushed",events:e}),(r?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success)return this._emitter({name:"logs_flushed",events:e}),!0;return a.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return a.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return r(this,void 0,void 0,function*(){var t;let n=yield this._network.post(this._getRequestData(e)),r=null!=(t=null==n?void 0:n.code)?t:-1;return{success:r>=200&&r<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[o.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{let n=this._getFailedLogsFromStorage(t);(0,c._setObjectInStorage)(t,[...n,...e])}catch(e){a.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{let n=(0,c._getObjectFromStorage)(e);return Array.isArray(n)&&(t=n),t}catch(e){return[]}}_retryFailedLogs(e){let t=this._getStorageKey();r(this,void 0,void 0,function*(){c.Storage.isReady()||(yield c.Storage.isReadyResolver());let n=(0,c._getObjectFromStorage)(t);
1n&&(e===f&&c.Storage.removeItem(t),(yield this._sendEvents(n))&&e===p&&c.Storage.removeItem(t))}).catch(()=>{a.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,s._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},n=this._getCurrentPageUrl();n&&(t.statsigMetadata={currentPage:n});let r=Object.assign(Object.assign({},e),t);a.Log.debug("Enqueued Event:",r),this._queue.push(r)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let n=setInterval(()=>{let e=h[this._sdkKey];e&&e._flushIntervalId===n?v._safeFlushAndForget(this._sdkKey):clearInterval(n)},null!=(t=null==(e=this._options)?void 0:e.loggingIntervalMs)?t:1e4);this._flushIntervalId=n}}t.EventLogger=v},48159:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${e}'.`),s.NoopEvaluationsClient.getFeatureGate(e,t)):n.getFeatureGate(e,t),[e,n,o,...t?Object.values(t):[]])}},48161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(77153);t.default=(0,r.createContext)({renderVersion:0,client:i.NoopEvaluationsClient,isLoading:!0})},48517:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},48814:(e,t,n)=>{var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let i=n(33346),s=n(84429),a=n(80476),o=n(77431),l=n(97651);class u extends i.StatsigClientBase{static instance(e){let t=(0,i._getStatsigGlobal)().instance(e);return t instanceof u?t:(i.Log.warn((0,i._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new u(null!=e?e:"",{}))}constructor(e,t,n=null){var r,o;i.SDKType._setClientType(e,"javascript-client");let u=new a.default(n,e=>{this.$emt(e)});for(let a of(super(e,null!=(r=null==n?void 0:n.dataAdapter)?r:new l.StatsigEvaluationsDataAdapter,u,n),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(i.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(i.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(i.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(i.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(i.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(i.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new s.default(e),this._network=u,this._user=this._configureUser(t,n),this._sdkInstanceID=(0,i.getUUID)(),null!=(o=null==n?void 0:n.plugins)?o:[]))a.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,i.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!=(t=this._store.getWarnings())?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return r(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(e,t){let n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,t,n){var r;let s=[...null!=(r=this._store.getWarnings())?r:[]];this._resetForUser(e);let a=this.dataAdapter.getDataSync(this._user);null==a&&s.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);
1let o=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===o||null==o&&(null==a?void 0:a.source)==="Bootstrap"||this._runPostUpdate(null!=a?a:null,this._user),(0,i.createUpdateDetails)(!0,this._store.getSource(),performance.now()-n,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),s)}updateUserAsync(e,t){return r(this,void 0,void 0,function*(){let n=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,n)}})}_updateUserAsyncImpl(e,t){return r(this,void 0,void 0,function*(){this._resetForUser(e);let n=this._user;i.Diagnostics._markInitOverallStart(this._sdkKey);let r=this.dataAdapter.getDataSync(n);if(this._store.setValues(r,this._user),this._setStatus("Loading",r),r=yield this.dataAdapter.getDataAsync(r,n,t),n!==this._user)return(0,i.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let s=!1;null!=r&&(i.Diagnostics._markInitProcessStart(this._sdkKey),s=this._store.setValues(r,this._user),i.Diagnostics._markInitProcessEnd(this._sdkKey,{success:s})),this._finalizeUpdate(r),s||(this._errorBoundary.attachErrorIfNoneExists(i.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),i.Diagnostics._markInitOverallEnd(this._sdkKey,s,this._store.getCurrentSourceDetails());let a=i.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,i.createUpdateDetails)(s,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:i.StatsigSession.get(this._sdkKey),stableID:i.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){let r="string"==typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:r}),this._logger.enqueue(Object.assign(Object.assign({},r),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return r(this,void 0,void 0,function*(){return i.Storage.isReady()||(yield i.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var n;return(0,i.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!=(n=this._store.getWarnings())?n:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{i.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var n,r,s;let a=(0,i._normalizeUser)(e,t),o=null==(n=a.customIDs)?void 0:n.stableID;if(o){let e=null==(s=(r=this.storageProvider).isReadyResolver)?void 0:s.call(r);e?e.then(()=>i.StableID.setOverride(o,this._sdkKey),()=>i.StableID.setOverride(o,this._sdkKey)):i.StableID.setOverride(o,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(a.analyticsOnlyMetadata=Object.assign(Object.assign({},a.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),a}_getFeatureGateImpl(e,t){var n,r;let{result:s,details:a}=this._store.getGate(e),o=(0,i._makeFeatureGate)(e,a,s),l=null==(r=null==(n=this.overrideAdapter)?void 0:n.getGateOverride)?void 0:r.call(n,o,this._user,t),u=null!=l?l:o;return this._enqueueExposure(e,(0,i._createGateExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:u}),u}_getDynamicConfigImpl(e,t){var n,r;let{result:s,details:a}=this._store.getConfig(e),o=(0,i._makeDynamicConfig)(e,a,s),l=null==(r=null==(n=this.overrideAdapter)?void 0:n.getDynamicConfigOverride)?void 0:r.call(n,o,this._user,t),u=null!=l?l:o;return this._enqueueExposure(e,(0,i._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:u}),u}_getExperimentImpl(e,t){var n,r,s,a;let{result:o,details:l}=this._store.getConfig(e),u=(0,i._makeExperiment)(e,l,o);null!=u.__evaluation&&(u.__evaluation.secondary_exposures=(0,i._mapExposures)(null!=(r=null==(n=u.__evaluation)?void 0:n.secondary_exposures)?r:[],this._store.getExposureMapping()));let d=null==(a=null==(s=this.overrideAdapter)?void 0:s.getExperimentOverride)?void 0:a.call(s,u,this._user,t),c=null!=d?d:u;return this._enqueueExposure(e,(0,i._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:c}),c}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var n,r,s;let{result:a,details:o}=this._store.getLayer(e),l=(0,i._makeLayer)(e,o,a),u=null==(r=null==(n=this.overrideAdapter)?void 0:n.getLayerOverride)?void 0:r.call(n,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let d=(0,i._mergeOverride)(l,u,null!=(s=null==u?void 0:u.__value)?s:l.__value,n=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,i._createLayerParameterExposure)(this._user,d,n,this._store.getExposureMapping()),t)}
1);return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,r;let{result:i,details:s}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let a={name:e,details:s,__configuration:i,get:(0,o._makeParamStoreGetter)(this,i,t)},l=null==(r=null==(n=this.overrideAdapter)?void 0:n.getParamStoreOverride)?void 0:r.call(n,a,t);return null!=l&&(a.__configuration=l.config,a.details=l.details,a.get=(0,o._makeParamStoreGetter)(this,l.config,t)),a}}t.default=u},52058:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${e}'.`),s.NoopEvaluationsClient.getParameterStore(e,t)):n.getParameterStore(e,t),[e,n,o,...t?Object.values(t):[]])}},56526:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let s=n(33346),a=n(48814);t.StatsigClient=a.default,i(n(33346),t),t.default=Object.assign((0,s._getStatsigGlobal)(),{StatsigClient:a.default})},60741:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let r=n(81172),i=n(93986);function s(e,t,n,r){var i;return{name:e,details:t,ruleID:null!=(i=null==n?void 0:n.rule_id)?i:"",__evaluation:n,value:r}}function a(e,t,n){var r;let i=null!=(r=null==n?void 0:n.value)?r:{};return Object.assign(Object.assign({},s(e,t,n,i)),{get:o(e,null==n?void 0:n.value)})}function o(e,t,n){return(s,a)=>{var o;let l=null!=(o=null==t?void 0:t[s])?o:null;return null==l?null!=a?a:null:null==a||(0,i._isTypeMatch)(l,a)?(null==n||n(s),l):(r.Log.warn(`Parameter type mismatch. '${e}.${s}' was found to be type '${typeof l}' but fallback/return type is '${typeof a}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=a?a:null)}}t._makeFeatureGate=function(e,t,n){var r;return Object.assign(Object.assign({},s(e,t,n,(null==n?void 0:n.value)===!0)),{idType:null!=(r=null==n?void 0:n.id_type)?r:null})},t._makeDynamicConfig=a,t._makeExperiment=function(e,t,n){var r;return Object.assign(Object.assign({},a(e,t,n)),{groupName:null!=(r=null==n?void 0:n.group_name)?r:null})},t._makeLayer=function(e,t,n,r){var i,a;return Object.assign(Object.assign({},s(e,t,n,void 0)),{get:o(e,null==n?void 0:n.value,r),groupName:null!=(i=null==n?void 0:n.group_name)?i:null,__value:null!=(a=null==n?void 0:n.value)?a:{}})},t._mergeOverride=function(e,t,n,r){return Object.assign(Object.assign(Object.assign({},e),t),{get:o(e.name,n,r)})},t._makeTypedGet=o},61874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},62648:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let i=n(83713),s=n(74614),a=n(81172),o=n(35270);class l{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null==(t=e.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var n;let r=null==(n=this._fallbackInfo)?void 0:n[t.endpoint];r&&(r.expiryTime=Date.now()+6048e5,c(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:r})))}getActiveFallbackUrl(e,t){var n,r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let i=this._fallbackInfo;null==i&&(i=null!=(n=function(e){let t=d(e),n=o.Storage.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return a.Log.error("Failed to parse FallbackInfo"),null}}(e))?n:{},this._fallbackInfo=i);let s=i[t.endpoint];return!s||Date.now()>(null!=(r=s.expiryTime)?r:0)||t.getChecksum()!==s.urlConfigChecksum?(delete i[t.endpoint],this._fallbackInfo=i,c(e,this._fallbackInfo),null):s.url?s.url:null}tryFetchUpdatedFallbackInfo(e,t,n,i){return r(this,void 0,void 0,function*(){var r,s;try{if(!u(n,i))return!1;let s=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,a=this._pickNewFallbackUrl(null==(r=this._fallbackInfo)?void 0:r[t.endpoint],s);if(!a)return!1;return this._updateFallbackInfoWithNewUrl(e,t,a),!0}catch(e){return null==(s=this._errorBoundary)||s.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,n){var r,i,s;let a={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+6048e5,previous:[]},o=t.endpoint,l=null==(r=this._fallbackInfo)?void 0:r[o];l&&a.previous.push(...l.previous),a.previous.length>10&&(a.previous=[]);let u=null==(s=null==(i=this._fallbackInfo)?void 0:i[o])?void 0:s.url;null!=u&&a.previous.push(u),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[o]:a}),c(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return r(this,void 0,void 0,function*(){var t;let n=this._dnsQueryCooldowns[e.endpoint];if(n&&Date.now()<n)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;let r=[],s=yield(0,i._fetchTxtRecords)(null!=(t=this._networkOverrideFunc)?t:fetch),a=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(let t of s){if(!t.startsWith(e.endpointDnsKey+"="))continue;let n=t.split("=");if(n.length>1){let e=n[1];e.endsWith("/")&&(e=e.slice(0,-1)),r.push(`https://${e}${a}`)}}return r})}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;let r=new Set(null!=(n=null==e?void 0:e.previous)?n:[]),i=null==e?void 0:e.url,s=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!r.has(e)&&t!==i){s=t;break}}return s}}function u(e,t){var n;let r=null!=(n=null==e?void 0:e.toLowerCase())?n:"";return t||r.includes("uncaught exception")||r.includes("failed to fetch")||r.includes("networkerror when attempting to fetch resource")}function d(e){return`statsig.network_fallback.${(0,s._DJB2)(e)}`}function c(e,t){let n=d(e);if(!t||0===Object.keys(t).length)return void o.Storage.removeItem(n);o.Storage.setItem(n,JSON.stringify(t))}t.NetworkFallbackResolver=l,t._isDomainFailure=u}
1,64752:(e,t,n)=>{n.d(t,{B:()=>_,I:()=>C,O:()=>u,S:()=>q,U:()=>l,a:()=>c,b:()=>a,c:()=>$,d:()=>V,e:()=>d,f:()=>G,g:()=>W,i:()=>v,j:()=>z,m:()=>g,n:()=>T,o:()=>F,r:()=>O,s:()=>A,t:()=>D,u:()=>I,z:()=>b});var r=n(6824),i=n(44376),s=n(3493);let a=new WeakMap,o=()=>{},l=o(),u=Object,d=e=>e===l,c=e=>"function"==typeof e,g=(e,t)=>({...e,...t}),_=e=>c(e.then),h={},f={},p="undefined",v=typeof window!=p,y=typeof document!=p,m=v&&"Deno"in window,b=(e,t)=>{let n=a.get(e);return[()=>!d(t)&&e.get(t)||h,r=>{if(!d(t)){let i=e.get(t);t in f||(f[t]=i),n[5](t,g(i,r),i||h)}},n[6],()=>!d(t)&&t in f?f[t]:!d(t)&&e.get(t)||h]},S=!0,[k,E]=v&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],w={initFocus:e=>(y&&document.addEventListener("visibilitychange",e),k("focus",e),()=>{y&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{let t=()=>{S=!0,e()},n=()=>{S=!1};return k("online",t),k("offline",n),()=>{E("online",t),E("offline",n)}}},C=!r.useId,O=!v||m,D=e=>v&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(e):setTimeout(e,1),I=O?r.useEffect:r.useLayoutEffect,j="undefined"!=typeof navigator&&navigator.connection,P=!O&&j&&(["slow-2g","2g"].includes(j.effectiveType)||j.saveData),x=new WeakMap,L=(e,t)=>e===`[object ${t}]`,M=0,U=e=>{let t,n,r=typeof e,i=u.prototype.toString.call(e),s=L(i,"Date"),a=L(i,"RegExp"),o=L(i,"Object");if(u(e)!==e||s||a)t=s?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=x.get(e))return t;if(t=++M+"~",x.set(e,t),Array.isArray(e)){for(n=0,t="@";n<e.length;n++)t+=U(e[n])+",";x.set(e,t)}if(o){t="#";let r=u.keys(e).sort();for(;!d(n=r.pop());)d(e[n])||(t+=n+":"+U(e[n])+",");x.set(e,t)}}return t},A=e=>{if(c(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?U(e):"",t]},R=0,F=()=>++R;async function T(...e){let[t,n,r,s]=e,o=g({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{}),u=o.populateCache,h=o.rollbackOnError,f=o.optimisticData,p=o.throwOnError;if(c(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(v))}return v(n);async function v(n){let s,[g]=A(n);if(!g)return;let[v,y]=b(t,g),[m,S,k,E]=a.get(t),w=()=>{let e=m[g];return(c(o.revalidate)?o.revalidate(v().data,n):!1!==o.revalidate)&&(delete k[g],delete E[g],e&&e[0])?e[0](i.q2).then(()=>v().data):v().data};if(e.length<3)return w();let C=r,O=!1,D=F();S[g]=[D,0];let I=!d(f),j=v(),P=j.data,x=j._c,L=d(x)?P:x;if(I&&y({data:f=c(f)?f(L,P):f,_c:L}),c(C))try{C=C(L)}catch(e){s=e,O=!0}if(C&&_(C)){let e;if(C=await C.catch(e=>{s=e,O=!0}),D!==S[g][0]){if(O)throw s;return C}O&&I&&(e=s,"function"==typeof h?h(e):!1!==h)&&(u=!0,y({data:L,_c:l}))}if(u&&!O&&(c(u)?y({data:u(C,L),error:l,_c:l}):y({data:C,error:l,_c:l})),S[g][1]=F(),Promise.resolve(w()).then(()=>{y({_c:l})}),O){if(p)throw s;return}return C}}let N=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},K=(e,t)=>{if(!a.has(e)){let n=g(w,t),r=Object.create(null),s=T.bind(l,e),u=o,d=Object.create(null),c=(e,t)=>{let n=d[e]||[];return d[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},_=(t,n,r)=>{e.set(t,n);let i=d[t];if(i)for(let e of i)e(n,r)},h=()=>{if(!a.has(e)&&(a.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,_,c]),!O)){let t=n.initFocus(setTimeout.bind(l,N.bind(l,r,i.CC))),s=n.initReconnect(setTimeout.bind(l,N.bind(l,r,i.jB)));u=()=>{t&&t(),s&&s(),a.delete(e)}}};return h(),[e,s,h,u]}return[e,a.get(e)[4]]},B=s.j,[$,z]=K(new Map),V=g({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,n,r,i)=>{let s=n.errorRetryCount,a=i.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(d(s)||!(a>s))&&setTimeout(r,o,i)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:P?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:P?5e3:3e3,compare:B,isPaused:()=>!1,cache:$,mutate:z,fallback:{}},{isOnline:()=>S,isVisible:()=>{let e=y&&document.visibilityState;
1return d(e)||"hidden"!==e}}),G=(e,t)=>{let n=g(e,t);if(t){let{use:r,fallback:i}=e,{use:s,fallback:a}=t;r&&s&&(n.use=r.concat(s)),i&&a&&(n.fallback=g(i,a))}return n},q=(0,r.createContext)({}),W=e=>{let{value:t}=e,n=(0,r.useContext)(q),i=c(t),s=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),a=(0,r.useMemo)(()=>i?s:G(n,s),[i,n,s]),o=s&&s.provider,u=(0,r.useRef)(l);o&&!u.current&&(u.current=K(o(a.cache||$),s));let d=u.current;return d&&(a.cache=d[0],a.mutate=d[1]),I(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,r.createElement)(q.Provider,g(e,{value:a}))}},65915:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigInternalClientFactoryBootstrap=void 0;let r=n(6824),i=n(33346);t.useStatsigInternalClientFactoryBootstrap=function(e,t){let n=(0,r.useRef)((0,i._getInstance)(t.sdkKey));return(0,r.useMemo)(()=>{if(n.current)return n.current;let r=e(t);return n.current=r,t.useLegacyFormat?r.dataAdapter.setDataLegacy(t.initialValues,t.initialUser):r.dataAdapter.setData(t.initialValues),r.initializeSync(),r},[])}},67345:(e,t,n)=>{var r=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigUser=t.useStatsigInternalClientFactoryBootstrap=t.useStatsigInternalClientFactoryAsync=t.useStatsigClient=t.useParameterStore=t.useLayer=t.useGateValue=t.useFeatureGate=t.useExperiment=t.useDynamicConfig=t.useClientBootstrapInit=t.useClientAsyncInit=t.StatsigProvider=t.StatsigContext=void 0;let i=n(33346),s=n(48161);t.StatsigContext=s.default;let a=n(92119);Object.defineProperty(t,"StatsigProvider",{enumerable:!0,get:function(){return a.StatsigProvider}});let o=n(75065);Object.defineProperty(t,"useClientAsyncInit",{enumerable:!0,get:function(){return o.useClientAsyncInit}});let l=n(39299);Object.defineProperty(t,"useClientBootstrapInit",{enumerable:!0,get:function(){return l.useClientBootstrapInit}});let u=n(33381);t.useDynamicConfig=u.default;let d=n(3805);t.useExperiment=d.default;let c=n(48159);t.useFeatureGate=c.default;let g=n(73870);t.useGateValue=g.default;let _=n(72587);t.useLayer=_.default;let h=n(52058);t.useParameterStore=h.default;let f=n(75790);Object.defineProperty(t,"useStatsigClient",{enumerable:!0,get:function(){return f.useStatsigClient}});let p=n(949);Object.defineProperty(t,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return p.useStatsigInternalClientFactoryAsync}});let v=n(65915);Object.defineProperty(t,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return v.useStatsigInternalClientFactoryBootstrap}});let y=n(43218);Object.defineProperty(t,"useStatsigUser",{enumerable:!0,get:function(){return y.useStatsigUser}}),function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)}(n(56526),t),Object.assign((0,i._getStatsigGlobal)(),{StatsigContext:s.default,StatsigProvider:a.StatsigProvider,useClientAsyncInit:o.useClientAsyncInit,useClientBootstrapInit:l.useClientBootstrapInit,useDynamicConfig:u.default,useExperiment:d.default,useFeatureGate:c.default,useGateValue:g.default,useLayer:_.default,useParameterStore:h.default,useStatsigClient:f.useStatsigClient,useStatsigInternalClientFactoryAsync:p.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:v.useStatsigInternalClientFactoryBootstrap,useStatsigUser:y.useStatsigUser})},72587:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${e}'.`),s.NoopEvaluationsClient.getLayer(e,t)):n.getLayer(e,t),[e,n,o,...t?Object.values(t):[]])}},73148:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},73870:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0});let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.default=function(e,t){let{client:n,renderVersion:o}=(0,r.useContext)(a.default);return(0,r.useMemo)(()=>(0,s.isNoopClient)(n)?(i.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${e}'.`),s.NoopEvaluationsClient.checkGate(e,t)):n.checkGate(e,t),[e,n,o,...t?Object.values(t):[]])}},74091:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(25431);let i=(0,n(81703).Ht)(r.Ay,e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))},74614:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let r=n(93986);t._DJB2=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return String(t>>>0)},t._DJB2Object=(e,n)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,n))),t._getSortedObject=(e,n)=>{if(null==e)return null;let i=Object.keys(e).sort(),s={};return i.forEach(i=>{let a=e[i];if(0===n||"object"!==(0,r._typeOf)(a)){s[i]=a;return}s[i]=(0,t._getSortedObject)(a,null!=n?n-1:n)}),s}},75065:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useClientAsyncInit=void 0;let r=n(56526),i=n(949);t.useClientAsyncInit=function(e,t,n=null){return(0,i.useStatsigInternalClientFactoryAsync)(e=>new r.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions),{sdkKey:e,initialUser:t,statsigOptions:n})}},75478:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,n,r,i,s)=>({duration:n,source:t,success:e,error:r,sourceUrl:i,warnings:s}),t.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."}},75790:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigClient=void 0;let r=n(6824),i=n(33346),s=n(77153),a=n(48161);t.useStatsigClient=function(){let{client:e,renderVersion:t,isLoading:n}=(0,r.useContext)(a.default),o=(0,r.useMemo)(()=>(0,s.isNoopClient)(e)?(i.Log.warn("Attempting to retrieve a StatsigClient but none was set."),s.NoopEvaluationsClient):e,[e,t]),l=[o,t],u=(0,r.useCallback)((e,t)=>o.checkGate(e,t),l),d=(0,r.useCallback)((e,t)=>o.getFeatureGate(e,t),l),c=(0,r.useCallback)((e,t)=>o.getDynamicConfig(e,t),l),g=(0,r.useCallback)((e,t)=>o.getExperiment(e,t),l),_=(0,r.useCallback)((e,t)=>o.getLayer(e,t),l),h=(0,r.useCallback)((e,t)=>o.getParameterStore(e,t),l),f=(0,r.useCallback)((e,t,n)=>"string"==typeof e?o.logEvent(e,t,n):o.logEvent(e),l);return(0,r.useMemo)(()=>({client:o,checkGate:u,getFeatureGate:d,getDynamicConfig:c,getExperiment:g,getLayer:_,getParameterStore:h,logEvent:f,isLoading:n}),[o,u,d,c,g,_,h,f,n])}},77153:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNoopClient=t.NoopEvaluationsClient=void 0;let r=n(33346),i={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},s=()=>{},a=()=>i,o=()=>Promise.resolve(),l=()=>Promise.resolve(i),u={reason:"Error:NoClient"},d=e=>(...t)=>{let n="string"==typeof t[0]?t[0]:t[1];switch(e){case"gate":return(0,r._makeFeatureGate)(n,u,null);case"config":return(0,r._makeDynamicConfig)(n,u,null);case"layer":return(0,r._makeLayer)(n,u,null);case"param_store":return{name:n}}},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:""},stableID:"",storageProvider:r.Storage,sdkInstanceID:""};t.NoopEvaluationsClient={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:a,initializeAsync:l,shutdown:o,flush:o,updateRuntimeOptions:s,updateUserSync:a,updateUserAsync:l,getContext:()=>Object.assign({},c),checkGate:()=>!1,getFeatureGate:d("gate"),getDynamicConfig:d("config"),getExperiment:d("config"),getLayer:d("layer"),getParameterStore:d("param_store"),logEvent:s,on:s,off:s,$on:s,$emt:s,dataAdapter:{attach:s,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:s,setDataLegacy:s,prefetchData:o}},t.isNoopClient=function(e){return"isNoop"in e}},77431:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let r=n(33346),i={disableExposureLog:!0};function s(e){return null==e||!1===e.disableExposureLog}function a(e,t){return null!=t&&!(0,r._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,n){return(o,l)=>{if(null==t)return l;let u=t[o];if(null==u||null!=l&&(0,r._typeOf)(l)!==u.param_type)return l;switch(u.ref_type){case"static":return u.value;case"gate":return e.getFeatureGate(u.gate_name,s(n)?void 0:i).value?u.pass_value:u.fail_value;case"dynamic_config":let d=e.getDynamicConfig(u.config_name,s(n)?void 0:i).get(u.param_name);return a(d,l)?l:d;case"experiment":let c=e.getExperiment(u.experiment_name,s(n)?void 0:i).get(u.param_name);return a(c,l)?l:c;case"layer":let g=e.getLayer(u.layer_name,s(n)?void 0:i).get(u.param_name);return a(g,l)?l:g;default:return l}}}},77778:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let i=n(81172),s=n(88738),a=n(3504);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let o="[Statsig] UnknownError";class l{constructor(e,t,n,r){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=r,this._seen=new Set}wrap(e,t){try{(function(e){let t=new Set,n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(e=>"function"==typeof(null==n?void 0:n[e])).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)})(e).forEach(n=>{let r=e[n];"$EB"in r||(e[n]=(...i)=>this._capture(t?`${t}:${n}`:n,()=>r.apply(e,i)),e[n].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=u(e))}_capture(e,t){try{let n=t();if(n&&n instanceof Promise)return n.catch(t=>this._onError(e,t));return n}catch(t){return this._onError(e,t),null}}_onError(e,n){try{i.Log.warn(`Caught error in ${e}`,{error:n}),r(this,void 0,void 0,function*(){var r,i,l,d,c,g,_;let h=n||Error(o),f=h instanceof Error,p=f?h.name:"No Name",v=u(h);if(this._lastSeenError=v,this._seen.has(p))return;if(this._seen.add(p),null==(i=null==(r=this._options)?void 0:r.networkConfig)?void 0:i.preventAllNetworkTraffic){null==(l=this._emitter)||l.call(this,{name:"error",error:n,tag:e});return}let y=s.SDKType._get(this._sdkKey),m=a.StatsigMetadataProvider.get(),b=f?h.stack:function(e){try{return JSON.stringify(e)}catch(e){return o}}(h),S=Object.assign({tag:e,exception:p,info:b,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(typeof r){case"number":case"bigint":case"boolean":t[String(n)]=r;break;case"string":r.length<50?t[String(n)]=r:t[String(n)]="set";break;case"object":"environment"===n?t.environment=r:"networkConfig"===n?t.networkConfig=r:t[String(n)]=null!=r?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},m),{sdkType:y})),k=null!=(g=null==(c=null==(d=this._options)?void 0:d.networkConfig)?void 0:c.networkOverrideFunc)?g:fetch;yield k(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(y),"STATSIG-SDK-VERSION":String(m.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(S)}),null==(_=this._emitter)||_.call(this,{name:"error",error:n,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}function u(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=l},80476:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};
1Object.defineProperty(t,"__esModule",{value:!0});let i=n(33346),s=n(22772);class a extends i.NetworkCore{constructor(e,t){super(e,t);let n=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new i.UrlConfiguration(i.Endpoint._initialize,null==n?void 0:n.initializeUrl,null==n?void 0:n.api,null==n?void 0:n.initializeFallbackUrls)}fetchEvaluations(e,t,n,s,a){return r(this,void 0,void 0,function*(){var r,o,l,u,d,c;let g=t?(0,i._typedJsonParse)(t,"has_updates","InitializeResponse"):null,_={user:s,hash:null!=(l=null==(o=null==(r=this._option)?void 0:r.networkConfig)?void 0:o.initializeHashAlgorithm)?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==g?void 0:g.has_updates){let e=(null==g?void 0:g.hash_used)!==(null!=(c=null==(d=null==(u=this._option)?void 0:u.networkConfig)?void 0:d.initializeHashAlgorithm)?c:"djb2");_=Object.assign(Object.assign({},_),{sinceTime:a&&!e?g.time:0,previousDerivedFields:"derived_fields"in g&&a?g.derived_fields:{},deltasResponseRequested:!0,full_checksum:g.full_checksum,partialUserMatchSinceTime:e?0:g.time})}return this._fetchEvaluations(e,g,_,n)})}_fetchEvaluations(e,t,n,i){return r(this,void 0,void 0,function*(){var r,a;let o=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:n,retries:2,isStatsigEncodable:!0,priority:i});if((null==o?void 0:o.code)===204)return'{"has_updates": false}';if((null==o?void 0:o.code)!==200)return null!=(r=null==o?void 0:o.body)?r:null;if((null==t?void 0:t.has_updates)!==!0||(null==(a=o.body)?void 0:a.includes('"is_delta":true'))!==!0||!0!==n.deltasResponseRequested)return o.body;let l=(0,s._resolveDeltasResponse)(t,o.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},n),l),{deltasResponseRequested:!1}),i)})}}t.default=a},81172:(e,t)=>{function n(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class r{static info(...e){r.level>=t.LogLevel.Info&&console.info("  INFO ",...n(e))}static debug(...e){r.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...n(e))}static warn(...e){r.level>=t.LogLevel.Warn&&console.warn("  WARN ",...n(e))}static error(...e){r.level>=t.LogLevel.Error&&console.error(" ERROR ",...n(e))}}t.Log=r,r.level=t.LogLevel.Warn},81703:(e,t,n)=>{n.d(t,{Ht:()=>_,aw:()=>g,iX:()=>u,qm:()=>c});var r=n(64752),i=n(24356),s=n(6824);let a=r.i&&window.__SWR_DEVTOOLS_USE__,o=a?window.__SWR_DEVTOOLS_USE__:[],l=e=>(0,r.a)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],u=()=>{let e=(0,s.useContext)(r.S);return(0,s.useMemo)(()=>(0,r.m)(r.d,e),[e])},d=o.concat(e=>(t,n,s)=>{let a=n&&((...e)=>{let[s]=(0,r.s)(t),[,,,a]=r.b.get(r.c);if(s.startsWith(i.q))return n(...e);let o=a[s];return(0,r.e)(o)?n(...e):(delete a[s],o)});return e(t,a,s)}),c=e=>function(...t){let n=u(),[i,s,a]=l(t),o=(0,r.f)(n,a),c=e,{use:g}=o,_=(g||[]).concat(d);for(let e=_.length;e--;)c=_[e](c);return c(i,s||o.fetcher||null,o)},g=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},_=(e,t)=>(...n)=>{let[r,i,s]=l(n),a=(s.use||[]).concat(t);return e(r,i,{...s,use:a})};a&&(window.__SWR_DEVTOOLS_REACT__=s)},83553:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let r=n(17140),i="foreground",s="background",a=[],o=i,l=!1;t._isCurrentlyVisible=()=>o===i,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{a.unshift(e)},t._notifyVisibilityChanged=e=>{e!==o&&(o=e,a.forEach(t=>t(e)))},(0,r._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(i)}),(0,r._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(s)),(0,r._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?i:s)}),(0,r._addWindowEventListenerSafe)((0,r._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(s)})},83713:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Prom
1ise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;let 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]),i=["i","e","d"];t._fetchTxtRecords=function(e){return n(this,void 0,void 0,function*(){let t=yield e("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:r});if(!t.ok){let e=Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}return function(e){let t=e.findIndex((t,n)=>n<200&&"="===String.fromCharCode(t)&&i.includes(String.fromCharCode(e[n-1])));if(-1===t){let e=Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let n="";for(let r=t-1;r<e.length;r++)n+=String.fromCharCode(e[r]);return n.split(",")}(new Uint8Array((yield t.arrayBuffer())))})}},84429:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});let r=n(33346);class i{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,r._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var n,i;if(!e)return!1;let s=(0,r._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=s&&(this._source=e.source,(null==s?void 0:s.has_updates)!==!0||(null!=(n=s.time)?n:0)<this._lcut||(this._rawValues=e.data,this._lcut=s.time,this._receivedAt=e.receivedAt,this._values=s,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,s),e.source&&s.user&&this._setWarningState(t,s),r.SDKFlags.setFlags(this._sdkKey,null!=(i=s.sdk_flags)?i:{}),!0))}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.dynamic_configs,e)}getConfigList(){var e;return(null==(e=this._values)?void 0:e.dynamic_configs)?Object.values(this._values.dynamic_configs).map(e=>e.name):[]}getLayer(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let n={};return t.user&&(n.user=t.user),t.sdkInfo&&(n.generatorSDKInfo=t.sdkInfo),n.lcut=t.time,n}_getDetailedStoreResult(e,t){let n=null;return e&&(n=e[t]?e[t]:e[(0,r._DJB2)(t)]),{result:n,details:this._getDetails(null==n)}}_setWarningState(e,t){var n,i;let s=r.StableID.get(this._sdkKey);if((null==(n=e.customIDs)?void 0:n.stableID)!==s&&((null==(i=e.customIDs)?void 0:i.stableID)||s))return void this._warnings.add("StableIDMismatch");if("user"in t){let n=t.user,i=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,r._getFullUserHash)(i)!==(0,r._getFullUserHash)(n)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,n;let r=this.getCurrentSourceDetails(),i=r.reason,s=null!=(t=r.warnings)?t:[];"Bootstrap"===this._source&&s.length>0&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=`${i}:${e?"Unrecognized":"Recognized"}`);let a="Bootstrap"===this._source&&null!=(n=this._bootstrapMetadata)?n:void 0;return a&&(r.bootstrapMetadata=a),Object.assign(Object.assign({},r),{reason:i})}}t.default=i},85899:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0})},88738:(e,t)=>{let n;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let r={};t.SDKType={_get:e=>{var t;return(null!=(t=r[e])?t:"js-mono")+(null!=n?n:"")},_setClientType(e,t){r[e]=t},_setBindingType(e){n&&"-react"!==n||(n="-"+e)}}},89941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let n={};t.SDKFlags={setFlags:(e,t)=>{n[e]=t},get:(e,t)=>{var r,i;return null!=(i=null==(r=n[e])?void 0:r[t])&&i}}},91818:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let i=n(81172),s=n(39944),a=n(22886),o=n(35270),l=n(40531);class u{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new c}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,a._normalizeUser)(e,this._options),n=this._getCacheKey(t),r=this._inMemoryCache.get(n,t);if(r&&this._getIsCacheValueValid(r))return r;let i=this._loadFromCache(n);return i&&this._getIsCacheValueValid(i)?(this._inMemoryCache.add(n,i,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){let n=t&&(0,a._normalizeUser)(t,this._options),r=this._getCacheKey(n);this._inMemoryCache.add(r,d("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===s.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,n){return r(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());let r=null!=e?e:this.getDataSync(t),s=[this._fetchAndPrepFromNetwork(r,t,n)];return(null==n?void 0:n.timeoutMs)&&s.push(new Promise(e=>setTimeout(e,n.timeoutMs)).then(()=>(i.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(s)})}_prefetchDataImpl(e,t){return r(this,void 0,void 0,function*(){let n=e&&(0,a._normalizeUser)(e,this._options),r=this._getCacheKey(n),i=yield this._getDataAsyncImpl(null,n,t);i&&this._inMemoryCache.add(r,Object.assign(Object.assign({},i),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,n){return r(this,void 0,void 0,function*(){var r;let a=null!=(r=null==e?void 0:e.data)?r:null,o=null!=e&&this._isCachedResultValidFor204(e,t),u=yield this._fetchFromNetwork(a,t,n,o);if(!u)return i.Log.debug("No response returned for latest value"),null;let c=(0,l._typedJsonParse)(u,"has_updates","Response"),g=this._getSdkKey(),_=s.StableID.get(g),h=null;if((null==c?void 0:c.has_updates)===!0)h=d("Network",u,_,t);else{if(!a||(null==c?void 0:c.has_updates)!==!1)return null;h=d("NetworkNotModified",a,_,t)}let f=this._getCacheKey(t);return this._inMemoryCache.add(f,h,this._cacheLimit),this._writeToCache(f,h),h})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(i.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let n=null==(t=o.Storage.getItem)?void 0:t.call(o.Storage,e);if(null==n)return null;let r=(0,l._typedJsonParse)(n,"source","Cached Result");return r?Object.assign(Object.assign({},r),{source:"Cache"}):null}_writeToCache(e,t){let 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._cacheLimit<=1)throw t;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var n;let r=null!=(n=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))?n:{};for(let n of(r[e]=Date.now(),g(r,t)))delete r[n],o.Storage.removeItem(n);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,r)}}function d(e,t,n,r){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,a._getFullUserHash)(r)}}t.DataAdapterCore=u,t._makeDataAdapterResult=d;class c{constructor(){this._data={}}get(e,t){var n;let r=this._data[e],s=null==r?void 0:r.stableID,a=null==(n=null==t?void 0:t.customIDs)?void 0:n.stableID;return a&&s&&a!==s?(i.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):r}add(e,t,n){for(let e of g(this._data,n-1))delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function g(e,t){let n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort((t,n)=>{let r=e[t],i=e[n];return"object"==typeof r&&"object"==typeof i?r.receivedAt-i.receivedAt:r-i}).slice(0,n.length-t)}},92119:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigProvider=void 0;let r=n(9476),i=n(6824),s=n(33346),a=n(48161),o=n(75065);function l(e){let[t,n]=(0,i.useState)(0),s=(0,o.useClientAsyncInit)(e.sdkKey,e.user,e.options).client,[l,u]=(0,i.useState)(!c(s));d(s,n,u);let g=(0,i.useMemo)(()=>({renderVersion:t,client:s,isLoading:l}),[t,s,l]);return(0,r.jsx)(a.default.Provider,{value:g,children:null!=e.loadingComponent&&g.isLoading?e.loadingComponent:e.children})}function u(e){let[t,n]=(0,i.useState)(0),s=e.client,[o,l]=(0,i.useState)(!c(s));d(s,n,l);let u=(0,i.useMemo)(()=>({renderVersion:t,client:s,isLoading:o}),[t,s,o]);return(0,r.jsx)(a.default.Provider,{value:u,children:null!=e.loadingComponent&&u.isLoading?e.loadingComponent:e.children})}function d(e,t,n){(0,i.useEffect)(()=>{let r=()=>{t(e=>e+1),n(!c(e))};return s.SDKType._setBindingType("react"),e.$on("values_updated",r),()=>{e.flush().catch(e=>s.Log.error("An error occurred during flush",e)),e.off("values_updated",r)}},[e,t])}function c(e){return"isNoop"in e||"Ready"===e.loadingStatus}t.StatsigProvider=function(e){return"client"in e?(("sdkKey"in e||"user"in e)&&s.Log.warn("Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored."),(0,r.jsx)(u,Object.assign({},e))):(0,r.jsx)(l,Object.assign({},e))}},93986:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)}},97140:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},97595:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let r=n(74614);function i(e,t,n){var i;if(n)return n(e,t);let s=t&&t.customIDs?t.customIDs:{},a=[`uid:${null!=(i=null==t?void 0:t.userID)?i:""}`,`cids:${Object.keys(s).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${s[e]}`).join(",")}`,`k:${e}`];return(0,r._DJB2)(a.join("|"))}t._getUserStorageKey=i,t._getStorageKey=function(e,t,n){return t?i(e,t,n):(0,r._DJB2)(`k:${e}`)}},97651:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let i=n(33346),s=n(80476);class a extends i.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,n){super.attach(e,t,n),null!==n&&n instanceof s.default?this._network=n:this._network=new s.default(null!=t?t:{})}getDataAsync(e,t,n){return this._getDataAsyncImpl(e,(0,i._normalizeUser)(t,this._options),n)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,i._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):i.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(e,t,n,i){return r(this,void 0,void 0,function*(){var r;let s=yield null==(r=this._network)?void 0:r.fetchEvaluations(this._getSdkKey(),e,null==n?void 0:n.priority,t,i);return null!=s?s:null})}_getCacheKey(e){var t;let n=(0,i._getStorageKey)(this._getSdkKey(),e,null==(t=this._options)?void 0:t.customUserCacheKeyFunc);return`${i.DataAdapterCachePrefix}.${this._cacheSuffix}.${n}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,i._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=a}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.