!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09f3e-7e5d-7070-b6b4-ca3f3058a809")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,260648,(e,t,r)=>{"use strict";function s(e){return e.unshift("[Statsig]"),e}Object.defineProperty(r,"__esModule",{value:!0}),r.Log=r.LogLevel=void 0,r.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...e){n.level>=r.LogLevel.Info&&console.info(" INFO ",...s(e))}static debug(...e){n.level>=r.LogLevel.Debug&&console.debug(" DEBUG ",...s(e))}static warn(...e){n.level>=r.LogLevel.Warn&&console.warn(" WARN ",...s(e))}static error(...e){n.level>=r.LogLevel.Error&&console.error(" ERROR ",...s(e))}}r.Log=n,n.level=r.LogLevel.Warn},335689,(e,t,r)=>{"use strict";var s,n,i;Object.defineProperty(r,"__esModule",{value:!0}),r._getInstance=r._getStatsigGlobalFlag=r._getStatsigGlobal=void 0;let a=e.r(260648);r._getStatsigGlobal=()=>{try{return"u">typeof __STATSIG__?__STATSIG__:c}catch(e){return c}},r._getStatsigGlobalFlag=e=>(0,r._getStatsigGlobal)()[e],r._getInstance=e=>{let t=(0,r._getStatsigGlobal)();return e?t.instances&&t.instances[e]:(t.instances&&Object.keys(t.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."),t.firstInstance)};let o="__STATSIG__",l="u">typeof window?window:{},u=e.g,d="u">typeof globalThis?globalThis:{},c=null!=(i=null!=(n=null!=(s=l[o])?s:u[o])?n:d[o])?i:{instance:r._getInstance};l[o]=c,u[o]=c,d[o]=c},754335,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Diagnostics=void 0;let s=new Map,n="start";function i(e,t,r,s){return Object.assign({key:r,action:t,step:s,timestamp:Date.now()},e)}function a(e,t){var r;let n=null!=(r=s.get(e))?r:[];n.push(t),s.set(e,n)}function o(e,t){if(t in e)return e[t]}r.Diagnostics={_getMarkers:e=>s.get(e),_markInitOverallStart:e=>{a(e,i({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{a(e,i({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,i(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,i(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{a(e,i({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,i(t,"end","initialize","process"))},_clearMarkers:e=>{s.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:o(e,"code"),name:o(e,"name"),message:o(e,"message")}},_getDiagnosticsData(e,t,s,n){var i;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null==(i=null==e?void 0:e.headers)?void 0:i.get("x-statsig-region"),isDelta:!0===s.includes('"is_delta":true')||void 0,attempt:t,error:r.Diagnostics._formatError(n)}},_enqueueDiagnosticsEvent(e,t,s,n){let i=r.Diagnostics._getMarkers(s);if(null==i||i.length<=0)return -1;let a=i[i.length-1].timestamp-i[0].timestamp;r.Diagnostics._clearMarkers(s);let o={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:i.slice(),statsigOptions:n},time:Date.now()};return t.enqueue(o),a}}},227488,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.EventBatch=void 0,r.EventBatch=class{constructor(e){this.attempts=0,this.createdAt=Date.now(),this.events=e}incrementAttempts(){this.attempts++}}},52699,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.EventRetryConstants=void 0,r.EventRetryConstants={MAX_RETRY_ATTEMPTS:8,DEFAULT_BATCH_SIZE:100,MAX_PENDING_BATCHES:40,TICK_INTERVAL_MS:1e3,QUICK_FLUSH_WINDOW_MS:200,MAX_LOCAL_STORAGE:500,get MAX_QUEUED_EVENTS(){return this.DEFAULT_BATCH_SIZE*this.MAX_PENDING_BATCHES}}},597945,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BatchQueue=void 0;let s=e.r(227488),n=e.r(52699);r.BatchQueue=class{constructor(e=n.EventRetryConstants.DEFAULT_BATCH_SIZE){this._batches=[],this._batchSize=e}batchSize(){return this._batchSize}requeueBatch(e){return this._enqueueBatch(e)}hasFullBatch(){return this._batches.some(e=>e.events.length>=this._batchSize)}takeNextBatch(){return this._batches.shift()}takeAllBatches(){let e=this._batches;return this._batches=[],e}createBatches(e){let t=0,r=0;for(;tn.EventRetryConstants.MAX_PENDING_BATCHES;){let e=this._batches.shift();e&&(t+=e.events.length)}return t}}},666793,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._isTypeMatch=r._typeOf=void 0,r._typeOf=function(e){return Array.isArray(e)?"array":typeof e},r._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},404337,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._getSortedObject=r._DJB2Object=r._DJB2=void 0;let s=e.r(666793);r._DJB2=e=>{let t=0;for(let r=0;r>>0)},r._DJB2Object=(e,t)=>(0,r._DJB2)(JSON.stringify((0,r._getSortedObject)(e,t))),r._getSortedObject=(e,t)=>{if(null==e)return null;let n=Object.keys(e).sort(),i={};return n.forEach(n=>{let a=e[n];if(0===t||"object"!==(0,s._typeOf)(a)){i[n]=a;return}i[n]=(0,r._getSortedObject)(a,null!=t?t-1:t)}),i}},334560,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._getStorageKey=r._getUserStorageKey=void 0;let s=e.r(404337);function n(e,t,r){var n;if(r)return r(e,t);let i=t&&t.customIDs?t.customIDs:{},a=[`uid:${null!=(n=null==t?void 0:t.userID)?n:""}`,`cids:${Object.keys(i).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${i[e]}`).join(",")}`,`k:${e}`];return(0,s._DJB2)(a.join("|"))}r._getUserStorageKey=n,r._getStorageKey=function(e,t,r){return t?n(e,t,r):(0,s._DJB2)(`k:${e}`)}},775703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NetworkParam=r.NetworkDefault=r.Endpoint=void 0,r.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},r.NetworkDefault={[r.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[r.Endpoint._initialize]:"https://featureassets.org/v1",[r.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},r.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},995432,(e,t,r)=>{"use strict";let s;Object.defineProperty(r,"__esModule",{value:!0}),r.SDKType=void 0;let n={};r.SDKType={_get:e=>{var t;return(null!=(t=n[e])?t:"js-mono")+(null!=s?s:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){s&&"-react"!==s||(s="-"+e)}}},209718,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigMetadataProvider=r.SDK_VERSION=void 0,r.SDK_VERSION="3.33.0";let s={sdkVersion:r.SDK_VERSION,sdkType:"js-mono"};r.StatsigMetadataProvider={get:()=>s,add:e=>{s=Object.assign(Object.assign({},s),e)}}},550477,(e,t,r)=>{"use strict";var s=e.i(820803);Object.defineProperty(r,"__esModule",{value:!0}),r._cloneObject=r._getUnloadEvent=r._getCurrentPageUrlSafe=r._addDocumentEventListenerSafe=r._addWindowEventListenerSafe=r._isServerEnv=r._getDocumentSafe=r._getWindowSafe=void 0;let n=e.r(260648);r._getWindowSafe=()=>"u">typeof window?window:null,r._getDocumentSafe=()=>{var e;let t=(0,r._getWindowSafe)();return null!=(e=null==t?void 0:t.document)?e:null},r._isServerEnv=()=>{if(null!==(0,r._getDocumentSafe)())return!1;let e=void 0!==s.default&&null!=s.default.versions&&null!=s.default.versions.node;return"string"==typeof EdgeRuntime||e},r._addWindowEventListenerSafe=(e,t)=>{let s=(0,r._getWindowSafe)();"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener(e,t)},r._addDocumentEventListenerSafe=(e,t)=>{let s=(0,r._getDocumentSafe)();"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener(e,t)},r._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,r._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},r._getUnloadEvent=()=>{let e=(0,r._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"},r._cloneObject=(e,t)=>{try{return JSON.parse(JSON.stringify(t))}catch(t){return n.Log.error(`Failed to clone object ${e}`),null}}},660523,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._notifyVisibilityChanged=r._subscribeToVisiblityChanged=r._isUnloading=r._isCurrentlyVisible=void 0;let s=e.r(550477),n="foreground",i="background",a=[],o=n,l=!1;r._isCurrentlyVisible=()=>o===n,r._isUnloading=()=>l,r._subscribeToVisiblityChanged=e=>{a.unshift(e)},r._notifyVisibilityChanged=e=>{e!==o&&(o=e,a.forEach(t=>t(e)))},(0,s._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,r._notifyVisibilityChanged)(n)}),(0,s._addWindowEventListenerSafe)("blur",()=>(0,r._notifyVisibilityChanged)(i)),(0,s._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,r._notifyVisibilityChanged)("visible"===document.visibilityState?n:i)}),(0,s._addWindowEventListenerSafe)((0,s._getUnloadEvent)(),()=>{l=!0,(0,r._notifyVisibilityChanged)(i)})},164359,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.EventSender=void 0;let n=e.r(260648),i=e.r(775703),a=e.r(995432),o=e.r(209718),l=e.r(660523);r.EventSender=class{constructor(e,t,r,s,n){this._sdkKey=e,this._network=t,this._emitter=r,this._options=n,this._logEventUrlConfig=s}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}sendBatch(e){return s(this,void 0,void 0,function*(){var t,r,s;let i="event_sender_unexpected_exception",a={};try{let s=(0,l._isUnloading)()&&this._network.isBeaconSupported()&&(null==(r=null==(t=this._options)?void 0:t.networkConfig)?void 0:r.networkOverrideFunc)==null;i="event_sender_pre_logs_flushed_emitter_exception",this._emitter({name:"pre_logs_flushed",events:e.events}),i=s?"event_sender_unexpected_exception":"event_sender_post_exception";let n=s?this._sendEventsViaBeacon(e,a):yield this._sendEventsViaPost(e,a);if(n.success)return i="event_sender_logs_flushed_emitter_exception",this._emitter({name:"logs_flushed",events:e.events}),n;return Object.assign(Object.assign(Object.assign({success:!1,statusCode:n.statusCode,failurePath:n.failurePath},n.failureErrorMessage?{failureErrorMessage:n.failureErrorMessage}:{}),n.failureDiagnosticBucket?{failureDiagnosticBucket:n.failureDiagnosticBucket}:{}),n.failureDiagnosticMetadata?{failureDiagnosticMetadata:n.failureDiagnosticMetadata}:{})}catch(e){return n.Log.warn("Failed to send batch:",e),Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!=(s=a.path)?s:i},a.errorMessage?{failureErrorMessage:a.errorMessage}:{}),a.diagnosticBucket?{failureDiagnosticBucket:a.diagnosticBucket}:{}),a.diagnosticMetadata?{failureDiagnosticMetadata:a.diagnosticMetadata}:{})}})}_sendEventsViaPost(e,t){return s(this,void 0,void 0,function*(){var r,s;let n=yield this._network.post(this._getRequestData(e),t),i=null!=(r=null==n?void 0:n.code)?r:-1;return -1===i?Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!=(s=t.path)?s:void 0===n?"event_sender_post_returned_undefined":"event_sender_post_returned_null"},t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{}):{success:i>=200&&i<300,statusCode:i}})}_sendEventsViaBeacon(e,t){var r;let s=this._network.beacon(this._getRequestData(e),t);return Object.assign(Object.assign(Object.assign({success:s,statusCode:s?200:-1,failurePath:s?void 0:null!=(r=t.path)?r:"beacon_send_false"},!s&&t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),!s&&t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),!s&&t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e.events},urlConfig:this._logEventUrlConfig,retries:3,preserveFailedStatusCode:!0,isCompressable:!0,params:{[i.NetworkParam.EventCount]:String(e.events.length)},headers:{"statsig-event-count":String(e.events.length),"statsig-retry-count":String(e.attempts),"statsig-sdk-type":a.SDKType._get(this._sdkKey),"statsig-sdk-version":o.SDK_VERSION},credentials:"same-origin"}}}},611836,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FlushInterval=void 0,r.FlushInterval=class{constructor(){this._currentIntervalMs=1e3,this._lastFlushAttemptTime=Date.now()}getCurrentIntervalMs(){return this._currentIntervalMs}markFlushAttempt(){this._lastFlushAttemptTime=Date.now()}getTimeSinceLastAttempt(){return Date.now()-this._lastFlushAttemptTime}hasReachedMaxInterval(){return this.getTimeSinceLastAttempt()>=6e4}getTimeTillMaxInterval(){return 6e4-this.getTimeSinceLastAttempt()}hasCompletelyRecoveredFromBackoff(){return this._currentIntervalMs<=1e3}adjustForSuccess(){let e=this._currentIntervalMs;1e3!==e&&(this._currentIntervalMs=Math.max(1e3,Math.floor(e/2)))}adjustForFailure(){let e=this._currentIntervalMs;this._currentIntervalMs=Math.min(6e4,2*e)}getTimeUntilNextFlush(){return this.getCurrentIntervalMs()-this.getTimeSinceLastAttempt()}}},298931,(e,t,r)=>{"use strict";var s,n;Object.defineProperty(r,"__esModule",{value:!0}),r.FlushType=void 0,(n=s||(r.FlushType=s={})).ScheduledMaxTime="scheduled:max_time",n.ScheduledFullBatch="scheduled:full_batch",n.Limit="limit",n.Manual="manual",n.Shutdown="shutdown"},792018,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r._fetchTxtRecords=void 0;let n=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"];r._fetchTxtRecords=function(e){return s(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:n});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,r)=>r<200&&"="===String.fromCharCode(t)&&i.includes(String.fromCharCode(e[r-1])));if(-1===t){let e=Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let r="";for(let s=t-1;s{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._setObjectInStorage=r._getObjectFromStorage=r.Storage=void 0;let s=e.r(260648),n=e.r(550477),i={},a={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>i[e]?i[e]:null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]},getAllKeys:()=>Object.keys(i)},o=null;try{let e=(0,n._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,r)=>e.localStorage.setItem(t,r),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(e){s.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 r.Storage._setProvider(a),null;throw e}}r.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}},r._getObjectFromStorage=function(e){let t=r.Storage.getItem(e);try{return JSON.parse(null!=t?t:"null")}catch(t){return s.Log.error(`Failed to parse value for key "${e}"`),null}},r._setObjectInStorage=function(e,t){r.Storage.setItem(e,JSON.stringify(t))}},509412,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r._isDomainFailure=r.NetworkFallbackResolver=void 0;let n=e.r(792018),i=e.r(404337),a=e.r(260648),o=e.r(33428);function l(e,t){var r;let s=null!=(r=null==e?void 0:e.toLowerCase())?r:"";return t||s.includes("uncaught exception")||s.includes("failed to fetch")||s.includes("networkerror when attempting to fetch resource")}function u(e){return`statsig.network_fallback.${(0,i._DJB2)(e)}`}function d(e,t){let r=u(e);t&&0!==Object.keys(t).length?o.Storage.setItem(r,JSON.stringify(t)):o.Storage.removeItem(r)}r.NetworkFallbackResolver=class{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 r;let s=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];s&&(s.expiryTime=Date.now()+6048e5,d(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:s})))}getActiveFallbackUrl(e,t){var r,s;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let n=this._fallbackInfo;null==n&&(n=null!=(r=function(e){let t=u(e),r=o.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return a.Log.error("Failed to parse FallbackInfo"),null}}(e))?r:{},this._fallbackInfo=n);let i=n[t.endpoint];return!i||Date.now()>(null!=(s=i.expiryTime)?s:0)||t.getChecksum()!==i.urlConfigChecksum?(delete n[t.endpoint],this._fallbackInfo=n,d(e,this._fallbackInfo),null):i.url?i.url:null}tryFetchUpdatedFallbackInfo(e,t,r,n){return s(this,void 0,void 0,function*(){var s,i;try{if(!l(r,n))return!1;let i=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,a=this._pickNewFallbackUrl(null==(s=this._fallbackInfo)?void 0:s[t.endpoint],i);if(!a)return!1;return this._updateFallbackInfoWithNewUrl(e,t,a),!0}catch(e){return null==(i=this._errorBoundary)||i.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var s,n,i;let a={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},o=t.endpoint,l=null==(s=this._fallbackInfo)?void 0:s[o];l&&a.previous.push(...l.previous),a.previous.length>10&&(a.previous=[]);let u=null==(i=null==(n=this._fallbackInfo)?void 0:n[o])?void 0:i.url;null!=u&&a.previous.push(u),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[o]:a}),d(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return s(this,void 0,void 0,function*(){var t;let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),s.push(`https://${e}${a}`)}}return s})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let s=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),n=null==e?void 0:e.url,i=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!s.has(e)&&t!==n){i=t;break}}return i}},r._isDomainFailure=l},708294,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SDKFlags=void 0;let s={};r.SDKFlags={setFlags:(e,t)=>{s[e]=t},get:(e,t)=>{var r,n;return null!=(n=null==(r=s[e])?void 0:r[t])&&n}}},796309,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getUUID=void 0,r.getUUID=function(){if("u">typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="u">typeof performance&&performance.now&&1e3*performance.now()||0,r="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${r}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,r=>{let s=16*Math.random();return e>0?(s=(e+s)%16|0,e=Math.floor(e/16)):(s=(t+s)%16|0,t=Math.floor(t/16)),("x"===r?s:7&s|8).toString(16)})}},899615,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigSession=r.SessionID=void 0;let s=e.r(334560),n=e.r(260648),i=e.r(33428),a=e.r(796309),o=e.r(660523),l={};function u(e){var t;let r=e.data,s=function({lastUpdate:e}){return Date.now()-e>18e5}(r)||function({startTime:e}){return Date.now()-e>144e5}(r);return s&&(e.data=_(),null==(t=null==__STATSIG__?void 0:__STATSIG__.instance(e.sdkKey))||t.$emt({name:"session_expired"})),s}function d(e){return`statsig.session_id.${(0,s._getStorageKey)(e)}`}function c(e){try{(0,i._setObjectInStorage)(e.storageKey,e.data),e.lastPersistedAt=Date.now()}catch(e){n.Log.warn("Failed to save SessionID")}}function _(){return{sessionID:(0,a.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}(0,o._subscribeToVisiblityChanged)(e=>{"background"===e&&Object.values(l).forEach(e=>c(e))}),r.SessionID={get:e=>r.StatsigSession.get(e).data.sessionID},r.StatsigSession={get:(e,t=!0)=>{var r,s,n;let a;return null==l[e]&&(l[e]=function(e){let t=d(e),r=(0,i._getObjectFromStorage)(t);return r&&r.sessionID&&r.startTime&&r.lastUpdate?{data:r,sdkKey:e,lastPersistedAt:0,storageKey:t}:{data:_(),sdkKey:e,lastPersistedAt:0,storageKey:t}}(e)),r=l[e],s=t,a=Date.now(),u(r)?c(r):s&&(r.data.lastUpdate=a,n=r,Date.now()-n.lastPersistedAt>15e3&&c(n)),r},overrideInitialSessionID:(e,t)=>{let r=Date.now(),s={data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t,lastPersistedAt:Date.now(),storageKey:d(t)};c(s),l[t]=s},checkForIdleSession:e=>{let t=l[e];!t||u(t)&&c(t)}}},464529,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getCookieName=r.StableID=void 0;let s=e.r(334560),n=e.r(260648),i=e.r(550477),a=e.r(33428),o=e.r(796309),l={},u={},d={};function c(e){return`statsig.stable_id.${(0,s._getStorageKey)(e)}`}function _(e,t){let r=c(t);try{(0,a._setObjectInStorage)(r,e)}catch(e){n.Log.warn("Failed to save StableID to storage")}}function h(e,t){if(!u[t]||null==(0,i._getDocumentSafe)())return;let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${g(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`}function g(e){return`statsig.stable_id.${(0,s._getStorageKey)(e)}`}r.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{let t;if(d[e])return null;if(null!=l[e])return l[e];let r=null;return null!=(r=function(e){if(!u[e]||null==(0,i._getDocumentSafe)())return null;for(let t of document.cookie.split(";")){let[r,s]=t.trim().split("=");if(r===g(e))return decodeURIComponent(s)}return null}(e))?(l[e]=r,_(r,e)):(null==(t=c(e),r=(0,a._getObjectFromStorage)(t))&&(r=(0,o.getUUID)()),_(r,e),h(r,e),l[e]=r),r},setOverride:(e,t)=>{l[t]=e,_(e,t),h(e,t)},_setCookiesEnabled:(e,t)=>{u[e]=t},_setDisabled:(e,t)=>{d[e]=t}},r.getCookieName=g},944890,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorTag=void 0,r.ErrorTag={NetworkError:"NetworkError"}},495544,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.LoggingEnabledOption=r.LogEventCompressionMode=void 0,r.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},r.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},484804,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.NetworkCore=r.RETRYABLE_CODES=void 0,e.r(335689);let n=e.r(335689),i=e.r(754335),a=e.r(260648),o=e.r(775703),l=e.r(509412),u=e.r(708294),d=e.r(995432),c=e.r(550477),_=e.r(899615),h=e.r(464529),g=e.r(944890),f=e.r(209718),p=e.r(495544),v=e.r(660523);r.RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]),r.NetworkCore=class{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"u">typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e,t){if(!m(e))return t&&(t.path="beacon_invalid_sdk_key"),!1;let r=this._getInternalRequestArgs("POST",e),s=this._getPopulatedURL(r),n=navigator;try{let e=n.sendBeacon.bind(n)(s,r.body);return!e&&t&&(t.path="beacon_send_false"),e}catch(e){throw t&&(t.path="beacon_send_exception"),e}}post(e,t){return s(this,void 0,void 0,function*(){let r=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(r),yield this._tryToCompressBody(r),this._sendRequest(r,t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e,t){return s(this,void 0,void 0,function*(){var n,l,u,d,_,h,f,p,y,E,k,C,w,I,O,D,P,x,M;if(!m(e))return t&&(t.path="network_invalid_sdk_key"),null;if(this._netConfig.preventAllNetworkTraffic)return t&&(t.path="network_prevent_all_network_traffic"),null;let{method:F,body:j,retries:L,attempt:T}=e,U=e.urlConfig.endpoint;if(this._isRateLimited(U))return a.Log.warn(`Request to ${U} was blocked because you are making requests too frequently.`),t&&(t.path="network_rate_limited"),null;let A=null!=T?T:1,R=!1,B=this._getPopulatedURL(e),N=Date.now(),K=null,$=(0,v._isUnloading)();try{let t,r={method:F,body:j,headers:Object.assign({},e.headers),priority:e.priority,keepalive:$};_=e,h=A,_.urlConfig.endpoint===o.Endpoint._initialize&&i.Diagnostics._markInitNetworkReqStart(_.sdkKey,{attempt:h});let s=this._leakyBucket[U];s&&(s.lastRequestTime=Date.now(),this._leakyBucket[U]=s);let a=null!=(n=this._netConfig.networkOverrideFunc)?n:fetch;if(!(K=yield Promise.race([a(B,r).finally(()=>clearTimeout(t)),new Promise((e,r)=>{t=setTimeout(()=>{R=!0,r(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield K.text().catch(()=>"No Text"),t=Error(`NetworkError: ${B} ${e}`);throw t.name="NetworkError",t}let l=yield K.text();return S(e,K,A,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:K.status}}catch(o){let n="string"==typeof(f=o)?f:f instanceof Error?`${f.name}: ${f.message}`:"Unknown Error",i=(p=null!=n?n:"",y=R,p.includes("Timeout")||y);if(S(e,K,A,"",o),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,n,i))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!L||A>L||!r.RETRYABLE_CODES.has(null!=(l=null==K?void 0:K.status)?l:500)){null==(u=this._emitter)||u.call(this,{name:"error",error:o,tag:g.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${F} request to ${B}.`;if(a.Log.error(r,n,o),null==(d=this._errorBoundary)||d.attachErrorIfNoneExists(r),e.preserveFailedStatusCode&&null!=K)return{body:null,code:K.status};if(null==K&&t){t.path=i?"network_request_timed_out_no_response":"network_request_exception_no_response",n&&(t.errorMessage=n);try{let r,s,n,a,o,l,u,d,_,h,g,f,p,m=(E=e,k=B,C=i,w=Date.now()-N,r=(0,c._getWindowSafe)(),s=null==r?void 0:r.document,n="u">typeof navigator?navigator:null,a=(0,v._isUnloading)(),o=n&&"boolean"==typeof n.onLine?String(n.onLine):"unknown",l=null!=(I=null==s?void 0:s.visibilityState)?I:"unknown",u=Object.keys(null!=(O=E.headers)?O:{}).length>0,d=(P=k,!(x=null==(D=null==r?void 0:r.location)?void 0:D.origin)||!P.startsWith(`${x}/`)&&!P.startsWith(`${x}?`)&&P!==x),_=null!=E.urlConfig.customUrl,h=null!=E.fallbackUrl,g=b(w,[250,1e3,5e3,1e4]),f=b((M=E.body,null==M?0:"string"==typeof M?M.length:M instanceof Uint8Array?M.byteLength:"u">typeof Blob&&M instanceof Blob?M.size:-1),[16384,65536,262144,1048576]),p="unknown_no_response",C?p="timeout":"false"===o?p="browser_offline":a?p="page_unloading":"hidden"===l?p="page_hidden":d&&u?p="cross_origin_custom_headers_preflight_risk":_||h?p="custom_url_no_response":w<250&&(p="immediate_network_rejection"),{bucket:p,metadata:{elapsedMsBucket:g,bodySizeBucket:f,online:o,visibilityState:l,isUnloading:String(a),crossOrigin:String(d),hasCustomUrl:String(_)}});t.diagnosticBucket=m.bucket,t.diagnosticMetadata=m.metadata}catch(e){}}return null}return yield function(e){return s(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(A),this._sendRequest(Object.assign(Object.assign({},e),{retries:L,attempt:A+1}),t)}})}_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 r=Date.now(),s=null!=(t=this._leakyBucket[e])?t:{count:0,lastRequestTime:r},n=Math.floor((r-s.lastRequestTime)*.05);return s.count=Math.max(0,s.count-n),s.count>=50||(s.count+=1,s.lastRequestTime=r,this._leakyBucket[e]=s,!1)}_getPopulatedURL(e){var t;let r=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===o.Endpoint._initialize||e.urlConfig.endpoint===o.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let s=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]:_.SessionID.get(e.sdkKey)},e.params),n=Object.keys(s).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(s[e])}`).join("&");return`${r}${n?`?${n}`:""}`}_tryEncodeBody(e){var t;let r=(0,c._getWindowSafe)(),s=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof s&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(s).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 s(this,void 0,void 0,function*(){var t;let r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable||null!=(0,n._getStatsigGlobalFlag)("no-compress")||"u"e+t.length,0),_=new Uint8Array(c),h=0;for(let e of d)_.set(e,h),h+=e.length;e.body=_,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 r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),s=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&y(s,t.data),s}};let m=e=>!!e.sdkKey||(a.Log.warn("Unable to make request without an SDK key"),!1),y=(e,t)=>{let{sdkKey:r,fallbackUrl:s}=e,n=h.StableID.get(r),i=_.SessionID.get(r),a=d.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:a,fallbackUrl:s})}))};function b(e,t){if(e<0)return"unknown";for(let r of t)if(e=${t[t.length-1]}`}function S(e,t,r,s,n){e.urlConfig.endpoint===o.Endpoint._initialize&&i.Diagnostics._markInitNetworkReqEnd(e.sdkKey,i.Diagnostics._getDiagnosticsData(t,r,s,n))}},642762,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.FlushCoordinator=void 0;let n=e.r(52699),i=e.r(164359),a=e.r(611836),o=e.r(298931),l=e.r(404337),u=e.r(260648),d=e.r(484804),c=e.r(550477),_=e.r(899615),h=e.r(495544),g=e.r(33428),f=new Set(["network_request_timed_out_no_response","network_request_exception_no_response","event_sender_post_returned_null","event_sender_post_returned_undefined","event_sender_post_exception"]);r.FlushCoordinator=class{constructor(e,t,r,s,n,o,l,u,d,c){this._cooldownTimer=null,this._maxIntervalTimer=null,this._hasRunQuickFlush=!1,this._currentFlushPromise=null,this._creationTime=Date.now(),this._isShuttingDown=!1,this._storageKey=null,this._flushInterval=new a.FlushInterval,this._batchQueue=e,this._pendingEvents=t,this._onPrepareFlush=r,this._errorBoundary=c,this._sdkKey=s,this._loggingEnabled=d,this._eventSender=new i.EventSender(s,n,o,l,u)}setLoggingEnabled(e){this._loggingEnabled=e}setLogEventCompressionMode(e){this._eventSender.setLogEventCompressionMode(e)}startScheduledFlushCycle(){this._scheduleNextFlush()}stopScheduledFlushCycle(){this._clearAllTimers()}addEvent(e){this._pendingEvents.addToPendingEventsQueue(e),!this._currentFlushPromise&&this._pendingEvents.hasEventsForFullBatch()&&this.processLimitFlush()}processManualFlush(){return s(this,void 0,void 0,function*(){return this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(o.FlushType.Manual).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}),this._currentFlushPromise})}processShutdown(){return s(this,void 0,void 0,function*(){return this._isShuttingDown=!0,this._clearAllTimers(),this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(o.FlushType.Shutdown).catch(e=>{u.Log.error(`Error during shutdown flush: ${e}`)}).finally(()=>{this._currentFlushPromise=null}),this._currentFlushPromise})}_executeFlush(e){return s(this,void 0,void 0,function*(){this._clearAllTimers();try{this._prepareQueueForFlush(e);let t=this._batchQueue.takeAllBatches();if(0===t.length)return;yield Promise.all(t.map(t=>this._processOneBatch(t,e)))}finally{this._isShuttingDown||this._scheduleNextFlush()}})}checkQuickFlush(){this._hasRunQuickFlush||Date.now()-this._creationTime>n.EventRetryConstants.QUICK_FLUSH_WINDOW_MS||(this._hasRunQuickFlush=!0,setTimeout(()=>{this.processManualFlush().catch(e=>{u.Log.warn("Quick flush failed:",e)})},n.EventRetryConstants.QUICK_FLUSH_WINDOW_MS))}_attemptScheduledFlush(){let e;if(this._currentFlushPromise)return void this._scheduleNextFlush();let t=this.containsAtLeastOneFullBatch(),r=this._flushInterval.hasReachedMaxInterval();t||r?(this._flushInterval.markFlushAttempt(),e=t?o.FlushType.ScheduledFullBatch:o.FlushType.ScheduledMaxTime,this._currentFlushPromise=this._processNextBatch(e).then(()=>{}).catch(e=>{u.Log.error("Error during scheduled flush:",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})):this._scheduleNoopPollTick()}processLimitFlush(){!this._flushInterval.hasCompletelyRecoveredFromBackoff()||this._currentFlushPromise||(this._currentFlushPromise=this._processLimitFlushInternal().catch(e=>{u.Log.error("Error during limit flush",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}))}_processLimitFlushInternal(){return s(this,void 0,void 0,function*(){if(yield this._processNextBatch(o.FlushType.Limit))for(;this._flushInterval.hasCompletelyRecoveredFromBackoff()&&this.containsAtLeastOneFullBatch()&&(yield this._processNextBatch(o.FlushType.Limit)););})}_scheduleNextFlush(){if(this._clearAllTimers(),this._isShuttingDown)return;let e=Math.max(0,this._flushInterval.getTimeUntilNextFlush());this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,_.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e);let t=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,_.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t)}_clearAllTimers(){null!==this._cooldownTimer&&(clearTimeout(this._cooldownTimer),this._cooldownTimer=null),null!==this._maxIntervalTimer&&(clearTimeout(this._maxIntervalTimer),this._maxIntervalTimer=null)}_scheduleNoopPollTick(){if(this._clearAllTimers(),this._isShuttingDown)return;this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,_.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},n.EventRetryConstants.TICK_INTERVAL_MS);let e=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,_.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e)}_processNextBatch(e){return s(this,void 0,void 0,function*(){this._prepareQueueForFlush(e);let t=this._batchQueue.takeNextBatch();return!!t&&this._processOneBatch(t,e)})}_processOneBatch(e,t){return s(this,void 0,void 0,function*(){if(this._loggingEnabled!==h.LoggingEnabledOption.always&&(0,c._isServerEnv)())return this._flushInterval.adjustForSuccess(),!0;let r=yield this._eventSender.sendBatch(e);return r.success?(this._flushInterval.adjustForSuccess(),!0):(this._flushInterval.adjustForFailure(),this._handleFailure(e,t,r.statusCode,r.failurePath,r.failureErrorMessage,r.failureDiagnosticBucket,r.failureDiagnosticMetadata),!1)})}_prepareQueueForFlush(e){this._onPrepareFlush();let t=this.convertPendingEventsToBatches();t>0&&(u.Log.warn(`Dropped ${t} events`),this._errorBoundary.logDroppedEvents(t,"Batch queue limit reached during batching",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:n.EventRetryConstants.MAX_PENDING_BATCHES,flushType:e,retries:"dropped before batching"}))}containsAtLeastOneFullBatch(){return this._pendingEvents.hasEventsForFullBatch()||this._batchQueue.hasFullBatch()}convertPendingEventsToBatches(){if(this._pendingEvents.isEmpty())return 0;let e=this._pendingEvents.takeAll();return this._batchQueue.createBatches(e)}_isRetryableBatch(e,t){return!!(d.RETRYABLE_CODES.has(e)||-1===e&&t&&f.has(t))}_handleFailure(e,t,r,s,i,a,l){if(t===o.FlushType.Shutdown){u.Log.warn(`${t} flush failed during shutdown. ${e.events.length} event(s) will be saved to storage for retry in next session.`),this._saveShutdownFailedEventsToStorage(e.events);return}if(!this._isRetryableBatch(r,s)){u.Log.warn(`${t} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped. Non-retryable error: ${r}`),this._errorBoundary.logEventRequestFailure(e.events.length,"non-retryable error",t,r,e.attempts,s,i,a,l);return}if(e.attempts>=n.EventRetryConstants.MAX_RETRY_ATTEMPTS){u.Log.warn(`${t} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped.`),this._errorBoundary.logEventRequestFailure(e.events.length,"max retry attempts exceeded",t,r,e.attempts,s,i,a,l);return}e.incrementAttempts();let d=this._batchQueue.requeueBatch(e);d>0&&(u.Log.warn(`Failed to requeue batch : dropped ${d} events due to full queue`),this._errorBoundary.logDroppedEvents(d,"Batch queue limit reached during requeue",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:n.EventRetryConstants.MAX_PENDING_BATCHES,flushType:t,retries:e.attempts}))}loadAndRetryShutdownFailedEvents(){return s(this,void 0,void 0,function*(){let e=this._getStorageKey();try{g.Storage.isReady()||(yield g.Storage.isReadyResolver());let t=this._getShutdownFailedEventsFromStorage(e);if(0===t.length)return;u.Log.debug(`Loading ${t.length} failed shutdown event(s) from storage for retry`),g.Storage.removeItem(e),t.forEach(e=>{this.addEvent(e)}),yield this.processManualFlush()}catch(e){u.Log.warn("Failed to load and retry failed shutdown events:",e)}})}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.failed_shutdown_events.${(0,l._DJB2)(this._sdkKey)}`),this._storageKey}_saveShutdownFailedEventsToStorage(e){let t=this._getStorageKey();try{let r=[...this._getShutdownFailedEventsFromStorage(t),...e];r.length>n.EventRetryConstants.MAX_LOCAL_STORAGE&&(r=r.slice(-n.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,g._setObjectInStorage)(t,r),u.Log.debug(`Saved ${e.length} failed shutdown event(s) to storage (total stored: ${r.length})`)}catch(e){u.Log.warn("Unable to save failed shutdown events to storage:",e)}}_getShutdownFailedEventsFromStorage(e){try{let t=(0,g._getObjectFromStorage)(e);if(Array.isArray(t))return t;return[]}catch(e){return[]}}}},834927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PendingEvents=void 0;let s=e.r(260648);r.PendingEvents=class{constructor(e){this._pendingEvents=[],this._batchSize=e}addToPendingEventsQueue(e){this._pendingEvents.push(e),s.Log.debug("Enqueued Event:",e)}hasEventsForFullBatch(){return this._pendingEvents.length>=this._batchSize}takeAll(){let e=this._pendingEvents;return this._pendingEvents=[],e}isEmpty(){return 0===this._pendingEvents.length}}},488396,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._createLayerParameterExposure=r._createConfigExposure=r._mapExposures=r._createGateExposure=r._isExposureEvent=void 0;let s="statsig::config_exposure",n="statsig::gate_exposure",i="statsig::layer_exposure",a=(e,t,r,s,n)=>(r.bootstrapMetadata&&(s.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:l(r,s),secondaryExposures:n,time:Date.now()});function o(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}r._isExposureEvent=({eventName:e})=>e===n||e===s||e===i,r._createGateExposure=(e,t,r)=>{var s,i,l;let u={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null==(s=t.__evaluation)?void 0:s.version)!=null&&(u.configVersion=t.__evaluation.version),a(n,e,t.details,u,o(null!=(l=null==(i=t.__evaluation)?void 0:i.secondary_exposures)?l:[],r))},r._mapExposures=o,r._createConfigExposure=(e,t,r)=>{var n,i,l,u;let d={config:t.name,ruleID:t.ruleID};return(null==(n=t.__evaluation)?void 0:n.version)!=null&&(d.configVersion=t.__evaluation.version),(null==(i=t.__evaluation)?void 0:i.passed)!=null&&(d.rulePassed=String(t.__evaluation.passed)),a(s,e,t.details,d,o(null!=(u=null==(l=t.__evaluation)?void 0:l.secondary_exposures)?u:[],r))},r._createLayerParameterExposure=(e,t,r,s)=>{var n,l,u,d,c,_,h;let g=t.__evaluation,f=(null==(n=null==g?void 0:g.explicit_parameters)?void 0:n.includes(r))===!0,p="",v=null!=(l=null==g?void 0:g.undelegated_secondary_exposures)?l:[];f&&(p=null!=(u=g.allocated_experiment_name)?u:"",v=null!=(d=g.secondary_exposures)?d:[]);let m=null==(c=t.__evaluation)?void 0:c.parameter_rule_ids,y={config:t.name,parameterName:r,ruleID:null!=(_=null==m?void 0:m[r])?_:t.ruleID,allocatedExperiment:p,isExplicitParameter:String(f)};return(null==(h=t.__evaluation)?void 0:h.version)!=null&&(y.configVersion=t.__evaluation.version),a(i,e,t.details,y,o(v,s))};let l=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},216139,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UrlConfiguration=void 0;let s=e.r(404337),n=e.r(775703),i={[n.Endpoint._initialize]:"i",[n.Endpoint._rgstr]:"e",[n.Endpoint._download_config_specs]:"d"};r.UrlConfiguration=class{constructor(e,t,r,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=i[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),s&&(this.fallbackUrls=s);const a=n.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,s._DJB2)(this.customUrl+t)}}},693613,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.EventLogger=void 0;let n=e.r(597945),i=e.r(334560),a=e.r(52699),o=e.r(642762),l=e.r(404337),u=e.r(260648),d=e.r(775703),c=e.r(834927),_=e.r(550477),h=e.r(488396),g=e.r(495544),f=e.r(33428),p=e.r(216139),v=e.r(660523),m={};r.EventLogger=class e{static _safeFlushAndForget(e){var t;null==(t=m[e])||t.flush().catch(()=>{})}constructor(e,t,r,s,n){var i;this._sdkKey=e,this._emitter=t,this._network=r,this._options=s,this._errorBoundary=n,this._pendingEvents=null,this._batchQueue=null,this._flushCoordinator=null,this._lastExposureTimeMap={},this._nonExposedChecks={},this._isShuttingDown=!1,this._storageKey=null,this._pendingCompressionMode=null,this._loggingEnabled=null!=(i=null==s?void 0:s.loggingEnabled)?i:(null==s?void 0:s.disableLogging)===!0?g.LoggingEnabledOption.disabled:g.LoggingEnabledOption.browserOnly,(null==s?void 0:s.loggingEnabled)&&void 0!==s.disableLogging&&u.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.");const a=null==s?void 0:s.networkConfig;this._logEventUrlConfig=new p.UrlConfiguration(d.Endpoint._rgstr,null==a?void 0:a.logEventUrl,null==a?void 0:a.api,null==a?void 0:a.logEventFallbackUrls)}setLogEventCompressionMode(e){this._flushCoordinator?this._flushCoordinator.setLogEventCompressionMode(e):this._pendingCompressionMode=e}setLoggingEnabled(e){let t="disabled"===this._loggingEnabled,r="disabled"!==e;if(this._loggingEnabled=e,this._flushCoordinator&&this._flushCoordinator.setLoggingEnabled(e),t&&r){let e=this._loadStoredEvents();u.Log.debug(`Loaded ${e.length} stored event(s) from storage`),e.length>0&&(e.forEach(e=>{this._initFlushCoordinator().addEvent(e)}),this.flush().catch(e=>{u.Log.warn("Failed to flush events after enabling logging:",e)}))}}enqueue(e){var t;if(!this._shouldLogEvent(e))return;let r=this._normalizeEvent(e);"disabled"===this._loggingEnabled?this._storeEventToStorage(r):(this._initFlushCoordinator().addEvent(r),null==(t=this._flushCoordinator)||t.checkQuickFlush())}incrementNonExposureCount(e){var t;let r=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var t;let r=(0,_._isServerEnv)();if(r&&(null==(t=this._options)?void 0:t.loggingEnabled)!=="always")return;let s=this._initFlushCoordinator();m[this._sdkKey]=this,r||(0,v._subscribeToVisiblityChanged)(t=>{"background"===t?e._safeFlushAndForget(this._sdkKey):"foreground"===t&&s.startScheduledFlushCycle()}),s.loadAndRetryShutdownFailedEvents().catch(e=>{u.Log.warn("Failed to load failed shutdown events:",e)}),s.startScheduledFlushCycle()}stop(){return s(this,void 0,void 0,function*(){this._isShuttingDown=!0,this._flushCoordinator&&(yield this._flushCoordinator.processShutdown()),delete m[this._sdkKey],this._flushCoordinator=null,this._pendingEvents=null,this._batchQueue=null})}flush(){return s(this,void 0,void 0,function*(){if(this._flushCoordinator)return this._flushCoordinator.processManualFlush()})}appendAndResetNonExposedChecks(){if(0===Object.keys(this._nonExposedChecks).length)return;let e=Object.assign({},this._nonExposedChecks);this._nonExposedChecks={};let t=this._normalizeEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:e}});this._flushCoordinator&&this._flushCoordinator.addEvent(t)}_shouldLogEvent(e){var t;if((null==(t=this._options)?void 0:t.loggingEnabled)!=="always"&&(0,_._isServerEnv)())return!1;if(!(0,h._isExposureEvent)(e))return!0;let r=e.user?e.user:{statsigEnvironment:void 0},s=(0,i._getUserStorageKey)(this._sdkKey,r),n=e.metadata?e.metadata:{},a=[e.eventName,s,n.gate,n.config,n.ruleID,n.allocatedExperiment,n.parameterName,String(n.isExplicitParameter),n.reason].join("|"),o=this._lastExposureTimeMap[a],l=Date.now();return(!o||!(l-o<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=l,!0)}_getCurrentPageUrl(){var e;if((null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,_._getCurrentPageUrlSafe)()}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.pending_events.${(0,l._DJB2)(this._sdkKey)}`),this._storageKey}_initFlushCoordinator(){var e,t;if(this._flushCoordinator)return this._flushCoordinator;let r=null!=(t=null==(e=this._options)?void 0:e.loggingBufferMaxSize)?t:a.EventRetryConstants.DEFAULT_BATCH_SIZE;return this._pendingEvents=new c.PendingEvents(r),this._batchQueue=new n.BatchQueue(r),this._flushCoordinator=new o.FlushCoordinator(this._batchQueue,this._pendingEvents,()=>this.appendAndResetNonExposedChecks(),this._sdkKey,this._network,this._emitter,this._logEventUrlConfig,this._options,this._loggingEnabled,this._errorBoundary),this._pendingCompressionMode&&(this._flushCoordinator.setLogEventCompressionMode(this._pendingCompressionMode),this._pendingCompressionMode=null),this._flushCoordinator}_storeEventToStorage(e){let t=this._getStorageKey();try{let r=this._getEventsFromStorage(t);r.push(e),r.length>a.EventRetryConstants.MAX_LOCAL_STORAGE&&(r=r.slice(-a.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,f._setObjectInStorage)(t,r)}catch(e){u.Log.warn("Unable to save events to storage")}}_getEventsFromStorage(e){try{let t=(0,f._getObjectFromStorage)(e);if(Array.isArray(t))return t;return[]}catch(e){return[]}}_loadStoredEvents(){let e=this._getStorageKey(),t=this._getEventsFromStorage(e);return t.length>0&&f.Storage.removeItem(e),t}_normalizeEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();return r&&(t.statsigMetadata={currentPage:r}),Object.assign(Object.assign({},e),t)}}},102723,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PrecomputedEvaluationsContextHandle=void 0;let s=e.r(260648),n=e.r(550477),i=e.r(899615),a=e.r(464529);r.PrecomputedEvaluationsContextHandle=class{constructor(e,t,r,s,n,i){this._sdkKey=e,this._getOptions=t,this._getErrorBoundary=r,this._getValues=s,this._getUser=n,this._getSdkInstanceID=i}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let e=(0,n._cloneObject)("StatsigUser",this._getUser());return null==e&&(s.Log.error("Failed to clone user"),e={}),e}getSession(e=!0){return i.StatsigSession.get(this._sdkKey,e)}get stableID(){return a.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(e=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(e),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}}},954462,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._getUnitIDFromUser=r._getFullUserHash=r._normalizeUser=void 0;let s=e.r(404337),n=e.r(260648),i=e.r(550477);r._normalizeUser=function(e,t,r){let s=(0,i._cloneObject)("StatsigUser",e);return null==s?(n.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(null!=t&&null!=t.environment?s.statsigEnvironment=t.environment:null!=r&&(s.statsigEnvironment={tier:r}),s)},r._getFullUserHash=function(e){return e?(0,s._DJB2Object)(e):null},r._getUnitIDFromUser=function(e,t){var r,s,n;if("string"!=typeof t)return e.userID;let i=t.toLowerCase();return"userid"!==i?null!=(s=null==(r=e.customIDs)?void 0:r[t])?s:null==(n=e.customIDs)?void 0:n[i]:e.userID}},890127,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._typedJsonParse=void 0;let s=e.r(260648);r._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return s.Log.error(`Failed to parse ${r}`),null}},715155,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r._makeDataAdapterResult=r.DataAdapterCore=void 0;let n=e.r(260648),i=e.r(464529),a=e.r(954462),o=e.r(33428),l=e.r(890127);function u(e,t,r,s){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,a._getFullUserHash)(s)}}r.DataAdapterCore=class{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 d}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,a._normalizeUser)(e,this._options),r=this._getCacheKey(t),s=this._inMemoryCache.get(r,t);if(s&&this._getIsCacheValueValid(s))return s;let n=this._loadFromCache(r);return n&&this._getIsCacheValueValid(n)?(this._inMemoryCache.add(r,n,this._cacheLimit),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,a._normalizeUser)(t,this._options),s=this._getCacheKey(r);this._inMemoryCache.add(s,u("Bootstrap",e,null,r),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===i.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,r){return s(this,void 0,void 0,function*(){o.Storage.isReady()||(yield o.Storage.isReadyResolver());let s=null!=e?e:this.getDataSync(t),i=[this._fetchAndPrepFromNetwork(s,t,r)];return(null==r?void 0:r.timeoutMs)&&i.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(n.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(i)})}_prefetchDataImpl(e,t){return s(this,void 0,void 0,function*(){let r=e&&(0,a._normalizeUser)(e,this._options),s=this._getCacheKey(r),n=yield this._getDataAsyncImpl(null,r,t);n&&this._inMemoryCache.add(s,Object.assign(Object.assign({},n),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,r){return s(this,void 0,void 0,function*(){var s;let a=null!=(s=null==e?void 0:e.data)?s:null,o=null!=e&&this._isCachedResultValidFor204(e,t),d=yield this._fetchFromNetwork(a,t,r,o);if(!d)return n.Log.debug("No response returned for latest value"),null;let c=(0,l._typedJsonParse)(d,"has_updates","Response"),_=this._getSdkKey(),h=i.StableID.get(_),g=null;if((null==c?void 0:c.has_updates)===!0)g=u("Network",d,h,t);else{if(!a||(null==c?void 0:c.has_updates)!==!1)return null;g=u("NetworkNotModified",a,h,t)}let f=this._getCacheKey(t);return this._inMemoryCache.add(f,g,this._cacheLimit),this._writeToCache(f,g),g})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(n.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null==(t=o.Storage.getItem)?void 0:t.call(o.Storage,e);if(null==r)return null;let s=(0,l._typedJsonParse)(r,"source","Cached Result");return s?Object.assign(Object.assign({},s),{source:"Cache"}):null}_writeToCache(e,t){let r=JSON.stringify(t);for(let t=0;t<8;t++)try{o.Storage.setItem(e,r);break}catch(t){if(!(t instanceof Error)||!(t.toString().includes("QuotaExceededError")||t.toString().includes("QUOTA_EXCEEDED_ERR"))||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 r;let s=null!=(r=(0,o._getObjectFromStorage)(this._lastModifiedStoreKey))?r:{};for(let r of(s[e]=Date.now(),c(s,t)))delete s[r],o.Storage.removeItem(r);(0,o._setObjectInStorage)(this._lastModifiedStoreKey,s)}},r._makeDataAdapterResult=u;class d{constructor(){this._data={}}get(e,t){var r;let s=this._data[e],i=null==s?void 0:s.stableID,a=null==(r=null==t?void 0:t.customIDs)?void 0:r.stableID;return a&&i&&a!==i?(n.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):s}add(e,t,r){for(let e of c(this._data,r-1))delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function c(e,t){let r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{let s=e[t],n=e[r];return"object"==typeof s&&"object"==typeof n?s.receivedAt-n.receivedAt:s-n}).slice(0,r.length-t)}},287264,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},234265,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorBoundary=r.EXCEPTION_ENDPOINT=void 0;let n=e.r(260648),i=e.r(995432),a=e.r(209718);r.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let o="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}r.ErrorBoundary=class{constructor(e,t,r,s){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=s,this._seen=new Set}wrap(e,t){try{(function(e){let t=new Set,r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null==r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)})(e).forEach(r=>{let s=e[r];"$EB"in s||(e[r]=(...n)=>this._capture(t?`${t}:${r}`:r,()=>s.apply(e,n)),e[r].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}logDroppedEvents(e,t,r){let s={eventCount:String(e),reason:t};r&&Object.keys(r).forEach(e=>{s[e]=String(r[e])}),this._onError("statsig::log_event_dropped_event_count",Error(t),!0,s)}logEventRequestFailure(e,t,r,s,n,i,a,o,l){let u={eventCount:String(e),flushType:r,statusCode:String(s),reason:t,retries:String(n)};i&&(u.failurePath=i),"string"==typeof a&&a.length>0&&(u.failureErrorMessage=a),"string"==typeof o&&o.length>0&&(u.failureDiagnosticBucket=o),l&&Object.keys(l).forEach(e=>{let t=l[e];t.length>0&&(u[`failureDiagnostic_${e}`]=t)}),this._onError("statsig::log_event_failed",Error(t),!0,u)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{let r=t();if(r&&r instanceof Promise)return r.catch(t=>this._onError(e,t));return r}catch(t){return this._onError(e,t),null}}_onError(e,t,u=!1,d){try{n.Log.warn(`Caught error in ${e}`,{error:t}),s(this,void 0,void 0,function*(){var s,n,c,_,h,g,f;let p=t||Error(o),v=p instanceof Error,m=v?p.name:"No Name",y=l(p);if(this._lastSeenError=y,!u&&this._seen.has(m))return;if(this._seen.add(m),null==(n=null==(s=this._options)?void 0:s.networkConfig)?void 0:n.preventAllNetworkTraffic){null==(c=this._emitter)||c.call(this,{name:"error",error:t,tag:e});return}let b=i.SDKType._get(this._sdkKey),S=a.StatsigMetadataProvider.get(),E=v?p.stack:function(e){try{return JSON.stringify(e)}catch(e){return o}}(p),k=Object.assign(Object.assign({tag:e,exception:m,info:E,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let s=e[r];switch(typeof s){case"number":case"bigint":case"boolean":t[String(r)]=s;break;case"string":s.length<50?t[String(r)]=s:t[String(r)]="set";break;case"object":"environment"===r?t.environment=s:"networkConfig"===r?t.networkConfig=s:t[String(r)]=null!=s?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},S),{sdkType:b})),null!=d?d:{}),C=null==(_=this._options)?void 0:_.networkConfig,w=null!=(h=null==C?void 0:C.networkOverrideFunc)?h:fetch;yield w(null!=(g=null==C?void 0:C.sdkExceptionUrl)?g:r.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(b),"STATSIG-SDK-VERSION":String(S.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(k)}),null==(f=this._emitter)||f.call(this,{name:"error",error:t,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},126465,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},222899,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},457379,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},819622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createMemoKey=r.MemoPrefix=void 0,r.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let s=new Set([]),n=new Set(["userPersistedValues"]);r.createMemoKey=function(e,t,r){let i=`${e}|${t}`;if(!r)return i;for(let e of Object.keys(r)){if(n.has(e))return;s.has(e)?i+=`|${e}=true`:i+=`|${e}=${r[e]}`}return i}},26766,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},296436,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},711826,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._fastApproxSizeOf=void 0,r._fastApproxSizeOf=(e,t)=>{let s=0,n=Object.keys(e);for(let i=0;i=t)break}return s}},317965,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigClientBase=void 0,e.r(335689);let n=e.r(335689),i=e.r(234265),a=e.r(693613),o=e.r(260648),l=e.r(819622),u=e.r(550477),d=e.r(899615),c=e.r(464529),_=e.r(495544),h=e.r(33428);r.StatsigClientBase=class{constructor(e,t,r,s){var l,_,g,f;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const p=this.$emt.bind(this);(null==s?void 0:s.logLevel)!=null&&(o.Log.level=s.logLevel),(null==s?void 0:s.disableStorage)&&h.Storage._setDisabled(!0),(null==s?void 0:s.initialSessionID)&&d.StatsigSession.overrideInitialSessionID(s.initialSessionID,e),(null==s?void 0:s.storageProvider)&&h.Storage._setProvider(s.storageProvider),(null==s?void 0:s.enableCookies)&&c.StableID._setCookiesEnabled(e,s.enableCookies),(null==s?void 0:s.disableStableID)&&c.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=s?s:{},this._memoCache={},this.overrideAdapter=null!=(l=null==s?void 0:s.overrideAdapter)?l:null,this._errorBoundary=new i.ErrorBoundary(e,s,p),this._logger=new a.EventLogger(e,p,r,s,this._errorBoundary),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,s,r),this.storageProvider=h.Storage,null==(f=null==(g=null==(_=this.overrideAdapter)?void 0:_.loadFromStorage)?void 0:g.call(_))||f.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,u._isServerEnv)())return;let s=(0,n._getStatsigGlobal)(),i=null!=(r=s.instances)?r:{};null!=i[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."),i[e]=t,s.firstInstance||(s.firstInstance=t),s.instances=i,__STATSIG__=s}(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,h.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(_.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return s(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 r=this._listeners[e].indexOf(t);-1!==r&&this._listeners[e].splice(r,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;let r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,r);o.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>r(e)),null==(t=this._listeners["*"])||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){(null==r?void 0:r.disableExposureLog)===!0?this._logger.incrementNonExposureCount(e):this._logger.enqueue(t)}_memoize(e,t){return(r,s)=>{if(this._options.disableEvaluationMemoization)return t(r,s);let n=(0,l.createMemoKey)(e,r,s);return n?(n in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[n]=t(r,s)),this._memoCache[n]):t(r,s)}}}},845162,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DataAdapterCachePrefix=void 0,r.DataAdapterCachePrefix="statsig.cached"},449573,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},725225,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._makeTypedGet=r._mergeOverride=r._makeLayer=r._makeExperiment=r._makeDynamicConfig=r._makeFeatureGate=void 0;let s=e.r(260648),n=e.r(666793);function i(e,t,r,s){var n;return{name:e,details:t,ruleID:null!=(n=null==r?void 0:r.rule_id)?n:"",__evaluation:r,value:s}}function a(e,t,r){var s,n;let a=null!=(s=null==r?void 0:r.value)?s:{};return Object.assign(Object.assign({},i(e,t,r,a)),{idType:null!=(n=null==r?void 0:r.id_type)?n:null,get:o(e,null==r?void 0:r.value)})}function o(e,t,r){return(i,a)=>{var o;let l=null!=(o=null==t?void 0:t[i])?o:null;return null==l?null!=a?a:null:null==a||(0,n._isTypeMatch)(l,a)?(null==r||r(i),l):(s.Log.warn(`Parameter type mismatch. '${e}.${i}' 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)}}r._makeFeatureGate=function(e,t,r){var s;return Object.assign(Object.assign({},i(e,t,r,(null==r?void 0:r.value)===!0)),{idType:null!=(s=null==r?void 0:r.id_type)?s:null})},r._makeDynamicConfig=a,r._makeExperiment=function(e,t,r){var s;return Object.assign(Object.assign({},a(e,t,r)),{groupName:null!=(s=null==r?void 0:r.group_name)?s:null})},r._makeLayer=function(e,t,r,s){var n,a;return Object.assign(Object.assign({},i(e,t,r,void 0)),{get:o(e,null==r?void 0:r.value,s),groupName:null!=(n=null==r?void 0:r.group_name)?n:null,__value:null!=(a=null==r?void 0:r.value)?a:{}})},r._mergeOverride=function(e,t,r,s){return Object.assign(Object.assign(Object.assign({},e),t),{get:o(e.name,r,s)})},r._makeTypedGet=o},388171,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},642418,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UPDATE_DETAIL_ERROR_MESSAGES=r.createUpdateDetails=void 0,r.createUpdateDetails=(e,t,r,s,n,i)=>({duration:r,source:t,success:e,error:s,sourceUrl:n,warnings:i}),r.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."}},882786,(e,t,r)=>{"use strict";var s=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.Storage=r.Log=r.EventLogger=r.Diagnostics=void 0,e.r(335689);let i=e.r(335689),a=e.r(754335);Object.defineProperty(r,"Diagnostics",{enumerable:!0,get:function(){return a.Diagnostics}});let o=e.r(693613);Object.defineProperty(r,"EventLogger",{enumerable:!0,get:function(){return o.EventLogger}});let l=e.r(260648);Object.defineProperty(r,"Log",{enumerable:!0,get:function(){return l.Log}});let u=e.r(209718),d=e.r(33428);Object.defineProperty(r,"Storage",{enumerable:!0,get:function(){return d.Storage}}),n(e.r(335689),r),n(e.r(334560),r),n(e.r(102723),r),n(e.r(715155),r),n(e.r(754335),r),n(e.r(287264),r),n(e.r(234265),r),n(e.r(126465),r),n(e.r(222899),r),n(e.r(404337),r),n(e.r(457379),r),n(e.r(260648),r),n(e.r(819622),r),n(e.r(775703),r),n(e.r(484804),r),n(e.r(26766),r),n(e.r(296436),r),n(e.r(550477),r),n(e.r(995432),r),n(e.r(899615),r),n(e.r(711826),r),n(e.r(464529),r),n(e.r(317965),r),n(e.r(944890),r),n(e.r(845162),r),n(e.r(488396),r),n(e.r(209718),r),n(e.r(495544),r),n(e.r(449573),r),n(e.r(725225),r),n(e.r(388171),r),n(e.r(954462),r),n(e.r(33428),r),n(e.r(890127),r),n(e.r(666793),r),n(e.r(216139),r),n(e.r(796309),r),n(e.r(660523),r),n(e.r(642418),r),n(e.r(708294),r),Object.assign((0,i._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},452007,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.V1InitializeContainer=void 0;let s=e.r(882786);r.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r,n;return e&&null!=(n=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?n:null}}},543467,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.V2InitializeContainer=void 0;let s=e.r(882786);r.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,r,s;let n=this._getResultFromLookup(this._values.feature_gates,e);return n?{name:e,value:!0===n.v,rule_id:null!=(t=n.r)?t:"default",secondary_exposures:null!=(r=n.s)?r:[],id_type:null!=(s=n.i)?s:""}:null}getConfig(e){var t,r,s,n;let i=this._getResultFromLookup(this._values.dynamic_configs,e);return i?{name:e,value:null!=(t=this._values.values[i.v])?t:{},rule_id:i.r,secondary_exposures:null!=(r=i.s)?r:[],id_type:null!=(s=i.i)?s:"",is_user_in_experiment:!0===i.ue,passed:!0===i.p,group_name:null!=(n=i.gn)?n:void 0,is_experiment_active:!0===i.ea,group:i.r,is_device_based:"stableID"===i.i}:null}getLayer(e){var t,r,s,n,i,a;let o=this._getResultFromLookup(this._values.layer_configs,e);return o?{name:e,value:null!=(t=this._values.values[o.v])?t:{},rule_id:o.r,secondary_exposures:null!=(r=o.s)?r:[],is_user_in_experiment:!0===o.ue,group_name:null!=(s=o.gn)?s:void 0,is_experiment_active:!0===o.ea,group:o.r,is_device_based:"stableID"===o.i,allocated_experiment_name:null!=(n=o.ae)?n:"",explicit_parameters:null!=(i=o.ep)?i:[],undelegated_secondary_exposures:null!=(a=o.us)?a:[],parameter_rule_ids:o.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r,n;return e&&null!=(n=null!=(r=e[t])?r:e[(0,s._DJB2)(t)])?n:null}}},195544,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(882786),n=e.r(452007),i=e.r(543467);r.default=class{constructor(e,t){this._sdkKey=e,this._options=t,this._valuesForExternalUse=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._valuesForExternalUse=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._valuesForExternalUse}setValues(e,t){var r,a;if(!e)return!1;let o=(0,s._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=o&&(this._source=e.source,(null==o?void 0:o.has_updates)!==!0||(null!=(r=o.time)?r:0)0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let s=this.getCurrentSourceDetails(),n=s.reason,i=null!=(t=s.warnings)?t:[];"Bootstrap"===this._source&&i.length>0&&(n+=i[0]),"Uninitialized"!==n&&"NoValues"!==n&&(n=`${n}:${e?"Unrecognized":"Recognized"}`);let a="Bootstrap"===this._source&&null!=(r=this._bootstrapMetadata)?r:void 0;return a&&(s.bootstrapMetadata=a),Object.assign(Object.assign({},s),{reason:n})}}},206308,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._resolveDeltasResponse=void 0;let s=e.r(882786);function n(e,t){null==e||e.forEach(e=>{delete t[e]})}r._resolveDeltasResponse=function(e,t){var r,i,a;let o=(0,s._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!o)return{hadBadDeltaChecksum:!0};let l=(n((a=(r=e,i=o,Object.assign(Object.assign(Object.assign({},r),i),{feature_gates:Object.assign(Object.assign({},r.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},r.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},r.dynamic_configs),i.dynamic_configs)}))).deleted_gates,a.feature_gates),delete a.deleted_gates,n(a.deleted_configs,a.dynamic_configs),delete a.deleted_configs,n(a.deleted_layers,a.layer_configs),delete a.deleted_layers,a),u=(0,s._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)}},526258,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(882786),i=e.r(206308);class a extends n.NetworkCore{constructor(e,t){super(e,t);const r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new n.UrlConfiguration(n.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,i,a){return s(this,void 0,void 0,function*(){var s,o,l,u,d,c;let _=t?(0,n._typedJsonParse)(t,"has_updates","InitializeResponse"):null,h={user:i,hash:null!=(l=null==(o=null==(s=this._option)?void 0:s.networkConfig)?void 0:o.initializeHashAlgorithm)?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==_?void 0:_.has_updates){let e=(null==_?void 0:_.hash_used)!==(null!=(c=null==(d=null==(u=this._option)?void 0:u.networkConfig)?void 0:d.initializeHashAlgorithm)?c:"djb2");h=Object.assign(Object.assign({},h),{sinceTime:a&&!e?_.time:0,previousDerivedFields:"derived_fields"in _&&a?_.derived_fields:{},deltasResponseRequested:!0,full_checksum:_.full_checksum,partialUserMatchSinceTime:e?0:_.time})}return this._fetchEvaluations(e,_,h,r)})}_fetchEvaluations(e,t,r,n){return s(this,void 0,void 0,function*(){var s,a;let o=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:n});if((null==o?void 0:o.code)===204)return'{"has_updates": false}';if((null==o?void 0:o.code)!==200)return null!=(s=null==o?void 0:o.body)?s:null;if((null==t?void 0:t.has_updates)!==!0||(null==(a=o.body)?void 0:a.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return o.body;let l=(0,i._resolveDeltasResponse)(t,o.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),n)})}}r.default=a},563350,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._makeParamStoreGetter=void 0;let s=e.r(882786),n={disableExposureLog:!0};function i(e){return null==e||!1===e.disableExposureLog}function a(e,t){return null!=t&&!(0,s._isTypeMatch)(e,t)}r._makeParamStoreGetter=function(e,t,r){return(o,l)=>{if(null==t)return l;let u=t[o];if(null==u||null!=l&&(0,s._typeOf)(l)!==u.param_type)return l;switch(u.ref_type){case"static":return u.value;case"gate":return e.getFeatureGate(u.gate_name,i(r)?void 0:n).value?u.pass_value:u.fail_value;case"dynamic_config":let d;return a(d=e.getDynamicConfig(u.config_name,i(r)?void 0:n).get(u.param_name),l)?l:d;case"experiment":let c;return a(c=e.getExperiment(u.experiment_name,i(r)?void 0:n).get(u.param_name),l)?l:c;case"layer":let _;return a(_=e.getLayer(u.layer_name,i(r)?void 0:n).get(u.param_name),l)?l:_;default:return l}}}},776813,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigEvaluationsDataAdapter=void 0;let n=e.r(882786),i=e.r(526258);class a extends n.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof i.default?this._network=r:this._network=new i.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,n._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,n._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):n.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,r,n){return s(this,void 0,void 0,function*(){var s;let i=yield null==(s=this._network)?void 0:s.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,n);return null!=i?i:null})}_getCacheKey(e){var t;let r=(0,n._getStorageKey)(this._getSdkKey(),e,null==(t=this._options)?void 0:t.customUserCacheKeyFunc);return`${n.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,n._getFullUserHash)(t)}}r.StatsigEvaluationsDataAdapter=a},182199,(e,t,r)=>{"use strict";var s=e.e&&e.e.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(882786),i=e.r(195544),a=e.r(526258),o=e.r(563350),l=e.r(776813);class u extends n.StatsigClientBase{static instance(e){let t=(0,n._getStatsigGlobal)().instance(e);return t instanceof u?t:(n.Log.warn((0,n._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new u(null!=e?e:"",{}))}constructor(e,t,r=null){var s,o;n.SDKType._setClientType(e,"javascript-client");const u=new a.default(r,e=>{this.$emt(e)});for(const a of(super(e,null!=(s=null==r?void 0:r.dataAdapter)?s:new l.StatsigEvaluationsDataAdapter,u,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(n.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(n.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(n.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(n.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(n.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(n.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new i.default(e,null!=r?r:null),this._network=u,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,n.getUUID)(),this._contextHandle=new n.PrecomputedEvaluationsContextHandle(e,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID),null!=(o=null==r?void 0:r.plugins)?o:[]))a.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,n.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 s(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(e,t){let r=performance.now();try{return this._updateUserSyncImpl(e,t,r)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}}_updateUserSyncImpl(e,t,r){var s;let i=[...null!=(s=this._store.getWarnings())?s:[]];this._resetForUser(e);let a=this.dataAdapter.getDataSync(this._user);null==a&&i.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);let 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,n.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),i)}updateUserAsync(e,t){return s(this,void 0,void 0,function*(){let r=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}})}_updateUserAsyncImpl(e,t){return s(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;n.Diagnostics._markInitOverallStart(this._sdkKey);let s=this.dataAdapter.getDataSync(r);if(this._store.setValues(s,this._user),this._setStatus("Loading",s),s=yield this.dataAdapter.getDataAsync(s,r,t),r!==this._user)return(0,n.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let i=!1;null!=s&&(n.Diagnostics._markInitProcessStart(this._sdkKey),i=this._store.setValues(s,this._user),n.Diagnostics._markInitProcessEnd(this._sdkKey,{success:i})),this._finalizeUpdate(s),i||(this._errorBoundary.attachErrorIfNoneExists(n.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),n.Diagnostics._markInitOverallEnd(this._sdkKey,i,this._store.getCurrentSourceDetails());let a=n.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,n.createUpdateDetails)(i,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let e=(0,n._cloneObject)("StatsigUser",this._user);return null==e&&(n.Log.error("Failed to clone user"),e={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:e,errorBoundary:this._errorBoundary,session:n.StatsigSession.get(this._sdkKey),stableID:n.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){let s="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:s}),this._logger.enqueue(Object.assign(Object.assign({},s),{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 s(this,void 0,void 0,function*(){return n.Storage.isReady()||(yield n.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var r;return(0,n.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!=(r=this._store.getWarnings())?r:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{n.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 r,s,i;let a=(0,n._normalizeUser)(e,t),o=null==(r=a.customIDs)?void 0:r.stableID;if(o){let e=null==(i=(s=this.storageProvider).isReadyResolver)?void 0:i.call(s);e?e.then(()=>n.StableID.setOverride(o,this._sdkKey),()=>n.StableID.setOverride(o,this._sdkKey)):n.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 r,s;let{result:i,details:a}=this._store.getGate(e);this._checkUserHasIdForEvaluation(null==i?void 0:i.id_type,e,"Gate"),this._checkInitializationStatus(a.reason);let o=(0,n._makeFeatureGate)(e,a,i),l=null==(s=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:s.call(r,o,this._user,t),u=null!=l?l:o;return this._enqueueExposure(e,(0,n._createGateExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:u}),u}_getDynamicConfigImpl(e,t){var r,s;let{result:i,details:a}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==i?void 0:i.id_type,e,"Dynamic config"),this._checkInitializationStatus(a.reason);let o=(0,n._makeDynamicConfig)(e,a,i),l=null==(s=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:s.call(r,o,this._user,t),u=null!=l?l:o;return this._enqueueExposure(e,(0,n._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:u}),u}_getExperimentImpl(e,t){var r,s,i,a;let{result:o,details:l}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==o?void 0:o.id_type,e,"Experiment"),this._checkInitializationStatus(l.reason);let u=(0,n._makeExperiment)(e,l,o);null!=u.__evaluation&&(u.__evaluation.secondary_exposures=(0,n._mapExposures)(null!=(s=null==(r=u.__evaluation)?void 0:r.secondary_exposures)?s:[],this._store.getExposureMapping()));let d=null==(a=null==(i=this.overrideAdapter)?void 0:i.getExperimentOverride)?void 0:a.call(i,u,this._user,t),c=null!=d?d:u;return this._enqueueExposure(e,(0,n._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 r,s,i;let{result:a,details:o}=this._store.getLayer(e),l=(0,n._makeLayer)(e,o,a),u=null==(s=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:s.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let d=(0,n._mergeOverride)(l,u,null!=(i=null==u?void 0:u.__value)?i:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,n._createLayerParameterExposure)(this._user,d,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var r,s;let{result:n,details:i}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let a={name:e,details:i,__configuration:n,get:(0,o._makeParamStoreGetter)(this,n,t)},l=null==(s=null==(r=this.overrideAdapter)?void 0:r.getParamStoreOverride)?void 0:s.call(r,a,t);return null!=l&&(a.__configuration=l.config,a.details=l.details,a.get=(0,o._makeParamStoreGetter)(this,l.config,t)),a}_checkUserHasIdForEvaluation(e,t,r){e&&((0,n._getUnitIDFromUser)(this._user,e)||n.Log.warn(`The user does not have the required id_type "${e}" for ${r} "${t}"`))}_checkInitializationStatus(e){("Uninitialized"===e||e.startsWith("Loading"))&&n.Log.warn(`SDK initialization has not completed. Reason: ${e}`)}}r.default=u},547413,(e,t,r)=>{"use strict";var s=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigClient=void 0;let i=e.r(882786),a=e.r(182199);r.StatsigClient=a.default,n(e.r(882786),r),r.default=Object.assign((0,i._getStatsigGlobal)(),{StatsigClient:a.default})},439458,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useStatsigInternalClientFactoryAsync=void 0;let s=e.r(270401),n=e.r(882786);r.useStatsigInternalClientFactoryAsync=function(e,t){let r=(0,s.useMemo)(()=>{var r;return null!=(r=(0,n._getInstance)(t.sdkKey))?r:e(t)},[]),[i,a]=(0,s.useState)("Ready"!==r.loadingStatus);return(0,s.useMemo)(()=>{"Ready"!==r.loadingStatus&&r.initializeAsync().catch(n.Log.error).finally(()=>a(!1))},[]),{client:r,isLoading:i}}},555263,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useClientAsyncInit=void 0;let s=e.r(547413),n=e.r(439458);r.useClientAsyncInit=function(e,t,r=null){return(0,n.useStatsigInternalClientFactoryAsync)(e=>new s.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions),{sdkKey:e,initialUser:t,statsigOptions:r})}},349941,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.StatsigProvider=void 0;let s=e.r(222666),n=e.r(270401),i=e.r(882786),a=e.r(119461),o=e.r(555263);function l(e){let[t,r]=(0,n.useState)(0),i=(0,o.useClientAsyncInit)(e.sdkKey,e.user,e.options).client,[l,u]=(0,n.useState)(!c(i));d(i,r,u);let _=(0,n.useMemo)(()=>({renderVersion:t,client:i,isLoading:l}),[t,i,l]);return(0,s.jsx)(a.default.Provider,{value:_,children:null!=e.loadingComponent&&_.isLoading?e.loadingComponent:e.children})}function u(e){let[t,r]=(0,n.useState)(0),i=e.client,[o,l]=(0,n.useState)(!c(i));d(i,r,l);let u=(0,n.useMemo)(()=>({renderVersion:t,client:i,isLoading:o}),[t,i,o]);return(0,s.jsx)(a.default.Provider,{value:u,children:null!=e.loadingComponent&&u.isLoading?e.loadingComponent:e.children})}function d(e,t,r){(0,n.useEffect)(()=>{let s=()=>{t(e=>e+1),r(!c(e))};return i.SDKType._setBindingType("react"),e.$on("values_updated",s),()=>{e.flush().catch(e=>i.Log.error("An error occurred during flush",e)),e.off("values_updated",s)}},[e,t])}function c(e){return"isNoop"in e||"Ready"===e.loadingStatus}r.StatsigProvider=function(e){return"client"in e?(("sdkKey"in e||"user"in e)&&i.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,s.jsx)(u,Object.assign({},e))):(0,s.jsx)(l,Object.assign({},e))}},393864,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useStatsigInternalClientFactoryBootstrap=void 0;let s=e.r(270401),n=e.r(882786);r.useStatsigInternalClientFactoryBootstrap=function(e,t){let r=(0,s.useRef)((0,n._getInstance)(t.sdkKey));return(0,s.useMemo)(()=>{if(r.current)return r.current;let s=e(t);return r.current=s,t.useLegacyFormat?s.dataAdapter.setDataLegacy(t.initialValues,t.initialUser):s.dataAdapter.setData(t.initialValues),s.initializeSync(),s},[])}},953444,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useClientBootstrapInit=void 0;let s=e.r(547413),n=e.r(393864);r.useClientBootstrapInit=function(e,t,r,i=null,a){return(0,n.useStatsigInternalClientFactoryBootstrap)(e=>new s.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions),{sdkKey:e,initialUser:t,initialValues:r,statsigOptions:i,useLegacyFormat:a})}},662564,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${e}'.`),i.NoopEvaluationsClient.getDynamicConfig(e,t)):r.getDynamicConfig(e,t),[e,r,o,...t?Object.values(t):[]])}},68141,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${e}'.`),i.NoopEvaluationsClient.getExperiment(e,t)):r.getExperiment(e,t),[e,r,o,...t?Object.values(t):[]])}},666842,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${e}'.`),i.NoopEvaluationsClient.getFeatureGate(e,t)):r.getFeatureGate(e,t),[e,r,o,...t?Object.values(t):[]])}},490522,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${e}'.`),i.NoopEvaluationsClient.checkGate(e,t)):r.checkGate(e,t),[e,r,o,...t?Object.values(t):[]])}},272190,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${e}'.`),i.NoopEvaluationsClient.getLayer(e,t)):r.getLayer(e,t),[e,r,o,...t?Object.values(t):[]])}},316735,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.default=function(e,t){let{client:r,renderVersion:o}=(0,s.useContext)(a.default);return(0,s.useMemo)(()=>(0,i.isNoopClient)(r)?(n.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${e}'.`),i.NoopEvaluationsClient.getParameterStore(e,t)):r.getParameterStore(e,t),[e,r,o,...t?Object.values(t):[]])}},590238,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useStatsigClient=void 0;let s=e.r(270401),n=e.r(882786),i=e.r(315779),a=e.r(119461);r.useStatsigClient=function(){let{client:e,renderVersion:t,isLoading:r}=(0,s.useContext)(a.default),o=(0,s.useMemo)(()=>(0,i.isNoopClient)(e)?(n.Log.warn("Attempting to retrieve a StatsigClient but none was set."),i.NoopEvaluationsClient):e,[e,t]),l=[o,t],u=(0,s.useCallback)((e,t)=>o.checkGate(e,t),l),d=(0,s.useCallback)((e,t)=>o.getFeatureGate(e,t),l),c=(0,s.useCallback)((e,t)=>o.getDynamicConfig(e,t),l),_=(0,s.useCallback)((e,t)=>o.getExperiment(e,t),l),h=(0,s.useCallback)((e,t)=>o.getLayer(e,t),l),g=(0,s.useCallback)((e,t)=>o.getParameterStore(e,t),l),f=(0,s.useCallback)((e,t,r)=>"string"==typeof e?o.logEvent(e,t,r):o.logEvent(e),l);return(0,s.useMemo)(()=>({client:o,checkGate:u,getFeatureGate:d,getDynamicConfig:c,getExperiment:_,getLayer:h,getParameterStore:g,logEvent:f,isLoading:r}),[o,u,d,c,_,h,g,f,r])}},704133,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.useStatsigUser=void 0;let s=e.r(270401),n=e.r(119461),i=e.r(590238);function a(e){return e.getContextHandle().user}r.useStatsigUser=function(){let{client:e}=(0,i.useStatsigClient)(),{renderVersion:t}=(0,s.useContext)(n.default);return{user:(0,s.useMemo)(()=>a(e),[e,t]),updateUserSync:(0,s.useCallback)(t=>("function"==typeof t&&(t=t(a(e))),e.updateUserSync(t)),[e]),updateUserAsync:(0,s.useCallback)(t=>("function"==typeof t&&(t=t(a(e))),e.updateUserAsync(t)),[e])}}},448712,(e,t,r)=>{"use strict";var s=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.useStatsigUser=r.useStatsigInternalClientFactoryBootstrap=r.useStatsigInternalClientFactoryAsync=r.useStatsigClient=r.useParameterStore=r.useLayer=r.useGateValue=r.useFeatureGate=r.useExperiment=r.useDynamicConfig=r.useClientBootstrapInit=r.useClientAsyncInit=r.StatsigProvider=r.StatsigContext=void 0;let i=e.r(882786),a=e.r(119461);r.StatsigContext=a.default;let o=e.r(349941);Object.defineProperty(r,"StatsigProvider",{enumerable:!0,get:function(){return o.StatsigProvider}});let l=e.r(555263);Object.defineProperty(r,"useClientAsyncInit",{enumerable:!0,get:function(){return l.useClientAsyncInit}});let u=e.r(953444);Object.defineProperty(r,"useClientBootstrapInit",{enumerable:!0,get:function(){return u.useClientBootstrapInit}});let d=e.r(662564);r.useDynamicConfig=d.default;let c=e.r(68141);r.useExperiment=c.default;let _=e.r(666842);r.useFeatureGate=_.default;let h=e.r(490522);r.useGateValue=h.default;let g=e.r(272190);r.useLayer=g.default;let f=e.r(316735);r.useParameterStore=f.default;let p=e.r(590238);Object.defineProperty(r,"useStatsigClient",{enumerable:!0,get:function(){return p.useStatsigClient}});let v=e.r(439458);Object.defineProperty(r,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return v.useStatsigInternalClientFactoryAsync}});let m=e.r(393864);Object.defineProperty(r,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return m.useStatsigInternalClientFactoryBootstrap}});let y=e.r(704133);Object.defineProperty(r,"useStatsigUser",{enumerable:!0,get:function(){return y.useStatsigUser}}),n(e.r(547413),r),Object.assign((0,i._getStatsigGlobal)(),{StatsigContext:a.default,StatsigProvider:o.StatsigProvider,useClientAsyncInit:l.useClientAsyncInit,useClientBootstrapInit:u.useClientBootstrapInit,useDynamicConfig:d.default,useExperiment:c.default,useFeatureGate:_.default,useGateValue:h.default,useLayer:g.default,useParameterStore:f.default,useStatsigClient:p.useStatsigClient,useStatsigInternalClientFactoryAsync:v.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:m.useStatsigInternalClientFactoryBootstrap,useStatsigUser:y.useStatsigUser})},315779,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isNoopClient=r.NoopEvaluationsClient=void 0;let s=e.r(882786),n={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},i=()=>{},a=()=>n,o=()=>Promise.resolve(),l=()=>Promise.resolve(n),u={reason:"Error:NoClient"},d=e=>(...t)=>{let r="string"==typeof t[0]?t[0]:t[1];switch(e){case"gate":return(0,s._makeFeatureGate)(r,u,null);case"config":return(0,s._makeDynamicConfig)(r,u,null);case"layer":return(0,s._makeLayer)(r,u,null);case"param_store":return{name:r}}},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:s.Storage,sdkInstanceID:""},_=new s.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>"");r.NoopEvaluationsClient={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:a,initializeAsync:l,shutdown:o,flush:o,updateRuntimeOptions:i,updateUserSync:a,updateUserAsync:l,getContext:()=>Object.assign({},c),getContextHandle:()=>_,checkGate:()=>!1,getFeatureGate:d("gate"),getDynamicConfig:d("config"),getExperiment:d("config"),getLayer:d("layer"),getParameterStore:d("param_store"),logEvent:i,on:i,off:i,$on:i,$emt:i,dataAdapter:{attach:i,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:i,setDataLegacy:i,prefetchData:o}},r.isNoopClient=function(e){return"isNoop"in e}},119461,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(270401),n=e.r(315779);r.default=(0,s.createContext)({renderVersion:0,client:n.NoopEvaluationsClient,isLoading:!0})},874339,e=>{"use strict";let t,r,s,n,i;var a=e.i(988855);let o=Object.freeze([]),l=(t=new Map,r=new Set,s=o,n=()=>{for(let e of r)e()},i=()=>{s=Object.freeze([...t.keys()].toSorted((e,t)=>(0,a.compareDisplayText)(e,t,{locale:"en-US"})))},{register(e){let r=t.get(e)??0;t.set(e,r+1),0===r&&(i(),n());let s=!0;return()=>{if(!s)return;s=!1;let r=t.get(e);if(void 0!==r&&!(r<=0)){if(r>1)return void t.set(e,r-1);t.delete(e),i(),n()}}},subscribe:e=>(r.add(e),()=>{r.delete(e)}),getSnapshot:()=>s,reset:()=>{t.clear(),r.clear(),s=o}});e.s(["flagUsageRegistry",0,l])},925429,281610,e=>{"use strict";let t={arenaExplore:{statsigName:"arena-explore"},chromeGeminiNano:{statsigName:"chrome-gemini-nano"},clusterDashboard:{statsigName:"cluster-dashboard"},hipaaWorkspaces:{statsigName:"hipaa-workspaces"},memebench:{statsigName:"memebench"},shadowPrompts:{statsigName:"shadow-prompts"},workspaceSkills:{statsigName:"workspace-skills"},oriCode:{isServerEvaluated:!0,statsigName:"ori-code"},internsMcpConnectionsV2:{statsigName:"interns-mcp-connections-v2"},oriChat:{isServerEvaluated:!0,statsigName:"ori-chat"},partnershipInboundIntent:{statsigName:"partnership-inbound-intent"},privateDeployments:{statsigName:"private-deployments"},securityCenterKeySafety:{statsigName:"security-center-key-safety"},whoami:{statsigName:"whoami"}},r=[...new Set(Object.values(t).map(e=>e.statsigName))];e.s(["FEATURE_FLAGS",0,t,"STATSIG_GATE_LIST",0,r],281610),e.s([],925429)},877357,e=>{"use strict";e.s(["STATSIG_GATE_EVAL_OPTIONS",0,{disableExposureLog:!0},"STATSIG_SYNC_UPDATE_OPTIONS",0,{disableBackgroundCacheRefresh:!0}])}]); //# sourceMappingURL=0rn_mj1b8o0cq.js.map //# chunkId=01a09f3e-7e5d-7070-b6b4-ca3f3058a809