@atlassian/aui 10.1.4 → 10.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aui/aui-css-deprecations.js +1 -1
- package/dist/aui/aui-css-deprecations.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api-full.js +2 -2
- package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
- package/dist/aui/aui-prototyping.css +1 -1
- package/dist/aui/aui-prototyping.js +6 -6
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +4 -4
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/package.json +1 -1
- package/src/js/aui/date-picker.js +1 -18
- package/src/js-vendor-effective/select2/select2.js +3 -3
- package/src/js-vendor-effective/jquery-aop/LICENSE +0 -21
- package/src/js-vendor-effective/jquery-aop/README.md +0 -54
- package/src/js-vendor-effective/jquery-aop/aop.js +0 -395
- package/src/js-vendor-effective/jquery-aop/jquery-aop.txt +0 -5
- package/src/js-vendor-effective/jquery-aop/package.json +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@atlassian/aui",[],t):"object"==typeof exports?exports["@atlassian/aui"]=t():(e.AJS=e.AJS||{},e.AJS.DesignTokens=t())}(window,()=>(()=>{var e={6572:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var o=r(1634);function a(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,r){var i=t.map(function(t){var i=null==r?t:n(n({},t),{options:n(n({},a(r)),a(t.options))});return(0,o.bind)(e,i)});return function(){i.forEach(function(e){return e()})}}},1634:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var r=t.type,n=t.listener,o=t.options;return e.addEventListener(r,n,o),function(){e.removeEventListener(r,n,o)}}},1833:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=t.bind=void 0;var n=r(1634);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return n.bind}});var o=r(6572);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return o.bindAll}})},2646:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,a||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,g=u.length;for(c=0;c<g;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},2027:function(){},1660:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},1657:function(e,t,r){var n=r(7090);function o(){var t,r,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function l(e,o,a,i){var s=Object.create((o&&o.prototype instanceof u?o:u).prototype);return n(s,"_invoke",function(e,n,o){var a,i,s,l=0,u=o||[],d=!1,h={p:0,n:0,v:t,a:g,f:g.bind(t,4),d:function(e,r){return a=e,i=0,s=t,h.n=r,c}};function g(e,n){for(i=e,s=n,r=0;!d&&l&&!o&&r<u.length;r++){var o,a=u[r],g=h.p,p=a[2];e>3?(o=p===n)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=g&&((o=e<2&&g<a[1])?(i=0,h.v=n,h.n=a[1]):g<p&&(o=e<3||a[0]>n||n>p)&&(a[4]=e,a[5]=n,h.n=p,i=0))}if(o||e>1)return c;throw d=!0,n}return function(o,u,p){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&g(u,p),i=u,s=p;(r=i<2?t:s)||!d;){a||(i?i<3?(i>1&&(h.n=-1),g(i,s)):h.n=s:h.v=s);try{if(l=2,a){if(i||(o="next"),r=a[o]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((r=(d=h.n<0)?s:e.call(n,h))!==c)break}catch(e){a=t,i=1,s=e}finally{l=1}}return{value:r,done:d}}}(e,a,i),!0),s}var c={};function u(){}function d(){}function h(){}r=Object.getPrototypeOf;var g=h.prototype=u.prototype=Object.create([][i]?r(r([][i]())):(n(r={},i,function(){return this}),r));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return d.prototype=h,n(g,"constructor",h),n(h,"constructor",d),d.displayName="GeneratorFunction",n(h,s,"GeneratorFunction"),n(g),n(g,s,"Generator"),n(g,i,function(){return this}),n(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},1333:function(e,t,r){var n=r(2239);e.exports=function(e,t,r,o,a){var i=n(e,t,r,o,a);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},2239:function(e,t,r){var n=r(1657),o=r(6711);e.exports=function(e,t,r,a,i){return new o(n().w(e,t,r,a),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},6711:function(e,t,r){var n=r(1660),o=r(7090);e.exports=function e(t,r){var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,o,i){function s(){return new r(function(o,a){!function e(o,a,i,s){try{var l=t[o](a),c=l.value;return c instanceof n?r.resolve(c.v).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):r.resolve(c).then(function(e){l.value=e,i(l)},function(t){return e("throw",t,i,s)})}catch(e){s(e)}}(e,i,o,a)})}return a=a?a.then(s,s):s()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},7090:function(e){function t(r,n,o,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}e.exports=t=function(e,r,n,o){function a(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3037:function(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},1777:function(e,t,r){var n=r(1660),o=r(1657),a=r(1333),i=r(2239),s=r(6711),l=r(3037),c=r(8955);function u(){"use strict";var t=o(),r=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var g={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,g[e],t)},delegateYield:function(e,o,a){return t.resultName=o,r(n.d,c(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,r,n,o){return t.w(p(e),r,n,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,o){return(h(t)?i:a)(p(e),t,r,n,o)},keys:l,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},8955:function(e,t,r){var n=r(7250).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},7250:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8972:function(e,t,r){var n=r(1777)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},1917:function(e,t,r){"use strict";var n,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let i=r(1392);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:d}catch(e){return d}},t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&i.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."),r.firstInstance)};let s="__STATSIG__",l="undefined"!=typeof window?window:{},c=void 0!==r.g?r.g:{},u="undefined"!=typeof globalThis?globalThis:{},d=null!=(a=null!=(o=null!=(n=l[s])?n:c[s])?o:u[s])?a:{instance:t._getInstance};l[s]=d,c[s]=d,u[s]=d},833:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let n=r(902);function o(e,t,r){var o;if(r)return r(e,t);let a=t&&t.customIDs?t.customIDs:{},i=[`uid:${null!=(o=null==t?void 0:t.userID)?o:""}`,`cids:${Object.keys(a).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${a[e]}`).join(",")}`,`k:${e}`];return(0,n._DJB2)(i.join("|"))}t._getUserStorageKey=o,t._getStorageKey=function(e,t,r){return t?o(e,t,r):(0,n._DJB2)(`k:${e}`)}},9171:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},830:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let o=r(1392),a=r(826),i=r(5466),s=r(9982),l=r(9217);function c(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,i._getFullUserHash)(n)}}t.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 u}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,i._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n&&this._getIsCacheValueValid(n))return n;let o=this._loadFromCache(r);return o&&this._getIsCacheValueValid(o)?(this._inMemoryCache.add(r,o,this._cacheLimit),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,i._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,c("Bootstrap",e,null,r),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===a.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,r){return n(this,void 0,void 0,function*(){s.Storage.isReady()||(yield s.Storage.isReadyResolver());let n=null!=e?e:this.getDataSync(t),a=[this._fetchAndPrepFromNetwork(n,t,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(o.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(e,t){return n(this,void 0,void 0,function*(){let r=e&&(0,i._normalizeUser)(e,this._options),n=this._getCacheKey(r),o=yield this._getDataAsyncImpl(null,r,t);o&&this._inMemoryCache.add(n,Object.assign(Object.assign({},o),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,r){return n(this,void 0,void 0,function*(){var n;let i=null!=(n=null==e?void 0:e.data)?n:null,s=null!=e&&this._isCachedResultValidFor204(e,t),u=yield this._fetchFromNetwork(i,t,r,s);if(!u)return o.Log.debug("No response returned for latest value"),null;let d=(0,l._typedJsonParse)(u,"has_updates","Response"),h=this._getSdkKey(),g=a.StableID.get(h),p=null;if((null==d?void 0:d.has_updates)===!0)p=c("Network",u,g,t);else{if(!i||(null==d?void 0:d.has_updates)!==!1)return null;p=c("NetworkNotModified",i,g,t)}let f=this._getCacheKey(t);return this._inMemoryCache.add(f,p,this._cacheLimit),this._writeToCache(f,p),p})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(o.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null==(t=s.Storage.getItem)?void 0:t.call(s.Storage,e);if(null==r)return null;let n=(0,l._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){let r=JSON.stringify(t);for(let t=0;t<8;t++)try{s.Storage.setItem(e,r);break}catch(t){if(!(t instanceof Error)||"QuotaExceededError"!==t.name||this._cacheLimit<=1)throw t;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r;let n=null!=(r=(0,s._getObjectFromStorage)(this._lastModifiedStoreKey))?r:{};for(let r of(n[e]=Date.now(),d(n,t)))delete n[r],s.Storage.removeItem(r);(0,s._setObjectInStorage)(this._lastModifiedStoreKey,n)}},t._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(e,t){var r;let n=this._data[e],a=null==n?void 0:n.stableID,i=null==(r=null==t?void 0:t.customIDs)?void 0:r.stableID;return i&&a&&i!==a?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t,r){for(let e of d(this._data,r-1))delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function d(e,t){let r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{let n=e[t],o=e[r];return"object"==typeof n&&"object"==typeof o?n.receivedAt-o.receivedAt:n-o}).slice(0,r.length-t)}},5930:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let r=new Map,n="start";function o(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function a(e,t){var n;let o=null!=(n=r.get(e))?n:[];o.push(t),r.set(e,o)}function i(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{a(e,o({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{a(e,o({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,o(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,o(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{a(e,o({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,o(t,"end","initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:i(e,"code"),name:i(e,"name"),message:i(e,"message")}},_getDiagnosticsData(e,r,n,o){var a;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null==(a=null==e?void 0:e.headers)?void 0:a.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:r,error:t.Diagnostics._formatError(o)}},_enqueueDiagnosticsEvent(e,r,n,o){let a=t.Diagnostics._getMarkers(n);if(null==a||a.length<=0)return -1;let i=a[a.length-1].timestamp-a[0].timestamp;t.Diagnostics._clearMarkers(n);let s={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:a.slice(),statsigOptions:o},time:Date.now()};return r.enqueue(s),i}}},1681:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._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]),o=["i","e","d"];t._fetchTxtRecords=function(e){return r(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)&&o.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 n=t-1;n<e.length;n++)r+=String.fromCharCode(e[n]);return r.split(",")}(new Uint8Array((yield t.arrayBuffer())))})}},2443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6510:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let o=r(1392),a=r(2470),i=r(8808);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let s="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=class{constructor(e,t,r,n){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=n,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 n=e[r];"$EB"in n||(e[r]=(...o)=>this._capture(t?`${t}:${r}`:r,()=>n.apply(e,o)),e[r].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=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,r){try{o.Log.warn(`Caught error in ${e}`,{error:r}),n(this,void 0,void 0,function*(){var n,o,c,u,d,h,g;let p=r||Error(s),f=p instanceof Error,b=f?p.name:"No Name",v=l(p);if(this._lastSeenError=v,this._seen.has(b))return;if(this._seen.add(b),null==(o=null==(n=this._options)?void 0:n.networkConfig)?void 0:o.preventAllNetworkTraffic){null==(c=this._emitter)||c.call(this,{name:"error",error:r,tag:e});return}let y=a.SDKType._get(this._sdkKey),m=i.StatsigMetadataProvider.get(),_=f?p.stack:function(e){try{return JSON.stringify(e)}catch(e){return s}}(p),k=Object.assign({tag:e,exception:b,info:_,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];switch(typeof n){case"number":case"bigint":case"boolean":t[String(r)]=n;break;case"string":n.length<50?t[String(r)]=n:t[String(r)]="set";break;case"object":"environment"===r?t.environment=n:"networkConfig"===r?t.networkConfig=n:t[String(r)]=null!=n?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},m),{sdkType:y})),w=null!=(h=null==(d=null==(u=this._options)?void 0:u.networkConfig)?void 0:d.networkOverrideFunc)?h:fetch;yield w(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(y),"STATSIG-SDK-VERSION":String(m.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(k)}),null==(g=this._emitter)||g.call(this,{name:"error",error:r,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},5154:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},882:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let o=r(833),a=r(902),i=r(1392),s=r(3549),l=r(7734),c=r(4349),u=r(5714),d=r(9982),h=r(7617),g=r(2837),p={},f="startup",b="gained_focus";class v{static _safeFlushAndForget(e){var t;null==(t=p[e])||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null==(t=p[e])||t._retryFailedLogs(b)}constructor(e,t,r,n){var o,a;this._sdkKey=e,this._emitter=t,this._network=r,this._options=n,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(o=null==n?void 0:n.loggingEnabled)?o:(null==n?void 0:n.disableLogging)===!0?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&i.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!=(a=null==n?void 0:n.loggingBufferMaxSize)?a:100;const l=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){let e=this._getStorageKey(),t=(0,d._getObjectFromStorage)(e);t&&this._queue.push(...t),d.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&v._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let r=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;let t=(0,l._isServerEnv)();t&&(null==(e=this._options)?void 0:e.loggingEnabled)!=="always"||(p[this._sdkKey]=this,t||(0,g._subscribeToVisiblityChanged)(e=>{"background"===e?v._safeFlushAndForget(this._sdkKey):"foreground"===e&&v._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(f),this._startBackgroundFlushInterval())}stop(){return n(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete p[this._sdkKey],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>v._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if((null==(t=this._options)?void 0:t.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;let r=e.user?e.user:{statsigEnvironment:void 0},n=(0,o._getUserStorageKey)(this._sdkKey,r),a=e.metadata?e.metadata:{},i=[e.eventName,n,a.gate,a.config,a.ruleID,a.allocatedExperiment,a.parameterName,String(a.isExplicitParameter),a.reason].join("|"),s=this._lastExposureTimeMap[i],u=Date.now();return(!s||!(u-s<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[i]=u,!0)}_sendEvents(e){return n(this,void 0,void 0,function*(){var t,r;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{let n=(0,g._isUnloading)()&&this._network.isBeaconSupported()&&(null==(r=null==(t=this._options)?void 0:t.networkConfig)?void 0:r.networkOverrideFunc)==null;if(this._emitter({name:"pre_logs_flushed",events:e}),(n?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success)return this._emitter({name:"logs_flushed",events:e}),!0;return i.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return i.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return n(this,void 0,void 0,function*(){var t;let r=yield this._network.post(this._getRequestData(e)),n=null!=(t=null==r?void 0:r.code)?t:-1;return{success:n>=200&&n<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[s.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{let r=this._getFailedLogsFromStorage(t);(0,d._setObjectInStorage)(t,[...r,...e])}catch(e){i.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{let r=(0,d._getObjectFromStorage)(e);return Array.isArray(r)&&(t=r),t}catch(e){return[]}}_retryFailedLogs(e){let t=this._getStorageKey();n(this,void 0,void 0,function*(){d.Storage.isReady()||(yield d.Storage.isReadyResolver());let r=(0,d._getObjectFromStorage)(t);!r||(e===f&&d.Storage.removeItem(t),(yield this._sendEvents(r))&&e===b&&d.Storage.removeItem(t))}).catch(()=>{i.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,a._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});let n=Object.assign(Object.assign({},e),t);i.Log.debug("Enqueued Event:",n),this._queue.push(n)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let r=setInterval(()=>{let e=p[this._sdkKey];e&&e._flushIntervalId===r?v._safeFlushAndForget(this._sdkKey):clearInterval(r)},null!=(t=null==(e=this._options)?void 0:e.loggingIntervalMs)?t:1e4);this._flushIntervalId=r}}t.EventLogger=v},902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let n=r(7730);t._DJB2=e=>{let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return String(t>>>0)},t._DJB2Object=(e,r)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r))),t._getSortedObject=(e,r)=>{if(null==e)return null;let o=Object.keys(e).sort(),a={};return o.forEach(o=>{let i=e[o];if(0===r||"object"!==(0,n._typeOf)(i)){a[o]=i;return}a[o]=(0,t._getSortedObject)(i,null!=r?r-1:r)}),a}},6765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1392:function(e,t){"use strict";function r(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...e){n.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){n.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){n.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){n.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}t.Log=n,n.level=t.LogLevel.Warn},547:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let a=`${e}|${t}`;if(!o)return a;for(let e of Object.keys(o)){if(n.has(e))return;r.has(e)?a+=`|${e}=true`:a+=`|${e}=${o[e]}`}return a}},3549:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(1917);let o=r(1917),a=r(5930),i=r(1392),s=r(3549),l=r(9180),c=r(2235),u=r(2470),d=r(7734),h=r(599),g=r(826),p=r(1556),f=r(8808),b=r(5714),v=r(2837),y=new Set([408,500,502,503,504,522,524,599]);t.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"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!m(e))return!1;let t=this._getInternalRequestArgs("POST",e),r=this._getPopulatedURL(t),n=navigator;return n.sendBeacon.bind(n)(r,t.body)}post(e){return n(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return n(this,void 0,void 0,function*(){var t,r,o,l,c,u,d,h,g;if(!m(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:f,body:b,retries:_,attempt:w}=e,O=e.urlConfig.endpoint;if(this._isRateLimited(O))return i.Log.warn(`Request to ${O} was blocked because you are making requests too frequently.`),null;let E=null!=w?w:1,x=!1,S=this._getPopulatedURL(e),C=null,D=(0,v._isUnloading)();try{let r,n={method:f,body:b,headers:Object.assign({},e.headers),priority:e.priority,keepalive:D};c=e,u=E,c.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqStart(c.sdkKey,{attempt:u});let o=this._leakyBucket[O];o&&(o.lastRequestTime=Date.now(),this._leakyBucket[O]=o);let i=null!=(t=this._netConfig.networkOverrideFunc)?t:fetch;if(!(C=yield Promise.race([i(S,n).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{x=!0,t(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield C.text().catch(()=>"No Text"),t=Error(`NetworkError: ${S} ${e}`);throw t.name="NetworkError",t}let l=yield C.text();return k(e,C,E,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:C.status}}catch(s){let t="string"==typeof(d=s)?d:d instanceof Error?`${d.name}: ${d.message}`:"Unknown Error",a=(h=null!=t?t:"",g=x,h.includes("Timeout")||g);if(k(e,C,E,"",s),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,a))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!_||E>_||!y.has(null!=(r=null==C?void 0:C.status)?r:500)){null==(o=this._emitter)||o.call(this,{name:"error",error:s,tag:p.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${f} request to ${S}.`;return i.Log.error(r,t,s),null==(l=this._errorBoundary)||l.attachErrorIfNoneExists(r),null}return yield function(e){return n(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(E),this._sendRequest(Object.assign(Object.assign({},e),{retries:_,attempt:E+1}))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||(null==e?void 0:e.disableCompression)!==!0||(t=b.LogEventCompressionMode.Disabled),t||(t=b.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;let r=Date.now(),n=null!=(t=this._leakyBucket[e])?t:{count:0,lastRequestTime:r},o=Math.floor((r-n.lastRequestTime)*.05);return n.count=Math.max(0,n.count-o),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;let r=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===s.Endpoint._initialize||e.urlConfig.endpoint===s.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let n=Object.assign({[s.NetworkParam.SdkKey]:e.sdkKey,[s.NetworkParam.SdkType]:u.SDKType._get(e.sdkKey),[s.NetworkParam.SdkVersion]:f.SDK_VERSION,[s.NetworkParam.Time]:String(Date.now()),[s.NetworkParam.SessionID]:h.SessionID.get(e.sdkKey)},e.params),o=Object.keys(n).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&");return`${r}${o?`?${o}`:""}`}_tryEncodeBody(e){var t;let r=(0,d._getWindowSafe)(),n=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof n&&null==(0,o._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(n).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.StatsigEncoded]:"1"})}catch(t){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return n(this,void 0,void 0,function*(){var t;let r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable||null!=(0,o._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;let r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case b.LogEventCompressionMode.Disabled:return!1;case b.LogEventCompressionMode.Enabled:if(r&&!n)return!1;return!0;case b.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{let n,o=new TextEncoder().encode(r),a=new CompressionStream("gzip"),l=a.writable.getWriter();l.write(o).catch(i.Log.error),l.close().catch(i.Log.error);let c=a.readable.getReader(),u=[];for(;!(n=yield c.read()).done;)u.push(n.value);let d=u.reduce((e,t)=>e+t.length,0),h=new Uint8Array(d),g=0;for(let e of u)h.set(e,g),g+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.IsGzipped]:"1"})}catch(t){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),n=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&_(n,t.data),n}};let m=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),_=(e,t)=>{let{sdkKey:r,fallbackUrl:n}=e,o=g.StableID.get(r),a=h.SessionID.get(r),i=u.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:o,sessionID:a,sdkType:i,fallbackUrl:n})}))};function k(e,t,r,n,o){e.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqEnd(e.sdkKey,a.Diagnostics._getDiagnosticsData(t,r,n,o))}},9180:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let o=r(1681),a=r(902),i=r(1392),s=r(9982);function l(e,t){var r;let n=null!=(r=null==e?void 0:e.toLowerCase())?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function c(e){return`statsig.network_fallback.${(0,a._DJB2)(e)}`}function u(e,t){let r=c(e);t&&0!==Object.keys(t).length?s.Storage.setItem(r,JSON.stringify(t)):s.Storage.removeItem(r)}t.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 n=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+6048e5,u(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:n})))}getActiveFallbackUrl(e,t){var r,n;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let o=this._fallbackInfo;null==o&&(o=null!=(r=function(e){let t=c(e),r=s.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return i.Log.error("Failed to parse FallbackInfo"),null}}(e))?r:{},this._fallbackInfo=o);let a=o[t.endpoint];return!a||Date.now()>(null!=(n=a.expiryTime)?n:0)||t.getChecksum()!==a.urlConfigChecksum?(delete o[t.endpoint],this._fallbackInfo=o,u(e,this._fallbackInfo),null):a.url?a.url:null}tryFetchUpdatedFallbackInfo(e,t,r,o){return n(this,void 0,void 0,function*(){var n,a;try{if(!l(r,o))return!1;let a=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,i=this._pickNewFallbackUrl(null==(n=this._fallbackInfo)?void 0:n[t.endpoint],a);if(!i)return!1;return this._updateFallbackInfoWithNewUrl(e,t,i),!0}catch(e){return null==(a=this._errorBoundary)||a.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var n,o,a;let i={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},s=t.endpoint,l=null==(n=this._fallbackInfo)?void 0:n[s];l&&i.previous.push(...l.previous),i.previous.length>10&&(i.previous=[]);let c=null==(a=null==(o=this._fallbackInfo)?void 0:o[s])?void 0:a.url;null!=c&&i.previous.push(c),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[s]:i}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return n(this,void 0,void 0,function*(){var t;let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;let n=[],a=yield(0,o._fetchTxtRecords)(null!=(t=this._networkOverrideFunc)?t:fetch),i=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(let t of a){if(!t.startsWith(e.endpointDnsKey+"="))continue;let r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${i}`)}}return n})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let n=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),o=null==e?void 0:e.url,a=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!n.has(e)&&t!==o){a=t;break}}return a}},t._isDomainFailure=l},6229:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},585:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{var n,o;return null!=(o=null==(n=r[e])?void 0:n[t])&&o}}},2470:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let n={};t.SDKType={_get:e=>{var t;return(null!=(t=n[e])?t:"js-mono")+(null!=r?r:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){r&&"-react"!==r||(r="-"+e)}}},7734:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"undefined"!=typeof window?window:null,t._getDocumentSafe=()=>{var e;let r=(0,t._getWindowSafe)();return null!=(e=null==r?void 0:r.document)?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||e},t._addWindowEventListenerSafe=(e,r)=>{let n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._addDocumentEventListenerSafe=(e,r)=>{let n=(0,t._getDocumentSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,t._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},599:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let n=r(1917),o=r(833),a=r(1392),i=r(9982),s=r(2127),l={};function c(e,t){return setTimeout(()=>{var t;let r=null==(t=(0,n._getStatsigGlobal)())?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})},t)}function u(e){return`statsig.session_id.${(0,o._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{var t;let r,n,o;return null==l[e]&&(l[e]=(n=(r=u(t=e),(0,i._getObjectFromStorage)(r)),o=Date.now(),n||(n={sessionID:(0,s.getUUID)(),startTime:o,lastUpdate:o}),{data:n,sdkKey:t})),function(e){let t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>18e5}(r)||function({startTime:e}){return Date.now()-e>144e5}(r)){r.sessionID=(0,s.getUUID)(),r.startTime=t;let e=null==__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){let r=u(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){a.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let o=t-r.startTime;return e.idleTimeoutID=c(n,18e5),e.ageTimeoutID=c(n,144e5-o),e}(l[e])},overrideInitialSessionID:(e,t)=>{var r,n;let o;l[t]=(r=e,n=t,{data:{sessionID:r,startTime:o=Date.now(),lastUpdate:o},sdkKey:n})}}},5096:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,r)=>{let n=0,o=Object.keys(e);for(let a=0;a<o.length;a++){let i=o[a],s=e[i];if(n+=i.length,"object"==typeof s&&null!==s?n+=(0,t._fastApproxSizeOf)(s,r)+2:n+=String(s).length+1,n>=r)break}return n}},826:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;let n=r(833),o=r(1392),a=r(7734),i=r(9982),s=r(2127),l={},c={},u={};function d(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function h(e,t){let r=d(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){o.Log.warn("Failed to save StableID to storage")}}function g(e,t){if(!c[t]||null==(0,a._getDocumentSafe)())return;let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`}function p(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{let t;if(u[e])return null;if(null!=l[e])return l[e];let r=null;return null!=(r=function(e){if(!c[e]||null==(0,a._getDocumentSafe)())return null;for(let t of document.cookie.split(";")){let[r,n]=t.trim().split("=");if(r===p(e))return decodeURIComponent(n)}return null}(e))?(l[e]=r,h(r,e)):(null==(t=d(e),r=(0,i._getObjectFromStorage)(t))&&(r=(0,s.getUUID)()),h(r,e),g(r,e),l[e]=r),r},setOverride:(e,t)=>{l[t]=e,h(e,t),g(e,t)},_setCookiesEnabled:(e,t)=>{c[e]=t},_setDisabled:(e,t)=>{u[e]=t}},t.getCookieName=p},2999:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(1917);let o=r(1917),a=r(6510),i=r(882),s=r(1392),l=r(547),c=r(7734),u=r(599),d=r(826),h=r(5714),g=r(9982);t.StatsigClientBase=class{constructor(e,t,r,n){var l,h,p,f;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const b=this.$emt.bind(this);(null==n?void 0:n.logLevel)!=null&&(s.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&g.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&u.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&g.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&d.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!=(l=null==n?void 0:n.overrideAdapter)?l:null,this._logger=new i.EventLogger(e,b,r,n),this._errorBoundary=new a.ErrorBoundary(e,n,b),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,n,r),this.storageProvider=g.Storage,null==(f=null==(p=null==(h=this.overrideAdapter)?void 0:h.loadFromStorage)?void 0:p.call(h))||f.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,c._isServerEnv)())return;let n=(0,o._getStatsigGlobal)(),a=null!=(r=n.instances)?r:{};null!=a[e]&&s.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),a[e]=t,n.firstInstance||(n.firstInstance=t),n.instances=a,__STATSIG__=n}(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,g.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(h.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return n(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);s.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,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);let o=(0,l.createMemoKey)(e,r,n);return o?(o in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[o]=t(r,n)),this._memoCache[o]):t(r,n)}}}},1556:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},5070:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},4349:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let r="statsig::config_exposure",n="statsig::gate_exposure",o="statsig::layer_exposure",a=(e,t,r,n,o)=>(r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:s(r,n),secondaryExposures:o,time:Date.now()});function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>e===n||e===r||e===o,t._createGateExposure=(e,t,r)=>{var o,s,l;let c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(c.configVersion=t.__evaluation.version),a(n,e,t.details,c,i(null!=(l=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?l:[],r))},t._mapExposures=i,t._createConfigExposure=(e,t,n)=>{var o,s,l,c;let u={config:t.name,ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(u.configVersion=t.__evaluation.version),(null==(s=t.__evaluation)?void 0:s.passed)!=null&&(u.rulePassed=String(t.__evaluation.passed)),a(r,e,t.details,u,i(null!=(c=null==(l=t.__evaluation)?void 0:l.secondary_exposures)?c:[],n))},t._createLayerParameterExposure=(e,t,r,n)=>{var s,l,c,u,d,h,g;let p=t.__evaluation,f=(null==(s=null==p?void 0:p.explicit_parameters)?void 0:s.includes(r))===!0,b="",v=null!=(l=null==p?void 0:p.undelegated_secondary_exposures)?l:[];f&&(b=null!=(c=p.allocated_experiment_name)?c:"",v=null!=(u=p.secondary_exposures)?u:[]);let y=null==(d=t.__evaluation)?void 0:d.parameter_rule_ids,m={config:t.name,parameterName:r,ruleID:null!=(h=null==y?void 0:y[r])?h:t.ruleID,allocatedExperiment:b,isExplicitParameter:String(f)};return(null==(g=t.__evaluation)?void 0:g.version)!=null&&(m.configVersion=t.__evaluation.version),a(o,e,t.details,m,i(v,n))};let s=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},8808:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.26.0";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},5714:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},7682:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let n=r(1392),o=r(7730);function a(e,t,r,n){var o;return{name:e,details:t,ruleID:null!=(o=null==r?void 0:r.rule_id)?o:"",__evaluation:r,value:n}}function i(e,t,r){var n;let o=null!=(n=null==r?void 0:r.value)?n:{};return Object.assign(Object.assign({},a(e,t,r,o)),{get:s(e,null==r?void 0:r.value)})}function s(e,t,r){return(a,i)=>{var s;let l=null!=(s=null==t?void 0:t[a])?s:null;return null==l?null!=i?i:null:null==i||(0,o._isTypeMatch)(l,i)?(null==r||r(a),l):(n.Log.warn(`Parameter type mismatch. '${e}.${a}' was found to be type '${typeof l}' but fallback/return type is '${typeof i}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=i?i:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},a(e,t,r,(null==r?void 0:r.value)===!0)),{idType:null!=(n=null==r?void 0:r.id_type)?n:null})},t._makeDynamicConfig=i,t._makeExperiment=function(e,t,r){var n;return Object.assign(Object.assign({},i(e,t,r)),{groupName:null!=(n=null==r?void 0:r.group_name)?n:null})},t._makeLayer=function(e,t,r,n){var o,i;return Object.assign(Object.assign({},a(e,t,r,void 0)),{get:s(e,null==r?void 0:r.value,n),groupName:null!=(o=null==r?void 0:r.group_name)?o:null,__value:null!=(i=null==r?void 0:r.value)?i:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:s(e.name,r,n)})},t._makeTypedGet=s},8860:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4196:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,r,n,o,a)=>({duration:r,source:t,success:e,error:n,sourceUrl:o,warnings:a}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},5466:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let n=r(902),o=r(1392);t._normalizeUser=function(e,t,r){try{let n=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?n.statsigEnvironment=t.environment:null!=r&&(n.statsigEnvironment={tier:r}),n}catch(e){return o.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,n._DJB2Object)(e):null}},9982:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let n=r(1392),o=r(7734),a={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>a[e]?a[e]:null,setItem:(e,t)=>{a[e]=t},removeItem:e=>{delete a[e]},getAllKeys:()=>Object.keys(a)},s=null;try{let e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(s={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){n.Log.warn("Failed to setup localStorageProvider.")}let l=null!=s?s:i,c=l;function u(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(i),null;if(e instanceof Error&&"QuotaExceededError"===e.name){let r=t.Storage.getAllKeys().filter(e=>e.startsWith("statsig."));e.message=`${e.message}. Statsig Keys: ${r.length}`}throw e}}t.Storage={isReady:()=>c.isReady(),isReadyResolver:()=>c.isReadyResolver(),getProviderName:()=>c.getProviderName(),getItem:e=>u(()=>c.getItem(e)),setItem:(e,t)=>u(()=>c.setItem(e,t)),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?i:l}},t._getObjectFromStorage=function(e){let r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},9217:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let n=r(1392);t._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return n.Log.error(`Failed to parse ${r}`),null}},7730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},2127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,r="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${r}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,r=>{let n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)})}},7617:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let n=r(902),o=r(3549),a={[o.Endpoint._initialize]:"i",[o.Endpoint._rgstr]:"e",[o.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=a[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),n&&(this.fallbackUrls=n);const i=o.NetworkDefault[e];this.defaultUrl=`${i}/${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,n._DJB2)(this.customUrl+t)}}},2837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let n=r(7734),o="foreground",a="background",i=[],s=o,l=!1;t._isCurrentlyVisible=()=>s===o,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{i.unshift(e)},t._notifyVisibilityChanged=e=>{e!==s&&(s=e,i.forEach(t=>t(e)))},(0,n._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(o)}),(0,n._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(a)),(0,n._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?o:a)}),(0,n._addWindowEventListenerSafe)((0,n._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(a)})},2874:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(1917);let a=r(1917),i=r(5930);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});let s=r(882);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return s.EventLogger}});let l=r(1392);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});let c=r(8808),u=r(9982);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return u.Storage}}),o(r(1917),t),o(r(833),t),o(r(9171),t),o(r(830),t),o(r(5930),t),o(r(2443),t),o(r(6510),t),o(r(5154),t),o(r(9161),t),o(r(902),t),o(r(6765),t),o(r(1392),t),o(r(547),t),o(r(3549),t),o(r(7),t),o(r(6229),t),o(r(585),t),o(r(7734),t),o(r(2470),t),o(r(599),t),o(r(5096),t),o(r(826),t),o(r(2999),t),o(r(1556),t),o(r(5070),t),o(r(4349),t),o(r(8808),t),o(r(5714),t),o(r(7682),t),o(r(2131),t),o(r(8860),t),o(r(5466),t),o(r(9982),t),o(r(9217),t),o(r(7730),t),o(r(7617),t),o(r(2127),t),o(r(2837),t),o(r(4196),t),o(r(2235),t),Object.assign((0,a._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:c.SDK_VERSION})},8070:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let n=r(2874);function o(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r,a,i;let s=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!s)return{hadBadDeltaChecksum:!0};let l=(o((i=(r=e,a=s,Object.assign(Object.assign(Object.assign({},r),a),{feature_gates:Object.assign(Object.assign({},r.feature_gates),a.feature_gates),layer_configs:Object.assign(Object.assign({},r.layer_configs),a.layer_configs),dynamic_configs:Object.assign(Object.assign({},r.dynamic_configs),a.dynamic_configs)}))).deleted_gates,i.feature_gates),delete i.deleted_gates,o(i.deleted_configs,i.dynamic_configs),delete i.deleted_configs,o(i.deleted_layers,i.layer_configs),delete i.deleted_layers,i),c=(0,n._DJB2Object)({feature_gates:l.feature_gates,dynamic_configs:l.dynamic_configs,layer_configs:l.layer_configs},2);return c!==s.checksumV2?{hadBadDeltaChecksum:!0,badChecksum:c,badMergedConfigs:l,badFullResponse:s.deltas_full_response}:JSON.stringify(l)}},5365:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(2874);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,o;if(!e)return!1;let a=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=a&&(this._source=e.source,(null==a?void 0:a.has_updates)!==!0||(null!=(r=a.time)?r:0)<this._lcut||(this._rawValues=e.data,this._lcut=a.time,this._receivedAt=e.receivedAt,this._values=a,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,a),e.source&&a.user&&this._setWarningState(t,a),n.SDKFlags.setFlags(this._sdkKey,null!=(o=a.sdk_flags)?o:{}),!0))}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.dynamic_configs,e)}getConfigList(){var e;return(null==(e=this._values)?void 0:e.dynamic_configs)?Object.values(this._values.dynamic_configs).map(e=>e.name):[]}getLayer(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let r={};return t.user&&(r.user=t.user),t.sdkInfo&&(r.generatorSDKInfo=t.sdkInfo),r.lcut=t.time,r}_getDetailedStoreResult(e,t){let r=null;return e&&(r=e[t]?e[t]:e[(0,n._DJB2)(t)]),{result:r,details:this._getDetails(null==r)}}_setWarningState(e,t){var r,o;let a=n.StableID.get(this._sdkKey);if((null==(r=e.customIDs)?void 0:r.stableID)!==a&&((null==(o=e.customIDs)?void 0:o.stableID)||a))return void this._warnings.add("StableIDMismatch");if("user"in t){let r=t.user,o=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,n._getFullUserHash)(o)!==(0,n._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let n=this.getCurrentSourceDetails(),o=n.reason,a=null!=(t=n.warnings)?t:[];"Bootstrap"===this._source&&a.length>0&&(o+=a[0]),"Uninitialized"!==o&&"NoValues"!==o&&(o=`${o}:${e?"Unrecognized":"Recognized"}`);let i="Bootstrap"===this._source&&null!=(r=this._bootstrapMetadata)?r:void 0;return i&&(n.bootstrapMetadata=i),Object.assign(Object.assign({},n),{reason:o})}}},1896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(2874),a=r(8070);class i extends o.NetworkCore{constructor(e,t){super(e,t);const r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new o.UrlConfiguration(o.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,a,i){return n(this,void 0,void 0,function*(){var n,s,l,c,u,d;let h=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null,g={user:a,hash:null!=(l=null==(s=null==(n=this._option)?void 0:n.networkConfig)?void 0:s.initializeHashAlgorithm)?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==h?void 0:h.has_updates){let e=(null==h?void 0:h.hash_used)!==(null!=(d=null==(u=null==(c=this._option)?void 0:c.networkConfig)?void 0:u.initializeHashAlgorithm)?d:"djb2");g=Object.assign(Object.assign({},g),{sinceTime:i&&!e?h.time:0,previousDerivedFields:"derived_fields"in h&&i?h.derived_fields:{},deltasResponseRequested:!0,full_checksum:h.full_checksum,partialUserMatchSinceTime:e?0:h.time})}return this._fetchEvaluations(e,h,g,r)})}_fetchEvaluations(e,t,r,o){return n(this,void 0,void 0,function*(){var n,i;let s=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:o});if((null==s?void 0:s.code)===204)return'{"has_updates": false}';if((null==s?void 0:s.code)!==200)return null!=(n=null==s?void 0:s.body)?n:null;if((null==t?void 0:t.has_updates)!==!0||(null==(i=s.body)?void 0:i.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return s.body;let l=(0,a._resolveDeltasResponse)(t,s.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),o)})}}t.default=i},9031:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let n=r(2874),o={disableExposureLog:!0};function a(e){return null==e||!1===e.disableExposureLog}function i(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(s,l)=>{if(null==t)return l;let c=t[s];if(null==c||null!=l&&(0,n._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return c.value;case"gate":return e.getFeatureGate(c.gate_name,a(r)?void 0:o).value?c.pass_value:c.fail_value;case"dynamic_config":let u;return i(u=e.getDynamicConfig(c.config_name,a(r)?void 0:o).get(c.param_name),l)?l:u;case"experiment":let d;return i(d=e.getExperiment(c.experiment_name,a(r)?void 0:o).get(c.param_name),l)?l:d;case"layer":let h;return i(h=e.getLayer(c.layer_name,a(r)?void 0:o).get(c.param_name),l)?l:h;default:return l}}}},3374:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(2874),a=r(5365),i=r(1896),s=r(9031),l=r(155);class c extends o.StatsigClientBase{static instance(e){let t=(0,o._getStatsigGlobal)().instance(e);return t instanceof c?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new c(null!=e?e:"",{}))}constructor(e,t,r=null){var n,s;o.SDKType._setClientType(e,"javascript-client");const c=new i.default(r,e=>{this.$emt(e)});for(const i of(super(e,null!=(n=null==r?void 0:r.dataAdapter)?n:new l.StatsigEvaluationsDataAdapter,c,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=c,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)(),null!=(s=null==r?void 0:r.plugins)?s:[]))i.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.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 n(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 n;let a=[...null!=(n=this._store.getWarnings())?n:[]];this._resetForUser(e);let i=this.dataAdapter.getDataSync(this._user);null==i&&a.push("NoCachedValues"),this._store.setValues(i,this._user),this._finalizeUpdate(i);let s=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===s||null==s&&(null==i?void 0:i.source)==="Bootstrap"||this._runPostUpdate(null!=i?i:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),a)}updateUserAsync(e,t){return n(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 n(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;o.Diagnostics._markInitOverallStart(this._sdkKey);let n=this.dataAdapter.getDataSync(r);if(this._store.setValues(n,this._user),this._setStatus("Loading",n),n=yield this.dataAdapter.getDataAsync(n,r,t),r!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let a=!1;null!=n&&(o.Diagnostics._markInitProcessStart(this._sdkKey),a=this._store.setValues(n,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:a})),this._finalizeUpdate(n),a||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,a,this._store.getCurrentSourceDetails());let i=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(a,this._store.getSource(),i,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){let n="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:n}),this._logger.enqueue(Object.assign(Object.assign({},n),{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 n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var r;return(0,o.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=>{o.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,n,a;let i=(0,o._normalizeUser)(e,t),s=null==(r=i.customIDs)?void 0:r.stableID;if(s){let e=null==(a=(n=this.storageProvider).isReadyResolver)?void 0:a.call(n);e?e.then(()=>o.StableID.setOverride(s,this._sdkKey),()=>o.StableID.setOverride(s,this._sdkKey)):o.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(i.analyticsOnlyMetadata=Object.assign(Object.assign({},i.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),i}_getFeatureGateImpl(e,t){var r,n;let{result:a,details:i}=this._store.getGate(e),s=(0,o._makeFeatureGate)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,t){var r,n;let{result:a,details:i}=this._store.getConfig(e),s=(0,o._makeDynamicConfig)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,t){var r,n,a,i;let{result:s,details:l}=this._store.getConfig(e),c=(0,o._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,o._mapExposures)(null!=(n=null==(r=c.__evaluation)?void 0:r.secondary_exposures)?n:[],this._store.getExposureMapping()));let u=null==(i=null==(a=this.overrideAdapter)?void 0:a.getExperimentOverride)?void 0:i.call(a,c,this._user,t),d=null!=u?u:c;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,d,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:d}),d}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var r,n,a;let{result:i,details:s}=this._store.getLayer(e),l=(0,o._makeLayer)(e,s,i),c=null==(n=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:n.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let u=(0,o._mergeOverride)(l,c,null!=(a=null==c?void 0:c.__value)?a:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,u,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:u}),u}_getParameterStoreImpl(e,t){var r,n;let{result:o,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let i={name:e,details:a,__configuration:o,get:(0,s._makeParamStoreGetter)(this,o,t)},l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getParamStoreOverride)?void 0:n.call(r,i,t);return null!=l&&(i.__configuration=l.config,i.details=l.details,i.get=(0,s._makeParamStoreGetter)(this,l.config,t)),i}}t.default=c},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let o=r(2874),a=r(1896);class i extends o.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof a.default?this._network=r:this._network=new a.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,o._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,o._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):o.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,o){return n(this,void 0,void 0,function*(){var n;let a=yield null==(n=this._network)?void 0:n.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,o);return null!=a?a:null})}_getCacheKey(e){var t;let r=(0,o._getStorageKey)(this._getSdkKey(),e,null==(t=this._options)?void 0:t.customUserCacheKeyFunc);return`${o.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,o._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=i},6122:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let a=r(2874),i=r(3374);t.StatsigClient=i.default,o(r(2874),t),t.default=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:i.default})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{enableTestingTheme:()=>t8,ThemeMutationObserver:()=>t7,token:()=>t3,toggleTestingTheme:()=>t6,disableTestingTheme:()=>t9,getTokenValue:()=>t5,setTestingThemeColor:()=>t4,setGlobalTheme:()=>t2});var e,t,o,a,i,s,l={};r.r(l),r.d(l,{CURRENT_SURFACE_CSS_VAR:()=>tn,ThemeMutationObserver:()=>t$,enableGlobalTheme:()=>tF,getGlobalTheme:()=>tB,getSSRAutoScript:()=>tN,getThemeHtmlAttrs:()=>tv,getThemeStyles:()=>tR,getTokenValue:()=>ta,setGlobalTheme:()=>tL,themeConfig:()=>e4,themeObjectToString:()=>tg,themeStringToObject:()=>th,token:()=>to,useThemeObserver:()=>tK()});var c={};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function p(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(e){if("string"==typeof e)return v(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||y(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){_(a,n,o,i,s,"next",e)}function s(e){_(a,n,o,i,s,"throw",e)}i(void 0)})}}r.r(c),r.d(c,{disableTestingTheme:()=>t0,enableTestingTheme:()=>tZ,setTestingThemeColor:()=>tX,toggleTestingTheme:()=>t1});var w=r(8972),O=r.n(w),E=r(6122),x=r(2646),S=r.n(x);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var j="@all-features",P=p(function e(){u(this,e),f(this,"eventToValue",new Map),this.emitter=new(S())},[{key:"onGateUpdated",value:function(e,t,r,n){var o=this,a=r(e,D(D({},n),{},{fireGateExposure:!1}));void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,a);var i=function(){var a=r(e,D(D({},n),{},{fireGateExposure:!1}));o.eventToValue.get(t)!==a&&(o.eventToValue.set(t,a),t(a))};return this.emitter.on(e,i),function(){o.emitter.off(e,i)}}},{key:"onExperimentValueUpdated",value:function(e,t,r,n,o,a){var i=this,s="".concat(e,".").concat(t),l=o(e,t,r,D(D({},a),{},{fireExperimentExposure:!1}));void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,l);var c=function(){var s=o(e,t,r,D(D({},a),{},{fireExperimentExposure:!1}));i.eventToValue.get(n)!==s&&(i.eventToValue.set(n,s),n(s))};return this.emitter.on(s,c),function(){i.emitter.off(s,c)}}},{key:"onAnyUpdated",value:function(e){var t=this;return this.emitter.on(j,e),function(){t.emitter.off(j,e)}}},{key:"anyUpdated",value:function(){var e=this;this.emitter.emit(j),this.emitter.eventNames().filter(function(e){return e!==j}).forEach(function(t){e.emitter.emit(t)})}}]),I=((eE={}).Error="Error",eE.LocalOverride="LocalOverride",eE.Unrecognized="Unrecognized",eE.Uninitialized="Uninitialized",eE.NetworkNotModified="NetworkNotModified",eE.Network="Network",eE.InvalidBootstrap="InvalidBootstrap",eE.Bootstrap="Bootstrap",eE.Cache="Cache",eE.Unknown="Unknown",eE),A=((ex={}).Development="development",ex.Staging="staging",ex.Production="production",ex),U=((eS={}).COMMERCIAL="commercial",eS.FEDRAMP_MODERATE="fedramp-moderate",eS),M=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var F=function(e){return L({perimeter:!function(){var e,t=globalThis,r=t.MICROS_PERIMETER||t.UNSAFE_ATL_CONTEXT_BOUNDARY;if(r)return"fedramp-moderate"===r;var n=null==(e=t.location)||null==(e=e.hostname)?void 0:e.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return!!n&&n.length>0}()?U.COMMERCIAL:U.FEDRAMP_MODERATE},e)},R=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var r=Object.entries(e),n=Object.entries(t);if(r.length!==n.length)return!1;var o=function(e,t){var r=m(e,1)[0],n=m(t,1)[0];return r.localeCompare(n)};r.sort(o),n.sort(o);for(var a=0;a<r.length;a++)if(m(r[a],2)[1]!==m(n[a],2)[1])return!1;return!0},N=function(e,t){var r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},V=function(e){var t=e.api,r=e.disableCurrentPageLogging,n=e.loggingIntervalMillis,o=e.loggingBufferMaxSize,a=e.localMode,i=e.eventLoggingApi,s=e.eventLoggingApiForRetries,l=e.disableLocalStorage,c=e.ignoreWindowUndefined,u=e.disableAllLogging;return L(L({},(e.initTimeoutMs,e.disableNetworkKeepalive,e.overrideStableID,e.disableErrorLogging,e.disableAutoMetricsLogging,b(e,M))),{},{networkConfig:{api:t,logEventUrl:i?i+"rgstr":void 0,logEventFallbackUrls:s?[s]:void 0,preventAllNetworkTraffic:a||!c&&"undefined"==typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:o,disableStorage:void 0===l?a:l,disableLogging:void 0===u?a:u})},K=Object.entries(I).map(function(e){var t=m(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]}),z=function(e){var t,r,n,o=e.reason.toLowerCase();return{reason:null!=(t=null==(r=K.find(function(e){var t=m(e,1)[0];return o.includes(t)}))?void 0:r[1])?t:I.Unknown,time:null!=(n=e.receivedAt)?n:Date.now()}},G=function(e){return e.map(function(e){return"string"==typeof e?{gate:e}:e})},B=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;u(this,e),this.value=r,this._name=t,this._ruleID=n,this._secondaryExposures=a,this._allocatedExperimentName=i,this._evaluationDetails=o,this._onDefaultValueFallback=s}return p(e,[{key:"get",value:function(e,t,r){var n,o,a=this.getValue(e,t);if(null==a)return t;var i=Array.isArray(t)?"array":d(t),s=Array.isArray(a)?"array":d(a);return r?r(a)?(this.fireExposure(e),a):(null==(o=this._onDefaultValueFallback)||o.call(this,this,e,i,s),t):null==t||i===s?(this.fireExposure(e),a):(null==(n=this._onDefaultValueFallback)||n.call(this,this,e,i,s),t)}},{key:"getValue",value:function(e,t){return null==e?this.value:(null==t&&(t=null),null==this.value[e])?t:(this.fireExposure(e),this.value[e])}},{key:"fireExposure",value:function(e){this.experiment&&this.experiment.get(e)}}],[{key:"fromExperiment",value:function(t){var r,n,o,a=new e(t.name,t.value,t.ruleID,z(t.details),G(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),null!=(o=t.groupName)?o:void 0);return a.experiment=t,a}}])}(),$=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];u(this,e),this._logParameterFunction=a,this._name=t,this._value=JSON.parse(JSON.stringify(null!=r?r:{})),this._ruleID=null!=n?n:"",this._evaluationDetails=o,this._secondaryExposures=i,this._undelegatedSecondaryExposures=s,this._allocatedExperimentName=l,this._explicitParameters=c}return p(e,[{key:"get",value:function(e,t,r){var n=this,o=this._value[e];if(null==o)return t;var a=function(){return n._logLayerParameterExposure(e),o};return r?r(o)?a():t:null==t||d(o)===d(t)&&Array.isArray(t)===Array.isArray(o)?a():t}},{key:"getValue",value:function(e,t){void 0==t&&(t=null);var r=this._value[e];return null!=r&&this._logLayerParameterExposure(e),null!=r?r:t}},{key:"_logLayerParameterExposure",value:function(e){var t;null==(t=this._logParameterFunction)||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,n,o,a,i,s;return new e(t.name,t.__value,t.ruleID,z(t.details),function(e,r){return t.get(r)},G(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),G(null!=(o=null==(a=t.__evaluation)?void 0:a.undelegated_secondary_exposures)?o:[]),null==(i=t.__evaluation)?void 0:i.allocated_experiment_name,null==(s=t.__evaluation)?void 0:s.explicit_parameters)}}])}(),J="0.0.0-development";function q(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,t){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}function X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function Y(e){var t="function"==typeof Map?new Map:void 0;return(Y=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(X())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&H(o,r.prototype),o}(e,arguments,W(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),H(r,e)})(e)}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Z=function(){return!!e})()}var ee=function(e){function t(e){var r,n;return u(this,t),r=t,n=[e],r=W(r),q(this,Z()?Reflect.construct(r,n||[],W(this).constructor):r.apply(this,n))}return Q(t,e),p(t)}(Y(Error));function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var er=function(){var e,t,r,n,o;function a(){u(this,a)}return p(a,null,[{key:"fetchClientSdk",value:(e=k(O().mark(function e(t){var r,n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.targetApp,n="/api/v2/frontend/clientSdkKey/".concat(r),e.prev=2,e.next=5,this.fetchRequest(n,"GET",t);case 5:return e.abrupt("return",e.sent);case 8:if(e.prev=8,e.t0=e.catch(2),!(e.t0 instanceof Error)){e.next=12;break}throw e.t0;case 12:throw Error("Failed to retrieve client sdk key");case 13:case"end":return e.stop()}},e,this,[[2,8]])})),function(t){return e.apply(this,arguments)})},{key:"fetchExperimentValues",value:(t=k(O().mark(function e(t,r,n){var o;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={identifiers:r,customAttributes:n,targetApp:t.targetApp},e.prev=1,e.next=4,this.fetchRequest("/api/v2/frontend/experimentValues","POST",t,o);case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),!(e.t0 instanceof Error)){e.next=11;break}throw e.t0;case 11:throw Error("Failed to retrieve experiment values");case 12:case"end":return e.stop()}},e,this,[[1,7]])})),function(e,r,n){return t.apply(this,arguments)})},{key:"handleResponseError",value:(r=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,t.text();case 3:throw r=e.sent,new ee("Non 2xx response status received, status: ".concat(t.status,", body: ").concat(JSON.stringify(r)));case 5:if(204!==t.status){e.next=7;break}throw new ee("Unexpected 204 response");case 7:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"extractResponseBody",value:(n=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.text();case 2:return r=e.sent,e.abrupt("return",JSON.parse(r));case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getBaseUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t)return"/gateway/api/flags";if(r===U.FEDRAMP_MODERATE)switch(e){case A.Production:return"https://api.atlassian-us-gov-mod.com/flags";case A.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw Error('Invalid environment "'.concat(e,'" for "').concat(r,'" perimeter'))}if(r===U.COMMERCIAL)switch(e){case A.Development:return"https://api.dev.atlassian.com/flags";case A.Staging:var o=this.getApiUrl(n);if(null!==o)return o;return"https://api.stg.atlassian.com/flags";default:var a=this.getApiUrl(n);if(null!==a)return a;return"https://api.atlassian.com/flags"}throw Error('Invalid perimeter "'.concat(r,'"'))}},{key:"fetchRequest",value:(o=k(O().mark(function e(t,r,n,o){var i,s,l,c,u;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.getBaseUrl(n.environment,n.useGatewayURL,n.perimeter,n.isolationContextId),s=n.fetchTimeoutMs||5e3,AbortSignal.timeout?l=AbortSignal.timeout(s):AbortController&&(l=(c=new AbortController).signal,setTimeout(function(){return c.abort()},s)),e.next=5,fetch("".concat(i).concat(t),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({method:r,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":J,"X-API-KEY":n.apiKey},signal:l},o&&{body:JSON.stringify(o)}));case 5:return u=e.sent,e.next=8,this.handleResponseError(u);case 8:return e.next=10,this.extractResponseBody(u);case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return o.apply(this,arguments)})},{key:"getApiUrl",value:function(e){var t=this.getWindowLocation();if(void 0===t)return e?"https://atlassian-statsig-proxy-archetype.atl-paas.%s.atl-ic.net".replace("%s",e):null;var r=t.protocol,n=t.hostname,o=n.match(/([^.]+)\.oasis-stg\.com$/);if(o)return"".concat(r,"//api.").concat(o[1],".").concat("oasis-stg.com/flags");var a=n.match(/([^.]+)\.atlassian-isolated\.net$/);return a?"".concat(r,"//api.").concat(a[1],".").concat("atlassian-isolated.net/flags"):null}},{key:"getWindowLocation",value:function(){if("undefined"!=typeof window&&window.location)return window.location}}])}();function en(){return(en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=W(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}}).apply(null,arguments)}function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ei(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ei=function(){return!!e})()}var es=function(e){var t,r,n;function o(){var e,t,r;return u(this,o),r=["NoFetchDataAdapter","nofetch"],t=W(t=o),f(e=q(this,ei()?Reflect.construct(t,r||[],W(this).constructor):t.apply(this,r)),"bootstrapResult",null),e}return Q(o,e),p(o,[{key:"setBootstrapData",value:function(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:E.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(t=k(O().mark(function e(t,r){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"getDataAsync",value:(r=k(O().mark(function e(t,r,n){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bootstrapResult&&ea(ea({},this.bootstrapResult),{},{fullUserHash:(0,E._getFullUserHash)(r)}));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"getDataSync",value:function(e){return this.bootstrapResult&&ea(ea({},this.bootstrapResult),{},{fullUserHash:(0,E._getFullUserHash)(e)})}},{key:"_fetchFromNetwork",value:(n=k(O().mark(function e(t,r,n){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})},{key:"_getCacheKey",value:function(e){var t=(0,E._getStorageKey)(this._getSdkKey(),e);return"".concat(E.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(t)}},{key:"_isCachedResultValidFor204",value:function(e,t){return!1}},{key:"setDataLegacy",value:function(e,t){var r,n;(r=this,"function"==typeof(n=en(W(o.prototype),"setData",r))?function(e){return n.apply(r,e)}:n)([e,t])}},{key:"toJSON",value:function(){var e=ea({},this);return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}])}(E.DataAdapterCore),el=r(2874);function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ed(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eh="LocalOverride:Recognized",eg="STATSIG_JS_LITE_LOCAL_OVERRIDES",ep=function(){return{gates:{},configs:{},layers:{}}},ef=function(e,t){return t+":"+e},eb=p(function e(t){u(this,e),this._overrides=ep(),this._djb2Map=new Map,this._localStorageKey=t},[{key:"parseStoredOverrides",value:function(e){try{var t=window.localStorage.getItem(e);if(!t)return ep();return JSON.parse(t)}catch(e){return ep()}}},{key:"mergeOverrides",value:function(){for(var e=ep(),t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=0;o<r.length;o++){for(var a=r[o],i=0,s=Object.entries(null!=(l=a.gates)?l:{});i<s.length;i++){var l,c=m(s[i],2),u=c[0],d=c[1];e.gates[u]=d}for(var h=0,g=Object.entries(null!=(p=a.configs)?p:{});h<g.length;h++){var p,f=m(g[h],2),b=f[0],v=f[1];e.configs[b]=v}for(var y=0,_=Object.entries(null!=(k=a.layers)?k:{});y<_.length;y++){var k,w=m(_[y],2),O=w[0],E=w[1];e.layers[O]=E}}return e}},{key:"initFromStoredOverrides",value:function(){var e=this.mergeOverrides(this._overrides,this.parseStoredOverrides(eg),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(eg)}catch(e){}for(var t=0,r=Object.values(e);t<r.length;t++){var n,o=r[t],a=new Set(Object.keys(o)),i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ed(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ed(e,void 0):void 0}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}(a);try{for(i.s();!(n=i.n()).done;){var s=n.value,l=(0,el._DJB2)(s);a.has(l)&&delete o[l]}}catch(e){i.e(e)}finally{i.f()}}this.applyOverrides(e)}},{key:"saveOverrides",value:function(){try{window.localStorage.setItem(this._localStorageKey,JSON.stringify(this._overrides))}catch(e){}}},{key:"getOverrides",value:function(){return this.mergeOverrides(this._overrides)}},{key:"applyOverrides",value:function(e){var t=eu(eu({},ep()),e);this._djb2Map.clear();for(var r=0,n=Object.entries(t);r<n.length;r++)for(var o=m(n[r],2),a=o[0],i=o[1],s=0,l=Object.entries(i);s<l.length;s++){var c=m(l[s],2),u=c[0],d=c[1];this._djb2Map.set(ef((0,el._DJB2)(u),a),d)}this._overrides=t}},{key:"setOverrides",value:function(e){this.applyOverrides(e),this.saveOverrides()}},{key:"overrideGate",value:function(e,t){this._overrides.gates[e]=t,this._djb2Map.set(ef((0,el._DJB2)(e),"gates"),t),this.saveOverrides()}},{key:"removeGateOverride",value:function(e){delete this._overrides.gates[e],this._djb2Map.delete(ef((0,el._DJB2)(e),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(e,t){var r,n=null!=(r=this._overrides.gates[e.name])?r:this._djb2Map.get(ef(e.name,"gates"));return null==n?null:eu(eu({},e),{},{value:n,details:eu(eu({},e.details),{},{reason:eh})})}},{key:"overrideDynamicConfig",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(ef((0,el._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ef((0,el._DJB2)(e),"configs")),this.saveOverrides()}},{key:"getDynamicConfigOverride",value:function(e,t){return this._getConfigOverride(e,this._overrides.configs)}},{key:"overrideExperiment",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(ef((0,el._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ef((0,el._DJB2)(e),"configs")),this.saveOverrides()}},{key:"getExperimentOverride",value:function(e,t){return this._getConfigOverride(e,this._overrides.configs)}},{key:"overrideLayer",value:function(e,t){this._overrides.layers[e]=t,this._djb2Map.set(ef((0,el._DJB2)(e),"layers"),t),this.saveOverrides()}},{key:"removeLayerOverride",value:function(e){delete this._overrides.layers[e],this._djb2Map.delete(ef((0,el._DJB2)(e),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides=ep();try{window.localStorage.removeItem(this._localStorageKey)}catch(e){}}},{key:"getLayerOverride",value:function(e,t){var r,n=null!=(r=this._overrides.layers[e.name])?r:this._djb2Map.get(ef(e.name,"layers"));return null==n?null:eu(eu({},e),{},{__value:n,get:(0,el._makeTypedGet)(e.name,n),details:eu(eu({},e.details),{},{reason:eh})})}},{key:"_getConfigOverride",value:function(e,t){var r,n=null!=(r=t[e.name])?r:this._djb2Map.get(ef(e.name,"configs"));return null==n?null:eu(eu({},e),{},{value:n,get:(0,el._makeTypedGet)(e.name,n),details:eu(eu({},e.details),{},{reason:eh})})}}]),ev=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ey(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var e_="client-default-key",ek=p(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.localStorageKey,o=r.overrideAdapter;u(this,e),f(this,"initPromise",null),f(this,"initCompleted",!1),f(this,"initWithDefaults",!1),f(this,"hasCheckGateErrorOccurred",!1),f(this,"hasGetExperimentErrorOccurred",!1),f(this,"hasGetExperimentValueErrorOccurred",!1),f(this,"hasGetLayerErrorOccurred",!1),f(this,"hasGetLayerValueErrorOccurred",!1),f(this,"subscriptions",new P),f(this,"dataAdapter",new es),f(this,"statsigValuesUpdated",function(){t.user&&t.statsigClient.updateUserSync(t.user,{disableBackgroundCacheRefresh:!0}),t.subscriptions.anyUpdated()}),this.overrideAdapter=o||new eb(void 0===n?"STATSIG_OVERRIDES":n)},[{key:"initialize",value:(eC=k(O().mark(function e(t,r,n){var o,a,i=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=F(t),!this.initPromise){e.next=4;break}return R(o,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return a=performance.now(),this.initOptions=o,this.initPromise=this.init(o,r,n).then(function(){i.initCompleted=!0,i.initWithDefaults=!0}).finally(function(){var e=performance.now()-a;i.fireClientEvent(a,e,"initialize",i.initCompleted,o.apiKey)}),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}},e,this)})),function(e,t,r){return eC.apply(this,arguments)})},{key:"initializeWithProvider",value:(eD=k(O().mark(function e(t,r,n,o){var a,i,s=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=F(t),!this.initPromise){e.next=4;break}return R(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return i=performance.now(),this.initOptions=a,this.provider=r,this.provider.setClientVersion(J),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeWithProvider",s.initCompleted,r.getApiKey?r.getApiKey():void 0)}),e.abrupt("return",this.initPromise);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return eD.apply(this,arguments)})},{key:"applyUpdateCallback",value:function(e){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(e.experimentValues),this.dataAdapter.setData(JSON.stringify(e.experimentValues)),this.statsigValuesUpdated())}catch(e){console.warn("Error when attempting to apply update",e)}}},{key:"fireClientEvent",value:function(e,t,r,n){var o,a=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null==(o=this.initOptions.analyticsWebClient)||o.then(function(o){var s=em({targetApp:a.initOptions.targetApp,clientVersion:J,success:n,startTime:e,totalTime:t},i&&{apiKey:i});o.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:s,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(e){a.initOptions.environment!==A.Production&&console.error("Analytics web client promise did not resolve",e)})}},{key:"initializeFromValues",value:(ej=k(O().mark(function e(t,r,n){var o,a,i,s=this,l=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>3&&void 0!==l[3]?l[3]:{},a=F(t),!this.initPromise){e.next=5;break}return R(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 5:return Object.prototype.hasOwnProperty.call(o,"has_updates")||(o.has_updates=!0),i=performance.now(),this.initOptions=a,this.initPromise=this.initFromValues(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeFromValues",s.initCompleted)}),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}},e,this)})),function(e,t,r){return ej.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw Error("Client must be initialized before using this method")}},{key:"updateUser",value:(eP=k(O().mark(function e(t,r,n){var o,a;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),o=F(t),a=function(){return er.fetchExperimentValues(o,r,n).then(function(e){return{experimentValues:e.experimentValues,customAttributesFromFetch:e.customAttributes}})},e.next=5,this.updateUserUsingInitializeValuesProducer(a,r,n);case 5:case"end":return e.stop()}},e,this)})),function(e,t,r){return eP.apply(this,arguments)})},{key:"updateUserWithProvider",value:(eI=k(O().mark(function e(t,r){var n=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw Error("Cannot update user using provider as the client was not initialised with a provider");case 3:return e.next=5,this.provider.setProfile(this.initOptions,t,r);case 5:return e.next=7,this.updateUserUsingInitializeValuesProducer(function(){return n.provider.getExperimentValues()},t,r);case 7:case"end":return e.stop()}},e,this)})),function(e,t){return eI.apply(this,arguments)})},{key:"updateUserWithValues",value:(eA=k(O().mark(function e(t,r){var n,o,a=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},this.assertInitialized(this.statsigClient),o=function(){return Promise.resolve({experimentValues:n,customAttributesFromFetch:r})},e.next=5,this.updateUserUsingInitializeValuesProducer(o,t,r);case 5:case"end":return e.stop()}},e,this)})),function(e,t){return eA.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"waitUntilInitializeCompleted",value:(eU=k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.initPromise){e.next=2;break}throw Error("The client must be initialized before you can wait until initialized.");case 2:if(!this.initCompleted){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this.initPromise;case 6:case"end":return e.stop()}},e,this)})),function(){return eU.apply(this,arguments)})},{key:"checkGate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireGateExposure;return this.statsigClient.checkGate(e,{disableExposureLog:!(void 0===r||r)})}catch(t){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:e,error:t}),this.hasCheckGateErrorOccurred=!0),!1}}},{key:"isGateExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getFeatureGate(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check FeatureGate: ".concat(e)),!0}}},{key:"isExperimentExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getExperiment(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check Experiment: ".concat(e)),!0}}},{key:"manuallyLogGateExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(e)}},{key:"getExperiment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireExperimentExposure;return B.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:e,error:t}),this.hasGetExperimentErrorOccurred=!0),new B(e,{},"",{time:Date.now(),reason:I.Error})}}},{key:"getExperimentValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getExperiment(e,n);try{var a=n.typeGuard;return o.get(t,r,a)}catch(t){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),this.hasGetExperimentValueErrorOccurred=!0),r}}},{key:"manuallyLogExperimentExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(e)}},{key:"manuallyLogLayerExposure",value:function(e,t){var r;this.assertInitialized(this.statsigClient),null==(r=this.statsigClient.getLayer(e))||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){if(this.overrideAdapter.overrideGate(e,t),this.user){var r;null==(r=this.statsigClient)||r.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0})}this.statsigValuesUpdated()}},{key:"clearGateOverride",value:function(e){this.overrideAdapter.removeGateOverride(e),this.statsigValuesUpdated()}},{key:"overrideConfig",value:function(e,t){this.overrideAdapter.overrideDynamicConfig(e,t),this.statsigValuesUpdated()}},{key:"clearConfigOverride",value:function(e){this.overrideAdapter.removeDynamicConfigOverride(e),this.statsigValuesUpdated()}},{key:"setOverrides",value:function(e){this.overrideAdapter.setOverrides(e),this.statsigValuesUpdated()}},{key:"getOverrides",value:function(){return this.overrideAdapter.getOverrides()}},{key:"clearAllOverrides",value:function(){this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}},{key:"isCurrentUser",value:function(e,t){return R(this.currentIdentifiers,e)&&R(this.currentAttributes,t)}},{key:"onGateUpdated",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.subscriptions.onGateUpdated(e,function(o){var a=n.fireGateExposure;(void 0===a||a)&&r.manuallyLogGateExposure(e);try{t(o)}catch(t){console.warn("Error calling callback for gate ".concat(e," with value ").concat(o),t)}},this.checkGate.bind(this),n)}},{key:"onExperimentValueUpdated",value:function(e,t,r,n){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return this.subscriptions.onExperimentValueUpdated(e,t,r,function(t){var r=a.fireExperimentExposure;(void 0===r||r)&&o.manuallyLogExperimentExposure(e);try{n(t)}catch(r){console.warn("Error calling callback for experiment ".concat(e," with value ").concat(t),r)}},this.getExperimentValue.bind(this),a)}},{key:"onAnyUpdated",value:function(e){return this.subscriptions.onAnyUpdated(e)}},{key:"init",value:(eM=k(O().mark(function e(t,r,n){var o,a,i,s,l,c;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=em({},t),e.prev=1,s=er.fetchClientSdk(t).then(function(e){return o.sdkKey=e.clientSdkKey}),l=er.fetchExperimentValues(t,r,n),e.next=6,Promise.all([s,l]);case 6:a=(c=m(e.sent,2)[1]).experimentValues,i=c.customAttributes,e.next=20;break;case 13:return e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=19,this.initFromValues(o,r,n);case 19:throw e.t0;case 20:return e.abrupt("return",this.initFromValues(o,r,i,a));case 21:case"end":return e.stop()}},e,this,[[1,13]])})),function(e,t,r){return eM.apply(this,arguments)})},{key:"initWithProvider",value:(eT=k(O().mark(function e(t,r,n,o){var a,i,s,l,c,u;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=em(em({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,n,o);case 4:return l=r.getClientSdkKey().then(function(e){return a.sdkKey=e}),c=r.getExperimentValues(),e.next=8,Promise.all([l,c]);case 8:i=(u=m(e.sent,2)[1]).experimentValues,s=u.customAttributesFromFetch,e.next=22;break;case 15:return e.prev=15,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=21,this.initFromValues(a,n,o);case 21:throw e.t0;case 22:return e.abrupt("return",this.initFromValues(a,n,s,i));case 23:case"end":return e.stop()}},e,this,[[1,15]])})),function(e,t,r,n){return eT.apply(this,arguments)})},{key:"initFromValues",value:(eL=k(O().mark(function e(t,r,n){var o,a,i,s,l,c,u,d=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>3&&void 0!==d[3]?d[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=n,(i=V(t)).sdkKey||(i.sdkKey=e_),null!=(o=i.networkConfig)&&o.logEventUrl||(i.networkConfig=em(em({},i.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),i.perimeter===U.FEDRAMP_MODERATE&&(i.disableLogging=!0),s=i.sdkKey,l=i.environment,i.updateUserCompletionCallback,i.perimeter,c=b(i,ev),this.user=N(r,n),u=em(em({},c),{},{environment:{tier:l},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter,logEventCompressionMode:E.LogEventCompressionMode.Forced}),r.stableId?E.StableID.setOverride(r.stableId,s):u.disableStableID=!0,e.prev=12,this.statsigClient=new E.StatsigClient(s,this.user,u),this.dataAdapter.setBootstrapData(a),e.next=17,this.statsigClient.initializeAsync();case 17:e.next=29;break;case 19:return e.prev=19,e.t0=e.catch(12),e.t0 instanceof Error&&console.error("Error occurred when trying to initialise the Statsig client, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new E.StatsigClient(e_,this.user,u),this.dataAdapter.setBootstrapData(),e.next=27,this.statsigClient.initializeAsync();case 27:throw this.initWithDefaults=!0,e.t0;case 29:case"end":return e.stop()}},e,this,[[12,19]])})),function(e,t,r){return eL.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(eF=k(O().mark(function e(t,r,n){var o,a,i,s=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw Error("The client must be initialized before you can update the user.");case 3:if(!this.isCurrentUser(r,n)){e.next=5;break}return e.abrupt("return",this.initPromise);case 5:return o=this.initPromise,e.prev=6,e.next=9,this.initPromise;case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(6);case 13:return a=t(),i=this.updateStatsigClientUser(a,r,n),this.initPromise=i.catch(k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s.initPromise=o,!s.provider){e.next=4;break}return e.next=4,s.provider.setProfile(s.initOptions,s.currentIdentifiers,s.currentAttributes);case 4:case"end":return e.stop()}},e)}))),e.abrupt("return",i);case 17:case"end":return e.stop()}},e,this,[[6,11]])})),function(e,t,r){return eF.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(eR=k(O().mark(function e(t,r,n){var o,a,i,s,l,c,u,d,h;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),e.prev=1,e.next=4,t;case 4:s=N(r,(i=e.sent).customAttributesFromFetch),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),u=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null==(l=(c=this.initOptions).updateUserCompletionCallback)||l.call(c,!1,u),e.t0;case 13:if(d=!0,h=null,e.prev=15,this.dataAdapter.setBootstrapData(i.experimentValues),this.user=s,!this.user){e.next=21;break}return e.next=21,this.statsigClient.updateUserAsync(this.user);case 21:e.next=27;break;case 23:e.prev=23,e.t1=e.catch(15),d=!1,h=String(e.t1);case 27:if(null==(o=this.initOptions)||null==(a=o.updateUserCompletionCallback)||a.call(o,d,h),!d){e.next=34;break}this.currentIdentifiers=r,this.currentAttributes=n,this.subscriptions.anyUpdated(),e.next=35;break;case 34:throw Error("Failed to update user. An unexpected error occured.");case 35:case"end":return e.stop()}},e,this,[[1,8],[15,23]])})),function(e,t,r){return eR.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return J}},{key:"getLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireLayerExposure;return $.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:e,error:t}),this.hasGetLayerErrorOccurred=!0),$.fromLayer((0,E._makeLayer)(e,{reason:"Error"},null))}}},{key:"getLayerValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getLayer(e,n);try{var a=n.typeGuard;return o.get(t,r,a)}catch(t){return this.hasGetLayerValueErrorOccurred||(console.warn({msg:"An error has occurred getting the layer value. Only the first occurrence of this error is logged.",layerName:e,defaultValue:r,options:n,error:t}),this.hasGetLayerValueErrorOccurred=!0),r}}}]),ew=p(function e(){u(this,e)},null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}]);f(ew,"client",new ek),f(ew,"hasCheckGateErrorOccurred",!1),f(ew,"hasGetExperimentValueErrorOccurred",!1),f(ew,"checkGate",function(e,t){try{if("undefined"!=typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getFeatureFlagOverride){var r=window.__CRITERION__.getFeatureFlagOverride(e);if(void 0!==r)return r}}catch(t){ew.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate from criterion override. Only the first occurrence of this error is logged.",gateName:e,error:t}),ew.hasCheckGateErrorOccurred=!0)}return ew.client.checkGate(e,t)}),f(ew,"getExperimentValue",function(e,t,r,n){try{if("undefined"!=typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getExperimentValueOverride){var o=window.__CRITERION__.getExperimentValueOverride(e,t);if(null!=o)return o}}catch(t){return ew.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value from criterion override. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),ew.hasGetExperimentValueErrorOccurred=!0),r}return ew.client.getExperimentValue(e,t,r,n)}),f(ew,"initializeCalled",ew.client.initializeCalled.bind(ew.client)),f(ew,"initializeCompleted",ew.client.initializeCompleted.bind(ew.client)),f(ew,"waitUntilInitializeCompleted",ew.client.waitUntilInitializeCompleted.bind(ew.client)),f(ew,"initialize",ew.client.initialize.bind(ew.client)),f(ew,"initializeWithProvider",ew.client.initializeWithProvider.bind(ew.client)),f(ew,"initializeFromValues",ew.client.initializeFromValues.bind(ew.client)),f(ew,"manuallyLogGateExposure",ew.client.manuallyLogGateExposure.bind(ew.client)),f(ew,"getExperiment",ew.client.getExperiment.bind(ew.client)),f(ew,"manuallyLogExperimentExposure",ew.client.manuallyLogExperimentExposure.bind(ew.client)),f(ew,"manuallyLogLayerExposure",ew.client.manuallyLogLayerExposure.bind(ew.client)),f(ew,"shutdownStatsig",ew.client.shutdownStatsig.bind(ew.client)),f(ew,"overrideGate",ew.client.overrideGate.bind(ew.client)),f(ew,"clearGateOverride",ew.client.clearGateOverride.bind(ew.client)),f(ew,"overrideConfig",ew.client.overrideConfig.bind(ew.client)),f(ew,"clearConfigOverride",ew.client.clearConfigOverride.bind(ew.client)),f(ew,"setOverrides",ew.client.setOverrides.bind(ew.client)),f(ew,"getOverrides",ew.client.getOverrides.bind(ew.client)),f(ew,"clearAllOverrides",ew.client.clearAllOverrides.bind(ew.client)),f(ew,"isCurrentUser",ew.client.isCurrentUser.bind(ew.client)),f(ew,"onGateUpdated",ew.client.onGateUpdated.bind(ew.client)),f(ew,"onExperimentValueUpdated",ew.client.onExperimentValueUpdated.bind(ew.client)),f(ew,"onAnyUpdated",ew.client.onAnyUpdated.bind(ew.client)),f(ew,"updateUser",ew.client.updateUser.bind(ew.client)),f(ew,"updateUserWithProvider",ew.client.updateUserWithProvider.bind(ew.client)),f(ew,"updateUserWithValues",ew.client.updateUserWithValues.bind(ew.client)),f(ew,"getPackageVersion",ew.client.getPackageVersion.bind(ew.client)),f(ew,"getLayer",ew.client.getLayer.bind(ew.client)),f(ew,"getLayerValue",ew.client.getLayerValue.bind(ew.client));var eO=ew;if("undefined"!=typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=ew;else{var eE,ex,eS,eC,eD,ej,eP,eI,eA,eU,eM,eT,eL,eF,eR,eN,eV,eK=(null==(eN=eO=window.__FEATUREGATES_JS__)||null==(eV=eN.getPackageVersion)?void 0:eV.call(eN))||"4.10.0 or earlier";eK!==J&&console.warn("Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(eK," when module version ").concat(J," was loading."))}let ez=eO;var eG=(null==globalThis||null==(i=globalThis.process)||null==(i=i.env)?void 0:i.JEST_WORKER_ID)===void 0&&(null==globalThis||null==(s=globalThis.process)||null==(s=s.env)?void 0:s.NODE_ENV)!=="production",eB=function(){var e;eG&&(e=console).debug.apply(e,arguments)},e$="__PLATFORM_FEATURE_FLAGS__",eJ="undefined"==typeof process&&!1,eq="undefined"!=typeof window?window:globalThis;function eW(e){if(eJ)return eB('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',"@atlaskit/platform-feature-flags",e),!0;try{if((null==(t=eq[e$])?void 0:t.booleanResolver)===void 0||(null==(r=eq[e$])?void 0:r.booleanResolver)===null)return ez.checkGate(e);var t,r,n,o=null==(n=eq[e$])?void 0:n.booleanResolver(e);if("boolean"!=typeof o)return console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1;return o}catch(e){return!1}}eq[e$]=eq[e$]||{booleanResolver:void 0};var eH=["light","dark","auto"],eQ=["light-increased-contrast","light","light-future","light-brand-refresh","dark","dark-future","dark-increased-contrast","dark-brand-refresh","legacy-light","legacy-dark","spacing","shape","typography-adg3","typography-modernized","typography-refreshed"],eX=[].concat(eQ,[]),eY="auto",eZ="auto",e0="dark",e1="light",e2=void 0,e3="spacing",e5=function(){if(eW("platform-default-typography-modernized"))return"typography-modernized"},e7=void 0;let e4={"atlassian-light":{id:"light",displayName:"Light Theme",palette:"defaultPalette",attributes:{type:"color",mode:"light"}},"atlassian-light-future":{id:"light-future",displayName:"Future Light Theme",palette:"defaultPalette",attributes:{type:"color",mode:"light"},override:"light"},"atlassian-light-increased-contrast":{id:"light-increased-contrast",displayName:"Light Theme (increased contrast)",palette:"defaultPalette",attributes:{type:"color",mode:"light"},extends:"light",increasesContrastFor:"light"},"atlassian-dark":{id:"dark",displayName:"Dark Theme",palette:"defaultPalette",attributes:{type:"color",mode:"dark"}},"atlassian-dark-future":{id:"dark-future",displayName:"Future Dark Theme",palette:"defaultPalette",attributes:{type:"color",mode:"dark"},override:"light"},"atlassian-dark-increased-contrast":{id:"dark-increased-contrast",displayName:"Dark Theme (increased contrast)",palette:"defaultPalette",attributes:{type:"color",mode:"dark"},extends:"dark",increasesContrastFor:"dark"},"atlassian-legacy-light":{id:"legacy-light",displayName:"Light Theme (legacy)",palette:"legacyPalette",attributes:{type:"color",mode:"light"}},"atlassian-legacy-dark":{id:"legacy-dark",displayName:"Dark Theme (legacy)",palette:"legacyPalette",attributes:{type:"color",mode:"dark"}},"atlassian-spacing":{id:"spacing",displayName:"Atlassian Spacing",palette:"spacingScale",attributes:{type:"spacing"}},"atlassian-typography-adg3":{id:"typography-adg3",displayName:"ADG3 Typography",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-shape":{id:"shape",displayName:"Atlassian Shape",palette:"shapePalette",attributes:{type:"shape"}},"atlassian-typography-modernized":{id:"typography-modernized",displayName:"Atlassian Typography (Modernized)",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-typography-refreshed":{id:"typography-refreshed",displayName:"Atlassian Typography (Refreshed)",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-light-brand-refresh":{id:"light-brand-refresh",displayName:"Light theme (Brand refresh)",palette:"brandRefreshPalette",attributes:{type:"color",mode:"light"}},"atlassian-dark-brand-refresh":{id:"dark-brand-refresh",displayName:"Dark theme (Brand refresh)",palette:"brandRefreshPalette",attributes:{type:"color",mode:"dark"}}},e8={"color.text":"--ds-text","color.text.accent.lime":"--ds-text-accent-lime","color.text.accent.lime.bolder":"--ds-text-accent-lime-bolder","color.text.accent.red":"--ds-text-accent-red","color.text.accent.red.bolder":"--ds-text-accent-red-bolder","color.text.accent.orange":"--ds-text-accent-orange","color.text.accent.orange.bolder":"--ds-text-accent-orange-bolder","color.text.accent.yellow":"--ds-text-accent-yellow","color.text.accent.yellow.bolder":"--ds-text-accent-yellow-bolder","color.text.accent.green":"--ds-text-accent-green","color.text.accent.green.bolder":"--ds-text-accent-green-bolder","color.text.accent.teal":"--ds-text-accent-teal","color.text.accent.teal.bolder":"--ds-text-accent-teal-bolder","color.text.accent.blue":"--ds-text-accent-blue","color.text.accent.blue.bolder":"--ds-text-accent-blue-bolder","color.text.accent.purple":"--ds-text-accent-purple","color.text.accent.purple.bolder":"--ds-text-accent-purple-bolder","color.text.accent.magenta":"--ds-text-accent-magenta","color.text.accent.magenta.bolder":"--ds-text-accent-magenta-bolder","color.text.accent.gray":"--ds-text-accent-gray","color.text.accent.gray.bolder":"--ds-text-accent-gray-bolder","color.text.disabled":"--ds-text-disabled","color.text.inverse":"--ds-text-inverse","color.text.selected":"--ds-text-selected","color.text.brand":"--ds-text-brand","color.text.danger":"--ds-text-danger","color.text.warning":"--ds-text-warning","color.text.warning.inverse":"--ds-text-warning-inverse","color.text.success":"--ds-text-success","color.text.discovery":"--ds-text-discovery","color.text.information":"--ds-text-information","color.text.subtlest":"--ds-text-subtlest","color.text.subtle":"--ds-text-subtle","color.link":"--ds-link","color.link.pressed":"--ds-link-pressed","color.link.visited":"--ds-link-visited","color.link.visited.pressed":"--ds-link-visited-pressed","color.icon":"--ds-icon","color.icon.accent.lime":"--ds-icon-accent-lime","color.icon.accent.red":"--ds-icon-accent-red","color.icon.accent.orange":"--ds-icon-accent-orange","color.icon.accent.yellow":"--ds-icon-accent-yellow","color.icon.accent.green":"--ds-icon-accent-green","color.icon.accent.teal":"--ds-icon-accent-teal","color.icon.accent.blue":"--ds-icon-accent-blue","color.icon.accent.purple":"--ds-icon-accent-purple","color.icon.accent.magenta":"--ds-icon-accent-magenta","color.icon.accent.gray":"--ds-icon-accent-gray","color.icon.disabled":"--ds-icon-disabled","color.icon.inverse":"--ds-icon-inverse","color.icon.selected":"--ds-icon-selected","color.icon.brand":"--ds-icon-brand","color.icon.danger":"--ds-icon-danger","color.icon.warning":"--ds-icon-warning","color.icon.warning.inverse":"--ds-icon-warning-inverse","color.icon.success":"--ds-icon-success","color.icon.discovery":"--ds-icon-discovery","color.icon.information":"--ds-icon-information","color.icon.subtlest":"--ds-icon-subtlest","color.icon.subtle":"--ds-icon-subtle","color.border":"--ds-border","color.border.accent.lime":"--ds-border-accent-lime","color.border.accent.red":"--ds-border-accent-red","color.border.accent.orange":"--ds-border-accent-orange","color.border.accent.yellow":"--ds-border-accent-yellow","color.border.accent.green":"--ds-border-accent-green","color.border.accent.teal":"--ds-border-accent-teal","color.border.accent.blue":"--ds-border-accent-blue","color.border.accent.purple":"--ds-border-accent-purple","color.border.accent.magenta":"--ds-border-accent-magenta","color.border.accent.gray":"--ds-border-accent-gray","color.border.disabled":"--ds-border-disabled","color.border.focused":"--ds-border-focused","color.border.input":"--ds-border-input","color.border.inverse":"--ds-border-inverse","color.border.selected":"--ds-border-selected","color.border.brand":"--ds-border-brand","color.border.danger":"--ds-border-danger","color.border.warning":"--ds-border-warning","color.border.success":"--ds-border-success","color.border.discovery":"--ds-border-discovery","color.border.information":"--ds-border-information","color.border.bold":"--ds-border-bold","color.background.accent.lime.subtlest":"--ds-background-accent-lime-subtlest","color.background.accent.lime.subtlest.hovered":"--ds-background-accent-lime-subtlest-hovered","color.background.accent.lime.subtlest.pressed":"--ds-background-accent-lime-subtlest-pressed","color.background.accent.lime.subtler":"--ds-background-accent-lime-subtler","color.background.accent.lime.subtler.hovered":"--ds-background-accent-lime-subtler-hovered","color.background.accent.lime.subtler.pressed":"--ds-background-accent-lime-subtler-pressed","color.background.accent.lime.subtle":"--ds-background-accent-lime-subtle","color.background.accent.lime.subtle.hovered":"--ds-background-accent-lime-subtle-hovered","color.background.accent.lime.subtle.pressed":"--ds-background-accent-lime-subtle-pressed","color.background.accent.lime.bolder":"--ds-background-accent-lime-bolder","color.background.accent.lime.bolder.hovered":"--ds-background-accent-lime-bolder-hovered","color.background.accent.lime.bolder.pressed":"--ds-background-accent-lime-bolder-pressed","color.background.accent.red.subtlest":"--ds-background-accent-red-subtlest","color.background.accent.red.subtlest.hovered":"--ds-background-accent-red-subtlest-hovered","color.background.accent.red.subtlest.pressed":"--ds-background-accent-red-subtlest-pressed","color.background.accent.red.subtler":"--ds-background-accent-red-subtler","color.background.accent.red.subtler.hovered":"--ds-background-accent-red-subtler-hovered","color.background.accent.red.subtler.pressed":"--ds-background-accent-red-subtler-pressed","color.background.accent.red.subtle":"--ds-background-accent-red-subtle","color.background.accent.red.subtle.hovered":"--ds-background-accent-red-subtle-hovered","color.background.accent.red.subtle.pressed":"--ds-background-accent-red-subtle-pressed","color.background.accent.red.bolder":"--ds-background-accent-red-bolder","color.background.accent.red.bolder.hovered":"--ds-background-accent-red-bolder-hovered","color.background.accent.red.bolder.pressed":"--ds-background-accent-red-bolder-pressed","color.background.accent.orange.subtlest":"--ds-background-accent-orange-subtlest","color.background.accent.orange.subtlest.hovered":"--ds-background-accent-orange-subtlest-hovered","color.background.accent.orange.subtlest.pressed":"--ds-background-accent-orange-subtlest-pressed","color.background.accent.orange.subtler":"--ds-background-accent-orange-subtler","color.background.accent.orange.subtler.hovered":"--ds-background-accent-orange-subtler-hovered","color.background.accent.orange.subtler.pressed":"--ds-background-accent-orange-subtler-pressed","color.background.accent.orange.subtle":"--ds-background-accent-orange-subtle","color.background.accent.orange.subtle.hovered":"--ds-background-accent-orange-subtle-hovered","color.background.accent.orange.subtle.pressed":"--ds-background-accent-orange-subtle-pressed","color.background.accent.orange.bolder":"--ds-background-accent-orange-bolder","color.background.accent.orange.bolder.hovered":"--ds-background-accent-orange-bolder-hovered","color.background.accent.orange.bolder.pressed":"--ds-background-accent-orange-bolder-pressed","color.background.accent.yellow.subtlest":"--ds-background-accent-yellow-subtlest","color.background.accent.yellow.subtlest.hovered":"--ds-background-accent-yellow-subtlest-hovered","color.background.accent.yellow.subtlest.pressed":"--ds-background-accent-yellow-subtlest-pressed","color.background.accent.yellow.subtler":"--ds-background-accent-yellow-subtler","color.background.accent.yellow.subtler.hovered":"--ds-background-accent-yellow-subtler-hovered","color.background.accent.yellow.subtler.pressed":"--ds-background-accent-yellow-subtler-pressed","color.background.accent.yellow.subtle":"--ds-background-accent-yellow-subtle","color.background.accent.yellow.subtle.hovered":"--ds-background-accent-yellow-subtle-hovered","color.background.accent.yellow.subtle.pressed":"--ds-background-accent-yellow-subtle-pressed","color.background.accent.yellow.bolder":"--ds-background-accent-yellow-bolder","color.background.accent.yellow.bolder.hovered":"--ds-background-accent-yellow-bolder-hovered","color.background.accent.yellow.bolder.pressed":"--ds-background-accent-yellow-bolder-pressed","color.background.accent.green.subtlest":"--ds-background-accent-green-subtlest","color.background.accent.green.subtlest.hovered":"--ds-background-accent-green-subtlest-hovered","color.background.accent.green.subtlest.pressed":"--ds-background-accent-green-subtlest-pressed","color.background.accent.green.subtler":"--ds-background-accent-green-subtler","color.background.accent.green.subtler.hovered":"--ds-background-accent-green-subtler-hovered","color.background.accent.green.subtler.pressed":"--ds-background-accent-green-subtler-pressed","color.background.accent.green.subtle":"--ds-background-accent-green-subtle","color.background.accent.green.subtle.hovered":"--ds-background-accent-green-subtle-hovered","color.background.accent.green.subtle.pressed":"--ds-background-accent-green-subtle-pressed","color.background.accent.green.bolder":"--ds-background-accent-green-bolder","color.background.accent.green.bolder.hovered":"--ds-background-accent-green-bolder-hovered","color.background.accent.green.bolder.pressed":"--ds-background-accent-green-bolder-pressed","color.background.accent.teal.subtlest":"--ds-background-accent-teal-subtlest","color.background.accent.teal.subtlest.hovered":"--ds-background-accent-teal-subtlest-hovered","color.background.accent.teal.subtlest.pressed":"--ds-background-accent-teal-subtlest-pressed","color.background.accent.teal.subtler":"--ds-background-accent-teal-subtler","color.background.accent.teal.subtler.hovered":"--ds-background-accent-teal-subtler-hovered","color.background.accent.teal.subtler.pressed":"--ds-background-accent-teal-subtler-pressed","color.background.accent.teal.subtle":"--ds-background-accent-teal-subtle","color.background.accent.teal.subtle.hovered":"--ds-background-accent-teal-subtle-hovered","color.background.accent.teal.subtle.pressed":"--ds-background-accent-teal-subtle-pressed","color.background.accent.teal.bolder":"--ds-background-accent-teal-bolder","color.background.accent.teal.bolder.hovered":"--ds-background-accent-teal-bolder-hovered","color.background.accent.teal.bolder.pressed":"--ds-background-accent-teal-bolder-pressed","color.background.accent.blue.subtlest":"--ds-background-accent-blue-subtlest","color.background.accent.blue.subtlest.hovered":"--ds-background-accent-blue-subtlest-hovered","color.background.accent.blue.subtlest.pressed":"--ds-background-accent-blue-subtlest-pressed","color.background.accent.blue.subtler":"--ds-background-accent-blue-subtler","color.background.accent.blue.subtler.hovered":"--ds-background-accent-blue-subtler-hovered","color.background.accent.blue.subtler.pressed":"--ds-background-accent-blue-subtler-pressed","color.background.accent.blue.subtle":"--ds-background-accent-blue-subtle","color.background.accent.blue.subtle.hovered":"--ds-background-accent-blue-subtle-hovered","color.background.accent.blue.subtle.pressed":"--ds-background-accent-blue-subtle-pressed","color.background.accent.blue.bolder":"--ds-background-accent-blue-bolder","color.background.accent.blue.bolder.hovered":"--ds-background-accent-blue-bolder-hovered","color.background.accent.blue.bolder.pressed":"--ds-background-accent-blue-bolder-pressed","color.background.accent.purple.subtlest":"--ds-background-accent-purple-subtlest","color.background.accent.purple.subtlest.hovered":"--ds-background-accent-purple-subtlest-hovered","color.background.accent.purple.subtlest.pressed":"--ds-background-accent-purple-subtlest-pressed","color.background.accent.purple.subtler":"--ds-background-accent-purple-subtler","color.background.accent.purple.subtler.hovered":"--ds-background-accent-purple-subtler-hovered","color.background.accent.purple.subtler.pressed":"--ds-background-accent-purple-subtler-pressed","color.background.accent.purple.subtle":"--ds-background-accent-purple-subtle","color.background.accent.purple.subtle.hovered":"--ds-background-accent-purple-subtle-hovered","color.background.accent.purple.subtle.pressed":"--ds-background-accent-purple-subtle-pressed","color.background.accent.purple.bolder":"--ds-background-accent-purple-bolder","color.background.accent.purple.bolder.hovered":"--ds-background-accent-purple-bolder-hovered","color.background.accent.purple.bolder.pressed":"--ds-background-accent-purple-bolder-pressed","color.background.accent.magenta.subtlest":"--ds-background-accent-magenta-subtlest","color.background.accent.magenta.subtlest.hovered":"--ds-background-accent-magenta-subtlest-hovered","color.background.accent.magenta.subtlest.pressed":"--ds-background-accent-magenta-subtlest-pressed","color.background.accent.magenta.subtler":"--ds-background-accent-magenta-subtler","color.background.accent.magenta.subtler.hovered":"--ds-background-accent-magenta-subtler-hovered","color.background.accent.magenta.subtler.pressed":"--ds-background-accent-magenta-subtler-pressed","color.background.accent.magenta.subtle":"--ds-background-accent-magenta-subtle","color.background.accent.magenta.subtle.hovered":"--ds-background-accent-magenta-subtle-hovered","color.background.accent.magenta.subtle.pressed":"--ds-background-accent-magenta-subtle-pressed","color.background.accent.magenta.bolder":"--ds-background-accent-magenta-bolder","color.background.accent.magenta.bolder.hovered":"--ds-background-accent-magenta-bolder-hovered","color.background.accent.magenta.bolder.pressed":"--ds-background-accent-magenta-bolder-pressed","color.background.accent.gray.subtlest":"--ds-background-accent-gray-subtlest","color.background.accent.gray.subtlest.hovered":"--ds-background-accent-gray-subtlest-hovered","color.background.accent.gray.subtlest.pressed":"--ds-background-accent-gray-subtlest-pressed","color.background.accent.gray.subtler":"--ds-background-accent-gray-subtler","color.background.accent.gray.subtler.hovered":"--ds-background-accent-gray-subtler-hovered","color.background.accent.gray.subtler.pressed":"--ds-background-accent-gray-subtler-pressed","color.background.accent.gray.subtle":"--ds-background-accent-gray-subtle","color.background.accent.gray.subtle.hovered":"--ds-background-accent-gray-subtle-hovered","color.background.accent.gray.subtle.pressed":"--ds-background-accent-gray-subtle-pressed","color.background.accent.gray.bolder":"--ds-background-accent-gray-bolder","color.background.accent.gray.bolder.hovered":"--ds-background-accent-gray-bolder-hovered","color.background.accent.gray.bolder.pressed":"--ds-background-accent-gray-bolder-pressed","color.background.disabled":"--ds-background-disabled","color.background.input":"--ds-background-input","color.background.input.hovered":"--ds-background-input-hovered","color.background.input.pressed":"--ds-background-input-pressed","color.background.inverse.subtle":"--ds-background-inverse-subtle","color.background.inverse.subtle.hovered":"--ds-background-inverse-subtle-hovered","color.background.inverse.subtle.pressed":"--ds-background-inverse-subtle-pressed","color.background.neutral":"--ds-background-neutral","color.background.neutral.hovered":"--ds-background-neutral-hovered","color.background.neutral.pressed":"--ds-background-neutral-pressed","color.background.neutral.subtle":"--ds-background-neutral-subtle","color.background.neutral.subtle.hovered":"--ds-background-neutral-subtle-hovered","color.background.neutral.subtle.pressed":"--ds-background-neutral-subtle-pressed","color.background.neutral.bold":"--ds-background-neutral-bold","color.background.neutral.bold.hovered":"--ds-background-neutral-bold-hovered","color.background.neutral.bold.pressed":"--ds-background-neutral-bold-pressed","color.background.selected":"--ds-background-selected","color.background.selected.hovered":"--ds-background-selected-hovered","color.background.selected.pressed":"--ds-background-selected-pressed","color.background.selected.bold":"--ds-background-selected-bold","color.background.selected.bold.hovered":"--ds-background-selected-bold-hovered","color.background.selected.bold.pressed":"--ds-background-selected-bold-pressed","color.background.brand.subtlest":"--ds-background-brand-subtlest","color.background.brand.subtlest.hovered":"--ds-background-brand-subtlest-hovered","color.background.brand.subtlest.pressed":"--ds-background-brand-subtlest-pressed","color.background.brand.bold":"--ds-background-brand-bold","color.background.brand.bold.hovered":"--ds-background-brand-bold-hovered","color.background.brand.bold.pressed":"--ds-background-brand-bold-pressed","color.background.brand.boldest":"--ds-background-brand-boldest","color.background.brand.boldest.hovered":"--ds-background-brand-boldest-hovered","color.background.brand.boldest.pressed":"--ds-background-brand-boldest-pressed","color.background.danger":"--ds-background-danger","color.background.danger.hovered":"--ds-background-danger-hovered","color.background.danger.pressed":"--ds-background-danger-pressed","color.background.danger.bold":"--ds-background-danger-bold","color.background.danger.bold.hovered":"--ds-background-danger-bold-hovered","color.background.danger.bold.pressed":"--ds-background-danger-bold-pressed","color.background.warning":"--ds-background-warning","color.background.warning.hovered":"--ds-background-warning-hovered","color.background.warning.pressed":"--ds-background-warning-pressed","color.background.warning.bold":"--ds-background-warning-bold","color.background.warning.bold.hovered":"--ds-background-warning-bold-hovered","color.background.warning.bold.pressed":"--ds-background-warning-bold-pressed","color.background.success":"--ds-background-success","color.background.success.hovered":"--ds-background-success-hovered","color.background.success.pressed":"--ds-background-success-pressed","color.background.success.bold":"--ds-background-success-bold","color.background.success.bold.hovered":"--ds-background-success-bold-hovered","color.background.success.bold.pressed":"--ds-background-success-bold-pressed","color.background.discovery":"--ds-background-discovery","color.background.discovery.hovered":"--ds-background-discovery-hovered","color.background.discovery.pressed":"--ds-background-discovery-pressed","color.background.discovery.bold":"--ds-background-discovery-bold","color.background.discovery.bold.hovered":"--ds-background-discovery-bold-hovered","color.background.discovery.bold.pressed":"--ds-background-discovery-bold-pressed","color.background.information":"--ds-background-information","color.background.information.hovered":"--ds-background-information-hovered","color.background.information.pressed":"--ds-background-information-pressed","color.background.information.bold":"--ds-background-information-bold","color.background.information.bold.hovered":"--ds-background-information-bold-hovered","color.background.information.bold.pressed":"--ds-background-information-bold-pressed","color.blanket":"--ds-blanket","color.blanket.selected":"--ds-blanket-selected","color.blanket.danger":"--ds-blanket-danger","color.interaction.hovered":"--ds-interaction-hovered","color.interaction.pressed":"--ds-interaction-pressed","color.skeleton":"--ds-skeleton","color.skeleton.subtle":"--ds-skeleton-subtle","color.chart.categorical.1":"--ds-chart-categorical-1","color.chart.categorical.1.hovered":"--ds-chart-categorical-1-hovered","color.chart.categorical.2":"--ds-chart-categorical-2","color.chart.categorical.2.hovered":"--ds-chart-categorical-2-hovered","color.chart.categorical.3":"--ds-chart-categorical-3","color.chart.categorical.3.hovered":"--ds-chart-categorical-3-hovered","color.chart.categorical.4":"--ds-chart-categorical-4","color.chart.categorical.4.hovered":"--ds-chart-categorical-4-hovered","color.chart.categorical.5":"--ds-chart-categorical-5","color.chart.categorical.5.hovered":"--ds-chart-categorical-5-hovered","color.chart.categorical.6":"--ds-chart-categorical-6","color.chart.categorical.6.hovered":"--ds-chart-categorical-6-hovered","color.chart.categorical.7":"--ds-chart-categorical-7","color.chart.categorical.7.hovered":"--ds-chart-categorical-7-hovered","color.chart.categorical.8":"--ds-chart-categorical-8","color.chart.categorical.8.hovered":"--ds-chart-categorical-8-hovered","color.chart.lime.bold":"--ds-chart-lime-bold","color.chart.lime.bold.hovered":"--ds-chart-lime-bold-hovered","color.chart.lime.bolder":"--ds-chart-lime-bolder","color.chart.lime.bolder.hovered":"--ds-chart-lime-bolder-hovered","color.chart.lime.boldest":"--ds-chart-lime-boldest","color.chart.lime.boldest.hovered":"--ds-chart-lime-boldest-hovered","color.chart.neutral":"--ds-chart-neutral","color.chart.neutral.hovered":"--ds-chart-neutral-hovered","color.chart.red.bold":"--ds-chart-red-bold","color.chart.red.bold.hovered":"--ds-chart-red-bold-hovered","color.chart.red.bolder":"--ds-chart-red-bolder","color.chart.red.bolder.hovered":"--ds-chart-red-bolder-hovered","color.chart.red.boldest":"--ds-chart-red-boldest","color.chart.red.boldest.hovered":"--ds-chart-red-boldest-hovered","color.chart.orange.bold":"--ds-chart-orange-bold","color.chart.orange.bold.hovered":"--ds-chart-orange-bold-hovered","color.chart.orange.bolder":"--ds-chart-orange-bolder","color.chart.orange.bolder.hovered":"--ds-chart-orange-bolder-hovered","color.chart.orange.boldest":"--ds-chart-orange-boldest","color.chart.orange.boldest.hovered":"--ds-chart-orange-boldest-hovered","color.chart.yellow.bold":"--ds-chart-yellow-bold","color.chart.yellow.bold.hovered":"--ds-chart-yellow-bold-hovered","color.chart.yellow.bolder":"--ds-chart-yellow-bolder","color.chart.yellow.bolder.hovered":"--ds-chart-yellow-bolder-hovered","color.chart.yellow.boldest":"--ds-chart-yellow-boldest","color.chart.yellow.boldest.hovered":"--ds-chart-yellow-boldest-hovered","color.chart.green.bold":"--ds-chart-green-bold","color.chart.green.bold.hovered":"--ds-chart-green-bold-hovered","color.chart.green.bolder":"--ds-chart-green-bolder","color.chart.green.bolder.hovered":"--ds-chart-green-bolder-hovered","color.chart.green.boldest":"--ds-chart-green-boldest","color.chart.green.boldest.hovered":"--ds-chart-green-boldest-hovered","color.chart.teal.bold":"--ds-chart-teal-bold","color.chart.teal.bold.hovered":"--ds-chart-teal-bold-hovered","color.chart.teal.bolder":"--ds-chart-teal-bolder","color.chart.teal.bolder.hovered":"--ds-chart-teal-bolder-hovered","color.chart.teal.boldest":"--ds-chart-teal-boldest","color.chart.teal.boldest.hovered":"--ds-chart-teal-boldest-hovered","color.chart.blue.bold":"--ds-chart-blue-bold","color.chart.blue.bold.hovered":"--ds-chart-blue-bold-hovered","color.chart.blue.bolder":"--ds-chart-blue-bolder","color.chart.blue.bolder.hovered":"--ds-chart-blue-bolder-hovered","color.chart.blue.boldest":"--ds-chart-blue-boldest","color.chart.blue.boldest.hovered":"--ds-chart-blue-boldest-hovered","color.chart.purple.bold":"--ds-chart-purple-bold","color.chart.purple.bold.hovered":"--ds-chart-purple-bold-hovered","color.chart.purple.bolder":"--ds-chart-purple-bolder","color.chart.purple.bolder.hovered":"--ds-chart-purple-bolder-hovered","color.chart.purple.boldest":"--ds-chart-purple-boldest","color.chart.purple.boldest.hovered":"--ds-chart-purple-boldest-hovered","color.chart.magenta.bold":"--ds-chart-magenta-bold","color.chart.magenta.bold.hovered":"--ds-chart-magenta-bold-hovered","color.chart.magenta.bolder":"--ds-chart-magenta-bolder","color.chart.magenta.bolder.hovered":"--ds-chart-magenta-bolder-hovered","color.chart.magenta.boldest":"--ds-chart-magenta-boldest","color.chart.magenta.boldest.hovered":"--ds-chart-magenta-boldest-hovered","color.chart.gray.bold":"--ds-chart-gray-bold","color.chart.gray.bold.hovered":"--ds-chart-gray-bold-hovered","color.chart.gray.bolder":"--ds-chart-gray-bolder","color.chart.gray.bolder.hovered":"--ds-chart-gray-bolder-hovered","color.chart.gray.boldest":"--ds-chart-gray-boldest","color.chart.gray.boldest.hovered":"--ds-chart-gray-boldest-hovered","color.chart.brand":"--ds-chart-brand","color.chart.brand.hovered":"--ds-chart-brand-hovered","color.chart.danger":"--ds-chart-danger","color.chart.danger.hovered":"--ds-chart-danger-hovered","color.chart.danger.bold":"--ds-chart-danger-bold","color.chart.danger.bold.hovered":"--ds-chart-danger-bold-hovered","color.chart.warning":"--ds-chart-warning","color.chart.warning.hovered":"--ds-chart-warning-hovered","color.chart.warning.bold":"--ds-chart-warning-bold","color.chart.warning.bold.hovered":"--ds-chart-warning-bold-hovered","color.chart.success":"--ds-chart-success","color.chart.success.hovered":"--ds-chart-success-hovered","color.chart.success.bold":"--ds-chart-success-bold","color.chart.success.bold.hovered":"--ds-chart-success-bold-hovered","color.chart.discovery":"--ds-chart-discovery","color.chart.discovery.hovered":"--ds-chart-discovery-hovered","color.chart.discovery.bold":"--ds-chart-discovery-bold","color.chart.discovery.bold.hovered":"--ds-chart-discovery-bold-hovered","color.chart.information":"--ds-chart-information","color.chart.information.hovered":"--ds-chart-information-hovered","color.chart.information.bold":"--ds-chart-information-bold","color.chart.information.bold.hovered":"--ds-chart-information-bold-hovered","elevation.surface":"--ds-surface","elevation.surface.hovered":"--ds-surface-hovered","elevation.surface.pressed":"--ds-surface-pressed","elevation.surface.overlay":"--ds-surface-overlay","elevation.surface.overlay.hovered":"--ds-surface-overlay-hovered","elevation.surface.overlay.pressed":"--ds-surface-overlay-pressed","elevation.surface.raised":"--ds-surface-raised","elevation.surface.raised.hovered":"--ds-surface-raised-hovered","elevation.surface.raised.pressed":"--ds-surface-raised-pressed","elevation.surface.sunken":"--ds-surface-sunken","elevation.shadow.overflow":"--ds-shadow-overflow","elevation.shadow.overflow.perimeter":"--ds-shadow-overflow-perimeter","elevation.shadow.overflow.spread":"--ds-shadow-overflow-spread","elevation.shadow.overlay":"--ds-shadow-overlay","elevation.shadow.raised":"--ds-shadow-raised","opacity.disabled":"--ds-opacity-disabled","opacity.loading":"--ds-opacity-loading","utility.UNSAFE.textTransformUppercase":"--ds-UNSAFE-textTransformUppercase","utility.UNSAFE.transparent":"--ds-UNSAFE-transparent","utility.elevation.surface.current":"--ds-elevation-surface-current","border.radius.050":"--ds-border-radius-050","border.radius":"--ds-border-radius","border.radius.100":"--ds-border-radius-100","border.radius.200":"--ds-border-radius-200","border.radius.300":"--ds-border-radius-300","border.radius.400":"--ds-border-radius-400","border.radius.circle":"--ds-border-radius-circle","border.width":"--ds-border-width","border.width.0":"--ds-border-width-0","border.width.indicator":"--ds-border-width-indicator","border.width.outline":"--ds-border-width-outline","space.0":"--ds-space-0","space.025":"--ds-space-025","space.050":"--ds-space-050","space.075":"--ds-space-075","space.100":"--ds-space-100","space.150":"--ds-space-150","space.200":"--ds-space-200","space.250":"--ds-space-250","space.300":"--ds-space-300","space.400":"--ds-space-400","space.500":"--ds-space-500","space.600":"--ds-space-600","space.800":"--ds-space-800","space.1000":"--ds-space-1000","space.negative.025":"--ds-space-negative-025","space.negative.050":"--ds-space-negative-050","space.negative.075":"--ds-space-negative-075","space.negative.100":"--ds-space-negative-100","space.negative.150":"--ds-space-negative-150","space.negative.200":"--ds-space-negative-200","space.negative.250":"--ds-space-negative-250","space.negative.300":"--ds-space-negative-300","space.negative.400":"--ds-space-negative-400","font.heading.xxlarge":"--ds-font-heading-xxlarge","font.heading.xlarge":"--ds-font-heading-xlarge","font.heading.large":"--ds-font-heading-large","font.heading.medium":"--ds-font-heading-medium","font.heading.small":"--ds-font-heading-small","font.heading.xsmall":"--ds-font-heading-xsmall","font.heading.xxsmall":"--ds-font-heading-xxsmall","font.body.large":"--ds-font-body-large","font.body":"--ds-font-body","font.body.small":"--ds-font-body-small","font.body.UNSAFE_small":"--ds-font-body-UNSAFE_small","font.code":"--ds-font-code","font.weight.regular":"--ds-font-weight-regular","font.weight.medium":"--ds-font-weight-medium","font.weight.semibold":"--ds-font-weight-semibold","font.weight.bold":"--ds-font-weight-bold","font.family.heading":"--ds-font-family-heading","font.family.body":"--ds-font-family-body","font.family.code":"--ds-font-family-code","font.family.brand.heading":"--ds-font-family-brand-heading","font.family.brand.body":"--ds-font-family-brand-body"};var e9="data-theme",e6="data-color-mode",te="data-contrast-mode",tt="data-custom-theme",tr="--".concat("ds","-token-not-found"),tn="--".concat("ds","-elevation-surface-current");let to=function(e,t){var r=e8[e];return r||(r=tr),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")},ta=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e8[e],n=t;return"undefined"==typeof window?n:n=(n=window.getComputedStyle(document.documentElement).getPropertyValue(r).trim())||t};var ti=function(e){return/^#[0-9A-F]{6}$/i.test(e)},ts=["light","dark","spacing","typography","shape"],tl="UNSAFE_themeOptions",tc=function(e){return void 0!==ts.find(function(t){return t===e})},tu=function(e){return void 0!==eQ.find(function(t){return t===e})},td=function(e){return["light","dark","auto"].includes(e)},th=function(e){return e.split(" ").map(function(e){return e.split(/:([^]*)/)}).reduce(function(e,t){var r=m(t,2),n=r[0],o=r[1];if("colorMode"===n&&td(o)&&(e[n]=o),tc(n)&&tu(o)&&(e[n]=o),n===tl)try{e[tl]=JSON.parse(o)}catch(e){Error("Invalid custom theme string")}return e},{})},tg=function(e){return Object.entries(e).reduce(function(e,t){var r=m(t,2),n=r[0],o=r[1];return"colorMode"===n&&"string"==typeof o&&td(o)||n===tl&&"object"===d(o)||tc(n)&&"string"==typeof o&&tu(o)?e+"".concat(e?" ":"")+"".concat(n,":").concat("object"===d(o)?JSON.stringify(o):o):e},"")},tp=function(e){for(var t=0,r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return new Uint32Array([t])[0].toString(36)};function tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tf(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tv=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?eY:t,n=e.dark,o=e.light,a=e.contrastMode,i=void 0===a?eZ:a,s=e.shape,l=e.spacing,c=e.typography,u=void 0===c?e5():c,d=e.UNSAFE_themeOptions,h=void 0===d?e7:d,g=f(f({},e9,tg({dark:void 0===n?e0:n,light:void 0===o?e1:o,shape:void 0===s?e2:s,spacing:void 0===l?e3:l,typography:u})),e6,"auto"===r?"light":r);if(eW("platform_increased-contrast-themes")&&(g=tb(tb({},g),{},f({},te,"auto"===i?"no-preference":i))),h&&ti(h.brandColor)){var p=tp(JSON.stringify(h));g[tt]=p}return g};var ty=r(1833);let tm={light:()=>()=>{},"light-future":()=>()=>{},dark:()=>()=>{},"dark-future":()=>()=>{},"legacy-light":()=>()=>{},"legacy-dark":()=>()=>{},spacing:()=>()=>{},shape:()=>()=>{},"typography-adg3":()=>()=>{},"typography-modernized":()=>()=>{},"typography-refreshed":()=>()=>{}};var t_=(e=k(O().mark(function e(t){var r,n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.head.querySelector("style[".concat(e9,'="').concat(t,'"]:not([').concat(tt,"])"))){e.next=2;break}return e.abrupt("return");case 2:if(t){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,tk(t);case 6:r=e.sent,(n=document.createElement("style")).textContent=r,n.dataset.theme=t,document.head.appendChild(n);case 11:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),tk=(t=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return("light"===t||"dark"===t)&&eW("platform-component-visual-refresh")&&(t+="-brand-refresh"),e.next=3,tm[t]();case 3:return r=e.sent.default,e.abrupt("return",r);case 6:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),tw="(prefers-color-scheme: dark)",tO="(prefers-contrast: more)";function tE(e){document.documentElement.setAttribute(e6,e.matches?"dark":"light")}var tx="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(tw),tS=new(p(function e(){u(this,e),f(this,"unbindThemeChangeListener",null)},[{key:"getColorMode",value:function(){return tx&&null!=tx&&tx.matches?"dark":"light"}},{key:"bind",value:function(){tx&&null===this.unbindThemeChangeListener&&(this.unbindThemeChangeListener=(0,ty.bind)(tx,{type:"change",listener:tE}))}},{key:"unbind",value:function(){this.unbindThemeChangeListener&&(this.unbindThemeChangeListener(),this.unbindThemeChangeListener=null)}}]));function tC(e){document.documentElement.setAttribute(te,e.matches?"more":"no-preference")}var tD="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(tO),tj=new(p(function e(){u(this,e),f(this,"unbindContrastChangeListener",null)},[{key:"getContrastMode",value:function(){return tD&&null!=tD&&tD.matches?"more":"no-preference"}},{key:"bind",value:function(){tD&&null===this.unbindContrastChangeListener&&(this.unbindContrastChangeListener=(0,ty.bind)(tD,{type:"change",listener:tC}))}},{key:"unbind",value:function(){this.unbindContrastChangeListener&&(this.unbindContrastChangeListener(),this.unbindContrastChangeListener=null)}}]));function tP(e){return"auto"===e.colorMode?(e.colorMode=tS.getColorMode(),tS.bind()):tS.unbind(),eW("platform_increased-contrast-themes")&&("auto"===e.contrastMode?(e.contrastMode=tj.getContrastMode(),tj.bind()):tj.unbind()),Object.entries(tv(e)).forEach(function(e){var t=m(e,2),r=t[0],n=t[1];document.documentElement.setAttribute(r,n)}),function(){tS.unbind(),eW("platform_increased-contrast-themes")&&tj.unbind()}}function tI(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tA(e){var t;return null==(t=Object.entries(e4).find(function(t){return m(t,2)[1].increasesContrastFor===e}))?void 0:t[1].id}var tU=function(e){var t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=[o,n],c=[];if("auto"===t)"no-preference"!==r&&eW("platform_increased-contrast-themes")&&l.forEach(function(e){var t=tA(e);t&&l.push(t)}),c.push.apply(c,l);else if(c.push(e[t]),"no-preference"!==r&&eW("platform_increased-contrast-themes")){var u=tA(e[t]);u&&c.push(u)}return[a,i,s].forEach(function(e){e&&c.push(e)}),tI(new Set(c))},tM=function(e){return tI(new Set([]))};function tT(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let tL=(o=k(O().mark(function e(){var t,r,n,o,a,i,s,l,c,u,d,h,g,p,f,b,v,y,m,_,w,E,x,S,C,D,j,P=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0===(r=(t=P.length>0&&void 0!==P[0]?P[0]:{}).colorMode)?eY:r,a=void 0===(o=t.contrastMode)?eZ:o,s=void 0===(i=t.dark)?e0:i,c=void 0===(l=t.light)?e1:l,d=void 0===(u=t.shape)?e2:u,g=void 0===(h=t.spacing)?e3:h,f=void 0===(p=t.typography)?e5():p,v=void 0===(b=t.UNSAFE_themeOptions)?e7:b,y=P.length>1?P[1]:void 0,eW("platform_increased-contrast-themes")||("light-increased-contrast"===c&&(c="light"),"dark-increased-contrast"===s&&(s="dark")),_=tU(m={colorMode:n,contrastMode:a,dark:s,light:c,shape:d,spacing:g,typography:f,UNSAFE_themeOptions:y?void 0:v}),w=y||t_,E=_.map(function(){var e=k(O().mark(function e(t){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),!y&&v&&ti(null==v?void 0:v.brandColor)&&(x=function(e,t){var r=tp(JSON.stringify(e)),n=[];return("auto"===t?["light","dark"]:[t]).forEach(function(e){var t=document.head.querySelector("style[".concat(tt,'="').concat(r,'"][').concat(e9,'="').concat(e,'"]'));t?document.head.appendChild(t):n.push(e)}),n}(v,n||eY)).length>0&&E.push(k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 2:(0,e.sent.loadAndAppendCustomThemeCss)({colorMode:2===x.length?"auto":x[0],UNSAFE_themeOptions:v});case 5:case"end":return e.stop()}},e)}))()),e.next=10,Promise.all(E);case 10:S=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tT(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tT(e,void 0):void 0}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}(tM(m)),e.prev=12,S.s();case 14:if((C=S.n()).done){e.next=20;break}return D=C.value,e.next=18,w(D);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),S.e(e.t0);case 25:return e.prev=25,S.f(),e.finish(25);case 28:return j=tP(m),e.abrupt("return",j);case 30:case"end":return e.stop()}},e,null,[[12,22,25,28]])})),function(){return o.apply(this,arguments)}),tF=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=void 0===s?e5():s,c=e.UNSAFE_themeOptions,u=arguments.length>1?arguments[1]:void 0,d={colorMode:void 0===t?eY:t,contrastMode:void 0===r?eZ:r,dark:void 0===n?e0:n,light:void 0===o?e1:o,shape:void 0===a?e2:a,spacing:void 0===i?e3:i,typography:l,UNSAFE_themeOptions:u?void 0:void 0===c?e7:c},h=tU(d);return u&&h.map(function(e){return u(e)}),tP(d)},tR=(a=k(O().mark(function e(t){var r,n,o,a;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],"all"===t?(r=eX,eW("platform_increased-contrast-themes")||(r=r.filter(function(e){return"light-increased-contrast"!==e&&"dark-increased-contrast"!==e})),r=r.filter(function(e){return"light-brand-refresh"!==e&&"dark-brand-refresh"!==e})):(r=tU(o={colorMode:(null==t?void 0:t.colorMode)||eY,contrastMode:(null==t?void 0:t.contrastMode)||eZ,dark:(null==t?void 0:t.dark)||e0,light:(null==t?void 0:t.light)||e1,shape:(null==t?void 0:t.shape)||e2,spacing:(null==t?void 0:t.spacing)||e3,typography:(null==t?void 0:t.typography)||e5()}),n=tM(o)),e.next=4,Promise.all([].concat(tI([].concat(tI(r),tI(n)).map(function(){var e=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,tk(t);case 3:return r=e.sent,e.abrupt("return",{id:t,attrs:{"data-theme":t},css:r});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",void 0);case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}())),[k(O().mark(function e(){var r,n,o;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!("all"!==t&&null!=t&&t.UNSAFE_themeOptions&&ti(null==t||null==(r=t.UNSAFE_themeOptions)?void 0:r.brandColor))){e.next=15;break}return e.prev=1,e.next=4,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 4:return n=e.sent.getCustomThemeStyles,e.next=8,n({colorMode:(null==t?void 0:t.colorMode)||eY,UNSAFE_themeOptions:null==t?void 0:t.UNSAFE_themeOptions});case 8:return o=e.sent,e.abrupt("return",o);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}},e,null,[[1,12]])}))()]));case 4:return a=e.sent,e.abrupt("return",a.flat().filter(function(e){return void 0!==e}));case 6:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),tN=function(e,t){if("auto"===e||"auto"===t){var r="auto"===e?"\n try {\n const darkModeMql = window.matchMedia('".concat(tw,"');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat(e6,"', colorMode);\n } catch (e) {}"):"",n="auto"===t&&eW("platform_increased-contrast-themes")?"\n try {\n const contrastModeMql = window.matchMedia('".concat(tO,"');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(te,"', contrastMode);\n } catch (e) {}"):"";return"(() => {".concat(r).concat(n,"})()")}};var tV=r(2027),tK=r.n(tV);function tz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tz(Object(r),!0).forEach(function(t){f(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tB=function(){if("undefined"==typeof document)return{};var e=document.documentElement,t=e.getAttribute(e6)||"";return tG(tG({},th(e.getAttribute(e9)||"")),void 0!==eH.find(function(e){return e===t})&&{colorMode:t})};var t$=function(){function e(t){u(this,e),f(this,"legacyObserver",null),this.callback=t,e.callbacks.add(t)}return p(e,[{key:"observe",value:function(){e.observer||(e.observer=new MutationObserver(function(){var t=tB();e.callbacks.forEach(function(e){return e(t)})}),e.observer.observe(document.documentElement,{attributeFilter:[e9,e6]}))}},{key:"disconnect",value:function(){this.callback&&e.callbacks.delete(this.callback),0===e.callbacks.size&&e.observer&&(e.observer.disconnect(),e.observer=null)}}])}();f(t$,"observer",null),f(t$,"callbacks",new Set);let tJ=document.documentElement,tq="--aui-theme-testing-color",tW="color(srgb 1 0.75 0.8 / 0.6)",tH="aui-theme-testing",tQ=`html.${tH}[data-color-mode][data-theme*="light:"], html.${tH}[data-color-mode][data-theme*="dark:"]`;function tX(e=tW){document.body.style.setProperty(tq,e)}function tY(){return tJ.matches(tQ)}function tZ(){tY()||tJ.classList.add(tH)}function t0(){tY()&&tJ.classList.remove(tH)}function t1(e){null==e&&(e=!tY()),e?tZ():t0()}!function(){if(document.querySelector(tQ))return;let e=[`${tq}: ${tW};`,...Object.values(e8).map(e=>` ${e}: var(${tq});`)],t=`/* This theme is autogenerated using AJS.DesignTokens.generateTestingTheme(). */
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@atlassian/aui",[],t):"object"==typeof exports?exports["@atlassian/aui"]=t():(e.AJS=e.AJS||{},e.AJS.DesignTokens=t())}(window,()=>(()=>{var e={6572(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var o=r(1634);function a(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,r){var i=t.map(function(t){var i=null==r?t:n(n({},t),{options:n(n({},a(r)),a(t.options))});return(0,o.bind)(e,i)});return function(){i.forEach(function(e){return e()})}}},1634(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var r=t.type,n=t.listener,o=t.options;return e.addEventListener(r,n,o),function(){e.removeEventListener(r,n,o)}}},1833(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=t.bind=void 0;var n=r(1634);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return n.bind}});var o=r(6572);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return o.bindAll}})},2646(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,a||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,g=u.length;for(c=0;c<g;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},7861(){},5632(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},2125(e,t,r){var n=r(8590);function o(){var t,r,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function l(e,o,a,i){var s=Object.create((o&&o.prototype instanceof u?o:u).prototype);return n(s,"_invoke",function(e,n,o){var a,i,s,l=0,u=o||[],d=!1,h={p:0,n:0,v:t,a:g,f:g.bind(t,4),d:function(e,r){return a=e,i=0,s=t,h.n=r,c}};function g(e,n){for(i=e,s=n,r=0;!d&&l&&!o&&r<u.length;r++){var o,a=u[r],g=h.p,p=a[2];e>3?(o=p===n)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=g&&((o=e<2&&g<a[1])?(i=0,h.v=n,h.n=a[1]):g<p&&(o=e<3||a[0]>n||n>p)&&(a[4]=e,a[5]=n,h.n=p,i=0))}if(o||e>1)return c;throw d=!0,n}return function(o,u,p){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&g(u,p),i=u,s=p;(r=i<2?t:s)||!d;){a||(i?i<3?(i>1&&(h.n=-1),g(i,s)):h.n=s:h.v=s);try{if(l=2,a){if(i||(o="next"),r=a[o]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((r=(d=h.n<0)?s:e.call(n,h))!==c)break}catch(e){a=t,i=1,s=e}finally{l=1}}return{value:r,done:d}}}(e,a,i),!0),s}var c={};function u(){}function d(){}function h(){}r=Object.getPrototypeOf;var g=h.prototype=u.prototype=Object.create([][i]?r(r([][i]())):(n(r={},i,function(){return this}),r));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return d.prototype=h,n(g,"constructor",h),n(h,"constructor",d),d.displayName="GeneratorFunction",n(h,s,"GeneratorFunction"),n(g),n(g,s,"Generator"),n(g,i,function(){return this}),n(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},4857(e,t,r){var n=r(8691);e.exports=function(e,t,r,o,a){var i=n(e,t,r,o,a);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},8691(e,t,r){var n=r(2125),o=r(8251);e.exports=function(e,t,r,a,i){return new o(n().w(e,t,r,a),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},8251(e,t,r){var n=r(5632),o=r(8590);e.exports=function e(t,r){var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,o,i){function s(){return new r(function(o,a){!function e(o,a,i,s){try{var l=t[o](a),c=l.value;return c instanceof n?r.resolve(c.v).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):r.resolve(c).then(function(e){l.value=e,i(l)},function(t){return e("throw",t,i,s)})}catch(e){s(e)}}(e,i,o,a)})}return a=a?a.then(s,s):s()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},8590(e){function t(r,n,o,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}e.exports=t=function(e,r,n,o){function a(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},9769(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},9541(e,t,r){var n=r(5632),o=r(2125),a=r(4857),i=r(8691),s=r(8251),l=r(9769),c=r(1423);function u(){"use strict";var t=o(),r=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var g={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,g[e],t)},delegateYield:function(e,o,a){return t.resultName=o,r(n.d,c(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,r,n,o){return t.w(p(e),r,n,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,o){return(h(t)?i:a)(p(e),t,r,n,o)},keys:l,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},1423(e,t,r){var n=r(998).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},998(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6192(e,t,r){var n=r(9541)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},8657(e,t,r){"use strict";var n,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let i=r(2132);t._getStatsigGlobal=()=>{try{return"u">typeof __STATSIG__?__STATSIG__:d}catch(e){return d}},t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&i.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."),r.firstInstance)};let s="__STATSIG__",l="u">typeof window?window:{},c=void 0!==r.g?r.g:{},u="u">typeof globalThis?globalThis:{},d=null!=(a=null!=(o=null!=(n=l[s])?n:c[s])?o:u[s])?a:{instance:t._getInstance};l[s]=d,c[s]=d,u[s]=d},981(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let n=r(8210);function o(e,t,r){var o;if(r)return r(e,t);let a=t&&t.customIDs?t.customIDs:{},i=[`uid:${null!=(o=null==t?void 0:t.userID)?o:""}`,`cids:${Object.keys(a).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${a[e]}`).join(",")}`,`k:${e}`];return(0,n._DJB2)(i.join("|"))}t._getUserStorageKey=o,t._getStorageKey=function(e,t,r){return t?o(e,t,r):(0,n._DJB2)(`k:${e}`)}},4399(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8562(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let o=r(2132),a=r(6286),i=r(4830),s=r(6346),l=r(1829);function c(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,i._getFullUserHash)(n)}}t.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 u}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,i._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n&&this._getIsCacheValueValid(n))return n;let o=this._loadFromCache(r);return o&&this._getIsCacheValueValid(o)?(this._inMemoryCache.add(r,o,this._cacheLimit),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,i._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,c("Bootstrap",e,null,r),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===a.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,r){return n(this,void 0,void 0,function*(){s.Storage.isReady()||(yield s.Storage.isReadyResolver());let n=null!=e?e:this.getDataSync(t),a=[this._fetchAndPrepFromNetwork(n,t,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(o.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(e,t){return n(this,void 0,void 0,function*(){let r=e&&(0,i._normalizeUser)(e,this._options),n=this._getCacheKey(r),o=yield this._getDataAsyncImpl(null,r,t);o&&this._inMemoryCache.add(n,Object.assign(Object.assign({},o),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,r){return n(this,void 0,void 0,function*(){var n;let i=null!=(n=null==e?void 0:e.data)?n:null,s=null!=e&&this._isCachedResultValidFor204(e,t),u=yield this._fetchFromNetwork(i,t,r,s);if(!u)return o.Log.debug("No response returned for latest value"),null;let d=(0,l._typedJsonParse)(u,"has_updates","Response"),h=this._getSdkKey(),g=a.StableID.get(h),p=null;if((null==d?void 0:d.has_updates)===!0)p=c("Network",u,g,t);else{if(!i||(null==d?void 0:d.has_updates)!==!1)return null;p=c("NetworkNotModified",i,g,t)}let b=this._getCacheKey(t);return this._inMemoryCache.add(b,p,this._cacheLimit),this._writeToCache(b,p),p})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(o.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null==(t=s.Storage.getItem)?void 0:t.call(s.Storage,e);if(null==r)return null;let n=(0,l._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){let r=JSON.stringify(t);for(let t=0;t<8;t++)try{s.Storage.setItem(e,r);break}catch(t){if(!(t instanceof Error)||"QuotaExceededError"!==t.name||this._cacheLimit<=1)throw t;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r;let n=null!=(r=(0,s._getObjectFromStorage)(this._lastModifiedStoreKey))?r:{};for(let r of(n[e]=Date.now(),d(n,t)))delete n[r],s.Storage.removeItem(r);(0,s._setObjectInStorage)(this._lastModifiedStoreKey,n)}},t._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(e,t){var r;let n=this._data[e],a=null==n?void 0:n.stableID,i=null==(r=null==t?void 0:t.customIDs)?void 0:r.stableID;return i&&a&&i!==a?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t,r){for(let e of d(this._data,r-1))delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function d(e,t){let r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{let n=e[t],o=e[r];return"object"==typeof n&&"object"==typeof o?n.receivedAt-o.receivedAt:n-o}).slice(0,r.length-t)}},2798(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let r=new Map,n="start";function o(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function a(e,t){var n;let o=null!=(n=r.get(e))?n:[];o.push(t),r.set(e,o)}function i(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{a(e,o({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{a(e,o({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,o(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,o(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{a(e,o({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,o(t,"end","initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:i(e,"code"),name:i(e,"name"),message:i(e,"message")}},_getDiagnosticsData(e,r,n,o){var a;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null==(a=null==e?void 0:e.headers)?void 0:a.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:r,error:t.Diagnostics._formatError(o)}},_enqueueDiagnosticsEvent(e,r,n,o){let a=t.Diagnostics._getMarkers(n);if(null==a||a.length<=0)return -1;let i=a[a.length-1].timestamp-a[0].timestamp;t.Diagnostics._clearMarkers(n);let s={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:a.slice(),statsigOptions:o},time:Date.now()};return r.enqueue(s),i}}},6413(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._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]),o=["i","e","d"];t._fetchTxtRecords=function(e){return r(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)&&o.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 n=t-1;n<e.length;n++)r+=String.fromCharCode(e[n]);return r.split(",")}(new Uint8Array((yield t.arrayBuffer())))})}},6663(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1290(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let o=r(2132),a=r(2442),i=r(2452);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let s="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=class{constructor(e,t,r,n){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=n,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 n=e[r];"$EB"in n||(e[r]=(...o)=>this._capture(t?`${t}:${r}`:r,()=>n.apply(e,o)),e[r].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=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,r){try{o.Log.warn(`Caught error in ${e}`,{error:r}),n(this,void 0,void 0,function*(){var n,o,c,u,d,h,g;let p=r||Error(s),b=p instanceof Error,f=b?p.name:"No Name",v=l(p);if(this._lastSeenError=v,this._seen.has(f))return;if(this._seen.add(f),null==(o=null==(n=this._options)?void 0:n.networkConfig)?void 0:o.preventAllNetworkTraffic){null==(c=this._emitter)||c.call(this,{name:"error",error:r,tag:e});return}let y=a.SDKType._get(this._sdkKey),m=i.StatsigMetadataProvider.get(),_=b?p.stack:function(e){try{return JSON.stringify(e)}catch(e){return s}}(p),k=Object.assign({tag:e,exception:f,info:_,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];switch(typeof n){case"number":case"bigint":case"boolean":t[String(r)]=n;break;case"string":n.length<50?t[String(r)]=n:t[String(r)]="set";break;case"object":"environment"===r?t.environment=n:"networkConfig"===r?t.networkConfig=n:t[String(r)]=null!=n?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},m),{sdkType:y})),w=null!=(h=null==(d=null==(u=this._options)?void 0:u.networkConfig)?void 0:d.networkOverrideFunc)?h:fetch;yield w(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(y),"STATSIG-SDK-VERSION":String(m.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(k)}),null==(g=this._emitter)||g.call(this,{name:"error",error:r,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},118(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3725(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},638(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let o=r(981),a=r(8210),i=r(2132),s=r(3582),l=r(6650),c=r(1217),u=r(5910),d=r(6346),h=r(5445),g=r(5873),p={},b="startup",f="gained_focus";class v{static _safeFlushAndForget(e){var t;null==(t=p[e])||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null==(t=p[e])||t._retryFailedLogs(f)}constructor(e,t,r,n){var o,a;this._sdkKey=e,this._emitter=t,this._network=r,this._options=n,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(o=null==n?void 0:n.loggingEnabled)?o:(null==n?void 0:n.disableLogging)===!0?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&i.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!=(a=null==n?void 0:n.loggingBufferMaxSize)?a:100;const l=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){let e=this._getStorageKey(),t=(0,d._getObjectFromStorage)(e);t&&this._queue.push(...t),d.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&v._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let r=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;let t=(0,l._isServerEnv)();t&&(null==(e=this._options)?void 0:e.loggingEnabled)!=="always"||(p[this._sdkKey]=this,t||(0,g._subscribeToVisiblityChanged)(e=>{"background"===e?v._safeFlushAndForget(this._sdkKey):"foreground"===e&&v._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(b),this._startBackgroundFlushInterval())}stop(){return n(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete p[this._sdkKey],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>v._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if((null==(t=this._options)?void 0:t.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;let r=e.user?e.user:{statsigEnvironment:void 0},n=(0,o._getUserStorageKey)(this._sdkKey,r),a=e.metadata?e.metadata:{},i=[e.eventName,n,a.gate,a.config,a.ruleID,a.allocatedExperiment,a.parameterName,String(a.isExplicitParameter),a.reason].join("|"),s=this._lastExposureTimeMap[i],u=Date.now();return(!s||!(u-s<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[i]=u,!0)}_sendEvents(e){return n(this,void 0,void 0,function*(){var t,r;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{let n=(0,g._isUnloading)()&&this._network.isBeaconSupported()&&(null==(r=null==(t=this._options)?void 0:t.networkConfig)?void 0:r.networkOverrideFunc)==null;if(this._emitter({name:"pre_logs_flushed",events:e}),(n?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success)return this._emitter({name:"logs_flushed",events:e}),!0;return i.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return i.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return n(this,void 0,void 0,function*(){var t;let r=yield this._network.post(this._getRequestData(e)),n=null!=(t=null==r?void 0:r.code)?t:-1;return{success:n>=200&&n<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[s.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{let r=this._getFailedLogsFromStorage(t);(0,d._setObjectInStorage)(t,[...r,...e])}catch(e){i.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{let r=(0,d._getObjectFromStorage)(e);return Array.isArray(r)&&(t=r),t}catch(e){return[]}}_retryFailedLogs(e){let t=this._getStorageKey();n(this,void 0,void 0,function*(){d.Storage.isReady()||(yield d.Storage.isReadyResolver());let r=(0,d._getObjectFromStorage)(t);!r||(e===b&&d.Storage.removeItem(t),(yield this._sendEvents(r))&&e===f&&d.Storage.removeItem(t))}).catch(()=>{i.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,a._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});let n=Object.assign(Object.assign({},e),t);i.Log.debug("Enqueued Event:",n),this._queue.push(n)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let r=setInterval(()=>{let e=p[this._sdkKey];e&&e._flushIntervalId===r?v._safeFlushAndForget(this._sdkKey):clearInterval(r)},null!=(t=null==(e=this._options)?void 0:e.loggingIntervalMs)?t:1e4);this._flushIntervalId=r}}t.EventLogger=v},8210(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let n=r(8062);t._DJB2=e=>{let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return String(t>>>0)},t._DJB2Object=(e,r)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r))),t._getSortedObject=(e,r)=>{if(null==e)return null;let o=Object.keys(e).sort(),a={};return o.forEach(o=>{let i=e[o];if(0===r||"object"!==(0,n._typeOf)(i)){a[o]=i;return}a[o]=(0,t._getSortedObject)(i,null!=r?r-1:r)}),a}},2849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2132(e,t){"use strict";function r(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...e){n.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){n.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){n.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){n.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}t.Log=n,n.level=t.LogLevel.Warn},6375(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let a=`${e}|${t}`;if(!o)return a;for(let e of Object.keys(o)){if(n.has(e))return;r.has(e)?a+=`|${e}=true`:a+=`|${e}=${o[e]}`}return a}},3582(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},6555(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(8657);let o=r(8657),a=r(2798),i=r(2132),s=r(3582),l=r(2064),c=r(4175),u=r(2442),d=r(6650),h=r(4899),g=r(6286),p=r(3528),b=r(2452),f=r(5910),v=r(5873),y=new Set([408,500,502,503,504,522,524,599]);t.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){if(!m(e))return!1;let t=this._getInternalRequestArgs("POST",e),r=this._getPopulatedURL(t),n=navigator;return n.sendBeacon.bind(n)(r,t.body)}post(e){return n(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return n(this,void 0,void 0,function*(){var t,r,o,l,c,u,d,h,g;if(!m(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:b,body:f,retries:_,attempt:w}=e,O=e.urlConfig.endpoint;if(this._isRateLimited(O))return i.Log.warn(`Request to ${O} was blocked because you are making requests too frequently.`),null;let E=null!=w?w:1,x=!1,S=this._getPopulatedURL(e),C=null,D=(0,v._isUnloading)();try{let r,n={method:b,body:f,headers:Object.assign({},e.headers),priority:e.priority,keepalive:D};c=e,u=E,c.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqStart(c.sdkKey,{attempt:u});let o=this._leakyBucket[O];o&&(o.lastRequestTime=Date.now(),this._leakyBucket[O]=o);let i=null!=(t=this._netConfig.networkOverrideFunc)?t:fetch;if(!(C=yield Promise.race([i(S,n).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{x=!0,t(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield C.text().catch(()=>"No Text"),t=Error(`NetworkError: ${S} ${e}`);throw t.name="NetworkError",t}let l=yield C.text();return k(e,C,E,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:C.status}}catch(s){let t="string"==typeof(d=s)?d:d instanceof Error?`${d.name}: ${d.message}`:"Unknown Error",a=(h=null!=t?t:"",g=x,h.includes("Timeout")||g);if(k(e,C,E,"",s),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,a))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!_||E>_||!y.has(null!=(r=null==C?void 0:C.status)?r:500)){null==(o=this._emitter)||o.call(this,{name:"error",error:s,tag:p.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${b} request to ${S}.`;return i.Log.error(r,t,s),null==(l=this._errorBoundary)||l.attachErrorIfNoneExists(r),null}return yield function(e){return n(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(E),this._sendRequest(Object.assign(Object.assign({},e),{retries:_,attempt:E+1}))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||(null==e?void 0:e.disableCompression)!==!0||(t=f.LogEventCompressionMode.Disabled),t||(t=f.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;let r=Date.now(),n=null!=(t=this._leakyBucket[e])?t:{count:0,lastRequestTime:r},o=Math.floor((r-n.lastRequestTime)*.05);return n.count=Math.max(0,n.count-o),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;let r=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===s.Endpoint._initialize||e.urlConfig.endpoint===s.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let n=Object.assign({[s.NetworkParam.SdkKey]:e.sdkKey,[s.NetworkParam.SdkType]:u.SDKType._get(e.sdkKey),[s.NetworkParam.SdkVersion]:b.SDK_VERSION,[s.NetworkParam.Time]:String(Date.now()),[s.NetworkParam.SessionID]:h.SessionID.get(e.sdkKey)},e.params),o=Object.keys(n).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&");return`${r}${o?`?${o}`:""}`}_tryEncodeBody(e){var t;let r=(0,d._getWindowSafe)(),n=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof n&&null==(0,o._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(n).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.StatsigEncoded]:"1"})}catch(t){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return n(this,void 0,void 0,function*(){var t;let r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable||null!=(0,o._getStatsigGlobalFlag)("no-compress")||"u"<typeof CompressionStream||"u"<typeof TextEncoder)return!1;let r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case f.LogEventCompressionMode.Disabled:return!1;case f.LogEventCompressionMode.Enabled:if(r&&!n)return!1;return!0;case f.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{let n,o=new TextEncoder().encode(r),a=new CompressionStream("gzip"),l=a.writable.getWriter();l.write(o).catch(i.Log.error),l.close().catch(i.Log.error);let c=a.readable.getReader(),u=[];for(;!(n=yield c.read()).done;)u.push(n.value);let d=u.reduce((e,t)=>e+t.length,0),h=new Uint8Array(d),g=0;for(let e of u)h.set(e,g),g+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.IsGzipped]:"1"})}catch(t){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),n=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&_(n,t.data),n}};let m=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),_=(e,t)=>{let{sdkKey:r,fallbackUrl:n}=e,o=g.StableID.get(r),a=h.SessionID.get(r),i=u.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},b.StatsigMetadataProvider.get()),{stableID:o,sessionID:a,sdkType:i,fallbackUrl:n})}))};function k(e,t,r,n,o){e.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqEnd(e.sdkKey,a.Diagnostics._getDiagnosticsData(t,r,n,o))}},2064(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let o=r(6413),a=r(8210),i=r(2132),s=r(6346);function l(e,t){var r;let n=null!=(r=null==e?void 0:e.toLowerCase())?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function c(e){return`statsig.network_fallback.${(0,a._DJB2)(e)}`}function u(e,t){let r=c(e);t&&0!==Object.keys(t).length?s.Storage.setItem(r,JSON.stringify(t)):s.Storage.removeItem(r)}t.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 n=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+6048e5,u(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:n})))}getActiveFallbackUrl(e,t){var r,n;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let o=this._fallbackInfo;null==o&&(o=null!=(r=function(e){let t=c(e),r=s.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return i.Log.error("Failed to parse FallbackInfo"),null}}(e))?r:{},this._fallbackInfo=o);let a=o[t.endpoint];return!a||Date.now()>(null!=(n=a.expiryTime)?n:0)||t.getChecksum()!==a.urlConfigChecksum?(delete o[t.endpoint],this._fallbackInfo=o,u(e,this._fallbackInfo),null):a.url?a.url:null}tryFetchUpdatedFallbackInfo(e,t,r,o){return n(this,void 0,void 0,function*(){var n,a;try{if(!l(r,o))return!1;let a=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,i=this._pickNewFallbackUrl(null==(n=this._fallbackInfo)?void 0:n[t.endpoint],a);if(!i)return!1;return this._updateFallbackInfoWithNewUrl(e,t,i),!0}catch(e){return null==(a=this._errorBoundary)||a.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var n,o,a;let i={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},s=t.endpoint,l=null==(n=this._fallbackInfo)?void 0:n[s];l&&i.previous.push(...l.previous),i.previous.length>10&&(i.previous=[]);let c=null==(a=null==(o=this._fallbackInfo)?void 0:o[s])?void 0:a.url;null!=c&&i.previous.push(c),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[s]:i}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return n(this,void 0,void 0,function*(){var t;let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;let n=[],a=yield(0,o._fetchTxtRecords)(null!=(t=this._networkOverrideFunc)?t:fetch),i=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(let t of a){if(!t.startsWith(e.endpointDnsKey+"="))continue;let r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${i}`)}}return n})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let n=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),o=null==e?void 0:e.url,a=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!n.has(e)&&t!==o){a=t;break}}return a}},t._isDomainFailure=l},5377(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6037(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4175(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{var n,o;return null!=(o=null==(n=r[e])?void 0:n[t])&&o}}},2442(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let n={};t.SDKType={_get:e=>{var t;return(null!=(t=n[e])?t:"js-mono")+(null!=r?r:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){r&&"-react"!==r||(r="-"+e)}}},6650(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"u">typeof window?window:null,t._getDocumentSafe=()=>{var e;let r=(0,t._getWindowSafe)();return null!=(e=null==r?void 0:r.document)?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e="u">typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||e},t._addWindowEventListenerSafe=(e,r)=>{let n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._addDocumentEventListenerSafe=(e,r)=>{let n=(0,t._getDocumentSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,t._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},4899(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let n=r(8657),o=r(981),a=r(2132),i=r(6346),s=r(2555),l={};function c(e,t){return setTimeout(()=>{var t;let r=null==(t=(0,n._getStatsigGlobal)())?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})},t)}function u(e){return`statsig.session_id.${(0,o._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{var t;let r,n,o;return null==l[e]&&(l[e]=(n=(r=u(t=e),(0,i._getObjectFromStorage)(r)),o=Date.now(),n||(n={sessionID:(0,s.getUUID)(),startTime:o,lastUpdate:o}),{data:n,sdkKey:t})),function(e){let t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>18e5}(r)||function({startTime:e}){return Date.now()-e>144e5}(r)){r.sessionID=(0,s.getUUID)(),r.startTime=t;let e=null==__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){let r=u(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){a.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let o=t-r.startTime;return e.idleTimeoutID=c(n,18e5),e.ageTimeoutID=c(n,144e5-o),e}(l[e])},overrideInitialSessionID:(e,t)=>{var r,n;let o;l[t]=(r=e,n=t,{data:{sessionID:r,startTime:o=Date.now(),lastUpdate:o},sdkKey:n})}}},5940(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,r)=>{let n=0,o=Object.keys(e);for(let a=0;a<o.length;a++){let i=o[a],s=e[i];if(n+=i.length,"object"==typeof s&&null!==s?n+=(0,t._fastApproxSizeOf)(s,r)+2:n+=String(s).length+1,n>=r)break}return n}},6286(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;let n=r(981),o=r(2132),a=r(6650),i=r(6346),s=r(2555),l={},c={},u={};function d(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function h(e,t){let r=d(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){o.Log.warn("Failed to save StableID to storage")}}function g(e,t){if(!c[t]||null==(0,a._getDocumentSafe)())return;let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`}function p(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{let t;if(u[e])return null;if(null!=l[e])return l[e];let r=null;return null!=(r=function(e){if(!c[e]||null==(0,a._getDocumentSafe)())return null;for(let t of document.cookie.split(";")){let[r,n]=t.trim().split("=");if(r===p(e))return decodeURIComponent(n)}return null}(e))?(l[e]=r,h(r,e)):(null==(t=d(e),r=(0,i._getObjectFromStorage)(t))&&(r=(0,s.getUUID)()),h(r,e),g(r,e),l[e]=r),r},setOverride:(e,t)=>{l[t]=e,h(e,t),g(e,t)},_setCookiesEnabled:(e,t)=>{c[e]=t},_setDisabled:(e,t)=>{u[e]=t}},t.getCookieName=p},5939(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(8657);let o=r(8657),a=r(1290),i=r(638),s=r(2132),l=r(6375),c=r(6650),u=r(4899),d=r(6286),h=r(5910),g=r(6346);t.StatsigClientBase=class{constructor(e,t,r,n){var l,h,p,b;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const f=this.$emt.bind(this);(null==n?void 0:n.logLevel)!=null&&(s.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&g.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&u.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&g.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&d.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!=(l=null==n?void 0:n.overrideAdapter)?l:null,this._logger=new i.EventLogger(e,f,r,n),this._errorBoundary=new a.ErrorBoundary(e,n,f),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,n,r),this.storageProvider=g.Storage,null==(b=null==(p=null==(h=this.overrideAdapter)?void 0:h.loadFromStorage)?void 0:p.call(h))||b.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,c._isServerEnv)())return;let n=(0,o._getStatsigGlobal)(),a=null!=(r=n.instances)?r:{};null!=a[e]&&s.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),a[e]=t,n.firstInstance||(n.firstInstance=t),n.instances=a,__STATSIG__=n}(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,g.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(h.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return n(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);s.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,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);let o=(0,l.createMemoKey)(e,r,n);return o?(o in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[o]=t(r,n)),this._memoCache[o]):t(r,n)}}}},3528(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},5362(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},1217(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let r="statsig::config_exposure",n="statsig::gate_exposure",o="statsig::layer_exposure",a=(e,t,r,n,o)=>(r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:s(r,n),secondaryExposures:o,time:Date.now()});function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>e===n||e===r||e===o,t._createGateExposure=(e,t,r)=>{var o,s,l;let c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(c.configVersion=t.__evaluation.version),a(n,e,t.details,c,i(null!=(l=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?l:[],r))},t._mapExposures=i,t._createConfigExposure=(e,t,n)=>{var o,s,l,c;let u={config:t.name,ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(u.configVersion=t.__evaluation.version),(null==(s=t.__evaluation)?void 0:s.passed)!=null&&(u.rulePassed=String(t.__evaluation.passed)),a(r,e,t.details,u,i(null!=(c=null==(l=t.__evaluation)?void 0:l.secondary_exposures)?c:[],n))},t._createLayerParameterExposure=(e,t,r,n)=>{var s,l,c,u,d,h,g;let p=t.__evaluation,b=(null==(s=null==p?void 0:p.explicit_parameters)?void 0:s.includes(r))===!0,f="",v=null!=(l=null==p?void 0:p.undelegated_secondary_exposures)?l:[];b&&(f=null!=(c=p.allocated_experiment_name)?c:"",v=null!=(u=p.secondary_exposures)?u:[]);let y=null==(d=t.__evaluation)?void 0:d.parameter_rule_ids,m={config:t.name,parameterName:r,ruleID:null!=(h=null==y?void 0:y[r])?h:t.ruleID,allocatedExperiment:f,isExplicitParameter:String(b)};return(null==(g=t.__evaluation)?void 0:g.version)!=null&&(m.configVersion=t.__evaluation.version),a(o,e,t.details,m,i(v,n))};let s=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},2452(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.26.0";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},5910(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1350(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1647(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let n=r(2132),o=r(8062);function a(e,t,r,n){var o;return{name:e,details:t,ruleID:null!=(o=null==r?void 0:r.rule_id)?o:"",__evaluation:r,value:n}}function i(e,t,r){var n;let o=null!=(n=null==r?void 0:r.value)?n:{};return Object.assign(Object.assign({},a(e,t,r,o)),{get:s(e,null==r?void 0:r.value)})}function s(e,t,r){return(a,i)=>{var s;let l=null!=(s=null==t?void 0:t[a])?s:null;return null==l?null!=i?i:null:null==i||(0,o._isTypeMatch)(l,i)?(null==r||r(a),l):(n.Log.warn(`Parameter type mismatch. '${e}.${a}' was found to be type '${typeof l}' but fallback/return type is '${typeof i}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=i?i:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},a(e,t,r,(null==r?void 0:r.value)===!0)),{idType:null!=(n=null==r?void 0:r.id_type)?n:null})},t._makeDynamicConfig=i,t._makeExperiment=function(e,t,r){var n;return Object.assign(Object.assign({},i(e,t,r)),{groupName:null!=(n=null==r?void 0:r.group_name)?n:null})},t._makeLayer=function(e,t,r,n){var o,i;return Object.assign(Object.assign({},a(e,t,r,void 0)),{get:s(e,null==r?void 0:r.value,n),groupName:null!=(o=null==r?void 0:r.group_name)?o:null,__value:null!=(i=null==r?void 0:r.value)?i:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:s(e.name,r,n)})},t._makeTypedGet=s},3224(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6400(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,r,n,o,a)=>({duration:r,source:t,success:e,error:n,sourceUrl:o,warnings:a}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},4830(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let n=r(8210),o=r(2132);t._normalizeUser=function(e,t,r){try{let n=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?n.statsigEnvironment=t.environment:null!=r&&(n.statsigEnvironment={tier:r}),n}catch(e){return o.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,n._DJB2Object)(e):null}},6346(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let n=r(2132),o=r(6650),a={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>a[e]?a[e]:null,setItem:(e,t)=>{a[e]=t},removeItem:e=>{delete a[e]},getAllKeys:()=>Object.keys(a)},s=null;try{let e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(s={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){n.Log.warn("Failed to setup localStorageProvider.")}let l=null!=s?s:i,c=l;function u(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(i),null;if(e instanceof Error&&"QuotaExceededError"===e.name){let r=t.Storage.getAllKeys().filter(e=>e.startsWith("statsig."));e.message=`${e.message}. Statsig Keys: ${r.length}`}throw e}}t.Storage={isReady:()=>c.isReady(),isReadyResolver:()=>c.isReadyResolver(),getProviderName:()=>c.getProviderName(),getItem:e=>u(()=>c.getItem(e)),setItem:(e,t)=>u(()=>c.setItem(e,t)),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?i:l}},t._getObjectFromStorage=function(e){let r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},1829(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let n=r(2132);t._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return n.Log.error(`Failed to parse ${r}`),null}},8062(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},2555(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.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 n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)})}},5445(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let n=r(8210),o=r(3582),a={[o.Endpoint._initialize]:"i",[o.Endpoint._rgstr]:"e",[o.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=a[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),n&&(this.fallbackUrls=n);const i=o.NetworkDefault[e];this.defaultUrl=`${i}/${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,n._DJB2)(this.customUrl+t)}}},5873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let n=r(6650),o="foreground",a="background",i=[],s=o,l=!1;t._isCurrentlyVisible=()=>s===o,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{i.unshift(e)},t._notifyVisibilityChanged=e=>{e!==s&&(s=e,i.forEach(t=>t(e)))},(0,n._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(o)}),(0,n._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(a)),(0,n._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?o:a)}),(0,n._addWindowEventListenerSafe)((0,n._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(a)})},382(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(8657);let a=r(8657),i=r(2798);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});let s=r(638);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return s.EventLogger}});let l=r(2132);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});let c=r(2452),u=r(6346);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return u.Storage}}),o(r(8657),t),o(r(981),t),o(r(4399),t),o(r(8562),t),o(r(2798),t),o(r(6663),t),o(r(1290),t),o(r(118),t),o(r(3725),t),o(r(8210),t),o(r(2849),t),o(r(2132),t),o(r(6375),t),o(r(3582),t),o(r(6555),t),o(r(5377),t),o(r(6037),t),o(r(6650),t),o(r(2442),t),o(r(4899),t),o(r(5940),t),o(r(6286),t),o(r(5939),t),o(r(3528),t),o(r(5362),t),o(r(1217),t),o(r(2452),t),o(r(5910),t),o(r(1350),t),o(r(1647),t),o(r(3224),t),o(r(4830),t),o(r(6346),t),o(r(1829),t),o(r(8062),t),o(r(5445),t),o(r(2555),t),o(r(5873),t),o(r(6400),t),o(r(4175),t),Object.assign((0,a._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:c.SDK_VERSION})},450(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let n=r(382);function o(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r,a,i;let s=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!s)return{hadBadDeltaChecksum:!0};let l=(o((i=(r=e,a=s,Object.assign(Object.assign(Object.assign({},r),a),{feature_gates:Object.assign(Object.assign({},r.feature_gates),a.feature_gates),layer_configs:Object.assign(Object.assign({},r.layer_configs),a.layer_configs),dynamic_configs:Object.assign(Object.assign({},r.dynamic_configs),a.dynamic_configs)}))).deleted_gates,i.feature_gates),delete i.deleted_gates,o(i.deleted_configs,i.dynamic_configs),delete i.deleted_configs,o(i.deleted_layers,i.layer_configs),delete i.deleted_layers,i),c=(0,n._DJB2Object)({feature_gates:l.feature_gates,dynamic_configs:l.dynamic_configs,layer_configs:l.layer_configs},2);return c!==s.checksumV2?{hadBadDeltaChecksum:!0,badChecksum:c,badMergedConfigs:l,badFullResponse:s.deltas_full_response}:JSON.stringify(l)}},8321(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(382);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,o;if(!e)return!1;let a=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=a&&(this._source=e.source,(null==a?void 0:a.has_updates)!==!0||(null!=(r=a.time)?r:0)<this._lcut||(this._rawValues=e.data,this._lcut=a.time,this._receivedAt=e.receivedAt,this._values=a,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,a),e.source&&a.user&&this._setWarningState(t,a),n.SDKFlags.setFlags(this._sdkKey,null!=(o=a.sdk_flags)?o:{}),!0))}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.dynamic_configs,e)}getConfigList(){var e;return(null==(e=this._values)?void 0:e.dynamic_configs)?Object.values(this._values.dynamic_configs).map(e=>e.name):[]}getLayer(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let r={};return t.user&&(r.user=t.user),t.sdkInfo&&(r.generatorSDKInfo=t.sdkInfo),r.lcut=t.time,r}_getDetailedStoreResult(e,t){let r=null;return e&&(r=e[t]?e[t]:e[(0,n._DJB2)(t)]),{result:r,details:this._getDetails(null==r)}}_setWarningState(e,t){var r,o;let a=n.StableID.get(this._sdkKey);if((null==(r=e.customIDs)?void 0:r.stableID)!==a&&((null==(o=e.customIDs)?void 0:o.stableID)||a))return void this._warnings.add("StableIDMismatch");if("user"in t){let r=t.user,o=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,n._getFullUserHash)(o)!==(0,n._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let n=this.getCurrentSourceDetails(),o=n.reason,a=null!=(t=n.warnings)?t:[];"Bootstrap"===this._source&&a.length>0&&(o+=a[0]),"Uninitialized"!==o&&"NoValues"!==o&&(o=`${o}:${e?"Unrecognized":"Recognized"}`);let i="Bootstrap"===this._source&&null!=(r=this._bootstrapMetadata)?r:void 0;return i&&(n.bootstrapMetadata=i),Object.assign(Object.assign({},n),{reason:o})}}},6892(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(382),a=r(450);class i extends o.NetworkCore{constructor(e,t){super(e,t);const r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new o.UrlConfiguration(o.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,a,i){return n(this,void 0,void 0,function*(){var n,s,l,c,u,d;let h=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null,g={user:a,hash:null!=(l=null==(s=null==(n=this._option)?void 0:n.networkConfig)?void 0:s.initializeHashAlgorithm)?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==h?void 0:h.has_updates){let e=(null==h?void 0:h.hash_used)!==(null!=(d=null==(u=null==(c=this._option)?void 0:c.networkConfig)?void 0:u.initializeHashAlgorithm)?d:"djb2");g=Object.assign(Object.assign({},g),{sinceTime:i&&!e?h.time:0,previousDerivedFields:"derived_fields"in h&&i?h.derived_fields:{},deltasResponseRequested:!0,full_checksum:h.full_checksum,partialUserMatchSinceTime:e?0:h.time})}return this._fetchEvaluations(e,h,g,r)})}_fetchEvaluations(e,t,r,o){return n(this,void 0,void 0,function*(){var n,i;let s=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:o});if((null==s?void 0:s.code)===204)return'{"has_updates": false}';if((null==s?void 0:s.code)!==200)return null!=(n=null==s?void 0:s.body)?n:null;if((null==t?void 0:t.has_updates)!==!0||(null==(i=s.body)?void 0:i.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return s.body;let l=(0,a._resolveDeltasResponse)(t,s.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),o)})}}t.default=i},2739(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let n=r(382),o={disableExposureLog:!0};function a(e){return null==e||!1===e.disableExposureLog}function i(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(s,l)=>{if(null==t)return l;let c=t[s];if(null==c||null!=l&&(0,n._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return c.value;case"gate":return e.getFeatureGate(c.gate_name,a(r)?void 0:o).value?c.pass_value:c.fail_value;case"dynamic_config":let u;return i(u=e.getDynamicConfig(c.config_name,a(r)?void 0:o).get(c.param_name),l)?l:u;case"experiment":let d;return i(d=e.getExperiment(c.experiment_name,a(r)?void 0:o).get(c.param_name),l)?l:d;case"layer":let h;return i(h=e.getLayer(c.layer_name,a(r)?void 0:o).get(c.param_name),l)?l:h;default:return l}}}},6962(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(382),a=r(8321),i=r(6892),s=r(2739),l=r(1887);class c extends o.StatsigClientBase{static instance(e){let t=(0,o._getStatsigGlobal)().instance(e);return t instanceof c?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new c(null!=e?e:"",{}))}constructor(e,t,r=null){var n,s;o.SDKType._setClientType(e,"javascript-client");const c=new i.default(r,e=>{this.$emt(e)});for(const i of(super(e,null!=(n=null==r?void 0:r.dataAdapter)?n:new l.StatsigEvaluationsDataAdapter,c,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=c,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)(),null!=(s=null==r?void 0:r.plugins)?s:[]))i.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.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 n(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 n;let a=[...null!=(n=this._store.getWarnings())?n:[]];this._resetForUser(e);let i=this.dataAdapter.getDataSync(this._user);null==i&&a.push("NoCachedValues"),this._store.setValues(i,this._user),this._finalizeUpdate(i);let s=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===s||null==s&&(null==i?void 0:i.source)==="Bootstrap"||this._runPostUpdate(null!=i?i:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),a)}updateUserAsync(e,t){return n(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 n(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;o.Diagnostics._markInitOverallStart(this._sdkKey);let n=this.dataAdapter.getDataSync(r);if(this._store.setValues(n,this._user),this._setStatus("Loading",n),n=yield this.dataAdapter.getDataAsync(n,r,t),r!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let a=!1;null!=n&&(o.Diagnostics._markInitProcessStart(this._sdkKey),a=this._store.setValues(n,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:a})),this._finalizeUpdate(n),a||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,a,this._store.getCurrentSourceDetails());let i=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(a,this._store.getSource(),i,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){let n="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:n}),this._logger.enqueue(Object.assign(Object.assign({},n),{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 n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var r;return(0,o.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=>{o.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,n,a;let i=(0,o._normalizeUser)(e,t),s=null==(r=i.customIDs)?void 0:r.stableID;if(s){let e=null==(a=(n=this.storageProvider).isReadyResolver)?void 0:a.call(n);e?e.then(()=>o.StableID.setOverride(s,this._sdkKey),()=>o.StableID.setOverride(s,this._sdkKey)):o.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(i.analyticsOnlyMetadata=Object.assign(Object.assign({},i.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),i}_getFeatureGateImpl(e,t){var r,n;let{result:a,details:i}=this._store.getGate(e),s=(0,o._makeFeatureGate)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,t){var r,n;let{result:a,details:i}=this._store.getConfig(e),s=(0,o._makeDynamicConfig)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,t){var r,n,a,i;let{result:s,details:l}=this._store.getConfig(e),c=(0,o._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,o._mapExposures)(null!=(n=null==(r=c.__evaluation)?void 0:r.secondary_exposures)?n:[],this._store.getExposureMapping()));let u=null==(i=null==(a=this.overrideAdapter)?void 0:a.getExperimentOverride)?void 0:i.call(a,c,this._user,t),d=null!=u?u:c;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,d,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:d}),d}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var r,n,a;let{result:i,details:s}=this._store.getLayer(e),l=(0,o._makeLayer)(e,s,i),c=null==(n=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:n.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let u=(0,o._mergeOverride)(l,c,null!=(a=null==c?void 0:c.__value)?a:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,u,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:u}),u}_getParameterStoreImpl(e,t){var r,n;let{result:o,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let i={name:e,details:a,__configuration:o,get:(0,s._makeParamStoreGetter)(this,o,t)},l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getParamStoreOverride)?void 0:n.call(r,i,t);return null!=l&&(i.__configuration=l.config,i.details=l.details,i.get=(0,s._makeParamStoreGetter)(this,l.config,t)),i}}t.default=c},1887(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let o=r(382),a=r(6892);class i extends o.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof a.default?this._network=r:this._network=new a.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,o._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,o._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):o.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,o){return n(this,void 0,void 0,function*(){var n;let a=yield null==(n=this._network)?void 0:n.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,o);return null!=a?a:null})}_getCacheKey(e){var t;let r=(0,o._getStorageKey)(this._getSdkKey(),e,null==(t=this._options)?void 0:t.customUserCacheKeyFunc);return`${o.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,o._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=i},7726(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let a=r(382),i=r(6962);t.StatsigClient=i.default,o(r(382),t),t.default=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:i.default})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{ThemeMutationObserver:()=>t6,setTestingThemeColor:()=>t4,toggleTestingTheme:()=>t9,setGlobalTheme:()=>t2,getTokenValue:()=>t3,disableTestingTheme:()=>t7,token:()=>t5,enableTestingTheme:()=>t8});var e,t,o,a,i,s,l={};r.r(l),r.d(l,{CURRENT_SURFACE_CSS_VAR:()=>tn,ThemeMutationObserver:()=>t$,enableGlobalTheme:()=>tF,getGlobalTheme:()=>tB,getSSRAutoScript:()=>tN,getThemeHtmlAttrs:()=>tv,getThemeStyles:()=>tR,getTokenValue:()=>ta,setGlobalTheme:()=>tL,themeConfig:()=>e4,themeObjectToString:()=>tg,themeStringToObject:()=>th,token:()=>to,useThemeObserver:()=>tK()});var c={};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function p(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function b(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(e){if("string"==typeof e)return v(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||y(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){_(a,n,o,i,s,"next",e)}function s(e){_(a,n,o,i,s,"throw",e)}i(void 0)})}}r.r(c),r.d(c,{disableTestingTheme:()=>t0,enableTestingTheme:()=>tZ,setTestingThemeColor:()=>tX,toggleTestingTheme:()=>t1});var w=r(6192),O=r.n(w),E=r(7726),x=r(2646),S=r.n(x);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var j="@all-features",P=p(function e(){u(this,e),b(this,"eventToValue",new Map),this.emitter=new(S())},[{key:"onGateUpdated",value:function(e,t,r,n){var o=this,a=r(e,D(D({},n),{},{fireGateExposure:!1}));void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,a);var i=function(){var a=r(e,D(D({},n),{},{fireGateExposure:!1}));o.eventToValue.get(t)!==a&&(o.eventToValue.set(t,a),t(a))};return this.emitter.on(e,i),function(){o.emitter.off(e,i)}}},{key:"onExperimentValueUpdated",value:function(e,t,r,n,o,a){var i=this,s="".concat(e,".").concat(t),l=o(e,t,r,D(D({},a),{},{fireExperimentExposure:!1}));void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,l);var c=function(){var s=o(e,t,r,D(D({},a),{},{fireExperimentExposure:!1}));i.eventToValue.get(n)!==s&&(i.eventToValue.set(n,s),n(s))};return this.emitter.on(s,c),function(){i.emitter.off(s,c)}}},{key:"onAnyUpdated",value:function(e){var t=this;return this.emitter.on(j,e),function(){t.emitter.off(j,e)}}},{key:"anyUpdated",value:function(){var e=this;this.emitter.emit(j),this.emitter.eventNames().filter(function(e){return e!==j}).forEach(function(t){e.emitter.emit(t)})}}]),I=((eE={}).Error="Error",eE.LocalOverride="LocalOverride",eE.Unrecognized="Unrecognized",eE.Uninitialized="Uninitialized",eE.NetworkNotModified="NetworkNotModified",eE.Network="Network",eE.InvalidBootstrap="InvalidBootstrap",eE.Bootstrap="Bootstrap",eE.Cache="Cache",eE.Unknown="Unknown",eE),A=((ex={}).Development="development",ex.Staging="staging",ex.Production="production",ex),U=((eS={}).COMMERCIAL="commercial",eS.FEDRAMP_MODERATE="fedramp-moderate",eS),M=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var F=function(e){return L({perimeter:!function(){var e,t=globalThis,r=t.MICROS_PERIMETER||t.UNSAFE_ATL_CONTEXT_BOUNDARY;if(r)return"fedramp-moderate"===r;var n=null==(e=t.location)||null==(e=e.hostname)?void 0:e.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return!!n&&n.length>0}()?U.COMMERCIAL:U.FEDRAMP_MODERATE},e)},R=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var r=Object.entries(e),n=Object.entries(t);if(r.length!==n.length)return!1;var o=function(e,t){var r=m(e,1)[0],n=m(t,1)[0];return r.localeCompare(n)};r.sort(o),n.sort(o);for(var a=0;a<r.length;a++)if(m(r[a],2)[1]!==m(n[a],2)[1])return!1;return!0},N=function(e,t){var r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},V=function(e){var t=e.api,r=e.disableCurrentPageLogging,n=e.loggingIntervalMillis,o=e.loggingBufferMaxSize,a=e.localMode,i=e.eventLoggingApi,s=e.eventLoggingApiForRetries,l=e.disableLocalStorage,c=e.ignoreWindowUndefined,u=e.disableAllLogging;return L(L({},(e.initTimeoutMs,e.disableNetworkKeepalive,e.overrideStableID,e.disableErrorLogging,e.disableAutoMetricsLogging,f(e,M))),{},{networkConfig:{api:t,logEventUrl:i?i+"rgstr":void 0,logEventFallbackUrls:s?[s]:void 0,preventAllNetworkTraffic:a||!c&&"u"<typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:o,disableStorage:void 0===l?a:l,disableLogging:void 0===u?a:u})},K=Object.entries(I).map(function(e){var t=m(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]}),z=function(e){var t,r,n,o=e.reason.toLowerCase();return{reason:null!=(t=null==(r=K.find(function(e){var t=m(e,1)[0];return o.includes(t)}))?void 0:r[1])?t:I.Unknown,time:null!=(n=e.receivedAt)?n:Date.now()}},G=function(e){return e.map(function(e){return"string"==typeof e?{gate:e}:e})},B=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;u(this,e),this.value=r,this._name=t,this._ruleID=n,this._secondaryExposures=a,this._allocatedExperimentName=i,this._evaluationDetails=o,this._onDefaultValueFallback=s}return p(e,[{key:"get",value:function(e,t,r){var n,o,a=this.getValue(e,t);if(null==a)return t;var i=Array.isArray(t)?"array":d(t),s=Array.isArray(a)?"array":d(a);return r?r(a)?(this.fireExposure(e),a):(null==(o=this._onDefaultValueFallback)||o.call(this,this,e,i,s),t):null==t||i===s?(this.fireExposure(e),a):(null==(n=this._onDefaultValueFallback)||n.call(this,this,e,i,s),t)}},{key:"getValue",value:function(e,t){return null==e?this.value:(null==t&&(t=null),null==this.value[e])?t:(this.fireExposure(e),this.value[e])}},{key:"fireExposure",value:function(e){this.experiment&&this.experiment.get(e)}}],[{key:"fromExperiment",value:function(t){var r,n,o,a=new e(t.name,t.value,t.ruleID,z(t.details),G(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),null!=(o=t.groupName)?o:void 0);return a.experiment=t,a}}])}(),$=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];u(this,e),this._logParameterFunction=a,this._name=t,this._value=JSON.parse(JSON.stringify(null!=r?r:{})),this._ruleID=null!=n?n:"",this._evaluationDetails=o,this._secondaryExposures=i,this._undelegatedSecondaryExposures=s,this._allocatedExperimentName=l,this._explicitParameters=c}return p(e,[{key:"get",value:function(e,t,r){var n=this,o=this._value[e];if(null==o)return t;var a=function(){return n._logLayerParameterExposure(e),o};return r?r(o)?a():t:null==t||d(o)===d(t)&&Array.isArray(t)===Array.isArray(o)?a():t}},{key:"getValue",value:function(e,t){void 0==t&&(t=null);var r=this._value[e];return null!=r&&this._logLayerParameterExposure(e),null!=r?r:t}},{key:"_logLayerParameterExposure",value:function(e){var t;null==(t=this._logParameterFunction)||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,n,o,a,i,s;return new e(t.name,t.__value,t.ruleID,z(t.details),function(e,r){return t.get(r)},G(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),G(null!=(o=null==(a=t.__evaluation)?void 0:a.undelegated_secondary_exposures)?o:[]),null==(i=t.__evaluation)?void 0:i.allocated_experiment_name,null==(s=t.__evaluation)?void 0:s.explicit_parameters)}}])}(),J="0.0.0-development";function q(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,t){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}function X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function Y(e){var t="function"==typeof Map?new Map:void 0;return(Y=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(X())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&H(o,r.prototype),o}(e,arguments,W(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),H(r,e)})(e)}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Z=function(){return!!e})()}var ee=function(e){function t(e){var r,n;return u(this,t),r=t,n=[e],r=W(r),q(this,Z()?Reflect.construct(r,n||[],W(this).constructor):r.apply(this,n))}return Q(t,e),p(t)}(Y(Error));function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var er=function(){var e,t,r,n,o;function a(){u(this,a)}return p(a,null,[{key:"fetchClientSdk",value:(e=k(O().mark(function e(t){var r,n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.targetApp,n="/api/v2/frontend/clientSdkKey/".concat(r),e.prev=2,e.next=5,this.fetchRequest(n,"GET",t);case 5:return e.abrupt("return",e.sent);case 8:if(e.prev=8,e.t0=e.catch(2),!(e.t0 instanceof Error)){e.next=12;break}throw e.t0;case 12:throw Error("Failed to retrieve client sdk key");case 13:case"end":return e.stop()}},e,this,[[2,8]])})),function(t){return e.apply(this,arguments)})},{key:"fetchExperimentValues",value:(t=k(O().mark(function e(t,r,n){var o;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={identifiers:r,customAttributes:n,targetApp:t.targetApp},e.prev=1,e.next=4,this.fetchRequest("/api/v2/frontend/experimentValues","POST",t,o);case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),!(e.t0 instanceof Error)){e.next=11;break}throw e.t0;case 11:throw Error("Failed to retrieve experiment values");case 12:case"end":return e.stop()}},e,this,[[1,7]])})),function(e,r,n){return t.apply(this,arguments)})},{key:"handleResponseError",value:(r=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,t.text();case 3:throw r=e.sent,new ee("Non 2xx response status received, status: ".concat(t.status,", body: ").concat(JSON.stringify(r)));case 5:if(204!==t.status){e.next=7;break}throw new ee("Unexpected 204 response");case 7:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"extractResponseBody",value:(n=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.text();case 2:return r=e.sent,e.abrupt("return",JSON.parse(r));case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getBaseUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t)return"/gateway/api/flags";if(r===U.FEDRAMP_MODERATE)switch(e){case A.Production:return"https://api.atlassian-us-gov-mod.com/flags";case A.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw Error('Invalid environment "'.concat(e,'" for "').concat(r,'" perimeter'))}if(r===U.COMMERCIAL)switch(e){case A.Development:return"https://api.dev.atlassian.com/flags";case A.Staging:var o=this.getApiUrl(n);if(null!==o)return o;return"https://api.stg.atlassian.com/flags";default:var a=this.getApiUrl(n);if(null!==a)return a;return"https://api.atlassian.com/flags"}throw Error('Invalid perimeter "'.concat(r,'"'))}},{key:"fetchRequest",value:(o=k(O().mark(function e(t,r,n,o){var i,s,l,c,u;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.getBaseUrl(n.environment,n.useGatewayURL,n.perimeter,n.isolationContextId),s=n.fetchTimeoutMs||5e3,AbortSignal.timeout?l=AbortSignal.timeout(s):AbortController&&(l=(c=new AbortController).signal,setTimeout(function(){return c.abort()},s)),e.next=5,fetch("".concat(i).concat(t),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({method:r,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":J,"X-API-KEY":n.apiKey},signal:l},o&&{body:JSON.stringify(o)}));case 5:return u=e.sent,e.next=8,this.handleResponseError(u);case 8:return e.next=10,this.extractResponseBody(u);case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return o.apply(this,arguments)})},{key:"getApiUrl",value:function(e){var t=this.getWindowLocation();if(void 0===t)return e?"https://atlassian-statsig-proxy-archetype.atl-paas.%s.atl-ic.net".replace("%s",e):null;var r=t.protocol,n=t.hostname,o=n.match(/([^.]+)\.oasis-stg\.com$/);if(o)return"".concat(r,"//api.").concat(o[1],".").concat("oasis-stg.com/flags");var a=n.match(/([^.]+)\.atlassian-isolated\.net$/);return a?"".concat(r,"//api.").concat(a[1],".").concat("atlassian-isolated.net/flags"):null}},{key:"getWindowLocation",value:function(){if("u">typeof window&&window.location)return window.location}}])}();function en(){return(en="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=W(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}}).apply(null,arguments)}function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ei(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ei=function(){return!!e})()}var es=function(e){var t,r,n;function o(){var e,t,r;return u(this,o),r=["NoFetchDataAdapter","nofetch"],t=W(t=o),b(e=q(this,ei()?Reflect.construct(t,r||[],W(this).constructor):t.apply(this,r)),"bootstrapResult",null),e}return Q(o,e),p(o,[{key:"setBootstrapData",value:function(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:E.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(t=k(O().mark(function e(t,r){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"getDataAsync",value:(r=k(O().mark(function e(t,r,n){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bootstrapResult&&ea(ea({},this.bootstrapResult),{},{fullUserHash:(0,E._getFullUserHash)(r)}));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"getDataSync",value:function(e){return this.bootstrapResult&&ea(ea({},this.bootstrapResult),{},{fullUserHash:(0,E._getFullUserHash)(e)})}},{key:"_fetchFromNetwork",value:(n=k(O().mark(function e(t,r,n){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})},{key:"_getCacheKey",value:function(e){var t=(0,E._getStorageKey)(this._getSdkKey(),e);return"".concat(E.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(t)}},{key:"_isCachedResultValidFor204",value:function(e,t){return!1}},{key:"setDataLegacy",value:function(e,t){var r,n;(r=this,"function"==typeof(n=en(W(o.prototype),"setData",r))?function(e){return n.apply(r,e)}:n)([e,t])}},{key:"toJSON",value:function(){var e=ea({},this);return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}])}(E.DataAdapterCore),el=r(382);function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ed(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eh="LocalOverride:Recognized",eg="STATSIG_JS_LITE_LOCAL_OVERRIDES",ep=function(){return{gates:{},configs:{},layers:{}}},eb=function(e,t){return t+":"+e},ef=p(function e(t){u(this,e),this._overrides=ep(),this._djb2Map=new Map,this._localStorageKey=t},[{key:"parseStoredOverrides",value:function(e){try{var t=window.localStorage.getItem(e);if(!t)return ep();return JSON.parse(t)}catch(e){return ep()}}},{key:"mergeOverrides",value:function(){for(var e=ep(),t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=0;o<r.length;o++){for(var a=r[o],i=0,s=Object.entries(null!=(l=a.gates)?l:{});i<s.length;i++){var l,c=m(s[i],2),u=c[0],d=c[1];e.gates[u]=d}for(var h=0,g=Object.entries(null!=(p=a.configs)?p:{});h<g.length;h++){var p,b=m(g[h],2),f=b[0],v=b[1];e.configs[f]=v}for(var y=0,_=Object.entries(null!=(k=a.layers)?k:{});y<_.length;y++){var k,w=m(_[y],2),O=w[0],E=w[1];e.layers[O]=E}}return e}},{key:"initFromStoredOverrides",value:function(){var e=this.mergeOverrides(this._overrides,this.parseStoredOverrides(eg),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(eg)}catch(e){}for(var t=0,r=Object.values(e);t<r.length;t++){var n,o=r[t],a=new Set(Object.keys(o)),i=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return ed(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ed(e,void 0):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(i)throw o}}}}(a);try{for(i.s();!(n=i.n()).done;){var s=n.value,l=(0,el._DJB2)(s);a.has(l)&&delete o[l]}}catch(e){i.e(e)}finally{i.f()}}this.applyOverrides(e)}},{key:"saveOverrides",value:function(){try{window.localStorage.setItem(this._localStorageKey,JSON.stringify(this._overrides))}catch(e){}}},{key:"getOverrides",value:function(){return this.mergeOverrides(this._overrides)}},{key:"applyOverrides",value:function(e){var t=eu(eu({},ep()),e);this._djb2Map.clear();for(var r=0,n=Object.entries(t);r<n.length;r++)for(var o=m(n[r],2),a=o[0],i=o[1],s=0,l=Object.entries(i);s<l.length;s++){var c=m(l[s],2),u=c[0],d=c[1];this._djb2Map.set(eb((0,el._DJB2)(u),a),d)}this._overrides=t}},{key:"setOverrides",value:function(e){this.applyOverrides(e),this.saveOverrides()}},{key:"overrideGate",value:function(e,t){this._overrides.gates[e]=t,this._djb2Map.set(eb((0,el._DJB2)(e),"gates"),t),this.saveOverrides()}},{key:"removeGateOverride",value:function(e){delete this._overrides.gates[e],this._djb2Map.delete(eb((0,el._DJB2)(e),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(e,t){var r,n=null!=(r=this._overrides.gates[e.name])?r:this._djb2Map.get(eb(e.name,"gates"));return null==n?null:eu(eu({},e),{},{value:n,details:eu(eu({},e.details),{},{reason:eh})})}},{key:"overrideDynamicConfig",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(eb((0,el._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(eb((0,el._DJB2)(e),"configs")),this.saveOverrides()}},{key:"getDynamicConfigOverride",value:function(e,t){return this._getConfigOverride(e,this._overrides.configs)}},{key:"overrideExperiment",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(eb((0,el._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(eb((0,el._DJB2)(e),"configs")),this.saveOverrides()}},{key:"getExperimentOverride",value:function(e,t){return this._getConfigOverride(e,this._overrides.configs)}},{key:"overrideLayer",value:function(e,t){this._overrides.layers[e]=t,this._djb2Map.set(eb((0,el._DJB2)(e),"layers"),t),this.saveOverrides()}},{key:"removeLayerOverride",value:function(e){delete this._overrides.layers[e],this._djb2Map.delete(eb((0,el._DJB2)(e),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides=ep();try{window.localStorage.removeItem(this._localStorageKey)}catch(e){}}},{key:"getLayerOverride",value:function(e,t){var r,n=null!=(r=this._overrides.layers[e.name])?r:this._djb2Map.get(eb(e.name,"layers"));return null==n?null:eu(eu({},e),{},{__value:n,get:(0,el._makeTypedGet)(e.name,n),details:eu(eu({},e.details),{},{reason:eh})})}},{key:"_getConfigOverride",value:function(e,t){var r,n=null!=(r=t[e.name])?r:this._djb2Map.get(eb(e.name,"configs"));return null==n?null:eu(eu({},e),{},{value:n,get:(0,el._makeTypedGet)(e.name,n),details:eu(eu({},e.details),{},{reason:eh})})}}]),ev=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ey(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var e_="client-default-key",ek=p(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.localStorageKey,o=r.overrideAdapter;u(this,e),b(this,"initPromise",null),b(this,"initCompleted",!1),b(this,"initWithDefaults",!1),b(this,"hasCheckGateErrorOccurred",!1),b(this,"hasGetExperimentErrorOccurred",!1),b(this,"hasGetExperimentValueErrorOccurred",!1),b(this,"hasGetLayerErrorOccurred",!1),b(this,"hasGetLayerValueErrorOccurred",!1),b(this,"subscriptions",new P),b(this,"dataAdapter",new es),b(this,"statsigValuesUpdated",function(){t.user&&t.statsigClient.updateUserSync(t.user,{disableBackgroundCacheRefresh:!0}),t.subscriptions.anyUpdated()}),this.overrideAdapter=o||new ef(void 0===n?"STATSIG_OVERRIDES":n)},[{key:"initialize",value:(eC=k(O().mark(function e(t,r,n){var o,a,i=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=F(t),!this.initPromise){e.next=4;break}return R(o,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return a=performance.now(),this.initOptions=o,this.initPromise=this.init(o,r,n).then(function(){i.initCompleted=!0,i.initWithDefaults=!0}).finally(function(){var e=performance.now()-a;i.fireClientEvent(a,e,"initialize",i.initCompleted,o.apiKey)}),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}},e,this)})),function(e,t,r){return eC.apply(this,arguments)})},{key:"initializeWithProvider",value:(eD=k(O().mark(function e(t,r,n,o){var a,i,s=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=F(t),!this.initPromise){e.next=4;break}return R(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return i=performance.now(),this.initOptions=a,this.provider=r,this.provider.setClientVersion(J),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeWithProvider",s.initCompleted,r.getApiKey?r.getApiKey():void 0)}),e.abrupt("return",this.initPromise);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return eD.apply(this,arguments)})},{key:"applyUpdateCallback",value:function(e){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(e.experimentValues),this.dataAdapter.setData(JSON.stringify(e.experimentValues)),this.statsigValuesUpdated())}catch(e){console.warn("Error when attempting to apply update",e)}}},{key:"fireClientEvent",value:function(e,t,r,n){var o,a=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null==(o=this.initOptions.analyticsWebClient)||o.then(function(o){var s=em({targetApp:a.initOptions.targetApp,clientVersion:J,success:n,startTime:e,totalTime:t},i&&{apiKey:i});o.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:s,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(e){a.initOptions.environment!==A.Production&&console.error("Analytics web client promise did not resolve",e)})}},{key:"initializeFromValues",value:(ej=k(O().mark(function e(t,r,n){var o,a,i,s=this,l=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>3&&void 0!==l[3]?l[3]:{},a=F(t),!this.initPromise){e.next=5;break}return R(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 5:return Object.prototype.hasOwnProperty.call(o,"has_updates")||(o.has_updates=!0),i=performance.now(),this.initOptions=a,this.initPromise=this.initFromValues(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeFromValues",s.initCompleted)}),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}},e,this)})),function(e,t,r){return ej.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw Error("Client must be initialized before using this method")}},{key:"updateUser",value:(eP=k(O().mark(function e(t,r,n){var o,a;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),o=F(t),a=function(){return er.fetchExperimentValues(o,r,n).then(function(e){return{experimentValues:e.experimentValues,customAttributesFromFetch:e.customAttributes}})},e.next=5,this.updateUserUsingInitializeValuesProducer(a,r,n);case 5:case"end":return e.stop()}},e,this)})),function(e,t,r){return eP.apply(this,arguments)})},{key:"updateUserWithProvider",value:(eI=k(O().mark(function e(t,r){var n=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw Error("Cannot update user using provider as the client was not initialised with a provider");case 3:return e.next=5,this.provider.setProfile(this.initOptions,t,r);case 5:return e.next=7,this.updateUserUsingInitializeValuesProducer(function(){return n.provider.getExperimentValues()},t,r);case 7:case"end":return e.stop()}},e,this)})),function(e,t){return eI.apply(this,arguments)})},{key:"updateUserWithValues",value:(eA=k(O().mark(function e(t,r){var n,o,a=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},this.assertInitialized(this.statsigClient),o=function(){return Promise.resolve({experimentValues:n,customAttributesFromFetch:r})},e.next=5,this.updateUserUsingInitializeValuesProducer(o,t,r);case 5:case"end":return e.stop()}},e,this)})),function(e,t){return eA.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"waitUntilInitializeCompleted",value:(eU=k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.initPromise){e.next=2;break}throw Error("The client must be initialized before you can wait until initialized.");case 2:if(!this.initCompleted){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this.initPromise;case 6:case"end":return e.stop()}},e,this)})),function(){return eU.apply(this,arguments)})},{key:"checkGate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireGateExposure;return this.statsigClient.checkGate(e,{disableExposureLog:!(void 0===r||r)})}catch(t){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:e,error:t}),this.hasCheckGateErrorOccurred=!0),!1}}},{key:"isGateExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getFeatureGate(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check FeatureGate: ".concat(e)),!0}}},{key:"isExperimentExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getExperiment(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check Experiment: ".concat(e)),!0}}},{key:"manuallyLogGateExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(e)}},{key:"getExperiment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireExperimentExposure;return B.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:e,error:t}),this.hasGetExperimentErrorOccurred=!0),new B(e,{},"",{time:Date.now(),reason:I.Error})}}},{key:"getExperimentValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getExperiment(e,n);try{var a=n.typeGuard;return o.get(t,r,a)}catch(t){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),this.hasGetExperimentValueErrorOccurred=!0),r}}},{key:"manuallyLogExperimentExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(e)}},{key:"manuallyLogLayerExposure",value:function(e,t){var r;this.assertInitialized(this.statsigClient),null==(r=this.statsigClient.getLayer(e))||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){if(this.overrideAdapter.overrideGate(e,t),this.user){var r;null==(r=this.statsigClient)||r.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0})}this.statsigValuesUpdated()}},{key:"clearGateOverride",value:function(e){this.overrideAdapter.removeGateOverride(e),this.statsigValuesUpdated()}},{key:"overrideConfig",value:function(e,t){this.overrideAdapter.overrideDynamicConfig(e,t),this.statsigValuesUpdated()}},{key:"clearConfigOverride",value:function(e){this.overrideAdapter.removeDynamicConfigOverride(e),this.statsigValuesUpdated()}},{key:"setOverrides",value:function(e){this.overrideAdapter.setOverrides(e),this.statsigValuesUpdated()}},{key:"getOverrides",value:function(){return this.overrideAdapter.getOverrides()}},{key:"clearAllOverrides",value:function(){this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}},{key:"isCurrentUser",value:function(e,t){return R(this.currentIdentifiers,e)&&R(this.currentAttributes,t)}},{key:"onGateUpdated",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.subscriptions.onGateUpdated(e,function(o){var a=n.fireGateExposure;(void 0===a||a)&&r.manuallyLogGateExposure(e);try{t(o)}catch(t){console.warn("Error calling callback for gate ".concat(e," with value ").concat(o),t)}},this.checkGate.bind(this),n)}},{key:"onExperimentValueUpdated",value:function(e,t,r,n){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return this.subscriptions.onExperimentValueUpdated(e,t,r,function(t){var r=a.fireExperimentExposure;(void 0===r||r)&&o.manuallyLogExperimentExposure(e);try{n(t)}catch(r){console.warn("Error calling callback for experiment ".concat(e," with value ").concat(t),r)}},this.getExperimentValue.bind(this),a)}},{key:"onAnyUpdated",value:function(e){return this.subscriptions.onAnyUpdated(e)}},{key:"init",value:(eM=k(O().mark(function e(t,r,n){var o,a,i,s,l,c;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=em({},t),e.prev=1,s=er.fetchClientSdk(t).then(function(e){return o.sdkKey=e.clientSdkKey}),l=er.fetchExperimentValues(t,r,n),e.next=6,Promise.all([s,l]);case 6:a=(c=m(e.sent,2)[1]).experimentValues,i=c.customAttributes,e.next=20;break;case 13:return e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=19,this.initFromValues(o,r,n);case 19:throw e.t0;case 20:return e.abrupt("return",this.initFromValues(o,r,i,a));case 21:case"end":return e.stop()}},e,this,[[1,13]])})),function(e,t,r){return eM.apply(this,arguments)})},{key:"initWithProvider",value:(eT=k(O().mark(function e(t,r,n,o){var a,i,s,l,c,u;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=em(em({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,n,o);case 4:return l=r.getClientSdkKey().then(function(e){return a.sdkKey=e}),c=r.getExperimentValues(),e.next=8,Promise.all([l,c]);case 8:i=(u=m(e.sent,2)[1]).experimentValues,s=u.customAttributesFromFetch,e.next=22;break;case 15:return e.prev=15,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=21,this.initFromValues(a,n,o);case 21:throw e.t0;case 22:return e.abrupt("return",this.initFromValues(a,n,s,i));case 23:case"end":return e.stop()}},e,this,[[1,15]])})),function(e,t,r,n){return eT.apply(this,arguments)})},{key:"initFromValues",value:(eL=k(O().mark(function e(t,r,n){var o,a,i,s,l,c,u,d=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>3&&void 0!==d[3]?d[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=n,(i=V(t)).sdkKey||(i.sdkKey=e_),null!=(o=i.networkConfig)&&o.logEventUrl||(i.networkConfig=em(em({},i.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),i.perimeter===U.FEDRAMP_MODERATE&&(i.disableLogging=!0),s=i.sdkKey,l=i.environment,i.updateUserCompletionCallback,i.perimeter,c=f(i,ev),this.user=N(r,n),u=em(em({},c),{},{environment:{tier:l},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter,logEventCompressionMode:E.LogEventCompressionMode.Forced}),r.stableId?E.StableID.setOverride(r.stableId,s):u.disableStableID=!0,e.prev=12,this.statsigClient=new E.StatsigClient(s,this.user,u),this.dataAdapter.setBootstrapData(a),e.next=17,this.statsigClient.initializeAsync();case 17:e.next=29;break;case 19:return e.prev=19,e.t0=e.catch(12),e.t0 instanceof Error&&console.error("Error occurred when trying to initialise the Statsig client, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new E.StatsigClient(e_,this.user,u),this.dataAdapter.setBootstrapData(),e.next=27,this.statsigClient.initializeAsync();case 27:throw this.initWithDefaults=!0,e.t0;case 29:case"end":return e.stop()}},e,this,[[12,19]])})),function(e,t,r){return eL.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(eF=k(O().mark(function e(t,r,n){var o,a,i,s=this;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw Error("The client must be initialized before you can update the user.");case 3:if(!this.isCurrentUser(r,n)){e.next=5;break}return e.abrupt("return",this.initPromise);case 5:return o=this.initPromise,e.prev=6,e.next=9,this.initPromise;case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(6);case 13:return a=t(),i=this.updateStatsigClientUser(a,r,n),this.initPromise=i.catch(k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s.initPromise=o,!s.provider){e.next=4;break}return e.next=4,s.provider.setProfile(s.initOptions,s.currentIdentifiers,s.currentAttributes);case 4:case"end":return e.stop()}},e)}))),e.abrupt("return",i);case 17:case"end":return e.stop()}},e,this,[[6,11]])})),function(e,t,r){return eF.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(eR=k(O().mark(function e(t,r,n){var o,a,i,s,l,c,u,d,h;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),e.prev=1,e.next=4,t;case 4:s=N(r,(i=e.sent).customAttributesFromFetch),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),u=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null==(l=(c=this.initOptions).updateUserCompletionCallback)||l.call(c,!1,u),e.t0;case 13:if(d=!0,h=null,e.prev=15,this.dataAdapter.setBootstrapData(i.experimentValues),this.user=s,!this.user){e.next=21;break}return e.next=21,this.statsigClient.updateUserAsync(this.user);case 21:e.next=27;break;case 23:e.prev=23,e.t1=e.catch(15),d=!1,h=String(e.t1);case 27:if(null==(o=this.initOptions)||null==(a=o.updateUserCompletionCallback)||a.call(o,d,h),!d){e.next=34;break}this.currentIdentifiers=r,this.currentAttributes=n,this.subscriptions.anyUpdated(),e.next=35;break;case 34:throw Error("Failed to update user. An unexpected error occured.");case 35:case"end":return e.stop()}},e,this,[[1,8],[15,23]])})),function(e,t,r){return eR.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return J}},{key:"getLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireLayerExposure;return $.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:e,error:t}),this.hasGetLayerErrorOccurred=!0),$.fromLayer((0,E._makeLayer)(e,{reason:"Error"},null))}}},{key:"getLayerValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getLayer(e,n);try{var a=n.typeGuard;return o.get(t,r,a)}catch(t){return this.hasGetLayerValueErrorOccurred||(console.warn({msg:"An error has occurred getting the layer value. Only the first occurrence of this error is logged.",layerName:e,defaultValue:r,options:n,error:t}),this.hasGetLayerValueErrorOccurred=!0),r}}}]),ew=p(function e(){u(this,e)},null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}]);b(ew,"client",new ek),b(ew,"hasCheckGateErrorOccurred",!1),b(ew,"hasGetExperimentValueErrorOccurred",!1),b(ew,"checkGate",function(e,t){try{if("u">typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getFeatureFlagOverride){var r=window.__CRITERION__.getFeatureFlagOverride(e);if(void 0!==r)return r}}catch(t){ew.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate from criterion override. Only the first occurrence of this error is logged.",gateName:e,error:t}),ew.hasCheckGateErrorOccurred=!0)}return ew.client.checkGate(e,t)}),b(ew,"getExperimentValue",function(e,t,r,n){try{if("u">typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getExperimentValueOverride){var o=window.__CRITERION__.getExperimentValueOverride(e,t);if(null!=o)return o}}catch(t){return ew.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value from criterion override. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),ew.hasGetExperimentValueErrorOccurred=!0),r}return ew.client.getExperimentValue(e,t,r,n)}),b(ew,"initializeCalled",ew.client.initializeCalled.bind(ew.client)),b(ew,"initializeCompleted",ew.client.initializeCompleted.bind(ew.client)),b(ew,"waitUntilInitializeCompleted",ew.client.waitUntilInitializeCompleted.bind(ew.client)),b(ew,"initialize",ew.client.initialize.bind(ew.client)),b(ew,"initializeWithProvider",ew.client.initializeWithProvider.bind(ew.client)),b(ew,"initializeFromValues",ew.client.initializeFromValues.bind(ew.client)),b(ew,"manuallyLogGateExposure",ew.client.manuallyLogGateExposure.bind(ew.client)),b(ew,"getExperiment",ew.client.getExperiment.bind(ew.client)),b(ew,"manuallyLogExperimentExposure",ew.client.manuallyLogExperimentExposure.bind(ew.client)),b(ew,"manuallyLogLayerExposure",ew.client.manuallyLogLayerExposure.bind(ew.client)),b(ew,"shutdownStatsig",ew.client.shutdownStatsig.bind(ew.client)),b(ew,"overrideGate",ew.client.overrideGate.bind(ew.client)),b(ew,"clearGateOverride",ew.client.clearGateOverride.bind(ew.client)),b(ew,"overrideConfig",ew.client.overrideConfig.bind(ew.client)),b(ew,"clearConfigOverride",ew.client.clearConfigOverride.bind(ew.client)),b(ew,"setOverrides",ew.client.setOverrides.bind(ew.client)),b(ew,"getOverrides",ew.client.getOverrides.bind(ew.client)),b(ew,"clearAllOverrides",ew.client.clearAllOverrides.bind(ew.client)),b(ew,"isCurrentUser",ew.client.isCurrentUser.bind(ew.client)),b(ew,"onGateUpdated",ew.client.onGateUpdated.bind(ew.client)),b(ew,"onExperimentValueUpdated",ew.client.onExperimentValueUpdated.bind(ew.client)),b(ew,"onAnyUpdated",ew.client.onAnyUpdated.bind(ew.client)),b(ew,"updateUser",ew.client.updateUser.bind(ew.client)),b(ew,"updateUserWithProvider",ew.client.updateUserWithProvider.bind(ew.client)),b(ew,"updateUserWithValues",ew.client.updateUserWithValues.bind(ew.client)),b(ew,"getPackageVersion",ew.client.getPackageVersion.bind(ew.client)),b(ew,"getLayer",ew.client.getLayer.bind(ew.client)),b(ew,"getLayerValue",ew.client.getLayerValue.bind(ew.client));var eO=ew;if("u">typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=ew;else{var eE,ex,eS,eC,eD,ej,eP,eI,eA,eU,eM,eT,eL,eF,eR,eN,eV,eK=(null==(eN=eO=window.__FEATUREGATES_JS__)||null==(eV=eN.getPackageVersion)?void 0:eV.call(eN))||"4.10.0 or earlier";eK!==J&&console.warn("Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(eK," when module version ").concat(J," was loading."))}let ez=eO;var eG=(null==globalThis||null==(i=globalThis.process)||null==(i=i.env)?void 0:i.JEST_WORKER_ID)===void 0&&(null==globalThis||null==(s=globalThis.process)||null==(s=s.env)?void 0:s.NODE_ENV)!=="production",eB=function(){var e;eG&&(e=console).debug.apply(e,arguments)},e$="__PLATFORM_FEATURE_FLAGS__",eJ=!("u">typeof process)&&!1,eq="u">typeof window?window:globalThis;function eW(e){if(eJ)return eB('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',"@atlaskit/platform-feature-flags",e),!0;try{if((null==(t=eq[e$])?void 0:t.booleanResolver)===void 0||(null==(r=eq[e$])?void 0:r.booleanResolver)===null)return ez.checkGate(e);var t,r,n,o=null==(n=eq[e$])?void 0:n.booleanResolver(e);if("boolean"!=typeof o)return console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1;return o}catch(e){return!1}}eq[e$]=eq[e$]||{booleanResolver:void 0};var eH=["light","dark","auto"],eQ=["light-increased-contrast","light","light-future","light-brand-refresh","dark","dark-future","dark-increased-contrast","dark-brand-refresh","legacy-light","legacy-dark","spacing","shape","typography-adg3","typography-modernized","typography-refreshed"],eX=[].concat(eQ,[]),eY="auto",eZ="auto",e0="dark",e1="light",e2=void 0,e5="spacing",e3=function(){if(eW("platform-default-typography-modernized"))return"typography-modernized"},e6=void 0;let e4={"atlassian-light":{id:"light",displayName:"Light Theme",palette:"defaultPalette",attributes:{type:"color",mode:"light"}},"atlassian-light-future":{id:"light-future",displayName:"Future Light Theme",palette:"defaultPalette",attributes:{type:"color",mode:"light"},override:"light"},"atlassian-light-increased-contrast":{id:"light-increased-contrast",displayName:"Light Theme (increased contrast)",palette:"defaultPalette",attributes:{type:"color",mode:"light"},extends:"light",increasesContrastFor:"light"},"atlassian-dark":{id:"dark",displayName:"Dark Theme",palette:"defaultPalette",attributes:{type:"color",mode:"dark"}},"atlassian-dark-future":{id:"dark-future",displayName:"Future Dark Theme",palette:"defaultPalette",attributes:{type:"color",mode:"dark"},override:"light"},"atlassian-dark-increased-contrast":{id:"dark-increased-contrast",displayName:"Dark Theme (increased contrast)",palette:"defaultPalette",attributes:{type:"color",mode:"dark"},extends:"dark",increasesContrastFor:"dark"},"atlassian-legacy-light":{id:"legacy-light",displayName:"Light Theme (legacy)",palette:"legacyPalette",attributes:{type:"color",mode:"light"}},"atlassian-legacy-dark":{id:"legacy-dark",displayName:"Dark Theme (legacy)",palette:"legacyPalette",attributes:{type:"color",mode:"dark"}},"atlassian-spacing":{id:"spacing",displayName:"Atlassian Spacing",palette:"spacingScale",attributes:{type:"spacing"}},"atlassian-typography-adg3":{id:"typography-adg3",displayName:"ADG3 Typography",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-shape":{id:"shape",displayName:"Atlassian Shape",palette:"shapePalette",attributes:{type:"shape"}},"atlassian-typography-modernized":{id:"typography-modernized",displayName:"Atlassian Typography (Modernized)",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-typography-refreshed":{id:"typography-refreshed",displayName:"Atlassian Typography (Refreshed)",palette:"typographyPalette",attributes:{type:"typography"}},"atlassian-light-brand-refresh":{id:"light-brand-refresh",displayName:"Light theme (Brand refresh)",palette:"brandRefreshPalette",attributes:{type:"color",mode:"light"}},"atlassian-dark-brand-refresh":{id:"dark-brand-refresh",displayName:"Dark theme (Brand refresh)",palette:"brandRefreshPalette",attributes:{type:"color",mode:"dark"}}},e8={"color.text":"--ds-text","color.text.accent.lime":"--ds-text-accent-lime","color.text.accent.lime.bolder":"--ds-text-accent-lime-bolder","color.text.accent.red":"--ds-text-accent-red","color.text.accent.red.bolder":"--ds-text-accent-red-bolder","color.text.accent.orange":"--ds-text-accent-orange","color.text.accent.orange.bolder":"--ds-text-accent-orange-bolder","color.text.accent.yellow":"--ds-text-accent-yellow","color.text.accent.yellow.bolder":"--ds-text-accent-yellow-bolder","color.text.accent.green":"--ds-text-accent-green","color.text.accent.green.bolder":"--ds-text-accent-green-bolder","color.text.accent.teal":"--ds-text-accent-teal","color.text.accent.teal.bolder":"--ds-text-accent-teal-bolder","color.text.accent.blue":"--ds-text-accent-blue","color.text.accent.blue.bolder":"--ds-text-accent-blue-bolder","color.text.accent.purple":"--ds-text-accent-purple","color.text.accent.purple.bolder":"--ds-text-accent-purple-bolder","color.text.accent.magenta":"--ds-text-accent-magenta","color.text.accent.magenta.bolder":"--ds-text-accent-magenta-bolder","color.text.accent.gray":"--ds-text-accent-gray","color.text.accent.gray.bolder":"--ds-text-accent-gray-bolder","color.text.disabled":"--ds-text-disabled","color.text.inverse":"--ds-text-inverse","color.text.selected":"--ds-text-selected","color.text.brand":"--ds-text-brand","color.text.danger":"--ds-text-danger","color.text.warning":"--ds-text-warning","color.text.warning.inverse":"--ds-text-warning-inverse","color.text.success":"--ds-text-success","color.text.discovery":"--ds-text-discovery","color.text.information":"--ds-text-information","color.text.subtlest":"--ds-text-subtlest","color.text.subtle":"--ds-text-subtle","color.link":"--ds-link","color.link.pressed":"--ds-link-pressed","color.link.visited":"--ds-link-visited","color.link.visited.pressed":"--ds-link-visited-pressed","color.icon":"--ds-icon","color.icon.accent.lime":"--ds-icon-accent-lime","color.icon.accent.red":"--ds-icon-accent-red","color.icon.accent.orange":"--ds-icon-accent-orange","color.icon.accent.yellow":"--ds-icon-accent-yellow","color.icon.accent.green":"--ds-icon-accent-green","color.icon.accent.teal":"--ds-icon-accent-teal","color.icon.accent.blue":"--ds-icon-accent-blue","color.icon.accent.purple":"--ds-icon-accent-purple","color.icon.accent.magenta":"--ds-icon-accent-magenta","color.icon.accent.gray":"--ds-icon-accent-gray","color.icon.disabled":"--ds-icon-disabled","color.icon.inverse":"--ds-icon-inverse","color.icon.selected":"--ds-icon-selected","color.icon.brand":"--ds-icon-brand","color.icon.danger":"--ds-icon-danger","color.icon.warning":"--ds-icon-warning","color.icon.warning.inverse":"--ds-icon-warning-inverse","color.icon.success":"--ds-icon-success","color.icon.discovery":"--ds-icon-discovery","color.icon.information":"--ds-icon-information","color.icon.subtlest":"--ds-icon-subtlest","color.icon.subtle":"--ds-icon-subtle","color.border":"--ds-border","color.border.accent.lime":"--ds-border-accent-lime","color.border.accent.red":"--ds-border-accent-red","color.border.accent.orange":"--ds-border-accent-orange","color.border.accent.yellow":"--ds-border-accent-yellow","color.border.accent.green":"--ds-border-accent-green","color.border.accent.teal":"--ds-border-accent-teal","color.border.accent.blue":"--ds-border-accent-blue","color.border.accent.purple":"--ds-border-accent-purple","color.border.accent.magenta":"--ds-border-accent-magenta","color.border.accent.gray":"--ds-border-accent-gray","color.border.disabled":"--ds-border-disabled","color.border.focused":"--ds-border-focused","color.border.input":"--ds-border-input","color.border.inverse":"--ds-border-inverse","color.border.selected":"--ds-border-selected","color.border.brand":"--ds-border-brand","color.border.danger":"--ds-border-danger","color.border.warning":"--ds-border-warning","color.border.success":"--ds-border-success","color.border.discovery":"--ds-border-discovery","color.border.information":"--ds-border-information","color.border.bold":"--ds-border-bold","color.background.accent.lime.subtlest":"--ds-background-accent-lime-subtlest","color.background.accent.lime.subtlest.hovered":"--ds-background-accent-lime-subtlest-hovered","color.background.accent.lime.subtlest.pressed":"--ds-background-accent-lime-subtlest-pressed","color.background.accent.lime.subtler":"--ds-background-accent-lime-subtler","color.background.accent.lime.subtler.hovered":"--ds-background-accent-lime-subtler-hovered","color.background.accent.lime.subtler.pressed":"--ds-background-accent-lime-subtler-pressed","color.background.accent.lime.subtle":"--ds-background-accent-lime-subtle","color.background.accent.lime.subtle.hovered":"--ds-background-accent-lime-subtle-hovered","color.background.accent.lime.subtle.pressed":"--ds-background-accent-lime-subtle-pressed","color.background.accent.lime.bolder":"--ds-background-accent-lime-bolder","color.background.accent.lime.bolder.hovered":"--ds-background-accent-lime-bolder-hovered","color.background.accent.lime.bolder.pressed":"--ds-background-accent-lime-bolder-pressed","color.background.accent.red.subtlest":"--ds-background-accent-red-subtlest","color.background.accent.red.subtlest.hovered":"--ds-background-accent-red-subtlest-hovered","color.background.accent.red.subtlest.pressed":"--ds-background-accent-red-subtlest-pressed","color.background.accent.red.subtler":"--ds-background-accent-red-subtler","color.background.accent.red.subtler.hovered":"--ds-background-accent-red-subtler-hovered","color.background.accent.red.subtler.pressed":"--ds-background-accent-red-subtler-pressed","color.background.accent.red.subtle":"--ds-background-accent-red-subtle","color.background.accent.red.subtle.hovered":"--ds-background-accent-red-subtle-hovered","color.background.accent.red.subtle.pressed":"--ds-background-accent-red-subtle-pressed","color.background.accent.red.bolder":"--ds-background-accent-red-bolder","color.background.accent.red.bolder.hovered":"--ds-background-accent-red-bolder-hovered","color.background.accent.red.bolder.pressed":"--ds-background-accent-red-bolder-pressed","color.background.accent.orange.subtlest":"--ds-background-accent-orange-subtlest","color.background.accent.orange.subtlest.hovered":"--ds-background-accent-orange-subtlest-hovered","color.background.accent.orange.subtlest.pressed":"--ds-background-accent-orange-subtlest-pressed","color.background.accent.orange.subtler":"--ds-background-accent-orange-subtler","color.background.accent.orange.subtler.hovered":"--ds-background-accent-orange-subtler-hovered","color.background.accent.orange.subtler.pressed":"--ds-background-accent-orange-subtler-pressed","color.background.accent.orange.subtle":"--ds-background-accent-orange-subtle","color.background.accent.orange.subtle.hovered":"--ds-background-accent-orange-subtle-hovered","color.background.accent.orange.subtle.pressed":"--ds-background-accent-orange-subtle-pressed","color.background.accent.orange.bolder":"--ds-background-accent-orange-bolder","color.background.accent.orange.bolder.hovered":"--ds-background-accent-orange-bolder-hovered","color.background.accent.orange.bolder.pressed":"--ds-background-accent-orange-bolder-pressed","color.background.accent.yellow.subtlest":"--ds-background-accent-yellow-subtlest","color.background.accent.yellow.subtlest.hovered":"--ds-background-accent-yellow-subtlest-hovered","color.background.accent.yellow.subtlest.pressed":"--ds-background-accent-yellow-subtlest-pressed","color.background.accent.yellow.subtler":"--ds-background-accent-yellow-subtler","color.background.accent.yellow.subtler.hovered":"--ds-background-accent-yellow-subtler-hovered","color.background.accent.yellow.subtler.pressed":"--ds-background-accent-yellow-subtler-pressed","color.background.accent.yellow.subtle":"--ds-background-accent-yellow-subtle","color.background.accent.yellow.subtle.hovered":"--ds-background-accent-yellow-subtle-hovered","color.background.accent.yellow.subtle.pressed":"--ds-background-accent-yellow-subtle-pressed","color.background.accent.yellow.bolder":"--ds-background-accent-yellow-bolder","color.background.accent.yellow.bolder.hovered":"--ds-background-accent-yellow-bolder-hovered","color.background.accent.yellow.bolder.pressed":"--ds-background-accent-yellow-bolder-pressed","color.background.accent.green.subtlest":"--ds-background-accent-green-subtlest","color.background.accent.green.subtlest.hovered":"--ds-background-accent-green-subtlest-hovered","color.background.accent.green.subtlest.pressed":"--ds-background-accent-green-subtlest-pressed","color.background.accent.green.subtler":"--ds-background-accent-green-subtler","color.background.accent.green.subtler.hovered":"--ds-background-accent-green-subtler-hovered","color.background.accent.green.subtler.pressed":"--ds-background-accent-green-subtler-pressed","color.background.accent.green.subtle":"--ds-background-accent-green-subtle","color.background.accent.green.subtle.hovered":"--ds-background-accent-green-subtle-hovered","color.background.accent.green.subtle.pressed":"--ds-background-accent-green-subtle-pressed","color.background.accent.green.bolder":"--ds-background-accent-green-bolder","color.background.accent.green.bolder.hovered":"--ds-background-accent-green-bolder-hovered","color.background.accent.green.bolder.pressed":"--ds-background-accent-green-bolder-pressed","color.background.accent.teal.subtlest":"--ds-background-accent-teal-subtlest","color.background.accent.teal.subtlest.hovered":"--ds-background-accent-teal-subtlest-hovered","color.background.accent.teal.subtlest.pressed":"--ds-background-accent-teal-subtlest-pressed","color.background.accent.teal.subtler":"--ds-background-accent-teal-subtler","color.background.accent.teal.subtler.hovered":"--ds-background-accent-teal-subtler-hovered","color.background.accent.teal.subtler.pressed":"--ds-background-accent-teal-subtler-pressed","color.background.accent.teal.subtle":"--ds-background-accent-teal-subtle","color.background.accent.teal.subtle.hovered":"--ds-background-accent-teal-subtle-hovered","color.background.accent.teal.subtle.pressed":"--ds-background-accent-teal-subtle-pressed","color.background.accent.teal.bolder":"--ds-background-accent-teal-bolder","color.background.accent.teal.bolder.hovered":"--ds-background-accent-teal-bolder-hovered","color.background.accent.teal.bolder.pressed":"--ds-background-accent-teal-bolder-pressed","color.background.accent.blue.subtlest":"--ds-background-accent-blue-subtlest","color.background.accent.blue.subtlest.hovered":"--ds-background-accent-blue-subtlest-hovered","color.background.accent.blue.subtlest.pressed":"--ds-background-accent-blue-subtlest-pressed","color.background.accent.blue.subtler":"--ds-background-accent-blue-subtler","color.background.accent.blue.subtler.hovered":"--ds-background-accent-blue-subtler-hovered","color.background.accent.blue.subtler.pressed":"--ds-background-accent-blue-subtler-pressed","color.background.accent.blue.subtle":"--ds-background-accent-blue-subtle","color.background.accent.blue.subtle.hovered":"--ds-background-accent-blue-subtle-hovered","color.background.accent.blue.subtle.pressed":"--ds-background-accent-blue-subtle-pressed","color.background.accent.blue.bolder":"--ds-background-accent-blue-bolder","color.background.accent.blue.bolder.hovered":"--ds-background-accent-blue-bolder-hovered","color.background.accent.blue.bolder.pressed":"--ds-background-accent-blue-bolder-pressed","color.background.accent.purple.subtlest":"--ds-background-accent-purple-subtlest","color.background.accent.purple.subtlest.hovered":"--ds-background-accent-purple-subtlest-hovered","color.background.accent.purple.subtlest.pressed":"--ds-background-accent-purple-subtlest-pressed","color.background.accent.purple.subtler":"--ds-background-accent-purple-subtler","color.background.accent.purple.subtler.hovered":"--ds-background-accent-purple-subtler-hovered","color.background.accent.purple.subtler.pressed":"--ds-background-accent-purple-subtler-pressed","color.background.accent.purple.subtle":"--ds-background-accent-purple-subtle","color.background.accent.purple.subtle.hovered":"--ds-background-accent-purple-subtle-hovered","color.background.accent.purple.subtle.pressed":"--ds-background-accent-purple-subtle-pressed","color.background.accent.purple.bolder":"--ds-background-accent-purple-bolder","color.background.accent.purple.bolder.hovered":"--ds-background-accent-purple-bolder-hovered","color.background.accent.purple.bolder.pressed":"--ds-background-accent-purple-bolder-pressed","color.background.accent.magenta.subtlest":"--ds-background-accent-magenta-subtlest","color.background.accent.magenta.subtlest.hovered":"--ds-background-accent-magenta-subtlest-hovered","color.background.accent.magenta.subtlest.pressed":"--ds-background-accent-magenta-subtlest-pressed","color.background.accent.magenta.subtler":"--ds-background-accent-magenta-subtler","color.background.accent.magenta.subtler.hovered":"--ds-background-accent-magenta-subtler-hovered","color.background.accent.magenta.subtler.pressed":"--ds-background-accent-magenta-subtler-pressed","color.background.accent.magenta.subtle":"--ds-background-accent-magenta-subtle","color.background.accent.magenta.subtle.hovered":"--ds-background-accent-magenta-subtle-hovered","color.background.accent.magenta.subtle.pressed":"--ds-background-accent-magenta-subtle-pressed","color.background.accent.magenta.bolder":"--ds-background-accent-magenta-bolder","color.background.accent.magenta.bolder.hovered":"--ds-background-accent-magenta-bolder-hovered","color.background.accent.magenta.bolder.pressed":"--ds-background-accent-magenta-bolder-pressed","color.background.accent.gray.subtlest":"--ds-background-accent-gray-subtlest","color.background.accent.gray.subtlest.hovered":"--ds-background-accent-gray-subtlest-hovered","color.background.accent.gray.subtlest.pressed":"--ds-background-accent-gray-subtlest-pressed","color.background.accent.gray.subtler":"--ds-background-accent-gray-subtler","color.background.accent.gray.subtler.hovered":"--ds-background-accent-gray-subtler-hovered","color.background.accent.gray.subtler.pressed":"--ds-background-accent-gray-subtler-pressed","color.background.accent.gray.subtle":"--ds-background-accent-gray-subtle","color.background.accent.gray.subtle.hovered":"--ds-background-accent-gray-subtle-hovered","color.background.accent.gray.subtle.pressed":"--ds-background-accent-gray-subtle-pressed","color.background.accent.gray.bolder":"--ds-background-accent-gray-bolder","color.background.accent.gray.bolder.hovered":"--ds-background-accent-gray-bolder-hovered","color.background.accent.gray.bolder.pressed":"--ds-background-accent-gray-bolder-pressed","color.background.disabled":"--ds-background-disabled","color.background.input":"--ds-background-input","color.background.input.hovered":"--ds-background-input-hovered","color.background.input.pressed":"--ds-background-input-pressed","color.background.inverse.subtle":"--ds-background-inverse-subtle","color.background.inverse.subtle.hovered":"--ds-background-inverse-subtle-hovered","color.background.inverse.subtle.pressed":"--ds-background-inverse-subtle-pressed","color.background.neutral":"--ds-background-neutral","color.background.neutral.hovered":"--ds-background-neutral-hovered","color.background.neutral.pressed":"--ds-background-neutral-pressed","color.background.neutral.subtle":"--ds-background-neutral-subtle","color.background.neutral.subtle.hovered":"--ds-background-neutral-subtle-hovered","color.background.neutral.subtle.pressed":"--ds-background-neutral-subtle-pressed","color.background.neutral.bold":"--ds-background-neutral-bold","color.background.neutral.bold.hovered":"--ds-background-neutral-bold-hovered","color.background.neutral.bold.pressed":"--ds-background-neutral-bold-pressed","color.background.selected":"--ds-background-selected","color.background.selected.hovered":"--ds-background-selected-hovered","color.background.selected.pressed":"--ds-background-selected-pressed","color.background.selected.bold":"--ds-background-selected-bold","color.background.selected.bold.hovered":"--ds-background-selected-bold-hovered","color.background.selected.bold.pressed":"--ds-background-selected-bold-pressed","color.background.brand.subtlest":"--ds-background-brand-subtlest","color.background.brand.subtlest.hovered":"--ds-background-brand-subtlest-hovered","color.background.brand.subtlest.pressed":"--ds-background-brand-subtlest-pressed","color.background.brand.bold":"--ds-background-brand-bold","color.background.brand.bold.hovered":"--ds-background-brand-bold-hovered","color.background.brand.bold.pressed":"--ds-background-brand-bold-pressed","color.background.brand.boldest":"--ds-background-brand-boldest","color.background.brand.boldest.hovered":"--ds-background-brand-boldest-hovered","color.background.brand.boldest.pressed":"--ds-background-brand-boldest-pressed","color.background.danger":"--ds-background-danger","color.background.danger.hovered":"--ds-background-danger-hovered","color.background.danger.pressed":"--ds-background-danger-pressed","color.background.danger.bold":"--ds-background-danger-bold","color.background.danger.bold.hovered":"--ds-background-danger-bold-hovered","color.background.danger.bold.pressed":"--ds-background-danger-bold-pressed","color.background.warning":"--ds-background-warning","color.background.warning.hovered":"--ds-background-warning-hovered","color.background.warning.pressed":"--ds-background-warning-pressed","color.background.warning.bold":"--ds-background-warning-bold","color.background.warning.bold.hovered":"--ds-background-warning-bold-hovered","color.background.warning.bold.pressed":"--ds-background-warning-bold-pressed","color.background.success":"--ds-background-success","color.background.success.hovered":"--ds-background-success-hovered","color.background.success.pressed":"--ds-background-success-pressed","color.background.success.bold":"--ds-background-success-bold","color.background.success.bold.hovered":"--ds-background-success-bold-hovered","color.background.success.bold.pressed":"--ds-background-success-bold-pressed","color.background.discovery":"--ds-background-discovery","color.background.discovery.hovered":"--ds-background-discovery-hovered","color.background.discovery.pressed":"--ds-background-discovery-pressed","color.background.discovery.bold":"--ds-background-discovery-bold","color.background.discovery.bold.hovered":"--ds-background-discovery-bold-hovered","color.background.discovery.bold.pressed":"--ds-background-discovery-bold-pressed","color.background.information":"--ds-background-information","color.background.information.hovered":"--ds-background-information-hovered","color.background.information.pressed":"--ds-background-information-pressed","color.background.information.bold":"--ds-background-information-bold","color.background.information.bold.hovered":"--ds-background-information-bold-hovered","color.background.information.bold.pressed":"--ds-background-information-bold-pressed","color.blanket":"--ds-blanket","color.blanket.selected":"--ds-blanket-selected","color.blanket.danger":"--ds-blanket-danger","color.interaction.hovered":"--ds-interaction-hovered","color.interaction.pressed":"--ds-interaction-pressed","color.skeleton":"--ds-skeleton","color.skeleton.subtle":"--ds-skeleton-subtle","color.chart.categorical.1":"--ds-chart-categorical-1","color.chart.categorical.1.hovered":"--ds-chart-categorical-1-hovered","color.chart.categorical.2":"--ds-chart-categorical-2","color.chart.categorical.2.hovered":"--ds-chart-categorical-2-hovered","color.chart.categorical.3":"--ds-chart-categorical-3","color.chart.categorical.3.hovered":"--ds-chart-categorical-3-hovered","color.chart.categorical.4":"--ds-chart-categorical-4","color.chart.categorical.4.hovered":"--ds-chart-categorical-4-hovered","color.chart.categorical.5":"--ds-chart-categorical-5","color.chart.categorical.5.hovered":"--ds-chart-categorical-5-hovered","color.chart.categorical.6":"--ds-chart-categorical-6","color.chart.categorical.6.hovered":"--ds-chart-categorical-6-hovered","color.chart.categorical.7":"--ds-chart-categorical-7","color.chart.categorical.7.hovered":"--ds-chart-categorical-7-hovered","color.chart.categorical.8":"--ds-chart-categorical-8","color.chart.categorical.8.hovered":"--ds-chart-categorical-8-hovered","color.chart.lime.bold":"--ds-chart-lime-bold","color.chart.lime.bold.hovered":"--ds-chart-lime-bold-hovered","color.chart.lime.bolder":"--ds-chart-lime-bolder","color.chart.lime.bolder.hovered":"--ds-chart-lime-bolder-hovered","color.chart.lime.boldest":"--ds-chart-lime-boldest","color.chart.lime.boldest.hovered":"--ds-chart-lime-boldest-hovered","color.chart.neutral":"--ds-chart-neutral","color.chart.neutral.hovered":"--ds-chart-neutral-hovered","color.chart.red.bold":"--ds-chart-red-bold","color.chart.red.bold.hovered":"--ds-chart-red-bold-hovered","color.chart.red.bolder":"--ds-chart-red-bolder","color.chart.red.bolder.hovered":"--ds-chart-red-bolder-hovered","color.chart.red.boldest":"--ds-chart-red-boldest","color.chart.red.boldest.hovered":"--ds-chart-red-boldest-hovered","color.chart.orange.bold":"--ds-chart-orange-bold","color.chart.orange.bold.hovered":"--ds-chart-orange-bold-hovered","color.chart.orange.bolder":"--ds-chart-orange-bolder","color.chart.orange.bolder.hovered":"--ds-chart-orange-bolder-hovered","color.chart.orange.boldest":"--ds-chart-orange-boldest","color.chart.orange.boldest.hovered":"--ds-chart-orange-boldest-hovered","color.chart.yellow.bold":"--ds-chart-yellow-bold","color.chart.yellow.bold.hovered":"--ds-chart-yellow-bold-hovered","color.chart.yellow.bolder":"--ds-chart-yellow-bolder","color.chart.yellow.bolder.hovered":"--ds-chart-yellow-bolder-hovered","color.chart.yellow.boldest":"--ds-chart-yellow-boldest","color.chart.yellow.boldest.hovered":"--ds-chart-yellow-boldest-hovered","color.chart.green.bold":"--ds-chart-green-bold","color.chart.green.bold.hovered":"--ds-chart-green-bold-hovered","color.chart.green.bolder":"--ds-chart-green-bolder","color.chart.green.bolder.hovered":"--ds-chart-green-bolder-hovered","color.chart.green.boldest":"--ds-chart-green-boldest","color.chart.green.boldest.hovered":"--ds-chart-green-boldest-hovered","color.chart.teal.bold":"--ds-chart-teal-bold","color.chart.teal.bold.hovered":"--ds-chart-teal-bold-hovered","color.chart.teal.bolder":"--ds-chart-teal-bolder","color.chart.teal.bolder.hovered":"--ds-chart-teal-bolder-hovered","color.chart.teal.boldest":"--ds-chart-teal-boldest","color.chart.teal.boldest.hovered":"--ds-chart-teal-boldest-hovered","color.chart.blue.bold":"--ds-chart-blue-bold","color.chart.blue.bold.hovered":"--ds-chart-blue-bold-hovered","color.chart.blue.bolder":"--ds-chart-blue-bolder","color.chart.blue.bolder.hovered":"--ds-chart-blue-bolder-hovered","color.chart.blue.boldest":"--ds-chart-blue-boldest","color.chart.blue.boldest.hovered":"--ds-chart-blue-boldest-hovered","color.chart.purple.bold":"--ds-chart-purple-bold","color.chart.purple.bold.hovered":"--ds-chart-purple-bold-hovered","color.chart.purple.bolder":"--ds-chart-purple-bolder","color.chart.purple.bolder.hovered":"--ds-chart-purple-bolder-hovered","color.chart.purple.boldest":"--ds-chart-purple-boldest","color.chart.purple.boldest.hovered":"--ds-chart-purple-boldest-hovered","color.chart.magenta.bold":"--ds-chart-magenta-bold","color.chart.magenta.bold.hovered":"--ds-chart-magenta-bold-hovered","color.chart.magenta.bolder":"--ds-chart-magenta-bolder","color.chart.magenta.bolder.hovered":"--ds-chart-magenta-bolder-hovered","color.chart.magenta.boldest":"--ds-chart-magenta-boldest","color.chart.magenta.boldest.hovered":"--ds-chart-magenta-boldest-hovered","color.chart.gray.bold":"--ds-chart-gray-bold","color.chart.gray.bold.hovered":"--ds-chart-gray-bold-hovered","color.chart.gray.bolder":"--ds-chart-gray-bolder","color.chart.gray.bolder.hovered":"--ds-chart-gray-bolder-hovered","color.chart.gray.boldest":"--ds-chart-gray-boldest","color.chart.gray.boldest.hovered":"--ds-chart-gray-boldest-hovered","color.chart.brand":"--ds-chart-brand","color.chart.brand.hovered":"--ds-chart-brand-hovered","color.chart.danger":"--ds-chart-danger","color.chart.danger.hovered":"--ds-chart-danger-hovered","color.chart.danger.bold":"--ds-chart-danger-bold","color.chart.danger.bold.hovered":"--ds-chart-danger-bold-hovered","color.chart.warning":"--ds-chart-warning","color.chart.warning.hovered":"--ds-chart-warning-hovered","color.chart.warning.bold":"--ds-chart-warning-bold","color.chart.warning.bold.hovered":"--ds-chart-warning-bold-hovered","color.chart.success":"--ds-chart-success","color.chart.success.hovered":"--ds-chart-success-hovered","color.chart.success.bold":"--ds-chart-success-bold","color.chart.success.bold.hovered":"--ds-chart-success-bold-hovered","color.chart.discovery":"--ds-chart-discovery","color.chart.discovery.hovered":"--ds-chart-discovery-hovered","color.chart.discovery.bold":"--ds-chart-discovery-bold","color.chart.discovery.bold.hovered":"--ds-chart-discovery-bold-hovered","color.chart.information":"--ds-chart-information","color.chart.information.hovered":"--ds-chart-information-hovered","color.chart.information.bold":"--ds-chart-information-bold","color.chart.information.bold.hovered":"--ds-chart-information-bold-hovered","elevation.surface":"--ds-surface","elevation.surface.hovered":"--ds-surface-hovered","elevation.surface.pressed":"--ds-surface-pressed","elevation.surface.overlay":"--ds-surface-overlay","elevation.surface.overlay.hovered":"--ds-surface-overlay-hovered","elevation.surface.overlay.pressed":"--ds-surface-overlay-pressed","elevation.surface.raised":"--ds-surface-raised","elevation.surface.raised.hovered":"--ds-surface-raised-hovered","elevation.surface.raised.pressed":"--ds-surface-raised-pressed","elevation.surface.sunken":"--ds-surface-sunken","elevation.shadow.overflow":"--ds-shadow-overflow","elevation.shadow.overflow.perimeter":"--ds-shadow-overflow-perimeter","elevation.shadow.overflow.spread":"--ds-shadow-overflow-spread","elevation.shadow.overlay":"--ds-shadow-overlay","elevation.shadow.raised":"--ds-shadow-raised","opacity.disabled":"--ds-opacity-disabled","opacity.loading":"--ds-opacity-loading","utility.UNSAFE.textTransformUppercase":"--ds-UNSAFE-textTransformUppercase","utility.UNSAFE.transparent":"--ds-UNSAFE-transparent","utility.elevation.surface.current":"--ds-elevation-surface-current","border.radius.050":"--ds-border-radius-050","border.radius":"--ds-border-radius","border.radius.100":"--ds-border-radius-100","border.radius.200":"--ds-border-radius-200","border.radius.300":"--ds-border-radius-300","border.radius.400":"--ds-border-radius-400","border.radius.circle":"--ds-border-radius-circle","border.width":"--ds-border-width","border.width.0":"--ds-border-width-0","border.width.indicator":"--ds-border-width-indicator","border.width.outline":"--ds-border-width-outline","space.0":"--ds-space-0","space.025":"--ds-space-025","space.050":"--ds-space-050","space.075":"--ds-space-075","space.100":"--ds-space-100","space.150":"--ds-space-150","space.200":"--ds-space-200","space.250":"--ds-space-250","space.300":"--ds-space-300","space.400":"--ds-space-400","space.500":"--ds-space-500","space.600":"--ds-space-600","space.800":"--ds-space-800","space.1000":"--ds-space-1000","space.negative.025":"--ds-space-negative-025","space.negative.050":"--ds-space-negative-050","space.negative.075":"--ds-space-negative-075","space.negative.100":"--ds-space-negative-100","space.negative.150":"--ds-space-negative-150","space.negative.200":"--ds-space-negative-200","space.negative.250":"--ds-space-negative-250","space.negative.300":"--ds-space-negative-300","space.negative.400":"--ds-space-negative-400","font.heading.xxlarge":"--ds-font-heading-xxlarge","font.heading.xlarge":"--ds-font-heading-xlarge","font.heading.large":"--ds-font-heading-large","font.heading.medium":"--ds-font-heading-medium","font.heading.small":"--ds-font-heading-small","font.heading.xsmall":"--ds-font-heading-xsmall","font.heading.xxsmall":"--ds-font-heading-xxsmall","font.body.large":"--ds-font-body-large","font.body":"--ds-font-body","font.body.small":"--ds-font-body-small","font.body.UNSAFE_small":"--ds-font-body-UNSAFE_small","font.code":"--ds-font-code","font.weight.regular":"--ds-font-weight-regular","font.weight.medium":"--ds-font-weight-medium","font.weight.semibold":"--ds-font-weight-semibold","font.weight.bold":"--ds-font-weight-bold","font.family.heading":"--ds-font-family-heading","font.family.body":"--ds-font-family-body","font.family.code":"--ds-font-family-code","font.family.brand.heading":"--ds-font-family-brand-heading","font.family.brand.body":"--ds-font-family-brand-body"};var e7="data-theme",e9="data-color-mode",te="data-contrast-mode",tt="data-custom-theme",tr="--".concat("ds","-token-not-found"),tn="--".concat("ds","-elevation-surface-current");let to=function(e,t){var r=e8[e];return r||(r=tr),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")},ta=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e8[e],n=t;return"u"<typeof window?n:n=(n=window.getComputedStyle(document.documentElement).getPropertyValue(r).trim())||t};var ti=function(e){return/^#[0-9A-F]{6}$/i.test(e)},ts=["light","dark","spacing","typography","shape"],tl="UNSAFE_themeOptions",tc=function(e){return void 0!==ts.find(function(t){return t===e})},tu=function(e){return void 0!==eQ.find(function(t){return t===e})},td=function(e){return["light","dark","auto"].includes(e)},th=function(e){return e.split(" ").map(function(e){return e.split(/:([^]*)/)}).reduce(function(e,t){var r=m(t,2),n=r[0],o=r[1];if("colorMode"===n&&td(o)&&(e[n]=o),tc(n)&&tu(o)&&(e[n]=o),n===tl)try{e[tl]=JSON.parse(o)}catch(e){Error("Invalid custom theme string")}return e},{})},tg=function(e){return Object.entries(e).reduce(function(e,t){var r=m(t,2),n=r[0],o=r[1];return"colorMode"===n&&"string"==typeof o&&td(o)||n===tl&&"object"===d(o)||tc(n)&&"string"==typeof o&&tu(o)?e+"".concat(e?" ":"")+"".concat(n,":").concat("object"===d(o)?JSON.stringify(o):o):e},"")},tp=function(e){for(var t=0,r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return new Uint32Array([t])[0].toString(36)};function tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tb(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tv=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?eY:t,n=e.dark,o=e.light,a=e.contrastMode,i=void 0===a?eZ:a,s=e.shape,l=e.spacing,c=e.typography,u=void 0===c?e3():c,d=e.UNSAFE_themeOptions,h=void 0===d?e6:d,g=b(b({},e7,tg({dark:void 0===n?e0:n,light:void 0===o?e1:o,shape:void 0===s?e2:s,spacing:void 0===l?e5:l,typography:u})),e9,"auto"===r?"light":r);if(eW("platform_increased-contrast-themes")&&(g=tf(tf({},g),{},b({},te,"auto"===i?"no-preference":i))),h&&ti(h.brandColor)){var p=tp(JSON.stringify(h));g[tt]=p}return g};var ty=r(1833);let tm={light:()=>()=>{},"light-future":()=>()=>{},dark:()=>()=>{},"dark-future":()=>()=>{},"legacy-light":()=>()=>{},"legacy-dark":()=>()=>{},spacing:()=>()=>{},shape:()=>()=>{},"typography-adg3":()=>()=>{},"typography-modernized":()=>()=>{},"typography-refreshed":()=>()=>{}};var t_=(e=k(O().mark(function e(t){var r,n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.head.querySelector("style[".concat(e7,'="').concat(t,'"]:not([').concat(tt,"])"))){e.next=2;break}return e.abrupt("return");case 2:if(t){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,tk(t);case 6:r=e.sent,(n=document.createElement("style")).textContent=r,n.dataset.theme=t,document.head.appendChild(n);case 11:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),tk=(t=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return("light"===t||"dark"===t)&&eW("platform-component-visual-refresh")&&(t+="-brand-refresh"),e.next=3,tm[t]();case 3:return r=e.sent.default,e.abrupt("return",r);case 6:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),tw="(prefers-color-scheme: dark)",tO="(prefers-contrast: more)";function tE(e){document.documentElement.setAttribute(e9,e.matches?"dark":"light")}var tx="u">typeof window&&"matchMedia"in window&&window.matchMedia(tw),tS=new(p(function e(){u(this,e),b(this,"unbindThemeChangeListener",null)},[{key:"getColorMode",value:function(){return tx&&null!=tx&&tx.matches?"dark":"light"}},{key:"bind",value:function(){tx&&null===this.unbindThemeChangeListener&&(this.unbindThemeChangeListener=(0,ty.bind)(tx,{type:"change",listener:tE}))}},{key:"unbind",value:function(){this.unbindThemeChangeListener&&(this.unbindThemeChangeListener(),this.unbindThemeChangeListener=null)}}]));function tC(e){document.documentElement.setAttribute(te,e.matches?"more":"no-preference")}var tD="u">typeof window&&"matchMedia"in window&&window.matchMedia(tO),tj=new(p(function e(){u(this,e),b(this,"unbindContrastChangeListener",null)},[{key:"getContrastMode",value:function(){return tD&&null!=tD&&tD.matches?"more":"no-preference"}},{key:"bind",value:function(){tD&&null===this.unbindContrastChangeListener&&(this.unbindContrastChangeListener=(0,ty.bind)(tD,{type:"change",listener:tC}))}},{key:"unbind",value:function(){this.unbindContrastChangeListener&&(this.unbindContrastChangeListener(),this.unbindContrastChangeListener=null)}}]));function tP(e){return"auto"===e.colorMode?(e.colorMode=tS.getColorMode(),tS.bind()):tS.unbind(),eW("platform_increased-contrast-themes")&&("auto"===e.contrastMode?(e.contrastMode=tj.getContrastMode(),tj.bind()):tj.unbind()),Object.entries(tv(e)).forEach(function(e){var t=m(e,2),r=t[0],n=t[1];document.documentElement.setAttribute(r,n)}),function(){tS.unbind(),eW("platform_increased-contrast-themes")&&tj.unbind()}}function tI(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tA(e){var t;return null==(t=Object.entries(e4).find(function(t){return m(t,2)[1].increasesContrastFor===e}))?void 0:t[1].id}var tU=function(e){var t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=[o,n],c=[];if("auto"===t)"no-preference"!==r&&eW("platform_increased-contrast-themes")&&l.forEach(function(e){var t=tA(e);t&&l.push(t)}),c.push.apply(c,l);else if(c.push(e[t]),"no-preference"!==r&&eW("platform_increased-contrast-themes")){var u=tA(e[t]);u&&c.push(u)}return[a,i,s].forEach(function(e){e&&c.push(e)}),tI(new Set(c))},tM=function(e){return tI(new Set([]))};function tT(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let tL=(o=k(O().mark(function e(){var t,r,n,o,a,i,s,l,c,u,d,h,g,p,b,f,v,y,m,_,w,E,x,S,C,D,j,P=arguments;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0===(r=(t=P.length>0&&void 0!==P[0]?P[0]:{}).colorMode)?eY:r,a=void 0===(o=t.contrastMode)?eZ:o,s=void 0===(i=t.dark)?e0:i,c=void 0===(l=t.light)?e1:l,d=void 0===(u=t.shape)?e2:u,g=void 0===(h=t.spacing)?e5:h,b=void 0===(p=t.typography)?e3():p,v=void 0===(f=t.UNSAFE_themeOptions)?e6:f,y=P.length>1?P[1]:void 0,eW("platform_increased-contrast-themes")||("light-increased-contrast"===c&&(c="light"),"dark-increased-contrast"===s&&(s="dark")),_=tU(m={colorMode:n,contrastMode:a,dark:s,light:c,shape:d,spacing:g,typography:b,UNSAFE_themeOptions:y?void 0:v}),w=y||t_,E=_.map(function(){var e=k(O().mark(function e(t){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),!y&&v&&ti(null==v?void 0:v.brandColor)&&(x=function(e,t){var r=tp(JSON.stringify(e)),n=[];return("auto"===t?["light","dark"]:[t]).forEach(function(e){var t=document.head.querySelector("style[".concat(tt,'="').concat(r,'"][').concat(e7,'="').concat(e,'"]'));t?document.head.appendChild(t):n.push(e)}),n}(v,n||eY)).length>0&&E.push(k(O().mark(function e(){return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 2:(0,e.sent.loadAndAppendCustomThemeCss)({colorMode:2===x.length?"auto":x[0],UNSAFE_themeOptions:v});case 5:case"end":return e.stop()}},e)}))()),e.next=10,Promise.all(E);case 10:S=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return tT(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?tT(e,void 0):void 0}}(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(i)throw o}}}}(tM(m)),e.prev=12,S.s();case 14:if((C=S.n()).done){e.next=20;break}return D=C.value,e.next=18,w(D);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),S.e(e.t0);case 25:return e.prev=25,S.f(),e.finish(25);case 28:return j=tP(m),e.abrupt("return",j);case 30:case"end":return e.stop()}},e,null,[[12,22,25,28]])})),function(){return o.apply(this,arguments)}),tF=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=void 0===s?e3():s,c=e.UNSAFE_themeOptions,u=arguments.length>1?arguments[1]:void 0,d={colorMode:void 0===t?eY:t,contrastMode:void 0===r?eZ:r,dark:void 0===n?e0:n,light:void 0===o?e1:o,shape:void 0===a?e2:a,spacing:void 0===i?e5:i,typography:l,UNSAFE_themeOptions:u?void 0:void 0===c?e6:c},h=tU(d);return u&&h.map(function(e){return u(e)}),tP(d)},tR=(a=k(O().mark(function e(t){var r,n,o,a;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],"all"===t?(r=eX,eW("platform_increased-contrast-themes")||(r=r.filter(function(e){return"light-increased-contrast"!==e&&"dark-increased-contrast"!==e})),r=r.filter(function(e){return"light-brand-refresh"!==e&&"dark-brand-refresh"!==e})):(r=tU(o={colorMode:(null==t?void 0:t.colorMode)||eY,contrastMode:(null==t?void 0:t.contrastMode)||eZ,dark:(null==t?void 0:t.dark)||e0,light:(null==t?void 0:t.light)||e1,shape:(null==t?void 0:t.shape)||e2,spacing:(null==t?void 0:t.spacing)||e5,typography:(null==t?void 0:t.typography)||e3()}),n=tM(o)),e.next=4,Promise.all([].concat(tI([].concat(tI(r),tI(n)).map(function(){var e=k(O().mark(function e(t){var r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,tk(t);case 3:return r=e.sent,e.abrupt("return",{id:t,attrs:{"data-theme":t},css:r});case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",void 0);case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}())),[k(O().mark(function e(){var r,n,o;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!("all"!==t&&null!=t&&t.UNSAFE_themeOptions&&ti(null==t||null==(r=t.UNSAFE_themeOptions)?void 0:r.brandColor))){e.next=15;break}return e.prev=1,e.next=4,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 4:return n=e.sent.getCustomThemeStyles,e.next=8,n({colorMode:(null==t?void 0:t.colorMode)||eY,UNSAFE_themeOptions:null==t?void 0:t.UNSAFE_themeOptions});case 8:return o=e.sent,e.abrupt("return",o);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}},e,null,[[1,12]])}))()]));case 4:return a=e.sent,e.abrupt("return",a.flat().filter(function(e){return void 0!==e}));case 6:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),tN=function(e,t){if("auto"===e||"auto"===t){var r="auto"===e?"\n try {\n const darkModeMql = window.matchMedia('".concat(tw,"');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat(e9,"', colorMode);\n } catch (e) {}"):"",n="auto"===t&&eW("platform_increased-contrast-themes")?"\n try {\n const contrastModeMql = window.matchMedia('".concat(tO,"');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(te,"', contrastMode);\n } catch (e) {}"):"";return"(() => {".concat(r).concat(n,"})()")}};var tV=r(7861),tK=r.n(tV);function tz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tz(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tB=function(){if("u"<typeof document)return{};var e=document.documentElement,t=e.getAttribute(e9)||"";return tG(tG({},th(e.getAttribute(e7)||"")),void 0!==eH.find(function(e){return e===t})&&{colorMode:t})};var t$=function(){function e(t){u(this,e),b(this,"legacyObserver",null),this.callback=t,e.callbacks.add(t)}return p(e,[{key:"observe",value:function(){e.observer||(e.observer=new MutationObserver(function(){var t=tB();e.callbacks.forEach(function(e){return e(t)})}),e.observer.observe(document.documentElement,{attributeFilter:[e7,e9]}))}},{key:"disconnect",value:function(){this.callback&&e.callbacks.delete(this.callback),0===e.callbacks.size&&e.observer&&(e.observer.disconnect(),e.observer=null)}}])}();b(t$,"observer",null),b(t$,"callbacks",new Set);let tJ=document.documentElement,tq="--aui-theme-testing-color",tW="color(srgb 1 0.75 0.8 / 0.6)",tH="aui-theme-testing",tQ=`html.${tH}[data-color-mode][data-theme*="light:"], html.${tH}[data-color-mode][data-theme*="dark:"]`;function tX(e=tW){document.body.style.setProperty(tq,e)}function tY(){return tJ.matches(tQ)}function tZ(){tY()||tJ.classList.add(tH)}function t0(){tY()&&tJ.classList.remove(tH)}function t1(e){null==e&&(e=!tY()),e?tZ():t0()}!function(){if(document.querySelector(tQ))return;let e=[`${tq}: ${tW};`,...Object.values(e8).map(e=>` ${e}: var(${tq});`)],t=`/* This theme is autogenerated using AJS.DesignTokens.generateTestingTheme(). */
|
|
2
2
|
${tQ} {
|
|
3
3
|
${e.join("\n")}
|
|
4
|
-
}`,r=document.createElement("style");r.id="aui-design-tokens-testing-theme",r.textContent=t;let n=document.querySelector("head");n&&n.appendChild(r)}(),document.documentElement.hasAttribute("data-color-mode-auto")&&tL({colorMode:"auto"});let{setGlobalTheme:t2,token:
|
|
4
|
+
}`,r=document.createElement("style");r.id="aui-design-tokens-testing-theme",r.textContent=t;let n=document.querySelector("head");n&&n.appendChild(r)}(),document.documentElement.hasAttribute("data-color-mode-auto")&&tL({colorMode:"auto"});let{setGlobalTheme:t2,token:t5,getTokenValue:t3,ThemeMutationObserver:t6}=l,{setTestingThemeColor:t4,enableTestingTheme:t8,disableTestingTheme:t7,toggleTestingTheme:t9}=c;"object"!=typeof window.AJS&&(window.AJS={}),window.AJS.DesignTokens={setGlobalTheme:t2,token:t5,getTokenValue:t3,ThemeMutationObserver:t6,toggleTestingTheme:t9,enableTestingTheme:t8,disableTestingTheme:t7,setTestingThemeColor:t4}})(),n})());
|
|
5
5
|
//# sourceMappingURL=aui-prototyping-design-tokens-api-full.js.map
|