@atlassian/aui 10.0.2 → 10.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,11 @@
1
1
  /*!!
2
2
  * @atlassian/aui - Atlassian User Interface library
3
- * @version v10.0.2
3
+ * @version v10.0.4
4
4
  * @link https://aui.atlassian.com
5
5
  * @license Apache-2.0
6
6
  * @author Atlassian Pty Ltd.
7
7
  */
8
- !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},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var o=r(1634);function i(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,r){var s=t.map((function(t){var s=function(e,t){return null==t?e:n(n({},e),{options:n(n({},i(t)),i(e.options))})}(t,r);return(0,o.bind)(e,s)}));return function(){s.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}})},7553:(e,t,r)=>{var n;
9
- /*!
10
- * EventEmitter2
11
- * https://github.com/hij1nx/EventEmitter2
12
- *
13
- * Copyright (c) 2013 hij1nx
14
- * Licensed under the MIT license.
15
- */!function(o){var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=10;function a(){this._events={},this._conf&&l.call(this,this._conf)}function l(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=e.maxListeners!==o?e.maxListeners:s,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=s}function c(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var n=new Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,process.emitWarning(n)}else console.error(r),console.trace&&console.trace()}function d(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,l.call(this,e)}function u(e,t,r,n){if(!r)return[];var o,i,s,a,l,c,d,h=[],g=t.length,p=t[n],f=t[n+1];if(n===g&&r._listeners){if("function"==typeof r._listeners)return e&&e.push(r._listeners),[r];for(o=0,i=r._listeners.length;o<i;o++)e&&e.push(r._listeners[o]);return[r]}if("*"===p||"**"===p||r[p]){if("*"===p){for(s in r)"_listeners"!==s&&r.hasOwnProperty(s)&&(h=h.concat(u(e,t,r[s],n+1)));return h}if("**"===p){for(s in(d=n+1===g||n+2===g&&"*"===f)&&r._listeners&&(h=h.concat(u(e,t,r,g))),r)"_listeners"!==s&&r.hasOwnProperty(s)&&("*"===s||"**"===s?(r[s]._listeners&&!d&&(h=h.concat(u(e,t,r[s],g))),h=h.concat(u(e,t,r[s],n))):h=s===f?h.concat(u(e,t,r[s],n+2)):h.concat(u(e,t,r[s],n)));return h}h=h.concat(u(e,t,r[p],n+1))}if((a=r["*"])&&u(e,t,a,n+1),l=r["**"])if(n<g)for(s in l._listeners&&u(e,t,l,g),l)"_listeners"!==s&&l.hasOwnProperty(s)&&(s===f?u(e,t,l[s],n+2):s===p?u(e,t,l[s],n+1):((c={})[s]=l[s],u(e,t,{"**":c},n+1)));else l._listeners?u(e,t,l,g):l["*"]&&l["*"]._listeners&&u(e,t,l["*"],g);return h}function h(e,t){for(var r=0,n=(e="string"==typeof e?e.split(this.delimiter):e.slice()).length;r+1<n;r++)if("**"===e[r]&&"**"===e[r+1])return;for(var i=this.listenerTree,s=e.shift();s!==o;){if(i[s]||(i[s]={}),i=i[s],0===e.length)return i._listeners?("function"==typeof i._listeners&&(i._listeners=[i._listeners]),i._listeners.push(t),!i._listeners.warned&&this._maxListeners>0&&i._listeners.length>this._maxListeners&&(i._listeners.warned=!0,c.call(this,i._listeners.length,s))):i._listeners=t,!0;s=e.shift()}return!0}d.EventEmitter2=d,d.prototype.delimiter=".",d.prototype.setMaxListeners=function(e){e!==o&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},d.prototype.event="",d.prototype.once=function(e,t){return this._once(e,t,!1)},d.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},d.prototype._once=function(e,t,r){return this._many(e,1,t,r),this},d.prototype.many=function(e,t,r){return this._many(e,t,r,!1)},d.prototype.prependMany=function(e,t,r){return this._many(e,t,r,!0)},d.prototype._many=function(e,t,r,n){var o=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function i(){return 0==--t&&o.off(e,i),r.apply(this,arguments)}return i._origin=r,this._on(e,i,n),o},d.prototype.emit=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,r,n,o,i,s=arguments.length;if(this._all&&this._all.length){if(i=this._all.slice(),s>3)for(t=new Array(s),o=0;o<s;o++)t[o]=arguments[o];for(n=0,r=i.length;n<r;n++)switch(this.event=e,s){case 1:i[n].call(this,e);break;case 2:i[n].call(this,e,arguments[1]);break;case 3:i[n].call(this,e,arguments[1],arguments[2]);break;default:i[n].apply(this,t)}}if(this.wildcard){i=[];var l="string"==typeof e?e.split(this.delimiter):e.slice();u.call(this,i,l,this.listenerTree,0)}else{if("function"==typeof(i=this._events[e])){switch(this.event=e,s){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(s-1),o=1;o<s;o++)t[o-1]=arguments[o];i.apply(this,t)}return!0}i&&(i=i.slice())}if(i&&i.length){if(s>3)for(t=new Array(s-1),o=1;o<s;o++)t[o-1]=arguments[o];for(n=0,r=i.length;n<r;n++)switch(this.event=e,s){case 1:i[n].call(this);break;case 2:i[n].call(this,arguments[1]);break;case 3:i[n].call(this,arguments[1],arguments[2]);break;default:i[n].apply(this,t)}return!0}if(!this._all&&"error"===e)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},d.prototype.emitAsync=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return Promise.resolve([!1]);var t,r,n,o,i,s=[],l=arguments.length;if(this._all){if(l>3)for(t=new Array(l),o=1;o<l;o++)t[o]=arguments[o];for(n=0,r=this._all.length;n<r;n++)switch(this.event=e,l){case 1:s.push(this._all[n].call(this,e));break;case 2:s.push(this._all[n].call(this,e,arguments[1]));break;case 3:s.push(this._all[n].call(this,e,arguments[1],arguments[2]));break;default:s.push(this._all[n].apply(this,t))}}if(this.wildcard){i=[];var c="string"==typeof e?e.split(this.delimiter):e.slice();u.call(this,i,c,this.listenerTree,0)}else i=this._events[e];if("function"==typeof i)switch(this.event=e,l){case 1:s.push(i.call(this));break;case 2:s.push(i.call(this,arguments[1]));break;case 3:s.push(i.call(this,arguments[1],arguments[2]));break;default:for(t=new Array(l-1),o=1;o<l;o++)t[o-1]=arguments[o];s.push(i.apply(this,t))}else if(i&&i.length){if(i=i.slice(),l>3)for(t=new Array(l-1),o=1;o<l;o++)t[o-1]=arguments[o];for(n=0,r=i.length;n<r;n++)switch(this.event=e,l){case 1:s.push(i[n].call(this));break;case 2:s.push(i[n].call(this,arguments[1]));break;case 3:s.push(i[n].call(this,arguments[1],arguments[2]));break;default:s.push(i[n].apply(this,t))}}else if(!this._all&&"error"===e)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(s)},d.prototype.on=function(e,t){return this._on(e,t,!1)},d.prototype.prependListener=function(e,t){return this._on(e,t,!0)},d.prototype.onAny=function(e){return this._onAny(e,!1)},d.prototype.prependAny=function(e){return this._onAny(e,!0)},d.prototype.addListener=d.prototype.on,d.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},d.prototype._on=function(e,t,r){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");return this._events||a.call(this),this.emit("newListener",e,t),this.wildcard?(h.call(this,e,t),this):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,c.call(this,this._events[e].length,e))):this._events[e]=t,this)},d.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,n=[];if(this.wildcard){var s="string"==typeof e?e.split(this.delimiter):e.slice();n=u.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;r=this._events[e],n.push({_listeners:r})}for(var a=0;a<n.length;a++){var l=n[a];if(r=l._listeners,i(r)){for(var c=-1,d=0,h=r.length;d<h;d++)if(r[d]===t||r[d].listener&&r[d].listener===t||r[d]._origin&&r[d]._origin===t){c=d;break}if(c<0)continue;return this.wildcard?l._listeners.splice(c,1):this._events[e].splice(c,1),0===r.length&&(this.wildcard?delete l._listeners:delete this._events[e]),this.emit("removeListener",e,t),this}(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)&&(this.wildcard?delete l._listeners:delete this._events[e],this.emit("removeListener",e,t))}return function e(t){if(t!==o){var r=Object.keys(t);for(var n in r){var i=r[n],s=t[i];s instanceof Function||"object"!=typeof s||null===s||(Object.keys(s).length>0&&e(t[i]),0===Object.keys(s).length&&delete t[i])}}}(this.listenerTree),this},d.prototype.offAny=function(e){var t,r=0,n=0;if(e&&this._all&&this._all.length>0){for(r=0,n=(t=this._all).length;r<n;r++)if(e===t[r])return t.splice(r,1),this.emit("removeListenerAny",e),this}else{for(r=0,n=(t=this._all).length;r<n;r++)this.emit("removeListenerAny",t[r]);this._all=[]}return this},d.prototype.removeListener=d.prototype.off,d.prototype.removeAllListeners=function(e){if(0===arguments.length)return!this._events||a.call(this),this;if(this.wildcard)for(var t="string"==typeof e?e.split(this.delimiter):e.slice(),r=u.call(this,null,t,this.listenerTree,0),n=0;n<r.length;n++){r[n]._listeners=null}else this._events&&(this._events[e]=null);return this},d.prototype.listeners=function(e){if(this.wildcard){var t=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return u.call(this,t,r,this.listenerTree,0),t}return this._events||a.call(this),this._events[e]||(this._events[e]=[]),i(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},d.prototype.eventNames=function(){return Object.keys(this._events)},d.prototype.listenerCount=function(e){return this.listeners(e).length},d.prototype.listenersAny=function(){return this._all?this._all:[]},(n=function(){return d}.call(t,r,t,e))===o||(e.exports=n)}()},6039:()=>{},9541:(e,t,r)=>{var n=r(998).default;function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",d=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new D(n||[]);return s(i,"_invoke",{value:O(e,r,a)}),i}function g(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p={};function f(){}function v(){}function b(){}var y={};u(y,l,(function(){return this}));var m=Object.getPrototypeOf,_=m&&m(m(j([])));_&&_!==r&&i.call(_,l)&&(y=_);var k=b.prototype=f.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,s,a,l){var c=g(e[o],e,s);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==n(u)&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(u).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,l)}))}l(c.arg)}var o;s(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function O(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=g(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function S(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=g(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return v.prototype=b,s(k,"constructor",{value:b,configurable:!0}),s(b,"constructor",{value:v,configurable:!0}),v.displayName=u(b,d,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,d,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},w(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var s=new E(h(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(k),u(k,d,"Generator"),u(k,l,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return s.type="throw",s.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=o,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,i;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;const s=r(2132);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:u}catch(e){return u}};t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e];t._getInstance=e=>{const r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&s.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)};const a="__STATSIG__",l="undefined"!=typeof window?window:{},c=void 0!==r.g?r.g:{},d="undefined"!=typeof globalThis?globalThis:{},u=null!==(i=null!==(o=null!==(n=l[a])&&void 0!==n?n:c[a])&&void 0!==o?o:d[a])&&void 0!==i?i:{instance:t._getInstance};l[a]=u,c[a]=u,d[a]=u},981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;const n=r(8210);function o(e,t,r){var o;if(r)return r(e,t);const i=t&&t.customIDs?t.customIDs:{},s=[`uid:${null!==(o=null==t?void 0:t.userID)&&void 0!==o?o:""}`,`cids:${Object.keys(i).sort(((e,t)=>e.localeCompare(t))).map((e=>`${e}-${i[e]}`)).join(",")}`,`k:${e}`];return(0,n._DJB2)(s.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:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;const o=r(2132),i=r(6286),s=r(4830),a=r(6346),l=r(1829);function c(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,s._getFullUserHash)(n)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new d}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,s._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n)return n;const o=this._loadFromCache(r);return o?(this._inMemoryCache.add(r,o),this._inMemoryCache.get(r,t)):null}setData(e,t){const r=t&&(0,s._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,c("Bootstrap",e,null,r))}_getDataAsyncImpl(e,t,r){return n(this,void 0,void 0,(function*(){a.Storage.isReady()||(yield a.Storage.isReadyResolver());const n=null!=e?e:this.getDataSync(t),i=[this._fetchAndPrepFromNetwork(n,t,r)];return(null==r?void 0:r.timeoutMs)&&i.push(new Promise((e=>setTimeout(e,r.timeoutMs))).then((()=>(o.Log.debug("Fetching latest value timed out"),null)))),yield Promise.race(i)}))}_prefetchDataImpl(e,t){return n(this,void 0,void 0,(function*(){const r=e&&(0,s._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"}))}))}_fetchAndPrepFromNetwork(e,t,r){var s;return n(this,void 0,void 0,(function*(){const n=null!==(s=null==e?void 0:e.data)&&void 0!==s?s:null,a=null!=e&&this._isCachedResultValidFor204(e,t),d=yield this._fetchFromNetwork(n,t,r,a);if(!d)return o.Log.debug("No response returned for latest value"),null;const u=(0,l._typedJsonParse)(d,"has_updates","Response"),h=this._getSdkKey(),g=i.StableID.get(h);let p=null;if(!0===(null==u?void 0:u.has_updates))p=c("Network",d,g,t);else{if(!n||!1!==(null==u?void 0:u.has_updates))return null;p=c("NetworkNotModified",n,g,t)}const f=this._getCacheKey(t);return this._inMemoryCache.add(f,p),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;const r=null===(t=a.Storage.getItem)||void 0===t?void 0:t.call(a.Storage,e);if(null==r)return null;const n=(0,l._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){a.Storage.setItem(e,JSON.stringify(t)),this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e){var t;const r=null!==(t=(0,a._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==t?t:{};r[e]=Date.now();const n=u(r,10);n&&(delete r[n],a.Storage.removeItem(n)),(0,a._setObjectInStorage)(this._lastModifiedStoreKey,r)}},t._makeDataAdapterResult=c;class d{constructor(){this._data={}}get(e,t){var r;const n=this._data[e],i=null==n?void 0:n.stableID,s=null===(r=null==t?void 0:t.customIDs)||void 0===r?void 0:r.stableID;return s&&i&&s!==i?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t){const r=u(this._data,9);r&&delete this._data[r],this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function u(e,t){const r=Object.keys(e);return r.length<=t?null:r.reduce(((t,r)=>{const n=e[t],o=e[r];return"object"==typeof n&&"object"==typeof o?o.receivedAt<n.receivedAt?r:t:o<n?r:t}))}},2798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;const r=new Map,n="start",o="end",i="statsig::diagnostics";function s(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function a(e,t){var n;const o=null!==(n=r.get(e))&&void 0!==n?n:[];o.push(t),r.set(e,o)}function l(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{a(e,s({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{a(e,s({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,s(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,s(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{a(e,s({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,s(t,o,"initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:l(e,"code"),name:l(e,"name"),message:l(e,"message")}},_getDiagnosticsData(e,r,n,o){var i;return{success:!0===(null==e?void 0:e.ok),statusCode:null==e?void 0:e.status,sdkRegion:null===(i=null==e?void 0:e.headers)||void 0===i?void 0:i.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){const s=t.Diagnostics._getMarkers(n);if(null==s||s.length<=0)return-1;const a=s[s.length-1].timestamp-s[0].timestamp;t.Diagnostics._clearMarkers(n);const l=function(e,t){const r={eventName:i,user:e,value:null,metadata:t,time:Date.now()};return r}(e,{context:"initialize",markers:s.slice(),statsigOptions:o});return r.enqueue(l),a}}},6413:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;const 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"],i=200;t._fetchTxtRecords=function(e){return r(this,void 0,void 0,(function*(){const 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){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const r=yield t.arrayBuffer();return function(e){const t=e.findIndex(((t,r)=>r<i&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(e[r-1]))));if(-1===t){const e=new 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(r))}))}},6663:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1290:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;const o=r(2132),i=r(2442),s=r(2452);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const a="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function c(e){if(!e)return{};const t={};return Object.entries(e).forEach((([e,r])=>{switch(typeof r){case"number":case"bigint":case"boolean":t[String(e)]=r;break;case"string":r.length<50?t[String(e)]=r:t[String(e)]="set";break;case"object":"environment"===e?t.environment=r:"networkConfig"===e?t.networkConfig=r:t[String(e)]=null!=r?"set":"unset"}})),t}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){try{const t=e;(function(e){const t=new Set;let 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)})(t).forEach((r=>{const n=t[r];"$EB"in n||(t[r]=(...t)=>this._capture(r,(()=>n.apply(e,t))),t[r].$EB=!0)}))}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{const r=t();return r&&r instanceof Promise?r.catch((t=>this._onError(e,t))):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,d,u,h,g,p;const f=r||Error(a),v=f instanceof Error,b=v?f.name:"No Name",y=l(f);if(this._lastSeenError=y,this._seen.has(b))return;if(this._seen.add(b),null===(o=null===(n=this._options)||void 0===n?void 0:n.networkConfig)||void 0===o?void 0:o.preventAllNetworkTraffic)return void(null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:r,tag:e}));const m=i.SDKType._get(this._sdkKey),_=s.StatsigMetadataProvider.get(),k=v?f.stack:function(e){try{return JSON.stringify(e)}catch(e){return a}}(f),w=Object.assign({tag:e,exception:b,info:k,statsigOptions:c(this._options)},Object.assign(Object.assign({},_),{sdkType:m})),E=null!==(g=null===(h=null===(u=this._options)||void 0===u?void 0:u.networkConfig)||void 0===h?void 0:h.networkOverrideFunc)&&void 0!==g?g:fetch;yield E(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(m),"STATSIG-SDK-VERSION":String(_.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(w)}),null===(p=this._emitter)||void 0===p||p.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:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;const o=r(981),i=r(8210),s=r(2132),a=r(3582),l=r(6650),c=r(1217),d=r(5910),u=r(6346),h=r(5445),g=r(5873),p={},f="startup",v="gained_focus";class b{static _safeFlushAndForget(e){var t;null===(t=p[e])||void 0===t||t.flush().catch((()=>{}))}static _safeRetryFailedLogs(e){var t;null===(t=p[e])||void 0===t||t._retryFailedLogs(v)}constructor(e,t,r,n){var o,i;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)&&void 0!==o?o:!0===(null==n?void 0:n.disableLogging)?d.LoggingEnabledOption.disabled:d.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&s.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!==(i=null==n?void 0:n.loggingBufferMaxSize)&&void 0!==i?i:100;const l=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(a.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){this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&b._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;const r=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=r+1}reset(){this._lastExposureTimeMap={}}start(){var e;const t=(0,l._isServerEnv)();t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled)||(p[this._sdkKey]=this,t||(0,g._subscribeToVisiblityChanged)((e=>{"background"===e?b._safeFlushAndForget(this._sdkKey):"foreground"===e&&b._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;const e=this._queue;this._queue=[],yield this._sendEvents(e)}))}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout((()=>b._safeFlushAndForget(this._sdkKey)),200))}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;const r=e.user?e.user:{statsigEnvironment:void 0},n=(0,o._getUserStorageKey)(this._sdkKey,r),i=e.metadata?e.metadata:{},s=[e.eventName,n,i.gate,i.config,i.ruleID,i.allocatedExperiment,i.parameterName,String(i.isExplicitParameter),i.reason].join("|"),a=this._lastExposureTimeMap[s],d=Date.now();return!(a&&d-a<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[s]=d,!0)}_sendEvents(e){var t,r;return n(this,void 0,void 0,(function*(){if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{const n=(0,g._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(r=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===r?void 0:r.networkOverrideFunc);this._emitter({name:"pre_logs_flushed",events:e});return(n?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success?(this._emitter({name:"logs_flushed",events:e}),!0):(s.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1)}catch(e){return s.Log.warn("Failed to flush events."),!1}}))}_sendEventsViaPost(e){var t;return n(this,void 0,void 0,(function*(){const r=yield this._network.post(this._getRequestData(e)),n=null!==(t=null==r?void 0:r.code)&&void 0!==t?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:{[a.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();const t=this._getStorageKey();try{(0,u._setObjectInStorage)(t,e)}catch(e){s.Log.warn("Unable to save failed logs to storage")}}_retryFailedLogs(e){const t=this._getStorageKey();(()=>n(this,void 0,void 0,(function*(){u.Storage.isReady()||(yield u.Storage.isReadyResolver());const r=(0,u._getObjectFromStorage)(t);if(!r)return;e===f&&u.Storage.removeItem(t);(yield this._sendEvents(r))&&e===v&&u.Storage.removeItem(t)})))().catch((()=>{s.Log.warn("Failed to flush stored logs")}))}_getStorageKey(){return`statsig.failed_logs.${(0,i._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});const n=Object.assign(Object.assign({},e),t);s.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(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;const r=null!==(t=null===(e=this._options)||void 0===e?void 0:e.loggingIntervalMs)&&void 0!==t?t:1e4,n=setInterval((()=>{const e=p[this._sdkKey];e&&e._flushIntervalId===n?b._safeFlushAndForget(this._sdkKey):clearInterval(n)}),r);this._flushIntervalId=n}}t.EventLogger=b},8210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;const 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|=0}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;const o=Object.keys(e).sort(),i={};return o.forEach((o=>{const s=e[o];0!==r&&"object"===(0,n._typeOf)(s)?i[o]=(0,t._getSortedObject)(s,null!=r?r-1:r):i[o]=s})),i}},2849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;function r(e){return e.unshift("[Statsig]"),e}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",_layer:"l",_paramStore:"p"};const r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let i=`${e}|${t}`;if(!o)return i;for(const e of Object.keys(o)){if(n.has(e))return;r.has(e)?i+=`|${e}=true`:i+=`|${e}=${o[e]}`}return i}},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:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(8657);const o=r(8657),i=r(2798),s=r(2132),a=r(3582),l=r(2064),c=r(4175),d=r(2442),u=r(6650),h=r(4899),g=r(6286),p=r(3528),f=r(2452),v=r(5910),b=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"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!m(e))return!1;const 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*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)}))}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){var t,r,o,l;return n(this,void 0,void 0,(function*(){if(!m(e))return null;if(this._netConfig.preventAllNetworkTraffic)return null;const{method:c,body:d,retries:u,attempt:h}=e,g=e.urlConfig.endpoint;if(this._isRateLimited(g))return s.Log.warn(`Request to ${g} was blocked because you are making requests too frequently.`),null;const f=null!=h?h:1,v="undefined"!=typeof AbortController?new AbortController:null,_=setTimeout((()=>{null==v||v.abort(`Timeout of ${this._timeout}ms expired.`)}),this._timeout),w=this._getPopulatedURL(e);let E=null;const O=(0,b._isUnloading)();try{const r={method:c,body:d,headers:Object.assign({},e.headers),signal:null==v?void 0:v.signal,priority:e.priority,keepalive:O};!function(e,t){if(e.urlConfig.endpoint!==a.Endpoint._initialize)return;i.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(e,f);const n=this._leakyBucket[g];n&&(n.lastRequestTime=Date.now(),this._leakyBucket[g]=n);const o=null!==(t=this._netConfig.networkOverrideFunc)&&void 0!==t?t:fetch;if(E=yield o(w,r),clearTimeout(_),!E.ok){const e=yield E.text().catch((()=>"No Text")),t=new Error(`NetworkError: ${w} ${e}`);throw t.name="NetworkError",t}const s=yield E.text();return k(e,E,f,s),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:s,code:E.status}}catch(t){const i=function(e,t){if((null==e?void 0:e.signal.aborted)&&"string"==typeof e.signal.reason)return e.signal.reason;if("string"==typeof t)return t;if(t instanceof Error)return`${t.name}: ${t.message}`;return"Unknown Error"}(v,t),a=(null==(S=v)?void 0:S.signal.aborted)&&"string"==typeof S.signal.reason&&S.signal.reason.includes("Timeout")||!1;k(e,E,f,"",t);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,i,a))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!u||f>u||!y.has(null!==(r=null==E?void 0:E.status)&&void 0!==r?r:500)){null===(o=this._emitter)||void 0===o||o.call(this,{name:"error",error:t,tag:p.ErrorTag.NetworkError,requestArgs:e});const r=`A networking error occurred during ${c} request to ${w}.`;return s.Log.error(r,i,t),null===(l=this._errorBoundary)||void 0===l||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))))}))}(f),this._sendRequest(Object.assign(Object.assign({},e),{retries:u,attempt:f+1}))}var S}))}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=v.LogEventCompressionMode.Disabled),t||(t=v.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const r=Date.now(),n=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:r},o=r-n.lastRequestTime,i=Math.floor(.05*o);return n.count=Math.max(0,n.count-i),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;const r=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==a.Endpoint._initialize&&e.urlConfig.endpoint!==a.Endpoint._download_config_specs||(this._lastUsedInitUrl=r);const n=Object.assign({[a.NetworkParam.SdkKey]:e.sdkKey,[a.NetworkParam.SdkType]:d.SDKType._get(e.sdkKey),[a.NetworkParam.SdkVersion]:f.SDK_VERSION,[a.NetworkParam.Time]:String(Date.now()),[a.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;const r=(0,u._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)&&void 0!==t?t:{}),{[a.NetworkParam.StatsigEncoded]:"1"})}catch(t){s.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){var t;return n(this,void 0,void 0,(function*(){const r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,o._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case v.LogEventCompressionMode.Disabled:return!1;case v.LogEventCompressionMode.Enabled:return!(r&&!n);case v.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(r),o=new CompressionStream("gzip"),i=o.writable.getWriter();i.write(n).catch(s.Log.error),i.close().catch(s.Log.error);const l=o.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const u=c.reduce(((e,t)=>e+t.length),0),h=new Uint8Array(u);let g=0;for(const e of c)h.set(e,g),g+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[a.NetworkParam.IsGzipped]:"1"})}catch(t){s.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}}))}_getInternalRequestArgs(e,t){const 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}};const m=e=>!!e.sdkKey||(s.Log.warn("Unable to make request without an SDK key"),!1),_=(e,t)=>{const{sdkKey:r,fallbackUrl:n}=e,o=g.StableID.get(r),i=h.SessionID.get(r),s=d.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:o,sessionID:i,sdkType:s,fallbackUrl:n})}))};function k(e,t,r,n,o){e.urlConfig.endpoint===a.Endpoint._initialize&&i.Diagnostics._markInitNetworkReqEnd(e.sdkKey,i.Diagnostics._getDiagnosticsData(t,r,n,o))}},2064:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;const o=r(6413),i=r(8210),s=r(2132),a=r(6346),l=6048e5;function c(e,t){var r;const n=null!==(r=null==e?void 0:e.toLowerCase())&&void 0!==r?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function d(e){return`statsig.network_fallback.${(0,i._DJB2)(e)}`}function u(e,t){const r=d(e);t&&0!==Object.keys(t).length?a.Storage.setItem(r,JSON.stringify(t)):a.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?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r;const n=null===(r=this._fallbackInfo)||void 0===r?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+l,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){const t=d(e),r=a.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return s.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==r?r:{},this._fallbackInfo=o);const i=o[t.endpoint];return!i||Date.now()>(null!==(n=i.expiryTime)&&void 0!==n?n:0)||t.getChecksum()!==i.urlConfigChecksum?(delete o[t.endpoint],this._fallbackInfo=o,u(e,this._fallbackInfo),null):i.url?i.url:null}tryFetchUpdatedFallbackInfo(e,t,r,o){var i,s;return n(this,void 0,void 0,(function*(){try{if(!c(r,o))return!1;const n=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,s=this._pickNewFallbackUrl(null===(i=this._fallbackInfo)||void 0===i?void 0:i[t.endpoint],n);return!!s&&(this._updateFallbackInfoWithNewUrl(e,t,s),!0)}catch(e){return null===(s=this._errorBoundary)||void 0===s||s.logError("tryFetchUpdatedFallbackInfo",e),!1}}))}_updateFallbackInfoWithNewUrl(e,t,r){var n,o,i;const s={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+l,previous:[]},a=t.endpoint,c=null===(n=this._fallbackInfo)||void 0===n?void 0:n[a];c&&s.previous.push(...c.previous),s.previous.length>10&&(s.previous=[]);const d=null===(i=null===(o=this._fallbackInfo)||void 0===o?void 0:o[a])||void 0===i?void 0:i.url;null!=d&&s.previous.push(d),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[a]:s}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){var t;return n(this,void 0,void 0,(function*(){const r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;const n=[],i=yield(0,o._fetchTxtRecords)(null!==(t=this._networkOverrideFunc)&&void 0!==t?t:fetch),s=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(const t of i){if(!t.startsWith(e.endpointDnsKey+"="))continue;const r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${s}`)}}return n}))}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;const n=new Set(null!==(r=null==e?void 0:e.previous)&&void 0!==r?r:[]),o=null==e?void 0:e.url;let i=null;for(const e of t){const t=e.endsWith("/")?e.slice(0,-1):e;if(!n.has(e)&&t!==o){i=t;break}}return i}},t._isDomainFailure=c},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;const 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?void 0:n[t])&&void 0!==o&&o}}},2442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;const r={};let n;t.SDKType={_get:e=>{var t;return(null!==(t=r[e])&&void 0!==t?t:"js-mono")+(null!=n?n:"")},_setClientType(e,t){r[e]=t},_setBindingType(e){n&&"-react"!==n||(n="-"+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=()=>"undefined"!=typeof window?window:null;t._getDocumentSafe=()=>{var e;const r=(0,t._getWindowSafe)();return null!==(e=null==r?void 0:r.document)&&void 0!==e?e:null};t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;const e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||e};t._addWindowEventListenerSafe=(e,r)=>{const n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)};t._addDocumentEventListenerSafe=(e,r)=>{const 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?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}};t._getUnloadEvent=()=>{const e=(0,t._getWindowSafe)();if(!e)return"beforeunload";return"onpagehide"in e?"pagehide":"beforeunload"}},4899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const n=r(8657),o=r(981),i=r(2132),s=r(6346),a=r(2555),l=18e5,c=144e5,d={};function u(e,t){return setTimeout((()=>{var t;const r=null===(t=(0,n._getStatsigGlobal)())||void 0===t?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})}),t)}function h(e){return`statsig.session_id.${(0,o._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==d[e]&&(d[e]=function(e){let t=function(e){const t=h(e);return(0,s._getObjectFromStorage)(t)}(e);const r=Date.now();t||(t={sessionID:(0,a.getUUID)(),startTime:r,lastUpdate:r});return{data:t,sdkKey:e}}(e));return function(e){const t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>l}(r)||function({startTime:e}){return Date.now()-e>c}(r)){r.sessionID=(0,a.getUUID)(),r.startTime=t;const e=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){const r=h(t);try{(0,s._setObjectInStorage)(r,e)}catch(e){i.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);const o=t-r.startTime;return e.idleTimeoutID=u(n,l),e.ageTimeoutID=u(n,c-o),e}(d[e])},overrideInitialSessionID:(e,t)=>{d[t]=function(e,t){const r=Date.now();return{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t}}(e,t)}}},6286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StableID=void 0;const n=r(981),o=r(2132),i=r(6650),s=r(6346),a=r(2555),l={},c={},d={};function u(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function h(e,t){const r=u(t);try{(0,s._setObjectInStorage)(r,e)}catch(e){o.Log.warn("Failed to save StableID to storage")}}function g(e,t){if(!c[t]||!document)return;const 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=>{if(d[e])return null;if(null!=l[e])return l[e];let t=null;return t=function(e){if(!c[e]||null==(0,i._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const r of t){const[t,n]=r.trim().split("=");if(t===p(e))return decodeURIComponent(n)}return null}(e),null!=t?(l[e]=t,h(t,e),t):(t=function(e){const t=u(e);return(0,s._getObjectFromStorage)(t)}(e),null==t&&(t=(0,a.getUUID)()),h(t,e),g(t,e),l[e]=t,t)},setOverride:(e,t)=>{l[t]=e,h(e,t),g(e,t)},_setCookiesEnabled:(e,t)=>{c[e]=t},_setDisabled:(e,t)=>{d[e]=t}}},5939:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(8657);const o=r(8657),i=r(1290),s=r(638),a=r(2132),l=r(6375),c=r(6650),d=r(4899),u=r(6286),h=r(5910),g=r(6346);t.StatsigClientBase=class{constructor(e,t,r,n){var l,h,p,f;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const v=this.$emt.bind(this);null!=(null==n?void 0:n.logLevel)&&(a.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&g.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&d.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&g.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&u.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&u.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!==(l=null==n?void 0:n.overrideAdapter)&&void 0!==l?l:null,this._logger=new s.EventLogger(e,v,r,n),this._errorBoundary=new i.ErrorBoundary(e,n,v),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?void 0:h.loadFromStorage)||void 0===p?void 0:p.call(h))||void 0===f||f.catch((e=>this._errorBoundary.logError("OA::loadFromStorage",e))),this._primeReadyRipcord(),function(e,t){var r;if((0,c._isServerEnv)())return;const n=(0,o._getStatsigGlobal)(),i=null!==(r=n.instances)&&void 0!==r?r:{},s=t;null!=i[e]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");i[e]=s,n.firstInstance||(n.firstInstance=s);n.instances=i,__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,u.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]){const 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;const r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,r);a.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["*"])||void 0===t||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){!0!==(null==r?void 0:r.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(r,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);const 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;const r="statsig::config_exposure",n="statsig::gate_exposure",o="statsig::layer_exposure",i=(e,t,r,n,o)=>(r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:a(r,n),secondaryExposures:o,time:Date.now()});t._isExposureEvent=({eventName:e})=>e===n||e===r||e===o;function s(e,t){return e.map((e=>"string"==typeof e?(null!=t?t:{})[e]:e)).filter((e=>null!=e))}t._createGateExposure=(e,t,r)=>{var o,a,l;const c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(c.configVersion=t.__evaluation.version),i(n,e,t.details,c,s(null!==(l=null===(a=t.__evaluation)||void 0===a?void 0:a.secondary_exposures)&&void 0!==l?l:[],r))},t._mapExposures=s;t._createConfigExposure=(e,t,n)=>{var o,a,l,c;const d={config:t.name,ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(d.configVersion=t.__evaluation.version),null!=(null===(a=t.__evaluation)||void 0===a?void 0:a.passed)&&(d.rulePassed=String(t.__evaluation.passed)),i(r,e,t.details,d,s(null!==(c=null===(l=t.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],n))};t._createLayerParameterExposure=(e,t,r,n)=>{var a,l,c,d,u,h;const g=t.__evaluation,p=!0===(null===(a=null==g?void 0:g.explicit_parameters)||void 0===a?void 0:a.includes(r));let f="",v=null!==(l=null==g?void 0:g.undelegated_secondary_exposures)&&void 0!==l?l:[];p&&(f=null!==(c=g.allocated_experiment_name)&&void 0!==c?c:"",v=g.secondary_exposures);const b=null===(d=t.__evaluation)||void 0===d?void 0:d.parameter_rule_ids,y={config:t.name,parameterName:r,ruleID:null!==(u=null==b?void 0:b[r])&&void 0!==u?u:t.ruleID,allocatedExperiment:f,isExplicitParameter:String(p)};return null!=(null===(h=t.__evaluation)||void 0===h?void 0:h.version)&&(y.configVersion=t.__evaluation.version),i(o,e,t.details,y,s(v,n))};const a=(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.17.2";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;const n=r(2132),o=r(8062);function i(e,t,r,n){var o;return{name:e,details:t,ruleID:null!==(o=null==r?void 0:r.rule_id)&&void 0!==o?o:"",__evaluation:r,value:n}}function s(e,t,r){var n;const o=null!==(n=null==r?void 0:r.value)&&void 0!==n?n:{};return Object.assign(Object.assign({},i(e,t,r,o)),{get:a(e,null==r?void 0:r.value)})}function a(e,t,r){return(i,s)=>{var a;const l=null!==(a=null==t?void 0:t[i])&&void 0!==a?a:null;return null==l?null!=s?s:null:null==s||(0,o._isTypeMatch)(l,s)?(null==r||r(i),l):(n.Log.warn(`Parameter type mismatch. '${e}.${i}' was found to be type '${typeof l}' but fallback/return type is '${typeof s}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=s?s:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},i(e,t,r,!0===(null==r?void 0:r.value))),{idType:null!==(n=null==r?void 0:r.id_type)&&void 0!==n?n:null})},t._makeDynamicConfig=s,t._makeExperiment=function(e,t,r){var n;const o=s(e,t,r);return Object.assign(Object.assign({},o),{groupName:null!==(n=null==r?void 0:r.group_name)&&void 0!==n?n:null})},t._makeLayer=function(e,t,r,n){var o,s;return Object.assign(Object.assign({},i(e,t,r,void 0)),{get:a(e,null==r?void 0:r.value,n),groupName:null!==(o=null==r?void 0:r.group_name)&&void 0!==o?o:null,__value:null!==(s=null==r?void 0:r.value)&&void 0!==s?s:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:a(e.name,r,n)})},t._makeTypedGet=a},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,i)=>({duration:r,source:t,success:e,error:n,sourceUrl:o,warnings:i}),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;const n=r(8210),o=r(2132);t._normalizeUser=function(e,t,r){try{const 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;const n=r(2132),o=r(6650),i={},s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>i[e]?i[e]:null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]},getAllKeys:()=>Object.keys(i)};let a=null;try{const e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(a={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!=a?a:s,c=l;function d(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(s),null;if(e instanceof Error&&"QuotaExceededError"===e.name){const 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=>d((()=>c.getItem(e))),setItem:(e,t)=>d((()=>c.setItem(e,t))),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?s:l}},t._getObjectFromStorage=function(e){const 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;const n=r(2132);t._typedJsonParse=function(e,t,r){try{const 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){const r=e=>Array.isArray(e)?"array":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("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;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}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;const n=r(8210),o=r(3582),i={[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=i[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),n&&(this.fallbackUrls=n);const s=o.NetworkDefault[e];this.defaultUrl=`${s}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var e;const t=(null!==(e=this.fallbackUrls)&&void 0!==e?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;const n=r(6650),o="foreground",i="background",s=[];let a=o,l=!1;t._isCurrentlyVisible=()=>a===o;t._isUnloading=()=>l;t._subscribeToVisiblityChanged=e=>{s.unshift(e)};t._notifyVisibilityChanged=e=>{e!==a&&(a=e,s.forEach((t=>t(e))))},(0,n._addWindowEventListenerSafe)("focus",(()=>{l=!1,(0,t._notifyVisibilityChanged)(o)})),(0,n._addWindowEventListenerSafe)("blur",(()=>(0,t._notifyVisibilityChanged)(i))),(0,n._addDocumentEventListenerSafe)("visibilitychange",(()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?o:i)})),(0,n._addWindowEventListenerSafe)((0,n._getUnloadEvent)(),(()=>{l=!0,(0,t._notifyVisibilityChanged)(i)}))},382: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(8657);const i=r(8657),s=r(2798);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return s.Diagnostics}});const a=r(638);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}});const l=r(2132);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});const c=r(2452),d=r(6346);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return d.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(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,i._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;const n=r(382);function o(e,t){null==e||e.forEach((e=>{delete t[e]}))}t._resolveDeltasResponse=function(e,t){const r=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!r)return{hadBadDeltaChecksum:!0};const i=function(e){const t=e;return o(e.deleted_gates,t.feature_gates),delete t.deleted_gates,o(e.deleted_configs,t.dynamic_configs),delete t.deleted_configs,o(e.deleted_layers,t.layer_configs),delete t.deleted_layers,t}(function(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{feature_gates:Object.assign(Object.assign({},e.feature_gates),t.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),t.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),t.dynamic_configs)})}(e,r)),s=(0,n._DJB2Object)({feature_gates:i.feature_gates,dynamic_configs:i.dynamic_configs,layer_configs:i.layer_configs},2);return s===r.checksumV2?JSON.stringify(i):{hadBadDeltaChecksum:!0,badChecksum:s,badMergedConfigs:i,badFullResponse:r.deltas_full_response}}},8321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const 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}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r;if(!e)return!1;const o=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=o&&(this._source=e.source,!0!==(null==o?void 0:o.has_updates)||(this._rawValues=e.data,this._lcut=o.time,this._receivedAt=e.receivedAt,this._values=o,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,o),e.source&&o.user&&this._setWarningState(t,o),n.SDKFlags.setFlags(this._sdkKey,null!==(r=o.sdk_flags)&&void 0!==r?r:{})),!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?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.dynamic_configs,e)}getLayer(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;const 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;const i=n.StableID.get(this._sdkKey);if((null===(r=e.customIDs)||void 0===r?void 0:r.stableID)===i||!(null===(o=e.customIDs)||void 0===o?void 0:o.stableID)&&!i){if("user"in t){const r=t.user;(0,n._getFullUserHash)(e)!==(0,n._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}else this._warnings.add("StableIDMismatch")}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};const 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;const n=this.getCurrentSourceDetails();let o=n.reason;const i=null!==(t=n.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&i.length>0&&(o+=i[0]),"Uninitialized"!==o&&"NoValues"!==o){o=`${o}:${e?"Unrecognized":"Recognized"}`}const s="Bootstrap"===this._source&&null!==(r=this._bootstrapMetadata)&&void 0!==r?r:void 0;return s&&(n.bootstrapMetadata=s),Object.assign(Object.assign({},n),{reason:o})}}},6892:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const o=r(382),i=r(450);class s 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,i,s){var a,l,c,d,u,h;return n(this,void 0,void 0,(function*(){const n=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null;let g={user:i,hash:null!==(c=null===(l=null===(a=this._option)||void 0===a?void 0:a.networkConfig)||void 0===l?void 0:l.initializeHashAlgorithm)&&void 0!==c?c:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==n?void 0:n.has_updates){const e=(null==n?void 0:n.hash_used)!==(null!==(h=null===(u=null===(d=this._option)||void 0===d?void 0:d.networkConfig)||void 0===u?void 0:u.initializeHashAlgorithm)&&void 0!==h?h:"djb2");g=Object.assign(Object.assign({},g),{sinceTime:s&&!e?n.time:0,previousDerivedFields:"derived_fields"in n&&s?n.derived_fields:{},deltasResponseRequested:!0,full_checksum:n.full_checksum,partialUserMatchSinceTime:e?0:n.time})}return this._fetchEvaluations(e,n,g,r)}))}_fetchEvaluations(e,t,r,o){var s,a;return n(this,void 0,void 0,(function*(){const n=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:o});if(204===(null==n?void 0:n.code))return'{"has_updates": false}';if(200!==(null==n?void 0:n.code))return null!==(s=null==n?void 0:n.body)&&void 0!==s?s:null;if(!0!==(null==t?void 0:t.has_updates)||!0!==(null===(a=n.body)||void 0===a?void 0:a.includes('"is_delta":true'))||!0!==r.deltasResponseRequested)return n.body;const l=(0,i._resolveDeltasResponse)(t,n.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),o)}))}}t.default=s},2739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;const n=r(382),o={disableExposureLog:!0};function i(e){return null==e||!1===e.disableExposureLog}function s(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(a,l)=>{if(null==t)return l;const c=t[a];if(null==c||null!=l&&(0,n._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e){return e.value}(c);case"gate":return function(e,t,r){return e.getFeatureGate(t.gate_name,i(r)?void 0:o).value?t.pass_value:t.fail_value}(e,c,r);case"dynamic_config":return function(e,t,r,n){const a=e.getDynamicConfig(t.config_name,i(n)?void 0:o).get(t.param_name);return s(a,r)?r:a}(e,c,l,r);case"experiment":return function(e,t,r,n){const a=e.getExperiment(t.experiment_name,i(n)?void 0:o).get(t.param_name);return s(a,r)?r:a}(e,c,l,r);case"layer":return function(e,t,r,n){const a=e.getLayer(t.layer_name,i(n)?void 0:o).get(t.param_name);return s(a,r)?r:a}(e,c,l,r);default:return l}}}},6962:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const o=r(382),i=r(8321),s=r(6892),a=r(2739),l=r(1887);class c extends o.StatsigClientBase{static instance(e){const 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,a;o.SDKType._setClientType(e,"javascript-client");const c=new s.default(r,(e=>{this.$emt(e)}));super(e,null!==(n=null==r?void 0:r.dataAdapter)&&void 0!==n?n:new l.StatsigEvaluationsDataAdapter,c,r),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.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new i.default(e),this._network=c,this._user=this._configureUser(t,r);const d=null!==(a=null==r?void 0:r.plugins)&&void 0!==a?a:[];for(const e of d)e.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())&&void 0!==t?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){var r;const n=performance.now(),i=[...null!==(r=this._store.getWarnings())&&void 0!==r?r:[]];this._resetForUser(e);const s=this.dataAdapter.getDataSync(this._user);null==s&&i.push("NoCachedValues"),this._store.setValues(s,this._user),this._finalizeUpdate(s);const a=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===a||null==a&&"Bootstrap"===(null==s?void 0:s.source)||this._runPostUpdate(null!=s?s:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-n,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),i)}updateUserAsync(e,t){return n(this,void 0,void 0,(function*(){this._resetForUser(e);const 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,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let i=!1;null!=n&&(o.Diagnostics._markInitProcessStart(this._sdkKey),i=this._store.setValues(n,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:i})),this._finalizeUpdate(n),i||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,i,this._store.getCurrentSourceDetails());const s=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(i,this._store.getSource(),s,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)}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){const 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()}))}_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)}))}_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;const n=(0,o._normalizeUser)(e,t),i=null===(r=n.customIDs)||void 0===r?void 0:r.stableID;return i&&o.StableID.setOverride(i,this._sdkKey),n}_getFeatureGateImpl(e,t){var r,n;const{result:i,details:s}=this._store.getGate(e),a=(0,o._makeFeatureGate)(e,s,i),l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getGateOverride)||void 0===n?void 0:n.call(r,a,this._user,t),c=null!=l?l:a;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;const{result:i,details:s}=this._store.getConfig(e),a=(0,o._makeDynamicConfig)(e,s,i),l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getDynamicConfigOverride)||void 0===n?void 0:n.call(r,a,this._user,t),c=null!=l?l:a;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,i,s;const{result:a,details:l}=this._store.getConfig(e),c=(0,o._makeExperiment)(e,l,a);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,o._mapExposures)(null!==(n=null===(r=c.__evaluation)||void 0===r?void 0:r.secondary_exposures)&&void 0!==n?n:[],this._store.getExposureMapping()));const d=null===(s=null===(i=this.overrideAdapter)||void 0===i?void 0:i.getExperimentOverride)||void 0===s?void 0:s.call(i,c,this._user,t),u=null!=d?d:c;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:u}),u}_getLayerImpl(e,t){var r,n,i;const{result:s,details:a}=this._store.getLayer(e),l=(0,o._makeLayer)(e,a,s),c=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getLayerOverride)||void 0===n?void 0:n.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,o._mergeOverride)(l,c,null!==(i=null==c?void 0:c.__value)&&void 0!==i?i:l.__value,(r=>{(null==t?void 0:t.disableExposureLog)||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,d,r,this._store.getExposureMapping()),t)}));return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var r,n;const{result:o,details:i}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:i,__configuration:o,get:(0,a._makeParamStoreGetter)(this,o,t)},l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getParamStoreOverride)||void 0===n?void 0:n.call(r,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,a._makeParamStoreGetter)(this,l.config,t)),s}}t.default=c},1887:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;const o=r(382),i=r(6892);class s 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 i.default?this._network=r:this._network=new i.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){const 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){var i;return n(this,void 0,void 0,(function*(){const n=yield null===(i=this._network)||void 0===i?void 0:i.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,o);return null!=n?n:null}))}_getCacheKey(e){var t;const r=(0,o._getStorageKey)(this._getSdkKey(),e,null===(t=this._options)||void 0===t?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=s},7726: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;const i=r(382),s=r(6962);t.StatsigClient=s.default,o(r(382),t);const a=Object.assign((0,i._getStatsigGlobal)(),{StatsigClient:s.default});t.default=a}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.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=function(){if("object"==typeof globalThis)return globalThis;try{return this||new 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,{setGlobalTheme:()=>Gt});var e={};function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function i(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function s(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,i(n.key),n)}}function a(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.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)?d(e,t):void 0}}function h(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,i,s,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t,r,n,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){g(i,n,o,s,a,"next",e)}function a(e){g(i,n,o,s,a,"throw",e)}s(void 0)}))}}r.r(e),r.d(e,{CURRENT_SURFACE_CSS_VAR:()=>He,ThemeMutationObserver:()=>Rt,enableGlobalTheme:()=>At,getGlobalTheme:()=>Nt,getSSRAutoScript:()=>Lt,getThemeHtmlAttrs:()=>ct,getThemeStyles:()=>It,getTokenValue:()=>Qe,setGlobalTheme:()=>Pt,themeConfig:()=>Ge,themeObjectToString:()=>it,themeStringToObject:()=>ot,token:()=>Ye,useThemeObserver:()=>Mt()});var f=r(6192),v=r.n(f),b=r(7726),y=r(7553);function m(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 _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k="@all-features",w=function(){return a((function e(){t(this,e),l(this,"eventToValue",new Map),this.emitter=new y.EventEmitter2}),[{key:"onGateUpdated",value:function(e,t,r,n){var o=this,i=r(e,_(_({},n),{},{fireGateExposure:!1}));void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,i);var s=function(){var i=r(e,_(_({},n),{},{fireGateExposure:!1}));o.eventToValue.get(t)!==i&&(o.eventToValue.set(t,i),t(i))};return this.emitter.on(e,s),function(){o.emitter.off(e,s)}}},{key:"onExperimentValueUpdated",value:function(e,t,r,n,o,i){var s=this,a="".concat(e,".").concat(t),l=o(e,t,r,_(_({},i),{},{fireExperimentExposure:!1}));void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,l);var c=function(){var a=o(e,t,r,_(_({},i),{},{fireExperimentExposure:!1}));s.eventToValue.get(n)!==a&&(s.eventToValue.set(n,a),n(a))};return this.emitter.on(a,c),function(){s.emitter.off(a,c)}}},{key:"onAnyUpdated",value:function(e){var t=this;return this.emitter.on(k,e),function(){t.emitter.off(k,e)}}},{key:"anyUpdated",value:function(){var e=this;this.emitter.emit(k),this.emitter.eventNames().filter((function(e){return e!==k})).forEach((function(t){e.emitter.emit(t)}))}}])}();function E(){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)||void 0===e||null===(e=e.hostname)||void 0===e?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}var O=function(e){return e.Error="Error",e.LocalOverride="LocalOverride",e.Unrecognized="Unrecognized",e.Uninitialized="Uninitialized",e.NetworkNotModified="NetworkNotModified",e.Network="Network",e.InvalidBootstrap="InvalidBootstrap",e.Bootstrap="Bootstrap",e.Cache="Cache",e.Unknown="Unknown",e}({}),S=function(e){return e.Development="development",e.Staging="staging",e.Production="production",e}({}),x=function(e){return e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e}({}),C=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function D(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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=function(e){return j({perimeter:E()?x.FEDRAMP_MODERATE:x.COMMERCIAL},e)},A=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=h(e,1)[0],n=h(t,1)[0];return r.localeCompare(n)};r.sort(o),n.sort(o);for(var i=0;i<r.length;i++){if(h(r[i],2)[1]!==h(n[i],2)[1])return!1}return!0},I=function(e,t){var r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},L=function(e){var t=e.api,r=e.disableCurrentPageLogging,n=e.loggingIntervalMillis,o=e.loggingBufferMaxSize,i=e.localMode,s=e.eventLoggingApi,a=e.eventLoggingApiForRetries,l=e.disableLocalStorage,d=e.ignoreWindowUndefined,u=e.disableAllLogging;e.initTimeoutMs,e.disableNetworkKeepalive,e.overrideStableID,e.disableErrorLogging,e.disableAutoMetricsLogging;return j(j({},c(e,C)),{},{networkConfig:{api:t,logEventUrl:s?s+"rgstr":void 0,logEventFallbackUrls:a?[a]:void 0,preventAllNetworkTraffic:i||!d&&"undefined"==typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:o,disableStorage:void 0===l?i:l,disableLogging:void 0===u?i:u})},U=Object.entries(O).map((function(e){var t=h(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})),M=function(e){var t,r,n,o=e.reason.toLowerCase();return{reason:null!==(t=null===(r=U.find((function(e){var t=h(e,1)[0];return o.includes(t)})))||void 0===r?void 0:r[1])&&void 0!==t?t:O.Unknown,time:null!==(n=e.receivedAt)&&void 0!==n?n:Date.now()}},T=function(e){return e.map((function(e){return"string"==typeof e?{gate:e}:e}))},F=function(){function e(r,n,o,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;t(this,e),this.value=n,this._name=r,this._ruleID=o,this._secondaryExposures=s,this._allocatedExperimentName=a,this._evaluationDetails=i,this._onDefaultValueFallback=l}return a(e,[{key:"get",value:function(e,t,r){var n,i=this.getValue(e,t);if(null==i)return t;var s,a=Array.isArray(t)?"array":o(t),l=Array.isArray(i)?"array":o(i);return r?r(i)?(this.fireExposure(e),i):(null===(s=this._onDefaultValueFallback)||void 0===s||s.call(this,this,e,a,l),t):null==t||a===l?(this.fireExposure(e),i):(null===(n=this._onDefaultValueFallback)||void 0===n||n.call(this,this,e,a,l),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,i=new e(t.name,t.value,t.ruleID,M(t.details),T(null!==(r=null===(n=t.__evaluation)||void 0===n?void 0:n.secondary_exposures)&&void 0!==r?r:[]),null!==(o=t.groupName)&&void 0!==o?o:void 0);return i.experiment=t,i}}])}(),N=function(){function e(r,n,o,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];t(this,e),this._logParameterFunction=s,this._name=r,this._value=JSON.parse(JSON.stringify(null!=n?n:{})),this._ruleID=null!=o?o:"",this._evaluationDetails=i,this._secondaryExposures=a,this._undelegatedSecondaryExposures=l,this._allocatedExperimentName=c,this._explicitParameters=d}return a(e,[{key:"get",value:function(e,t,r){var n=this,i=this._value[e];if(null==i)return t;var s=function(){return n._logLayerParameterExposure(e),i};return r?r(i)?s():t:null==t||o(i)===o(t)&&Array.isArray(t)===Array.isArray(i)?s():t}},{key:"getValue",value:function(e,t){null==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)||void 0===t||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,n,o,i,s,a;return new e(t.name,t.__value,t.ruleID,M(t.details),(function(e,r){return t.get(r)}),T(null!==(r=null===(n=t.__evaluation)||void 0===n?void 0:n.secondary_exposures)&&void 0!==r?r:[]),T(null!==(o=null===(i=t.__evaluation)||void 0===i?void 0:i.undelegated_secondary_exposures)&&void 0!==o?o:[]),null===(s=t.__evaluation)||void 0===s?void 0:s.allocated_experiment_name,null===(a=t.__evaluation)||void 0===a?void 0:a.explicit_parameters)}}])}(),R="5.3.1";function K(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}function z(e,t){if("function"!=typeof t&&null!==t)throw new 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&&G(e,t)}function B(e,t,r){return B=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&G(o,r.prototype),o},B.apply(null,arguments)}function $(e){var t="function"==typeof Map?new Map:void 0;return $=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new 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,n)}function n(){return B(e,arguments,V(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),G(n,e)},$(e)}function J(e,t,r){return t=V(t),K(e,q()?Reflect.construct(t,r||[],V(e).constructor):t.apply(e,r))}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}var W=function(e){function r(e){return t(this,r),J(this,r,[e])}return z(r,e),a(r)}($(Error));function H(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 Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q=function(){function e(){t(this,e)}return a(e,null,[{key:"fetchClientSdk",value:(s=p(v().mark((function e(t){var r,n;return v().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(e){return s.apply(this,arguments)})},{key:"fetchExperimentValues",value:(i=p(v().mark((function e(t,r,n){var o;return v().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,t,r){return i.apply(this,arguments)})},{key:"handleResponseError",value:(o=p(v().mark((function e(t){var r;return v().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 W("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 W("Unexpected 204 response");case 7:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"extractResponseBody",value:(n=p(v().mark((function e(t){var r;return v().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>2?arguments[2]:void 0;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return"/gateway/api/flags";if(t===x.FEDRAMP_MODERATE)switch(e){case S.Production:return"https://api.atlassian-us-gov-mod.com/flags";case S.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw new Error('Invalid environment "'.concat(e,'" for "').concat(t,'" perimeter'))}else{if(t!==x.COMMERCIAL)throw new Error('Invalid perimeter "'.concat(t,'"'));switch(e){case S.Development:return"https://api.dev.atlassian.com/flags";case S.Staging:return"https://api.stg.atlassian.com/flags";default:return"https://api.atlassian.com/flags"}}}},{key:"fetchRequest",value:(r=p(v().mark((function t(r,n,o,i){var s,a,l,c,d;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.getBaseUrl(o.environment,o.useGatewayURL,o.perimeter),a=o.fetchTimeoutMs||5e3,AbortSignal.timeout?l=AbortSignal.timeout(a):AbortController&&(c=new AbortController,l=c.signal,setTimeout((function(){return c.abort()}),a)),t.next=5,fetch("".concat(s).concat(r),Y({method:n,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":R,"X-API-KEY":o.apiKey},signal:l},i&&{body:JSON.stringify(i)}));case 5:return d=t.sent,t.next=8,this.handleResponseError(d);case 8:return t.next=10,this.extractResponseBody(d);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)}))),function(e,t,n,o){return r.apply(this,arguments)})}]);var r,n,o,i,s}();function X(){return X="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=V(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}},X.apply(this,arguments)}function Z(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 ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e,t,r){return t=V(t),K(e,re()?Reflect.construct(t,r||[],V(e).constructor):t.apply(e,r))}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}var ne=function(e){function r(){var e;return t(this,r),l(e=te(this,r,["NoFetchDataAdapter","nofetch"]),"bootstrapResult",null),e}return z(r,e),a(r,[{key:"setBootstrapData",value:function(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:b.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(i=p(v().mark((function e(t,r){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e,t){return i.apply(this,arguments)})},{key:"getDataAsync",value:(o=p(v().mark((function e(t,r,n){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bootstrapResult&&ee(ee({},this.bootstrapResult),{},{fullUserHash:(0,b._getFullUserHash)(r)}));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return o.apply(this,arguments)})},{key:"getDataSync",value:function(e){return this.bootstrapResult&&ee(ee({},this.bootstrapResult),{},{fullUserHash:(0,b._getFullUserHash)(e)})}},{key:"_fetchFromNetwork",value:(n=p(v().mark((function e(t,r,n){return v().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,b._getStorageKey)(this._getSdkKey(),e);return"".concat(b.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(t)}},{key:"_isCachedResultValidFor204",value:function(e,t){return!1}},{key:"setDataLegacy",value:function(e,t){var n,o,i,s,a;(n=r,o="setData",i=this,a=X(V(1&(s=3)?n.prototype:n),o,i),2&s&&"function"==typeof a?function(e){return a.apply(i,e)}:a)([e,t])}},{key:"toJSON",value:function(){var e=ee({},this);return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}]);var n,o,i}(b.DataAdapterCore),oe=r(382);function ie(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 se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ae(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 le(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)?le(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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 new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function le(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 ce="LocalOverride:Recognized",de="STATSIG_JS_LITE_LOCAL_OVERRIDES",ue=function(e,t){return t+":"+e},he=function(){return a((function e(r){t(this,e),this._overrides={gates:{},configs:{},layers:{}},this._djb2Map=new Map,this._localStorageKey=r}),[{key:"parseStoredOverrides",value:function(e){try{var t=window.localStorage.getItem(e);return t?JSON.parse(t):{gates:{},configs:{},layers:{}}}catch(e){return{gates:{},configs:{},layers:{}}}}},{key:"mergeOverrides",value:function(){for(var e={gates:{},configs:{},layers:{}},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=0,i=r;o<i.length;o++){for(var s=i[o],a=0,l=Object.entries(null!==(c=s.gates)&&void 0!==c?c:{});a<l.length;a++){var c,d=h(l[a],2),u=d[0],g=d[1];e.gates[u]=g}for(var p=0,f=Object.entries(null!==(v=s.configs)&&void 0!==v?v:{});p<f.length;p++){var v,b=h(f[p],2),y=b[0],m=b[1];e.configs[y]=m}for(var _=0,k=Object.entries(null!==(w=s.layers)&&void 0!==w?w:{});_<k.length;_++){var w,E=h(k[_],2),O=E[0],S=E[1];e.layers[O]=S}}return e}},{key:"initFromStoredOverrides",value:function(){var e=this.mergeOverrides(this._overrides,this.parseStoredOverrides(de),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(de)}catch(e){}for(var t=0,r=Object.values(e);t<r.length;t++){var n,o=r[t],i=new Set(Object.keys(o)),s=ae(i);try{for(s.s();!(n=s.n()).done;){var a=n.value,l=(0,oe._DJB2)(a);i.has(l)&&delete o[l]}}catch(e){s.e(e)}finally{s.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=se(se({},{gates:{},configs:{},layers:{}}),e);this._djb2Map.clear();for(var r=0,n=Object.entries(t);r<n.length;r++)for(var o=h(n[r],2),i=o[0],s=o[1],a=0,l=Object.entries(s);a<l.length;a++){var c=h(l[a],2),d=c[0],u=c[1];this._djb2Map.set(ue((0,oe._DJB2)(d),i),u)}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(ue((0,oe._DJB2)(e),"gates"),t),this.saveOverrides()}},{key:"removeGateOverride",value:function(e){delete this._overrides.gates[e],this._djb2Map.delete(ue((0,oe._DJB2)(e),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(e,t){var r,n=null!==(r=this._overrides.gates[e.name])&&void 0!==r?r:this._djb2Map.get(ue(e.name,"gates"));return null==n?null:se(se({},e),{},{value:n,details:se(se({},e.details),{},{reason:ce})})}},{key:"overrideDynamicConfig",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(ue((0,oe._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ue((0,oe._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(ue((0,oe._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ue((0,oe._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(ue((0,oe._DJB2)(e),"layers"),t),this.saveOverrides()}},{key:"removeLayerOverride",value:function(e){delete this._overrides.layers[e],this._djb2Map.delete(ue((0,oe._DJB2)(e),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides={gates:{},configs:{},layers:{}};try{window.localStorage.removeItem(this._localStorageKey)}catch(e){}}},{key:"getLayerOverride",value:function(e,t){var r,n=null!==(r=this._overrides.layers[e.name])&&void 0!==r?r:this._djb2Map.get(ue(e.name,"layers"));return null==n?null:se(se({},e),{},{__value:n,get:(0,oe._makeTypedGet)(e.name,n),details:se(se({},e.details),{},{reason:ce})})}},{key:"_getConfigOverride",value:function(e,t){var r,n=null!==(r=t[e.name])&&void 0!==r?r:this._djb2Map.get(ue(e.name,"configs"));return null==n?null:se(se({},e),{},{value:n,get:(0,oe._makeTypedGet)(e.name,n),details:se(se({},e.details),{},{reason:ce})})}}])}(),ge=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function pe(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 fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ve,be="client-default-key",ye=function(){return a((function e(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.localStorageKey,i=void 0===o?"STATSIG_OVERRIDES":o,s=n.overrideAdapter;t(this,e),l(this,"initPromise",null),l(this,"initCompleted",!1),l(this,"initWithDefaults",!1),l(this,"hasCheckGateErrorOccurred",!1),l(this,"hasGetExperimentErrorOccurred",!1),l(this,"hasGetExperimentValueErrorOccurred",!1),l(this,"hasGetLayerErrorOccurred",!1),l(this,"hasGetLayerValueErrorOccurred",!1),l(this,"subscriptions",new w),l(this,"dataAdapter",new ne),l(this,"statsigValuesUpdated",(function(){r.user&&r.statsigClient.updateUserSync(r.user,{disableBackgroundCacheRefresh:!0}),r.subscriptions.anyUpdated()})),this.overrideAdapter=s||new he(i)}),[{key:"initialize",value:(y=p(v().mark((function e(t,r,n){var o,i,s=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=P(t),!this.initPromise){e.next=4;break}return A(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 i=performance.now(),this.initOptions=o,this.initPromise=this.init(o,r,n).then((function(){s.initCompleted=!0,s.initWithDefaults=!0})).finally((function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initialize",s.initCompleted,o.apiKey)})),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return y.apply(this,arguments)})},{key:"initializeWithProvider",value:(f=p(v().mark((function e(t,r,n,o){var i,s,a=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=P(t),!this.initPromise){e.next=4;break}return A(i,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 s=performance.now(),this.initOptions=i,this.provider=r,this.provider.setClientVersion(R),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(i,r,n,o).then((function(){a.initCompleted=!0,a.initWithDefaults=!0})).finally((function(){var e=performance.now()-s;a.fireClientEvent(s,e,"initializeWithProvider",a.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 f.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,i=this,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null===(o=this.initOptions.analyticsWebClient)||void 0===o||o.then((function(o){var a=fe({targetApp:i.initOptions.targetApp,clientVersion:R,success:n,startTime:e,totalTime:t},s&&{apiKey:s});o.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:a,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})})).catch((function(e){i.initOptions.environment!==S.Production&&console.error("Analytics web client promise did not resolve",e)}))}},{key:"initializeFromValues",value:(g=p(v().mark((function e(t,r,n){var o,i,s,a=this,l=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>3&&void 0!==l[3]?l[3]:{},i=P(t),!this.initPromise){e.next=5;break}return A(i,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),s=performance.now(),this.initOptions=i,this.initPromise=this.initFromValues(i,r,n,o).then((function(){a.initCompleted=!0,a.initWithDefaults=!0})).finally((function(){var e=performance.now()-s;a.fireClientEvent(s,e,"initializeFromValues",a.initCompleted)})),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return g.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw new Error("Client must be initialized before using this method")}},{key:"updateUser",value:(u=p(v().mark((function e(t,r,n){var o,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),o=P(t),i=function(){return Q.fetchExperimentValues(o,r,n).then((function(e){return{experimentValues:e.experimentValues,customAttributesFromFetch:e.customAttributes}}))},e.next=5,this.updateUserUsingInitializeValuesProducer(i,r,n);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return u.apply(this,arguments)})},{key:"updateUserWithProvider",value:(d=p(v().mark((function e(t,r){var n=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw new 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 d.apply(this,arguments)})},{key:"updateUserWithValues",value:(s=p(v().mark((function e(t,r){var n,o,i=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[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 s.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{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,n=void 0===r||r;return this.statsigClient.checkGate(e,{disableExposureLog:!n})}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,n=void 0===r||r;return F.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!n}))}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 F(e,{},"",{time:Date.now(),reason:O.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 i=n.typeGuard;return o.get(t,r,i)}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))||void 0===r||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){var r;(this.overrideAdapter.overrideGate(e,t),this.user)&&(null===(r=this.statsigClient)||void 0===r||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 A(this.currentIdentifiers,e)&&A(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 i=n.fireGateExposure;(void 0===i||i)&&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,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return this.subscriptions.onExperimentValueUpdated(e,t,r,(function(t){var r=i.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),i)}},{key:"onAnyUpdated",value:function(e){return this.subscriptions.onAnyUpdated(e)}},{key:"init",value:(i=p(v().mark((function e(t,r,n){var o,i,s,a,l,c,d,u;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=fe({},t),e.prev=1,a=Q.fetchClientSdk(t).then((function(e){return o.sdkKey=e.clientSdkKey})),l=Q.fetchExperimentValues(t,r,n),e.next=6,Promise.all([a,l]);case 6:c=e.sent,d=h(c,2),u=d[1],i=u.experimentValues,s=u.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,s,i));case 21:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(e,t,r){return i.apply(this,arguments)})},{key:"initWithProvider",value:(o=p(v().mark((function e(t,r,n,o){var i,s,a,l,c,d,u,g;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=fe(fe({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,n,o);case 4:return l=r.getClientSdkKey().then((function(e){return i.sdkKey=e})),c=r.getExperimentValues(),e.next=8,Promise.all([l,c]);case 8:d=e.sent,u=h(d,2),g=u[1],s=g.experimentValues,a=g.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(i,n,o);case 21:throw e.t0;case 22:return e.abrupt("return",this.initFromValues(i,n,a,s));case 23:case"end":return e.stop()}}),e,this,[[1,15]])}))),function(e,t,r,n){return o.apply(this,arguments)})},{key:"initFromValues",value:(n=p(v().mark((function e(t,r,n){var o,i,s,a,l,d,u,h=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=h.length>3&&void 0!==h[3]?h[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=n,(s=L(t)).sdkKey||(s.sdkKey=be),null!==(o=s.networkConfig)&&void 0!==o&&o.logEventUrl||(s.networkConfig=fe(fe({},s.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),s.perimeter===x.FEDRAMP_MODERATE&&(s.disableLogging=!0),a=s.sdkKey,l=s.environment,s.updateUserCompletionCallback,s.perimeter,d=c(s,ge),this.user=I(r,n),u=fe(fe({},d),{},{environment:{tier:l},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter}),r.stableId?b.StableID.setOverride(r.stableId,a):u.disableStableID=!0,e.prev=12,this.statsigClient=new b.StatsigClient(a,this.user,u),this.dataAdapter.setBootstrapData(i),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 b.StatsigClient(be,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 n.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(r=p(v().mark((function e(t,r,n){var o,i,s,a=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw new 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 i=t(),s=this.updateStatsigClientUser(i,r,n),this.initPromise=s.catch(p(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.initPromise=o,!a.provider){e.next=4;break}return e.next=4,a.provider.setProfile(a.initOptions,a.currentIdentifiers,a.currentAttributes);case 4:case"end":return e.stop()}}),e)})))),e.abrupt("return",s);case 17:case"end":return e.stop()}}),e,this,[[6,11]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(e=p(v().mark((function e(t,r,n){var o,i,s,a,l,c,d,u,h;return v().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=e.sent,a=I(r,s.customAttributesFromFetch),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),d=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null===(l=(c=this.initOptions).updateUserCompletionCallback)||void 0===l||l.call(c,!1,d),e.t0;case 13:return u=!0,h=null,e.prev=15,this.dataAdapter.setBootstrapData(s.experimentValues),this.user=a,e.next=20,this.statsigClient.updateUserAsync(this.user);case 20:e.next=26;break;case 22:e.prev=22,e.t1=e.catch(15),u=!1,h=String(e.t1);case 26:if(null===(o=this.initOptions)||void 0===o||null===(i=o.updateUserCompletionCallback)||void 0===i||i.call(o,u,h),!u){e.next=33;break}this.currentIdentifiers=r,this.currentAttributes=n,this.subscriptions.anyUpdated(),e.next=34;break;case 33:throw new Error("Failed to update user. An unexpected error occured.");case 34:case"end":return e.stop()}}),e,this,[[1,8],[15,22]])}))),function(t,r,n){return e.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return R}},{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,n=void 0===r||r;return N.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!n}))}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),N.fromLayer((0,b._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 i=n.typeGuard;return o.get(t,r,i)}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}}}]);var e,r,n,o,i,s,d,u,g,f,y}(),me=function(){return a((function e(){t(this,e)}),null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}])}();ve=me,l(me,"client",new ye),l(me,"hasCheckGateErrorOccurred",!1),l(me,"hasGetExperimentValueErrorOccurred",!1),l(me,"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){ve.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}),ve.hasCheckGateErrorOccurred=!0)}return ve.client.checkGate(e,t)})),l(me,"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 ve.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}),ve.hasGetExperimentValueErrorOccurred=!0),r}return ve.client.getExperimentValue(e,t,r,n)})),l(me,"initializeCalled",ve.client.initializeCalled.bind(ve.client)),l(me,"initializeCompleted",ve.client.initializeCompleted.bind(ve.client)),l(me,"initialize",ve.client.initialize.bind(ve.client)),l(me,"initializeWithProvider",ve.client.initializeWithProvider.bind(ve.client)),l(me,"initializeFromValues",ve.client.initializeFromValues.bind(ve.client)),l(me,"manuallyLogGateExposure",ve.client.manuallyLogGateExposure.bind(ve.client)),l(me,"getExperiment",ve.client.getExperiment.bind(ve.client)),l(me,"manuallyLogExperimentExposure",ve.client.manuallyLogExperimentExposure.bind(ve.client)),l(me,"manuallyLogLayerExposure",ve.client.manuallyLogLayerExposure.bind(ve.client)),l(me,"shutdownStatsig",ve.client.shutdownStatsig.bind(ve.client)),l(me,"overrideGate",ve.client.overrideGate.bind(ve.client)),l(me,"clearGateOverride",ve.client.clearGateOverride.bind(ve.client)),l(me,"overrideConfig",ve.client.overrideConfig.bind(ve.client)),l(me,"clearConfigOverride",ve.client.clearConfigOverride.bind(ve.client)),l(me,"setOverrides",ve.client.setOverrides.bind(ve.client)),l(me,"getOverrides",ve.client.getOverrides.bind(ve.client)),l(me,"clearAllOverrides",ve.client.clearAllOverrides.bind(ve.client)),l(me,"isCurrentUser",ve.client.isCurrentUser.bind(ve.client)),l(me,"onGateUpdated",ve.client.onGateUpdated.bind(ve.client)),l(me,"onExperimentValueUpdated",ve.client.onExperimentValueUpdated.bind(ve.client)),l(me,"onAnyUpdated",ve.client.onAnyUpdated.bind(ve.client)),l(me,"updateUser",ve.client.updateUser.bind(ve.client)),l(me,"updateUserWithProvider",ve.client.updateUserWithProvider.bind(ve.client)),l(me,"updateUserWithValues",ve.client.updateUserWithValues.bind(ve.client)),l(me,"getPackageVersion",ve.client.getPackageVersion.bind(ve.client)),l(me,"getLayer",ve.client.getLayer.bind(ve.client)),l(me,"getLayerValue",ve.client.getLayerValue.bind(ve.client));var _e=me;if("undefined"!=typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=me;else{var ke,we,Ee=(null===(ke=_e=window.__FEATUREGATES_JS__)||void 0===ke||null===(we=ke.getPackageVersion)||void 0===we?void 0:we.call(ke))||"4.10.0 or earlier";if(Ee!==R){var Oe="Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(Ee," when module version ").concat(R," was loading.");console.warn(Oe)}}const Se=_e;var xe,Ce,De=!(void 0!==(null===globalThis||void 0===globalThis||null===(xe=globalThis.process)||void 0===xe||null===(xe=xe.env)||void 0===xe?void 0:xe.JEST_WORKER_ID))&&"production"!==(null===globalThis||void 0===globalThis||null===(Ce=globalThis.process)||void 0===Ce||null===(Ce=Ce.env)||void 0===Ce?void 0:Ce.NODE_ENV),je=function(){var e;De&&(e=console).debug.apply(e,arguments)},Pe="@atlaskit/platform-feature-flags",Ae="__PLATFORM_FEATURE_FLAGS__",Ie="undefined"!=typeof process&&!0,Le=!!Ie&&"true"==={NODE_ENV:"production"}.ENABLE_PLATFORM_FF||!!Ie&&"true"==={NODE_ENV:"production"}.STORYBOOK_ENABLE_PLATFORM_FF,Ue={booleanResolver:void 0},Me="undefined"!=typeof window?window:globalThis;function Te(e){if(Le)return je('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',Pe,e),!0;try{var t,r,n;if(void 0===(null===(t=Me[Ae])||void 0===t?void 0:t.booleanResolver)||null===(null===(r=Me[Ae])||void 0===r?void 0:r.booleanResolver))return Se.checkGate(e);var o=null===(n=Me[Ae])||void 0===n?void 0:n.booleanResolver(e);return"boolean"!=typeof o?(console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1):o}catch(e){return!1}}function Fe(e){return Te(e)}Me[Ae]=Me[Ae]||Ue;var Ne=["light","dark","auto"],Re=["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"],Ke=[].concat(Re,[]),Ve={colorMode:"auto",contrastMode:"auto",dark:"dark",light:"light",shape:void 0,spacing:"spacing",typography:function(){if(Fe("platform-default-typography-modernized"))return"typography-modernized"},UNSAFE_themeOptions:void 0};const Ge={"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"}}};const ze={"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 Be="data-theme",$e="data-color-mode",Je="data-contrast-mode",qe="data-custom-theme",We="--".concat("ds","-token-not-found"),He="--".concat("ds","-elevation-surface-current");const Ye=function(e,t){var r=ze[e];return r||(r=We),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")};const Qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=ze[e],n=t;return"undefined"==typeof window?n:n=(n=window.getComputedStyle(document.documentElement).getPropertyValue(r).trim())||t};var Xe=function(e){return/^#[0-9A-F]{6}$/i.test(e)};var Ze=["light","dark","spacing","typography","shape"],et="UNSAFE_themeOptions",tt=function(e){return void 0!==Ze.find((function(t){return t===e}))},rt=function(e){return void 0!==Re.find((function(t){return t===e}))},nt=function(e){return["light","dark","auto"].includes(e)},ot=function(e){return e.split(" ").map((function(e){return e.split(/:([^]*)/)})).reduce((function(e,t){var r=h(t,2),n=r[0],o=r[1];if("colorMode"===n&&nt(o)&&(e[n]=o),tt(n)&&rt(o)&&(e[n]=o),n===et)try{e[et]=JSON.parse(o)}catch(e){new Error("Invalid custom theme string")}return e}),{})},it=function(e){return Object.entries(e).reduce((function(e,t){var r=h(t,2),n=r[0],i=r[1];return"colorMode"===n&&"string"==typeof i&&nt(i)||n===et&&"object"===o(i)||tt(n)&&"string"==typeof i&&rt(i)?e+"".concat(e?" ":"")+"".concat(n,":").concat("object"===o(i)?JSON.stringify(i):i):e}),"")},st=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 at(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 lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?Ve.colorMode:t,n=e.dark,o=void 0===n?Ve.dark:n,i=e.light,s=void 0===i?Ve.light:i,a=e.contrastMode,c=void 0===a?Ve.contrastMode:a,d=e.shape,u=void 0===d?Ve.shape:d,h=e.spacing,g=void 0===h?Ve.spacing:h,p=e.typography,f=void 0===p?Ve.typography():p,v=e.UNSAFE_themeOptions,b=void 0===v?Ve.UNSAFE_themeOptions:v,y=it({dark:o,light:s,shape:u,spacing:g,typography:f}),m=l(l({},Be,y),$e,"auto"===r?"light":r);if(Fe("platform_increased-contrast-themes")&&(m=lt(lt({},m),{},l({},Je,"auto"===c?"no-preference":c))),b&&Xe(b.brandColor)){var _=JSON.stringify(b),k=st(_);m[qe]=k}return m};var dt=r(1833);const ut={light:()=>()=>{},"light-future":()=>()=>{},dark:()=>()=>{},"dark-future":()=>()=>{},"legacy-light":()=>()=>{},"legacy-dark":()=>()=>{},spacing:()=>()=>{},shape:()=>()=>{},"typography-adg3":()=>()=>{},"typography-modernized":()=>()=>{},"typography-refreshed":()=>()=>{}};var ht=function(){var e=p(v().mark((function e(t){var r,n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.head.querySelector("style[".concat(Be,'="').concat(t,'"]:not([').concat(qe,"])"))){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,gt(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)})));return function(t){return e.apply(this,arguments)}}(),gt=function(){var e=p(v().mark((function e(t){var r,n;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"light"!==t&&"dark"!==t||!Fe("platform-component-visual-refresh")||(t+="-brand-refresh"),e.next=3,ut[t]();case 3:return r=e.sent,n=r.default,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pt="(prefers-color-scheme: dark)",ft="(prefers-contrast: more)";function vt(e){document.documentElement.setAttribute($e,e.matches?"dark":"light")}var bt="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(pt);const yt=new(function(){return a((function e(){t(this,e),l(this,"unbindThemeChangeListener",null)}),[{key:"getColorMode",value:function(){return bt&&null!=bt&&bt.matches?"dark":"light"}},{key:"bind",value:function(){bt&&null===this.unbindThemeChangeListener&&(this.unbindThemeChangeListener=(0,dt.bind)(bt,{type:"change",listener:vt}))}},{key:"unbind",value:function(){this.unbindThemeChangeListener&&(this.unbindThemeChangeListener(),this.unbindThemeChangeListener=null)}}])}());function mt(e){document.documentElement.setAttribute(Je,e.matches?"more":"no-preference")}var _t="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(ft);const kt=new(function(){return a((function e(){t(this,e),l(this,"unbindContrastChangeListener",null)}),[{key:"getContrastMode",value:function(){return _t&&null!=_t&&_t.matches?"more":"no-preference"}},{key:"bind",value:function(){_t&&null===this.unbindContrastChangeListener&&(this.unbindContrastChangeListener=(0,dt.bind)(_t,{type:"change",listener:mt}))}},{key:"unbind",value:function(){this.unbindContrastChangeListener&&(this.unbindContrastChangeListener(),this.unbindContrastChangeListener=null)}}])}());function wt(e){"auto"===e.colorMode?(e.colorMode=yt.getColorMode(),yt.bind()):yt.unbind(),Fe("platform_increased-contrast-themes")&&("auto"===e.contrastMode?(e.contrastMode=kt.getContrastMode(),kt.bind()):kt.unbind());var t=ct(e);return Object.entries(t).forEach((function(e){var t=h(e,2),r=t[0],n=t[1];document.documentElement.setAttribute(r,n)})),function(){yt.unbind(),Fe("platform_increased-contrast-themes")&&kt.unbind()}}function Et(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,t){var r=JSON.stringify(e),n=st(r),o=[];return("auto"===t?["light","dark"]:[t]).forEach((function(e){var t=document.head.querySelector("style[".concat(qe,'="').concat(n,'"][').concat(Be,'="').concat(e,'"]'));t?document.head.appendChild(t):o.push(e)})),o}function St(e){var t;return null===(t=Object.entries(Ge).find((function(t){return h(t,2)[1].increasesContrastFor===e})))||void 0===t?void 0:t[1].id}var xt=function(e){var t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,i=e.shape,s=e.spacing,a=e.typography,l=[o,n],c=[];if("auto"===t)"no-preference"!==r&&Fe("platform_increased-contrast-themes")&&l.forEach((function(e){var t=St(e);t&&l.push(t)})),c.push.apply(c,l);else if(c.push(e[t]),"no-preference"!==r&&Fe("platform_increased-contrast-themes")){var d=St(e[t]);d&&c.push(d)}return[i,s,a].forEach((function(e){e&&c.push(e)})),Et(new Set(c))},Ct=function(e){return Et(new Set([]))};function Dt(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 jt(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)?jt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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 new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function jt(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}const Pt=function(){var e=p(v().mark((function e(){var t,r,n,o,i,s,a,l,c,d,u,h,g,f,b,y,m,_,k,w,E,O,S,x,C,D,j,P,A=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t=A.length>0&&void 0!==A[0]?A[0]:{}).colorMode,n=void 0===r?Ve.colorMode:r,o=t.contrastMode,i=void 0===o?Ve.contrastMode:o,s=t.dark,a=void 0===s?Ve.dark:s,l=t.light,c=void 0===l?Ve.light:l,d=t.shape,u=void 0===d?Ve.shape:d,h=t.spacing,g=void 0===h?Ve.spacing:h,f=t.typography,b=void 0===f?Ve.typography():f,y=t.UNSAFE_themeOptions,m=void 0===y?Ve.UNSAFE_themeOptions:y,_=A.length>1?A[1]:void 0,Fe("platform_increased-contrast-themes")||("light-increased-contrast"===c&&(c="light"),"dark-increased-contrast"===a&&(a="dark")),w=xt(k={colorMode:n,contrastMode:i,dark:a,light:c,shape:u,spacing:g,typography:b,UNSAFE_themeOptions:_?void 0:m}),E=_||ht,O=w.map(function(){var e=p(v().mark((function e(t){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E(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)}}()),!_&&m&&Xe(null==m?void 0:m.brandColor)&&(S=Ot(m,n||Ve.colorMode)).length>0&&O.push(p(v().mark((function e(){var t;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){var e=new Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e}));case 2:t=e.sent,(0,t.loadAndAppendCustomThemeCss)({colorMode:2===S.length?"auto":S[0],UNSAFE_themeOptions:m});case 5:case"end":return e.stop()}}),e)})))()),e.next=10,Promise.all(O);case 10:x=Ct(),C=Dt(x),e.prev=12,C.s();case 14:if((D=C.n()).done){e.next=20;break}return j=D.value,e.next=18,E(j);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),C.e(e.t0);case 25:return e.prev=25,C.f(),e.finish(25);case 28:return P=wt(k),e.abrupt("return",P);case 30:case"end":return e.stop()}}),e,null,[[12,22,25,28]])})));return function(){return e.apply(this,arguments)}}();const At=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?Ve.colorMode:t,n=e.contrastMode,o=void 0===n?Ve.contrastMode:n,i=e.dark,s=void 0===i?Ve.dark:i,a=e.light,l=void 0===a?Ve.light:a,c=e.shape,d=void 0===c?Ve.shape:c,u=e.spacing,h=void 0===u?Ve.spacing:u,g=e.typography,p=void 0===g?Ve.typography():g,f=e.UNSAFE_themeOptions,v=arguments.length>1?arguments[1]:void 0,b={colorMode:r,contrastMode:o,dark:s,light:l,shape:d,spacing:h,typography:p,UNSAFE_themeOptions:v?void 0:void 0===f?Ve.UNSAFE_themeOptions:f},y=xt(b);return v&&y.map((function(e){return v(e)})),wt(b)};const It=function(){var e=p(v().mark((function e(t){var r,n,o,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],"all"===t?(r=Ke,Fe("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}))):(o={colorMode:(null==t?void 0:t.colorMode)||Ve.colorMode,contrastMode:(null==t?void 0:t.contrastMode)||Ve.contrastMode,dark:(null==t?void 0:t.dark)||Ve.dark,light:(null==t?void 0:t.light)||Ve.light,shape:(null==t?void 0:t.shape)||Ve.shape,spacing:(null==t?void 0:t.spacing)||Ve.spacing,typography:(null==t?void 0:t.typography)||Ve.typography()},r=xt(o),n=Ct()),e.next=4,Promise.all([].concat(Et([].concat(Et(r),Et(n)).map(function(){var e=p(v().mark((function e(t){var r;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,gt(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)}}())),[p(v().mark((function e(){var r,n,o,i;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("all"===t||null==t||!t.UNSAFE_themeOptions||!Xe(null==t||null===(r=t.UNSAFE_themeOptions)||void 0===r?void 0:r.brandColor)){e.next=15;break}return e.prev=1,e.next=4,Promise.resolve().then((function(){var e=new Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e}));case 4:return n=e.sent,o=n.getCustomThemeStyles,e.next=8,o({colorMode:(null==t?void 0:t.colorMode)||Ve.colorMode,UNSAFE_themeOptions:null==t?void 0:t.UNSAFE_themeOptions});case 8:return i=e.sent,e.abrupt("return",i);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 i=e.sent,e.abrupt("return",i.flat().filter((function(e){return void 0!==e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();const Lt=function(e,t){if("auto"===e||"auto"===t){var r="auto"===e?"\n try {\n const darkModeMql = window.matchMedia('".concat(pt,"');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat($e,"', colorMode);\n } catch (e) {}"):"",n="auto"===t&&Fe("platform_increased-contrast-themes")?"\n try {\n const contrastModeMql = window.matchMedia('".concat(ft,"');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(Je,"', contrastMode);\n } catch (e) {}"):"";return"(() => {".concat(r).concat(n,"})()")}};var Ut=r(6039),Mt=r.n(Ut);function Tt(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 Ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Nt=function(){if("undefined"==typeof document)return{};var e=document.documentElement,t=e.getAttribute($e)||"",r=e.getAttribute(Be)||"";return Ft(Ft({},ot(r)),function(e){return void 0!==Ne.find((function(t){return t===e}))}(t)&&{colorMode:t})};var Rt=function(){function e(r){t(this,e),l(this,"legacyObserver",null),this.callback=r,e.callbacks.add(r)}return a(e,[{key:"observe",value:function(){e.observer||(e.observer=new MutationObserver((function(){var t=Nt();e.callbacks.forEach((function(e){return e(t)}))})),e.observer.observe(document.documentElement,{attributeFilter:[Be,$e]}))}},{key:"disconnect",value:function(){this.callback&&e.callbacks.delete(this.callback),0===e.callbacks.size&&e.observer&&(e.observer.disconnect(),e.observer=null)}}])}();l(Rt,"observer",null),l(Rt,"callbacks",new Set);const Kt="AJS";function Vt(){"object"!=typeof window[Kt]&&(window[Kt]={})}document.documentElement.hasAttribute("data-color-mode-auto")&&Pt({colorMode:"auto"});const{setGlobalTheme:Gt}=e;var zt,Bt;zt="DesignTokens",Bt={setGlobalTheme:Gt},Vt(),window[Kt][zt]=Bt})(),n})()));
8
+ !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},n.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 s=t.map(function(t){var s=function(e,t){return null==t?e:n(n({},e),{options:n(n({},a(t)),a(e.options))})}(t,r);return(0,o.bind)(e,s)});return function(){s.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,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var i=new o(n,a||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],i]:e._events[c].push(i):(e._events[c]=i,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),i.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},i.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,s=new Array(a);o<a;o++)s[o]=n[o].fn;return s},i.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},i.prototype.emit=function(e,t,n,o,a,s){var i=r?r+e:e;if(!this._events[i])return!1;var c,l,d=this._events[i],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,o),!0;case 5:return d.fn.call(d.context,t,n,o,a),!0;case 6:return d.fn.call(d.context,t,n,o,a,s),!0}for(l=1,c=new Array(u-1);l<u;l++)c[l-1]=arguments[l];d.fn.apply(d.context,c)}else{var g,h=d.length;for(l=0;l<h;l++)switch(d[l].once&&this.removeListener(e,d[l].fn,void 0,!0),u){case 1:d[l].fn.call(d[l].context);break;case 2:d[l].fn.call(d[l].context,t);break;case 3:d[l].fn.call(d[l].context,t,n);break;case 4:d[l].fn.call(d[l].context,t,n,o);break;default:if(!c)for(g=1,c=new Array(u-1);g<u;g++)c[g-1]=arguments[g];d[l].fn.apply(d[l].context,c)}}return!0},i.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},i.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},i.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var i=this._events[a];if(i.fn)i.fn!==t||o&&!i.once||n&&i.context!==n||s(this,a);else{for(var c=0,l=[],d=i.length;c<d;c++)(i[c].fn!==t||o&&!i[c].once||n&&i[c].context!==n)&&l.push(i[c]);l.length?this._events[a]=1===l.length?l[0]:l:s(this,a)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=r,i.EventEmitter=i,e.exports=i},6039:()=>{},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(){
9
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
10
+ var t,r,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",i=a.toStringTag||"@@toStringTag";function c(e,o,a,s){var i=o&&o.prototype instanceof d?o:d,c=Object.create(i.prototype);return n(c,"_invoke",function(e,n,o){var a,s,i,c=0,d=o||[],u=!1,g={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,r){return a=e,s=0,i=t,g.n=r,l}};function h(e,n){for(s=e,i=n,r=0;!u&&c&&!o&&r<d.length;r++){var o,a=d[r],h=g.p,p=a[2];e>3?(o=p===n)&&(i=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=t):a[0]<=h&&((o=e<2&&h<a[1])?(s=0,g.v=n,g.n=a[1]):h<p&&(o=e<3||a[0]>n||n>p)&&(a[4]=e,a[5]=n,g.n=p,s=0))}if(o||e>1)return l;throw u=!0,n}return function(o,d,p){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,p),s=d,i=p;(r=s<2?t:i)||!u;){a||(s?s<3?(s>1&&(g.n=-1),h(s,i)):g.n=i:g.v=i);try{if(c=2,a){if(s||(o="next"),r=a[o]){if(!(r=r.call(a,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,s<2&&(s=0)}else 1===s&&(r=a.return)&&r.call(a),s<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=t}else if((r=(u=g.n<0)?i:e.call(n,g))!==l)break}catch(e){a=t,s=1,i=e}finally{c=1}}return{value:r,done:u}}}(e,a,s),!0),c}var l={};function d(){}function u(){}function g(){}r=Object.getPrototypeOf;var h=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),p=g.prototype=d.prototype=Object.create(h);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,n(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=g,n(p,"constructor",g),n(g,"constructor",u),u.displayName="GeneratorFunction",n(g,i,"GeneratorFunction"),n(p),n(p,i,"Generator"),n(p,s,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m:v}},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 s=n(e,t,r,o,a);return s.next().then(function(e){return e.done?e.value:s.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,s){return new o(n().w(e,t,r,a),s||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){function a(e,o,s,i){try{var c=t[e](o),l=c.value;return l instanceof n?r.resolve(l.v).then(function(e){a("next",e,s,i)},function(e){a("throw",e,s,i)}):r.resolve(l).then(function(e){c.value=e,s(c)},function(e){return a("throw",e,s,i)})}catch(e){i(e)}}var s;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,n){function o(){return new r(function(t,r){a(e,n,t,r)})}return s=s?s.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},8590:e=>{function t(r,n,o,a){var s=Object.defineProperty;try{s({},"",{})}catch(r){s=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?s?s(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),s=r(8691),i=r(8251),c=r(9769),l=r(1423);function d(){"use strict";var t=o(),r=t.m(d),u=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function g(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))}var h={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,h[e],t)},delegateYield:function(e,o,a){return t.resultName=o,r(n.d,l(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=d=function(){return{wrap:function(e,r,n,o){return t.w(p(e),r,n,o&&o.reverse())},isGeneratorFunction:g,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(g(t)?s:a)(p(e),t,r,n,o)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,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 new 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;const s=r(2132);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:u}catch(e){return u}};t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e];t._getInstance=e=>{const r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&s.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)};const i="__STATSIG__",c="undefined"!=typeof window?window:{},l=void 0!==r.g?r.g:{},d="undefined"!=typeof globalThis?globalThis:{},u=null!==(a=null!==(o=null!==(n=c[i])&&void 0!==n?n:l[i])&&void 0!==o?o:d[i])&&void 0!==a?a:{instance:t._getInstance};c[i]=u,l[i]=u,d[i]=u},981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;const n=r(8210);function o(e,t,r){var o;if(r)return r(e,t);const a=t&&t.customIDs?t.customIDs:{},s=[`uid:${null!==(o=null==t?void 0:t.userID)&&void 0!==o?o:""}`,`cids:${Object.keys(a).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${a[e]}`).join(",")}`,`k:${e}`];return(0,n._DJB2)(s.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: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;const o=r(2132),a=r(6286),s=r(4830),i=r(6346),c=r(1829);function l(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,s._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 d}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,s._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n&&this._getIsCacheValueValid(n))return n;const 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){const r=t&&(0,s._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,l("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*(){i.Storage.isReady()||(yield i.Storage.isReadyResolver());const 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*(){const r=e&&(0,s._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;const s=null!==(n=null==e?void 0:e.data)&&void 0!==n?n:null,i=null!=e&&this._isCachedResultValidFor204(e,t),d=yield this._fetchFromNetwork(s,t,r,i);if(!d)return o.Log.debug("No response returned for latest value"),null;const u=(0,c._typedJsonParse)(d,"has_updates","Response"),g=this._getSdkKey(),h=a.StableID.get(g);let p=null;if(!0===(null==u?void 0:u.has_updates))p=l("Network",d,h,t);else{if(!s||!1!==(null==u?void 0:u.has_updates))return null;p=l("NetworkNotModified",s,h,t)}const v=this._getCacheKey(t);return this._inMemoryCache.add(v,p,this._cacheLimit),this._writeToCache(v,p),p})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(o.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;const r=null===(t=i.Storage.getItem)||void 0===t?void 0:t.call(i.Storage,e);if(null==r)return null;const n=(0,c._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){const r=JSON.stringify(t);for(let t=0;t<8;t++)try{i.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;const n=null!==(r=(0,i._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==r?r:{};n[e]=Date.now();const o=u(n,t);for(const e of o)delete n[e],i.Storage.removeItem(e);(0,i._setObjectInStorage)(this._lastModifiedStoreKey,n)}},t._makeDataAdapterResult=l;class d{constructor(){this._data={}}get(e,t){var r;const n=this._data[e],a=null==n?void 0:n.stableID,s=null===(r=null==t?void 0:t.customIDs)||void 0===r?void 0:r.stableID;return s&&a&&s!==a?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t,r){const n=u(this._data,r-1);for(const e of n)delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function u(e,t){const r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{const 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;const r=new Map,n="start",o="end",a="statsig::diagnostics";function s(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function i(e,t){var n;const o=null!==(n=r.get(e))&&void 0!==n?n:[];o.push(t),r.set(e,o)}function c(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{i(e,s({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{i(e,s({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{i(e,s(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{i(e,s(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{i(e,s({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{i(e,s(t,o,"initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:c(e,"code"),name:c(e,"name"),message:c(e,"message")}},_getDiagnosticsData(e,r,n,o){var a;return{success:!0===(null==e?void 0:e.ok),statusCode:null==e?void 0:e.status,sdkRegion:null===(a=null==e?void 0:e.headers)||void 0===a?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){const s=t.Diagnostics._getMarkers(n);if(null==s||s.length<=0)return-1;const i=s[s.length-1].timestamp-s[0].timestamp;t.Diagnostics._clearMarkers(n);const c=function(e,t){const r={eventName:a,user:e,value:null,metadata:t,time:Date.now()};return r}(e,{context:"initialize",markers:s.slice(),statsigOptions:o});return r.enqueue(c),i}}},6413:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;const 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*(){const 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){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const r=yield t.arrayBuffer();return function(e){const t=e.findIndex((t,r)=>r<200&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(e[r-1])));if(-1===t){const e=new 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(r))})}},6663:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1290: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;const o=r(2132),a=r(2442),s=r(2452);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const i="[Statsig] UnknownError";function c(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function l(e){if(!e)return{};const t={};return Object.keys(e).forEach(r=>{const n=r,o=e[n];switch(typeof o){case"number":case"bigint":case"boolean":t[String(n)]=o;break;case"string":o.length<50?t[String(n)]=o:t[String(n)]="set";break;case"object":"environment"===n?t.environment=o:"networkConfig"===n?t.networkConfig=o:t[String(n)]=null!=o?"set":"unset"}}),t}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{const r=e;(function(e){const t=new Set;let 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)})(r).forEach(n=>{const o=r[n];"$EB"in o||(r[n]=(...r)=>this._capture(t?`${t}:${n}`:n,()=>o.apply(e,r)),r[n].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=c(e))}_capture(e,t){try{const r=t();return r&&r instanceof Promise?r.catch(t=>this._onError(e,t)):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,d,u,g,h,p;const v=r||Error(i),f=v instanceof Error,b=f?v.name:"No Name",y=c(v);if(this._lastSeenError=y,this._seen.has(b))return;if(this._seen.add(b),null===(o=null===(n=this._options)||void 0===n?void 0:n.networkConfig)||void 0===o?void 0:o.preventAllNetworkTraffic)return void(null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:r,tag:e}));const _=a.SDKType._get(this._sdkKey),m=s.StatsigMetadataProvider.get(),k=f?v.stack:function(e){try{return JSON.stringify(e)}catch(e){return i}}(v),w=Object.assign({tag:e,exception:b,info:k,statsigOptions:l(this._options)},Object.assign(Object.assign({},m),{sdkType:_})),O=null!==(h=null===(g=null===(u=this._options)||void 0===u?void 0:u.networkConfig)||void 0===g?void 0:g.networkOverrideFunc)&&void 0!==h?h:fetch;yield O(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(_),"STATSIG-SDK-VERSION":String(m.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(w)}),null===(p=this._emitter)||void 0===p||p.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: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;const o=r(981),a=r(8210),s=r(2132),i=r(3582),c=r(6650),l=r(1217),d=r(5910),u=r(6346),g=r(5445),h=r(5873),p={},v="startup",f="gained_focus";class b{static _safeFlushAndForget(e){var t;null===(t=p[e])||void 0===t||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null===(t=p[e])||void 0===t||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)&&void 0!==o?o:!0===(null==n?void 0:n.disableLogging)?d.LoggingEnabledOption.disabled:d.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&s.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!==(a=null==n?void 0:n.loggingBufferMaxSize)&&void 0!==a?a:100;const c=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new g.UrlConfiguration(i.Endpoint._rgstr,null==c?void 0:c.logEventUrl,null==c?void 0:c.api,null==c?void 0:c.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){const e=this._getStorageKey(),t=(0,u._getObjectFromStorage)(e);t&&this._queue.push(...t),u.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&b._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;const r=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;const t=(0,c._isServerEnv)();t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled)||(p[this._sdkKey]=this,t||(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?b._safeFlushAndForget(this._sdkKey):"foreground"===e&&b._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(v),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;const e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>b._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,c._isServerEnv)())return!1;if(!(0,l._isExposureEvent)(e))return!0;const r=e.user?e.user:{statsigEnvironment:void 0},n=(0,o._getUserStorageKey)(this._sdkKey,r),a=e.metadata?e.metadata:{},s=[e.eventName,n,a.gate,a.config,a.ruleID,a.allocatedExperiment,a.parameterName,String(a.isExplicitParameter),a.reason].join("|"),i=this._lastExposureTimeMap[s],d=Date.now();return!(i&&d-i<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[s]=d,!0)}_sendEvents(e){return n(this,void 0,void 0,function*(){var t,r;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{const n=(0,h._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(r=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===r?void 0:r.networkOverrideFunc);this._emitter({name:"pre_logs_flushed",events:e});return(n?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success?(this._emitter({name:"logs_flushed",events:e}),!0):(s.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1)}catch(e){return s.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return n(this,void 0,void 0,function*(){var t;const r=yield this._network.post(this._getRequestData(e)),n=null!==(t=null==r?void 0:r.code)&&void 0!==t?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:{[i.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();const t=this._getStorageKey();try{const r=this._getFailedLogsFromStorage(t);(0,u._setObjectInStorage)(t,[...r,...e])}catch(e){s.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{const r=(0,u._getObjectFromStorage)(e);return Array.isArray(r)&&(t=r),t}catch(e){return[]}}_retryFailedLogs(e){const t=this._getStorageKey();(()=>n(this,void 0,void 0,function*(){u.Storage.isReady()||(yield u.Storage.isReadyResolver());const r=(0,u._getObjectFromStorage)(t);if(!r)return;e===v&&u.Storage.removeItem(t);(yield this._sendEvents(r))&&e===f&&u.Storage.removeItem(t)}))().catch(()=>{s.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);const t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});const n=Object.assign(Object.assign({},e),t);s.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(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,c._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;const r=null!==(t=null===(e=this._options)||void 0===e?void 0:e.loggingIntervalMs)&&void 0!==t?t:1e4,n=setInterval(()=>{const e=p[this._sdkKey];e&&e._flushIntervalId===n?b._safeFlushAndForget(this._sdkKey):clearInterval(n)},r);this._flushIntervalId=n}}t.EventLogger=b},8210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;const 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;const o=Object.keys(e).sort(),a={};return o.forEach(o=>{const s=e[o];0!==r&&"object"===(0,n._typeOf)(s)?a[o]=(0,t._getSortedObject)(s,null!=r?r-1:r):a[o]=s}),a}},2849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;function r(e){return e.unshift("[Statsig]"),e}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"};const r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let a=`${e}|${t}`;if(!o)return a;for(const 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: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(8657);const o=r(8657),a=r(2798),s=r(2132),i=r(3582),c=r(2064),l=r(4175),d=r(2442),u=r(6650),g=r(4899),h=r(6286),p=r(3528),v=r(2452),f=r(5910),b=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 c.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(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!_(e))return!1;const 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*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return n(this,void 0,void 0,function*(){var t,r,o,c;if(!_(e))return null;if(this._netConfig.preventAllNetworkTraffic)return null;const{method:l,body:d,retries:u,attempt:g}=e,h=e.urlConfig.endpoint;if(this._isRateLimited(h))return s.Log.warn(`Request to ${h} was blocked because you are making requests too frequently.`),null;const v=null!=g?g:1;let f=!1;const m=this._getPopulatedURL(e);let w=null;const O=(0,b._isUnloading)();try{const r={method:l,body:d,headers:Object.assign({},e.headers),priority:e.priority,keepalive:O};!function(e,t){if(e.urlConfig.endpoint!==i.Endpoint._initialize)return;a.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(e,v);const n=this._leakyBucket[h];n&&(n.lastRequestTime=Date.now(),this._leakyBucket[h]=n);const o=null!==(t=this._netConfig.networkOverrideFunc)&&void 0!==t?t:fetch;let s;if(w=yield Promise.race([o(m,r).finally(()=>clearTimeout(s)),new Promise((e,t)=>{s=setTimeout(()=>{f=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!w.ok){const e=yield w.text().catch(()=>"No Text"),t=new Error(`NetworkError: ${m} ${e}`);throw t.name="NetworkError",t}const c=yield w.text();return k(e,w,v,c),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:c,code:w.status}}catch(t){const a=function(e){if("string"==typeof e)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;return"Unknown Error"}(t),i=(E=f,(null!=a?a:"").includes("Timeout")||E);k(e,w,v,"",t);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,a,i))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!u||v>u||!y.has(null!==(r=null==w?void 0:w.status)&&void 0!==r?r:500)){null===(o=this._emitter)||void 0===o||o.call(this,{name:"error",error:t,tag:p.ErrorTag.NetworkError,requestArgs:e});const r=`A networking error occurred during ${l} request to ${m}.`;return s.Log.error(r,a,t),null===(c=this._errorBoundary)||void 0===c||c.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)))})}(v),this._sendRequest(Object.assign(Object.assign({},e),{retries:u,attempt:v+1}))}var E})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=f.LogEventCompressionMode.Disabled),t||(t=f.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const r=Date.now(),n=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:r},o=r-n.lastRequestTime,a=Math.floor(.05*o);return n.count=Math.max(0,n.count-a),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;const r=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==i.Endpoint._initialize&&e.urlConfig.endpoint!==i.Endpoint._download_config_specs||(this._lastUsedInitUrl=r);const n=Object.assign({[i.NetworkParam.SdkKey]:e.sdkKey,[i.NetworkParam.SdkType]:d.SDKType._get(e.sdkKey),[i.NetworkParam.SdkVersion]:v.SDK_VERSION,[i.NetworkParam.Time]:String(Date.now()),[i.NetworkParam.SessionID]:g.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;const r=(0,u._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)&&void 0!==t?t:{}),{[i.NetworkParam.StatsigEncoded]:"1"})}catch(t){s.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return n(this,void 0,void 0,function*(){var t;const r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,o._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===l.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case f.LogEventCompressionMode.Disabled:return!1;case f.LogEventCompressionMode.Enabled:return!(r&&!n);case f.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(r),o=new CompressionStream("gzip"),a=o.writable.getWriter();a.write(n).catch(s.Log.error),a.close().catch(s.Log.error);const c=o.readable.getReader(),l=[];let d;for(;!(d=yield c.read()).done;)l.push(d.value);const u=l.reduce((e,t)=>e+t.length,0),g=new Uint8Array(u);let h=0;for(const e of l)g.set(e,h),h+=e.length;e.body=g,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[i.NetworkParam.IsGzipped]:"1"})}catch(t){s.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){const r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),n=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&m(n,t.data),n}};const _=e=>!!e.sdkKey||(s.Log.warn("Unable to make request without an SDK key"),!1),m=(e,t)=>{const{sdkKey:r,fallbackUrl:n}=e,o=h.StableID.get(r),a=g.SessionID.get(r),s=d.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},v.StatsigMetadataProvider.get()),{stableID:o,sessionID:a,sdkType:s,fallbackUrl:n})}))};function k(e,t,r,n,o){e.urlConfig.endpoint===i.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqEnd(e.sdkKey,a.Diagnostics._getDiagnosticsData(t,r,n,o))}},2064: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;const o=r(6413),a=r(8210),s=r(2132),i=r(6346),c=6048e5;function l(e,t){var r;const n=null!==(r=null==e?void 0:e.toLowerCase())&&void 0!==r?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function d(e){return`statsig.network_fallback.${(0,a._DJB2)(e)}`}function u(e,t){const r=d(e);t&&0!==Object.keys(t).length?i.Storage.setItem(r,JSON.stringify(t)):i.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?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r;const n=null===(r=this._fallbackInfo)||void 0===r?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+c,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){const t=d(e),r=i.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return s.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==r?r:{},this._fallbackInfo=o);const a=o[t.endpoint];return!a||Date.now()>(null!==(n=a.expiryTime)&&void 0!==n?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;const a=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,s=this._pickNewFallbackUrl(null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint],a);return!!s&&(this._updateFallbackInfoWithNewUrl(e,t,s),!0)}catch(e){return null===(a=this._errorBoundary)||void 0===a||a.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var n,o,a;const s={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+c,previous:[]},i=t.endpoint,l=null===(n=this._fallbackInfo)||void 0===n?void 0:n[i];l&&s.previous.push(...l.previous),s.previous.length>10&&(s.previous=[]);const d=null===(a=null===(o=this._fallbackInfo)||void 0===o?void 0:o[i])||void 0===a?void 0:a.url;null!=d&&s.previous.push(d),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[i]:s}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return n(this,void 0,void 0,function*(){var t;const r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;const n=[],a=yield(0,o._fetchTxtRecords)(null!==(t=this._networkOverrideFunc)&&void 0!==t?t:fetch),s=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(const t of a){if(!t.startsWith(e.endpointDnsKey+"="))continue;const r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${s}`)}}return n})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;const n=new Set(null!==(r=null==e?void 0:e.previous)&&void 0!==r?r:[]),o=null==e?void 0:e.url;let a=null;for(const e of t){const 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;const 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?void 0:n[t])&&void 0!==o&&o}}},2442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;const r={};let n;t.SDKType={_get:e=>{var t;return(null!==(t=r[e])&&void 0!==t?t:"js-mono")+(null!=n?n:"")},_setClientType(e,t){r[e]=t},_setBindingType(e){n&&"-react"!==n||(n="-"+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=()=>"undefined"!=typeof window?window:null;t._getDocumentSafe=()=>{var e;const r=(0,t._getWindowSafe)();return null!==(e=null==r?void 0:r.document)&&void 0!==e?e:null};t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;const e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||e};t._addWindowEventListenerSafe=(e,r)=>{const n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)};t._addDocumentEventListenerSafe=(e,r)=>{const 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?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}};t._getUnloadEvent=()=>{const e=(0,t._getWindowSafe)();if(!e)return"beforeunload";return"onpagehide"in e?"pagehide":"beforeunload"}},4899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const n=r(8657),o=r(981),a=r(2132),s=r(6346),i=r(2555),c=18e5,l=144e5,d={};function u(e,t){return setTimeout(()=>{var t;const r=null===(t=(0,n._getStatsigGlobal)())||void 0===t?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})},t)}function g(e){return`statsig.session_id.${(0,o._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==d[e]&&(d[e]=function(e){let t=function(e){const t=g(e);return(0,s._getObjectFromStorage)(t)}(e);const r=Date.now();t||(t={sessionID:(0,i.getUUID)(),startTime:r,lastUpdate:r});return{data:t,sdkKey:e}}(e));return function(e){const t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>c}(r)||function({startTime:e}){return Date.now()-e>l}(r)){r.sessionID=(0,i.getUUID)(),r.startTime=t;const e=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){const r=g(t);try{(0,s._setObjectInStorage)(r,e)}catch(e){a.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);const o=t-r.startTime;return e.idleTimeoutID=u(n,c),e.ageTimeoutID=u(n,l-o),e}(d[e])},overrideInitialSessionID:(e,t)=>{d[t]=function(e,t){const r=Date.now();return{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t}}(e,t)}}},5940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0;t._fastApproxSizeOf=(e,r)=>{let n=0;const o=Object.keys(e);for(let a=0;a<o.length;a++){const s=o[a],i=e[s];if(n+=s.length,n+="object"==typeof i&&null!==i?(0,t._fastApproxSizeOf)(i,r)+2:String(i).length+1,n>=r)return n}return n}},6286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;const n=r(981),o=r(2132),a=r(6650),s=r(6346),i=r(2555),c={},l={},d={};function u(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function g(e,t){const r=u(t);try{(0,s._setObjectInStorage)(r,e)}catch(e){o.Log.warn("Failed to save StableID to storage")}}function h(e,t){if(!l[t]||null==(0,a._getDocumentSafe)())return;const 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=>{if(d[e])return null;if(null!=c[e])return c[e];let t=null;return t=function(e){if(!l[e]||null==(0,a._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const r of t){const[t,n]=r.trim().split("=");if(t===p(e))return decodeURIComponent(n)}return null}(e),null!=t?(c[e]=t,g(t,e),t):(t=function(e){const t=u(e);return(0,s._getObjectFromStorage)(t)}(e),null==t&&(t=(0,i.getUUID)()),g(t,e),h(t,e),c[e]=t,t)},setOverride:(e,t)=>{c[t]=e,g(e,t),h(e,t)},_setCookiesEnabled:(e,t)=>{l[e]=t},_setDisabled:(e,t)=>{d[e]=t}},t.getCookieName=p},5939: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(8657);const o=r(8657),a=r(1290),s=r(638),i=r(2132),c=r(6375),l=r(6650),d=r(4899),u=r(6286),g=r(5910),h=r(6346);t.StatsigClientBase=class{constructor(e,t,r,n){var c,g,p,v;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const f=this.$emt.bind(this);null!=(null==n?void 0:n.logLevel)&&(i.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&h.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&d.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&h.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&u.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&u.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!==(c=null==n?void 0:n.overrideAdapter)&&void 0!==c?c:null,this._logger=new s.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=h.Storage,null===(v=null===(p=null===(g=this.overrideAdapter)||void 0===g?void 0:g.loadFromStorage)||void 0===p?void 0:p.call(g))||void 0===v||v.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,l._isServerEnv)())return;const n=(0,o._getStatsigGlobal)(),a=null!==(r=n.instances)&&void 0!==r?r:{},s=t;null!=a[e]&&i.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]=s,n.firstInstance||(n.firstInstance=s);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,h.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,u.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(g.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return 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]){const 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;const r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,r);i.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["*"])||void 0===t||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){!0!==(null==r?void 0:r.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(r,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);const o=(0,c.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;const 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:i(r,n),secondaryExposures:o,time:Date.now()});t._isExposureEvent=({eventName:e})=>e===n||e===r||e===o;function s(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._createGateExposure=(e,t,r)=>{var o,i,c;const l={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(l.configVersion=t.__evaluation.version),a(n,e,t.details,l,s(null!==(c=null===(i=t.__evaluation)||void 0===i?void 0:i.secondary_exposures)&&void 0!==c?c:[],r))},t._mapExposures=s;t._createConfigExposure=(e,t,n)=>{var o,i,c,l;const d={config:t.name,ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(d.configVersion=t.__evaluation.version),null!=(null===(i=t.__evaluation)||void 0===i?void 0:i.passed)&&(d.rulePassed=String(t.__evaluation.passed)),a(r,e,t.details,d,s(null!==(l=null===(c=t.__evaluation)||void 0===c?void 0:c.secondary_exposures)&&void 0!==l?l:[],n))};t._createLayerParameterExposure=(e,t,r,n)=>{var i,c,l,d,u,g,h;const p=t.__evaluation,v=!0===(null===(i=null==p?void 0:p.explicit_parameters)||void 0===i?void 0:i.includes(r));let f="",b=null!==(c=null==p?void 0:p.undelegated_secondary_exposures)&&void 0!==c?c:[];v&&(f=null!==(l=p.allocated_experiment_name)&&void 0!==l?l:"",b=null!==(d=p.secondary_exposures)&&void 0!==d?d:[]);const y=null===(u=t.__evaluation)||void 0===u?void 0:u.parameter_rule_ids,_={config:t.name,parameterName:r,ruleID:null!==(g=null==y?void 0:y[r])&&void 0!==g?g:t.ruleID,allocatedExperiment:f,isExplicitParameter:String(v)};return null!=(null===(h=t.__evaluation)||void 0===h?void 0:h.version)&&(_.configVersion=t.__evaluation.version),a(o,e,t.details,_,s(b,n))};const i=(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;const 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)&&void 0!==o?o:"",__evaluation:r,value:n}}function s(e,t,r){var n;const o=null!==(n=null==r?void 0:r.value)&&void 0!==n?n:{};return Object.assign(Object.assign({},a(e,t,r,o)),{get:i(e,null==r?void 0:r.value)})}function i(e,t,r){return(a,s)=>{var i;const c=null!==(i=null==t?void 0:t[a])&&void 0!==i?i:null;return null==c?null!=s?s:null:null==s||(0,o._isTypeMatch)(c,s)?(null==r||r(a),c):(n.Log.warn(`Parameter type mismatch. '${e}.${a}' was found to be type '${typeof c}' but fallback/return type is '${typeof s}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=s?s:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},a(e,t,r,!0===(null==r?void 0:r.value))),{idType:null!==(n=null==r?void 0:r.id_type)&&void 0!==n?n:null})},t._makeDynamicConfig=s,t._makeExperiment=function(e,t,r){var n;const o=s(e,t,r);return Object.assign(Object.assign({},o),{groupName:null!==(n=null==r?void 0:r.group_name)&&void 0!==n?n:null})},t._makeLayer=function(e,t,r,n){var o,s;return Object.assign(Object.assign({},a(e,t,r,void 0)),{get:i(e,null==r?void 0:r.value,n),groupName:null!==(o=null==r?void 0:r.group_name)&&void 0!==o?o:null,__value:null!==(s=null==r?void 0:r.value)&&void 0!==s?s:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,r,n)})},t._makeTypedGet=i},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;const n=r(8210),o=r(2132);t._normalizeUser=function(e,t,r){try{const 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;const n=r(2132),o=r(6650),a={},s={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)};let i=null;try{const e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(i={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 c=null!=i?i:s,l=c;function d(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(s),null;if(e instanceof Error&&"QuotaExceededError"===e.name){const r=t.Storage.getAllKeys().filter(e=>e.startsWith("statsig."));e.message=`${e.message}. Statsig Keys: ${r.length}`}throw e}}t.Storage={isReady:()=>l.isReady(),isReadyResolver:()=>l.isReadyResolver(),getProviderName:()=>l.getProviderName(),getItem:e=>d(()=>l.getItem(e)),setItem:(e,t)=>d(()=>l.setItem(e,t)),removeItem:e=>l.removeItem(e),getAllKeys:()=>l.getAllKeys(),_setProvider:e=>{c=e,l=e},_setDisabled:e=>{l=e?s:c}},t._getObjectFromStorage=function(e){const 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;const n=r(2132);t._typedJsonParse=function(e,t,r){try{const 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){const 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("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;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}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;const 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 s=o.NetworkDefault[e];this.defaultUrl=`${s}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var e;const t=(null!==(e=this.fallbackUrls)&&void 0!==e?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;const n=r(6650),o="foreground",a="background",s=[];let i=o,c=!1;t._isCurrentlyVisible=()=>i===o;t._isUnloading=()=>c;t._subscribeToVisiblityChanged=e=>{s.unshift(e)};t._notifyVisibilityChanged=e=>{e!==i&&(i=e,s.forEach(t=>t(e)))},(0,n._addWindowEventListenerSafe)("focus",()=>{c=!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)(),()=>{c=!0,(0,t._notifyVisibilityChanged)(a)})},382: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(8657);const a=r(8657),s=r(2798);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return s.Diagnostics}});const i=r(638);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return i.EventLogger}});const c=r(2132);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return c.Log}});const l=r(2452),d=r(6346);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return d.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:c.Log,SDK_VERSION:l.SDK_VERSION})},450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;const n=r(382);function o(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){const r=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!r)return{hadBadDeltaChecksum:!0};const a=function(e){const t=e;return o(e.deleted_gates,t.feature_gates),delete t.deleted_gates,o(e.deleted_configs,t.dynamic_configs),delete t.deleted_configs,o(e.deleted_layers,t.layer_configs),delete t.deleted_layers,t}(function(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{feature_gates:Object.assign(Object.assign({},e.feature_gates),t.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),t.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),t.dynamic_configs)})}(e,r)),s=(0,n._DJB2Object)({feature_gates:a.feature_gates,dynamic_configs:a.dynamic_configs,layer_configs:a.layer_configs},2);return s===r.checksumV2?JSON.stringify(a):{hadBadDeltaChecksum:!0,badChecksum:s,badMergedConfigs:a,badFullResponse:r.deltas_full_response}}},8321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const 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;const a=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");if(null==a)return!1;if(this._source=e.source,!0!==(null==a?void 0:a.has_updates))return!0;return(null!==(r=a.time)&&void 0!==r?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)&&void 0!==o?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?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.dynamic_configs,e)}getConfigList(){var e;return(null===(e=this._values)||void 0===e?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?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;const 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;const a=n.StableID.get(this._sdkKey);if((null===(r=e.customIDs)||void 0===r?void 0:r.stableID)===a||!(null===(o=e.customIDs)||void 0===o?void 0:o.stableID)&&!a){if("user"in t){const 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")}}else this._warnings.add("StableIDMismatch")}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};const 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;const n=this.getCurrentSourceDetails();let o=n.reason;const a=null!==(t=n.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&a.length>0&&(o+=a[0]),"Uninitialized"!==o&&"NoValues"!==o){o=`${o}:${e?"Unrecognized":"Recognized"}`}const s="Bootstrap"===this._source&&null!==(r=this._bootstrapMetadata)&&void 0!==r?r:void 0;return s&&(n.bootstrapMetadata=s),Object.assign(Object.assign({},n),{reason:o})}}},6892: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const o=r(382),a=r(450);class s 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,s){return n(this,void 0,void 0,function*(){var n,i,c,l,d,u;const g=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null;let h={user:a,hash:null!==(c=null===(i=null===(n=this._option)||void 0===n?void 0:n.networkConfig)||void 0===i?void 0:i.initializeHashAlgorithm)&&void 0!==c?c:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==g?void 0:g.has_updates){const e=(null==g?void 0:g.hash_used)!==(null!==(u=null===(d=null===(l=this._option)||void 0===l?void 0:l.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==u?u:"djb2");h=Object.assign(Object.assign({},h),{sinceTime:s&&!e?g.time:0,previousDerivedFields:"derived_fields"in g&&s?g.derived_fields:{},deltasResponseRequested:!0,full_checksum:g.full_checksum,partialUserMatchSinceTime:e?0:g.time})}return this._fetchEvaluations(e,g,h,r)})}_fetchEvaluations(e,t,r,o){return n(this,void 0,void 0,function*(){var n,s;const i=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:o});if(204===(null==i?void 0:i.code))return'{"has_updates": false}';if(200!==(null==i?void 0:i.code))return null!==(n=null==i?void 0:i.body)&&void 0!==n?n:null;if(!0!==(null==t?void 0:t.has_updates)||!0!==(null===(s=i.body)||void 0===s?void 0:s.includes('"is_delta":true'))||!0!==r.deltasResponseRequested)return i.body;const c=(0,a._resolveDeltasResponse)(t,i.body);return"string"==typeof c?c:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),c),{deltasResponseRequested:!1}),o)})}}t.default=s},2739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;const n=r(382),o={disableExposureLog:!0};function a(e){return null==e||!1===e.disableExposureLog}function s(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(i,c)=>{if(null==t)return c;const l=t[i];if(null==l||null!=c&&(0,n._typeOf)(c)!==l.param_type)return c;switch(l.ref_type){case"static":return function(e){return e.value}(l);case"gate":return function(e,t,r){return e.getFeatureGate(t.gate_name,a(r)?void 0:o).value?t.pass_value:t.fail_value}(e,l,r);case"dynamic_config":return function(e,t,r,n){const i=e.getDynamicConfig(t.config_name,a(n)?void 0:o).get(t.param_name);return s(i,r)?r:i}(e,l,c,r);case"experiment":return function(e,t,r,n){const i=e.getExperiment(t.experiment_name,a(n)?void 0:o).get(t.param_name);return s(i,r)?r:i}(e,l,c,r);case"layer":return function(e,t,r,n){const i=e.getLayer(t.layer_name,a(n)?void 0:o).get(t.param_name);return s(i,r)?r:i}(e,l,c,r);default:return c}}}},6962: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const o=r(382),a=r(8321),s=r(6892),i=r(2739),c=r(1887);class l extends o.StatsigClientBase{static instance(e){const t=(0,o._getStatsigGlobal)().instance(e);return t instanceof l?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new l(null!=e?e:"",{}))}constructor(e,t,r=null){var n,i;o.SDKType._setClientType(e,"javascript-client");const l=new s.default(r,e=>{this.$emt(e)});super(e,null!==(n=null==r?void 0:r.dataAdapter)&&void 0!==n?n:new c.StatsigEvaluationsDataAdapter,l,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=l,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)();const d=null!==(i=null==r?void 0:r.plugins)&&void 0!==i?i:[];for(const e of d)e.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())&&void 0!==t?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){const r=performance.now();try{return this._updateUserSyncImpl(e,t,r)}catch(e){const t=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(t,r)}}_updateUserSyncImpl(e,t,r){var n;const a=[...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]];this._resetForUser(e);const s=this.dataAdapter.getDataSync(this._user);null==s&&a.push("NoCachedValues"),this._store.setValues(s,this._user),this._finalizeUpdate(s);const i=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===i||null==i&&"Bootstrap"===(null==s?void 0:s.source)||this._runPostUpdate(null!=s?s: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*(){const r=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(e){const t=e instanceof Error?e:new Error(String(e));return this._createErrorUpdateDetails(t,r)}})}_updateUserAsyncImpl(e,t){return n(this,void 0,void 0,function*(){this._resetForUser(e);const 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,new 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());const s=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(a,this._store.getSource(),s,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){const 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())&&void 0!==r?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;const s=(0,o._normalizeUser)(e,t),i=null===(r=s.customIDs)||void 0===r?void 0:r.stableID;if(i){const e=null===(a=(n=this.storageProvider).isReadyResolver)||void 0===a?void 0:a.call(n);e?e.then(()=>o.StableID.setOverride(i,this._sdkKey),()=>o.StableID.setOverride(i,this._sdkKey)):o.StableID.setOverride(i,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(s.analyticsOnlyMetadata=Object.assign(Object.assign({},s.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),s}_getFeatureGateImpl(e,t){var r,n;const{result:a,details:s}=this._store.getGate(e),i=(0,o._makeFeatureGate)(e,s,a),c=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getGateOverride)||void 0===n?void 0:n.call(r,i,this._user,t),l=null!=c?c:i;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,l,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:l}),l}_getDynamicConfigImpl(e,t){var r,n;const{result:a,details:s}=this._store.getConfig(e),i=(0,o._makeDynamicConfig)(e,s,a),c=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getDynamicConfigOverride)||void 0===n?void 0:n.call(r,i,this._user,t),l=null!=c?c:i;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,l,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:l}),l}_getExperimentImpl(e,t){var r,n,a,s;const{result:i,details:c}=this._store.getConfig(e),l=(0,o._makeExperiment)(e,c,i);null!=l.__evaluation&&(l.__evaluation.secondary_exposures=(0,o._mapExposures)(null!==(n=null===(r=l.__evaluation)||void 0===r?void 0:r.secondary_exposures)&&void 0!==n?n:[],this._store.getExposureMapping()));const d=null===(s=null===(a=this.overrideAdapter)||void 0===a?void 0:a.getExperimentOverride)||void 0===s?void 0:s.call(a,l,this._user,t),u=null!=d?d:l;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:u}),u}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var r,n,a;const{result:s,details:i}=this._store.getLayer(e),c=(0,o._makeLayer)(e,i,s),l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getLayerOverride)||void 0===n?void 0:n.call(r,c,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,o._mergeOverride)(c,l,null!==(a=null==l?void 0:l.__value)&&void 0!==a?a:c.__value,r=>{(null==t?void 0:t.disableExposureLog)||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,d,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var r,n;const{result:o,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:o,get:(0,i._makeParamStoreGetter)(this,o,t)},c=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getParamStoreOverride)||void 0===n?void 0:n.call(r,s,t);return null!=c&&(s.__configuration=c.config,s.details=c.details,s.get=(0,i._makeParamStoreGetter)(this,c.config,t)),s}}t.default=l},1887: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 s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,i)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;const o=r(382),a=r(6892);class s 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){const 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;const a=yield null===(n=this._network)||void 0===n?void 0:n.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,o);return null!=a?a:null})}_getCacheKey(e){var t;const r=(0,o._getStorageKey)(this._getSdkKey(),e,null===(t=this._options)||void 0===t?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=s},7726: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;const a=r(382),s=r(6962);t.StatsigClient=s.default,o(r(382),t);const i=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:s.default});t.default=i}},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=function(){if("object"==typeof globalThis)return globalThis;try{return this||new 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,{setGlobalTheme:()=>Rt});var e={};function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}function s(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,a(n.key),n)}}function i(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(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 d(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 u(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}function g(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,s,i=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return i}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,r,n,o,a,s){try{var i=e[a](s),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(e){h(a,n,o,s,i,"next",e)}function i(e){h(a,n,o,s,i,"throw",e)}s(void 0)})}}r.r(e),r.d(e,{CURRENT_SURFACE_CSS_VAR:()=>Je,ThemeMutationObserver:()=>Tt,enableGlobalTheme:()=>Dt,getGlobalTheme:()=>Lt,getSSRAutoScript:()=>Pt,getThemeHtmlAttrs:()=>st,getThemeStyles:()=>jt,getTokenValue:()=>We,setGlobalTheme:()=>Ct,themeConfig:()=>Re,themeObjectToString:()=>rt,themeStringToObject:()=>tt,token:()=>qe,useThemeObserver:()=>At()});var v=r(6192),f=r.n(v),b=r(7726),y=r(2646),_=r.n(y);function m(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 k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var w="@all-features",O=function(){return i(function e(){t(this,e),c(this,"eventToValue",new Map),this.emitter=new(_())},[{key:"onGateUpdated",value:function(e,t,r,n){var o=this,a=r(e,k(k({},n),{},{fireGateExposure:!1}));void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,a);var s=function(){var a=r(e,k(k({},n),{},{fireGateExposure:!1}));o.eventToValue.get(t)!==a&&(o.eventToValue.set(t,a),t(a))};return this.emitter.on(e,s),function(){o.emitter.off(e,s)}}},{key:"onExperimentValueUpdated",value:function(e,t,r,n,o,a){var s=this,i="".concat(e,".").concat(t),c=o(e,t,r,k(k({},a),{},{fireExperimentExposure:!1}));void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,c);var l=function(){var i=o(e,t,r,k(k({},a),{},{fireExperimentExposure:!1}));s.eventToValue.get(n)!==i&&(s.eventToValue.set(n,i),n(i))};return this.emitter.on(i,l),function(){s.emitter.off(i,l)}}},{key:"onAnyUpdated",value:function(e){var t=this;return this.emitter.on(w,e),function(){t.emitter.off(w,e)}}},{key:"anyUpdated",value:function(){var e=this;this.emitter.emit(w),this.emitter.eventNames().filter(function(e){return e!==w}).forEach(function(t){e.emitter.emit(t)})}}])}();function E(){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)||void 0===e||null===(e=e.hostname)||void 0===e?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}var x=function(e){return e.Error="Error",e.LocalOverride="LocalOverride",e.Unrecognized="Unrecognized",e.Uninitialized="Uninitialized",e.NetworkNotModified="NetworkNotModified",e.Network="Network",e.InvalidBootstrap="InvalidBootstrap",e.Bootstrap="Bootstrap",e.Cache="Cache",e.Unknown="Unknown",e}({}),S=function(e){return e.Development="development",e.Staging="staging",e.Production="production",e}({}),C=function(e){return e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e}({}),D=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function j(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 P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var I=function(e){return P({perimeter:E()?C.FEDRAMP_MODERATE:C.COMMERCIAL},e)},A=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=g(e,1)[0],n=g(t,1)[0];return r.localeCompare(n)};r.sort(o),n.sort(o);for(var a=0;a<r.length;a++){if(g(r[a],2)[1]!==g(n[a],2)[1])return!1}return!0},U=function(e,t){var r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},M=function(e){var t=e.api,r=e.disableCurrentPageLogging,n=e.loggingIntervalMillis,o=e.loggingBufferMaxSize,a=e.localMode,s=e.eventLoggingApi,i=e.eventLoggingApiForRetries,c=e.disableLocalStorage,d=e.ignoreWindowUndefined,u=e.disableAllLogging;e.initTimeoutMs,e.disableNetworkKeepalive,e.overrideStableID,e.disableErrorLogging,e.disableAutoMetricsLogging;return P(P({},l(e,D)),{},{networkConfig:{api:t,logEventUrl:s?s+"rgstr":void 0,logEventFallbackUrls:i?[i]:void 0,preventAllNetworkTraffic:a||!d&&"undefined"==typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:o,disableStorage:void 0===c?a:c,disableLogging:void 0===u?a:u})},L=Object.entries(x).map(function(e){var t=g(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]}),T=function(e){var t,r,n,o=e.reason.toLowerCase();return{reason:null!==(t=null===(r=L.find(function(e){var t=g(e,1)[0];return o.includes(t)}))||void 0===r?void 0:r[1])&&void 0!==t?t:x.Unknown,time:null!==(n=e.receivedAt)&&void 0!==n?n:Date.now()}},F=function(e){return e.map(function(e){return"string"==typeof e?{gate:e}:e})},N=function(){function e(r,n,o,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;t(this,e),this.value=n,this._name=r,this._ruleID=o,this._secondaryExposures=s,this._allocatedExperimentName=i,this._evaluationDetails=a,this._onDefaultValueFallback=c}return i(e,[{key:"get",value:function(e,t,r){var n,a=this.getValue(e,t);if(null==a)return t;var s,i=Array.isArray(t)?"array":o(t),c=Array.isArray(a)?"array":o(a);return r?r(a)?(this.fireExposure(e),a):(null===(s=this._onDefaultValueFallback)||void 0===s||s.call(this,this,e,i,c),t):null==t||i===c?(this.fireExposure(e),a):(null===(n=this._onDefaultValueFallback)||void 0===n||n.call(this,this,e,i,c),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,T(t.details),F(null!==(r=null===(n=t.__evaluation)||void 0===n?void 0:n.secondary_exposures)&&void 0!==r?r:[]),null!==(o=t.groupName)&&void 0!==o?o:void 0);return a.experiment=t,a}}])}(),R=function(){function e(r,n,o,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];t(this,e),this._logParameterFunction=s,this._name=r,this._value=JSON.parse(JSON.stringify(null!=n?n:{})),this._ruleID=null!=o?o:"",this._evaluationDetails=a,this._secondaryExposures=i,this._undelegatedSecondaryExposures=c,this._allocatedExperimentName=l,this._explicitParameters=d}return i(e,[{key:"get",value:function(e,t,r){var n=this,a=this._value[e];if(null==a)return t;var s=function(){return n._logLayerParameterExposure(e),a};return r?r(a)?s():t:null==t||o(a)===o(t)&&Array.isArray(t)===Array.isArray(a)?s():t}},{key:"getValue",value:function(e,t){null==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)||void 0===t||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,n,o,a,s,i;return new e(t.name,t.__value,t.ruleID,T(t.details),function(e,r){return t.get(r)},F(null!==(r=null===(n=t.__evaluation)||void 0===n?void 0:n.secondary_exposures)&&void 0!==r?r:[]),F(null!==(o=null===(a=t.__evaluation)||void 0===a?void 0:a.undelegated_secondary_exposures)&&void 0!==o?o:[]),null===(s=t.__evaluation)||void 0===s?void 0:s.allocated_experiment_name,null===(i=t.__evaluation)||void 0===i?void 0:i.explicit_parameters)}}])}(),V="0.0.0-development";function K(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}function B(e,t){if("function"!=typeof t&&null!==t)throw new 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&&G(e,t)}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($=function(){return!!e})()}function J(e){var t="function"==typeof Map?new Map:void 0;return J=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 new 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($())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&G(o,r.prototype),o}(e,arguments,z(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),G(r,e)},J(e)}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(q=function(){return!!e})()}var W=function(e){function r(e){return t(this,r),n=this,a=[e],o=z(o=r),K(n,q()?Reflect.construct(o,a||[],z(n).constructor):o.apply(n,a));var n,o,a}return B(r,e),i(r)}(J(Error));function H(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 Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var X=function(){function e(){t(this,e)}return i(e,null,[{key:"fetchClientSdk",value:(s=p(f().mark(function e(t){var r,n;return f().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(e){return s.apply(this,arguments)})},{key:"fetchExperimentValues",value:(a=p(f().mark(function e(t,r,n){var o;return f().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,t,r){return a.apply(this,arguments)})},{key:"handleResponseError",value:(o=p(f().mark(function e(t){var r;return f().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 W("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 W("Unexpected 204 response");case 7:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"extractResponseBody",value:(n=p(f().mark(function e(t){var r;return f().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>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return"/gateway/api/flags";if(t===C.FEDRAMP_MODERATE)switch(e){case S.Production:return"https://api.atlassian-us-gov-mod.com/flags";case S.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw new Error('Invalid environment "'.concat(e,'" for "').concat(t,'" perimeter'))}else{if(t!==C.COMMERCIAL)throw new Error('Invalid perimeter "'.concat(t,'"'));switch(e){case S.Development:return"https://api.dev.atlassian.com/flags";case S.Staging:var n=this.getApiUrl(r);return null!==n?n:"https://api.stg.atlassian.com/flags";default:var o=this.getApiUrl(r);return null!==o?o:"https://api.atlassian.com/flags"}}}},{key:"fetchRequest",value:(r=p(f().mark(function t(r,n,o,a){var s,i,c,l,d;return f().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.getBaseUrl(o.environment,o.useGatewayURL,o.perimeter,o.isolationContextId),i=o.fetchTimeoutMs||5e3,AbortSignal.timeout?c=AbortSignal.timeout(i):AbortController&&(l=new AbortController,c=l.signal,setTimeout(function(){return l.abort()},i)),t.next=5,fetch("".concat(s).concat(r),Q({method:n,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":V,"X-API-KEY":o.apiKey},signal:c},a&&{body:JSON.stringify(a)}));case 5:return d=t.sent,t.next=8,this.handleResponseError(d);case 8:return t.next=10,this.extractResponseBody(d);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}},t,this)})),function(e,t,n,o){return r.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}}]);var r,n,o,a,s}();function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=z(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}},Y.apply(null,arguments)}function Z(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 ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(te=function(){return!!e})()}var re=function(e){function r(){var e,n,o,a;return t(this,r),n=this,a=["NoFetchDataAdapter","nofetch"],o=z(o=r),c(e=K(n,te()?Reflect.construct(o,a||[],z(n).constructor):o.apply(n,a)),"bootstrapResult",null),e}return B(r,e),i(r,[{key:"setBootstrapData",value:function(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:b.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(a=p(f().mark(function e(t,r){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e,t){return a.apply(this,arguments)})},{key:"getDataAsync",value:(o=p(f().mark(function e(t,r,n){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bootstrapResult&&ee(ee({},this.bootstrapResult),{},{fullUserHash:(0,b._getFullUserHash)(r)}));case 1:case"end":return e.stop()}},e,this)})),function(e,t,r){return o.apply(this,arguments)})},{key:"getDataSync",value:function(e){return this.bootstrapResult&&ee(ee({},this.bootstrapResult),{},{fullUserHash:(0,b._getFullUserHash)(e)})}},{key:"_fetchFromNetwork",value:(n=p(f().mark(function e(t,r,n){return f().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,b._getStorageKey)(this._getSdkKey(),e);return"".concat(b.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(t)}},{key:"_isCachedResultValidFor204",value:function(e,t){return!1}},{key:"setDataLegacy",value:function(e,t){var n,o,a,s,i;(n=r,o="setData",a=this,i=Y(z(1&(s=3)?n.prototype:n),o,a),2&s&&"function"==typeof i?function(e){return i.apply(a,e)}:i)([e,t])}},{key:"toJSON",value:function(){var e=ee({},this);return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}]);var n,o,a}(b.DataAdapterCore),ne=r(382);function oe(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 ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function se(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 ie(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)?ie(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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 new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){i=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function ie(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 ce="LocalOverride:Recognized",le="STATSIG_JS_LITE_LOCAL_OVERRIDES",de=function(e,t){return t+":"+e},ue=function(){return i(function e(r){t(this,e),this._overrides={gates:{},configs:{},layers:{}},this._djb2Map=new Map,this._localStorageKey=r},[{key:"parseStoredOverrides",value:function(e){try{var t=window.localStorage.getItem(e);return t?JSON.parse(t):{gates:{},configs:{},layers:{}}}catch(e){return{gates:{},configs:{},layers:{}}}}},{key:"mergeOverrides",value:function(){for(var e={gates:{},configs:{},layers:{}},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=0,a=r;o<a.length;o++){for(var s=a[o],i=0,c=Object.entries(null!==(l=s.gates)&&void 0!==l?l:{});i<c.length;i++){var l,d=g(c[i],2),u=d[0],h=d[1];e.gates[u]=h}for(var p=0,v=Object.entries(null!==(f=s.configs)&&void 0!==f?f:{});p<v.length;p++){var f,b=g(v[p],2),y=b[0],_=b[1];e.configs[y]=_}for(var m=0,k=Object.entries(null!==(w=s.layers)&&void 0!==w?w:{});m<k.length;m++){var w,O=g(k[m],2),E=O[0],x=O[1];e.layers[E]=x}}return e}},{key:"initFromStoredOverrides",value:function(){var e=this.mergeOverrides(this._overrides,this.parseStoredOverrides(le),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(le)}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)),s=se(a);try{for(s.s();!(n=s.n()).done;){var i=n.value,c=(0,ne._DJB2)(i);a.has(c)&&delete o[c]}}catch(e){s.e(e)}finally{s.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=ae(ae({},{gates:{},configs:{},layers:{}}),e);this._djb2Map.clear();for(var r=0,n=Object.entries(t);r<n.length;r++)for(var o=g(n[r],2),a=o[0],s=o[1],i=0,c=Object.entries(s);i<c.length;i++){var l=g(c[i],2),d=l[0],u=l[1];this._djb2Map.set(de((0,ne._DJB2)(d),a),u)}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(de((0,ne._DJB2)(e),"gates"),t),this.saveOverrides()}},{key:"removeGateOverride",value:function(e){delete this._overrides.gates[e],this._djb2Map.delete(de((0,ne._DJB2)(e),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(e,t){var r,n=null!==(r=this._overrides.gates[e.name])&&void 0!==r?r:this._djb2Map.get(de(e.name,"gates"));return null==n?null:ae(ae({},e),{},{value:n,details:ae(ae({},e.details),{},{reason:ce})})}},{key:"overrideDynamicConfig",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(de((0,ne._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(de((0,ne._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(de((0,ne._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(de((0,ne._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(de((0,ne._DJB2)(e),"layers"),t),this.saveOverrides()}},{key:"removeLayerOverride",value:function(e){delete this._overrides.layers[e],this._djb2Map.delete(de((0,ne._DJB2)(e),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides={gates:{},configs:{},layers:{}};try{window.localStorage.removeItem(this._localStorageKey)}catch(e){}}},{key:"getLayerOverride",value:function(e,t){var r,n=null!==(r=this._overrides.layers[e.name])&&void 0!==r?r:this._djb2Map.get(de(e.name,"layers"));return null==n?null:ae(ae({},e),{},{__value:n,get:(0,ne._makeTypedGet)(e.name,n),details:ae(ae({},e.details),{},{reason:ce})})}},{key:"_getConfigOverride",value:function(e,t){var r,n=null!==(r=t[e.name])&&void 0!==r?r:this._djb2Map.get(de(e.name,"configs"));return null==n?null:ae(ae({},e),{},{value:n,get:(0,ne._makeTypedGet)(e.name,n),details:ae(ae({},e.details),{},{reason:ce})})}}])}(),ge=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function he(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ve,fe="client-default-key",be=function(){return i(function e(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.localStorageKey,a=void 0===o?"STATSIG_OVERRIDES":o,s=n.overrideAdapter;t(this,e),c(this,"initPromise",null),c(this,"initCompleted",!1),c(this,"initWithDefaults",!1),c(this,"hasCheckGateErrorOccurred",!1),c(this,"hasGetExperimentErrorOccurred",!1),c(this,"hasGetExperimentValueErrorOccurred",!1),c(this,"hasGetLayerErrorOccurred",!1),c(this,"hasGetLayerValueErrorOccurred",!1),c(this,"subscriptions",new O),c(this,"dataAdapter",new re),c(this,"statsigValuesUpdated",function(){r.user&&r.statsigClient.updateUserSync(r.user,{disableBackgroundCacheRefresh:!0}),r.subscriptions.anyUpdated()}),this.overrideAdapter=s||new ue(a)},[{key:"initialize",value:(_=p(f().mark(function e(t,r,n){var o,a,s=this;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=I(t),!this.initPromise){e.next=4;break}return A(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(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-a;s.fireClientEvent(a,e,"initialize",s.initCompleted,o.apiKey)}),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}},e,this)})),function(e,t,r){return _.apply(this,arguments)})},{key:"initializeWithProvider",value:(y=p(f().mark(function e(t,r,n,o){var a,s,i=this;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=I(t),!this.initPromise){e.next=4;break}return A(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 s=performance.now(),this.initOptions=a,this.provider=r,this.provider.setClientVersion(V),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(a,r,n,o).then(function(){i.initCompleted=!0,i.initWithDefaults=!0}).finally(function(){var e=performance.now()-s;i.fireClientEvent(s,e,"initializeWithProvider",i.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 y.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,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null===(o=this.initOptions.analyticsWebClient)||void 0===o||o.then(function(o){var i=pe({targetApp:a.initOptions.targetApp,clientVersion:V,success:n,startTime:e,totalTime:t},s&&{apiKey:s});o.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:i,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(e){a.initOptions.environment!==S.Production&&console.error("Analytics web client promise did not resolve",e)})}},{key:"initializeFromValues",value:(v=p(f().mark(function e(t,r,n){var o,a,s,i=this,c=arguments;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=c.length>3&&void 0!==c[3]?c[3]:{},a=I(t),!this.initPromise){e.next=5;break}return A(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),s=performance.now(),this.initOptions=a,this.initPromise=this.initFromValues(a,r,n,o).then(function(){i.initCompleted=!0,i.initWithDefaults=!0}).finally(function(){var e=performance.now()-s;i.fireClientEvent(s,e,"initializeFromValues",i.initCompleted)}),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}},e,this)})),function(e,t,r){return v.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw new Error("Client must be initialized before using this method")}},{key:"updateUser",value:(h=p(f().mark(function e(t,r,n){var o,a;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),o=I(t),a=function(){return X.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 h.apply(this,arguments)})},{key:"updateUserWithProvider",value:(u=p(f().mark(function e(t,r){var n=this;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw new 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 u.apply(this,arguments)})},{key:"updateUserWithValues",value:(d=p(f().mark(function e(t,r){var n,o,a=arguments;return f().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 d.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"waitUntilInitializeCompleted",value:(s=p(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.initPromise){e.next=2;break}throw new 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 s.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,n=void 0===r||r;return this.statsigClient.checkGate(e,{disableExposureLog:!n})}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,n=void 0===r||r;return N.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!n}))}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 N(e,{},"",{time:Date.now(),reason:x.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))||void 0===r||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){var r;(this.overrideAdapter.overrideGate(e,t),this.user)&&(null===(r=this.statsigClient)||void 0===r||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 A(this.currentIdentifiers,e)&&A(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:(a=p(f().mark(function e(t,r,n){var o,a,s,i,c,l,d,u;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=pe({},t),e.prev=1,i=X.fetchClientSdk(t).then(function(e){return o.sdkKey=e.clientSdkKey}),c=X.fetchExperimentValues(t,r,n),e.next=6,Promise.all([i,c]);case 6:l=e.sent,d=g(l,2),u=d[1],a=u.experimentValues,s=u.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,s,a));case 21:case"end":return e.stop()}},e,this,[[1,13]])})),function(e,t,r){return a.apply(this,arguments)})},{key:"initWithProvider",value:(o=p(f().mark(function e(t,r,n,o){var a,s,i,c,l,d,u,h;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=pe(pe({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,n,o);case 4:return c=r.getClientSdkKey().then(function(e){return a.sdkKey=e}),l=r.getExperimentValues(),e.next=8,Promise.all([c,l]);case 8:d=e.sent,u=g(d,2),h=u[1],s=h.experimentValues,i=h.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,i,s));case 23:case"end":return e.stop()}},e,this,[[1,15]])})),function(e,t,r,n){return o.apply(this,arguments)})},{key:"initFromValues",value:(n=p(f().mark(function e(t,r,n){var o,a,s,i,c,d,u,g=arguments;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=g.length>3&&void 0!==g[3]?g[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=n,(s=M(t)).sdkKey||(s.sdkKey=fe),null!==(o=s.networkConfig)&&void 0!==o&&o.logEventUrl||(s.networkConfig=pe(pe({},s.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),s.perimeter===C.FEDRAMP_MODERATE&&(s.disableLogging=!0),i=s.sdkKey,c=s.environment,s.updateUserCompletionCallback,s.perimeter,d=l(s,ge),this.user=U(r,n),u=pe(pe({},d),{},{environment:{tier:c},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter,logEventCompressionMode:b.LogEventCompressionMode.Forced}),r.stableId?b.StableID.setOverride(r.stableId,i):u.disableStableID=!0,e.prev=12,this.statsigClient=new b.StatsigClient(i,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 b.StatsigClient(fe,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 n.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(r=p(f().mark(function e(t,r,n){var o,a,s,i=this;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw new 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(),s=this.updateStatsigClientUser(a,r,n),this.initPromise=s.catch(p(f().mark(function e(){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i.initPromise=o,!i.provider){e.next=4;break}return e.next=4,i.provider.setProfile(i.initOptions,i.currentIdentifiers,i.currentAttributes);case 4:case"end":return e.stop()}},e)}))),e.abrupt("return",s);case 17:case"end":return e.stop()}},e,this,[[6,11]])})),function(e,t,n){return r.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(e=p(f().mark(function e(t,r,n){var o,a,s,i,c,l,d,u,g;return f().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=e.sent,i=U(r,s.customAttributesFromFetch),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),d=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null===(c=(l=this.initOptions).updateUserCompletionCallback)||void 0===c||c.call(l,!1,d),e.t0;case 13:if(u=!0,g=null,e.prev=15,this.dataAdapter.setBootstrapData(s.experimentValues),this.user=i,!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),u=!1,g=String(e.t1);case 27:if(null===(o=this.initOptions)||void 0===o||null===(a=o.updateUserCompletionCallback)||void 0===a||a.call(o,u,g),!u){e.next=34;break}this.currentIdentifiers=r,this.currentAttributes=n,this.subscriptions.anyUpdated(),e.next=35;break;case 34:throw new Error("Failed to update user. An unexpected error occured.");case 35:case"end":return e.stop()}},e,this,[[1,8],[15,23]])})),function(t,r,n){return e.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return V}},{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,n=void 0===r||r;return R.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!n}))}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),R.fromLayer((0,b._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}}}]);var e,r,n,o,a,s,d,u,h,v,y,_}(),ye=function(){return i(function e(){t(this,e)},null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}])}();ve=ye,c(ye,"client",new be),c(ye,"hasCheckGateErrorOccurred",!1),c(ye,"hasGetExperimentValueErrorOccurred",!1),c(ye,"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){ve.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}),ve.hasCheckGateErrorOccurred=!0)}return ve.client.checkGate(e,t)}),c(ye,"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 ve.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}),ve.hasGetExperimentValueErrorOccurred=!0),r}return ve.client.getExperimentValue(e,t,r,n)}),c(ye,"initializeCalled",ve.client.initializeCalled.bind(ve.client)),c(ye,"initializeCompleted",ve.client.initializeCompleted.bind(ve.client)),c(ye,"waitUntilInitializeCompleted",ve.client.waitUntilInitializeCompleted.bind(ve.client)),c(ye,"initialize",ve.client.initialize.bind(ve.client)),c(ye,"initializeWithProvider",ve.client.initializeWithProvider.bind(ve.client)),c(ye,"initializeFromValues",ve.client.initializeFromValues.bind(ve.client)),c(ye,"manuallyLogGateExposure",ve.client.manuallyLogGateExposure.bind(ve.client)),c(ye,"getExperiment",ve.client.getExperiment.bind(ve.client)),c(ye,"manuallyLogExperimentExposure",ve.client.manuallyLogExperimentExposure.bind(ve.client)),c(ye,"manuallyLogLayerExposure",ve.client.manuallyLogLayerExposure.bind(ve.client)),c(ye,"shutdownStatsig",ve.client.shutdownStatsig.bind(ve.client)),c(ye,"overrideGate",ve.client.overrideGate.bind(ve.client)),c(ye,"clearGateOverride",ve.client.clearGateOverride.bind(ve.client)),c(ye,"overrideConfig",ve.client.overrideConfig.bind(ve.client)),c(ye,"clearConfigOverride",ve.client.clearConfigOverride.bind(ve.client)),c(ye,"setOverrides",ve.client.setOverrides.bind(ve.client)),c(ye,"getOverrides",ve.client.getOverrides.bind(ve.client)),c(ye,"clearAllOverrides",ve.client.clearAllOverrides.bind(ve.client)),c(ye,"isCurrentUser",ve.client.isCurrentUser.bind(ve.client)),c(ye,"onGateUpdated",ve.client.onGateUpdated.bind(ve.client)),c(ye,"onExperimentValueUpdated",ve.client.onExperimentValueUpdated.bind(ve.client)),c(ye,"onAnyUpdated",ve.client.onAnyUpdated.bind(ve.client)),c(ye,"updateUser",ve.client.updateUser.bind(ve.client)),c(ye,"updateUserWithProvider",ve.client.updateUserWithProvider.bind(ve.client)),c(ye,"updateUserWithValues",ve.client.updateUserWithValues.bind(ve.client)),c(ye,"getPackageVersion",ve.client.getPackageVersion.bind(ve.client)),c(ye,"getLayer",ve.client.getLayer.bind(ve.client)),c(ye,"getLayerValue",ve.client.getLayerValue.bind(ve.client));var _e=ye;if("undefined"!=typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=ye;else{var me,ke,we=(null===(me=_e=window.__FEATUREGATES_JS__)||void 0===me||null===(ke=me.getPackageVersion)||void 0===ke?void 0:ke.call(me))||"4.10.0 or earlier";if(we!==V){var Oe="Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(we," when module version ").concat(V," was loading.");console.warn(Oe)}}const Ee=_e;var xe,Se,Ce=!(void 0!==(null===globalThis||void 0===globalThis||null===(xe=globalThis.process)||void 0===xe||null===(xe=xe.env)||void 0===xe?void 0:xe.JEST_WORKER_ID))&&"production"!==(null===globalThis||void 0===globalThis||null===(Se=globalThis.process)||void 0===Se||null===(Se=Se.env)||void 0===Se?void 0:Se.NODE_ENV),De="__PLATFORM_FEATURE_FLAGS__",je="undefined"!=typeof process&&!0,Pe=!!je&&"true"==={NODE_ENV:"production"}.ENABLE_PLATFORM_FF||!!je&&"true"==={NODE_ENV:"production"}.STORYBOOK_ENABLE_PLATFORM_FF,Ie={booleanResolver:void 0},Ae="undefined"!=typeof window?window:globalThis;function Ue(e){if(Pe)return function(){var e;Ce&&(e=console).debug.apply(e,arguments)}('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',"@atlaskit/platform-feature-flags",e),!0;try{var t,r,n;if(void 0===(null===(t=Ae[De])||void 0===t?void 0:t.booleanResolver)||null===(null===(r=Ae[De])||void 0===r?void 0:r.booleanResolver))return Ee.checkGate(e);var o=null===(n=Ae[De])||void 0===n?void 0:n.booleanResolver(e);return"boolean"!=typeof o?(console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1):o}catch(e){return!1}}function Me(e){return Ue(e)}Ae[De]=Ae[De]||Ie;var Le=["light","dark","auto"],Te=["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"],Fe=[].concat(Te,[]),Ne={colorMode:"auto",contrastMode:"auto",dark:"dark",light:"light",shape:void 0,spacing:"spacing",typography:function(){if(Me("platform-default-typography-modernized"))return"typography-modernized"},UNSAFE_themeOptions:void 0};const Re={"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"}}};const Ve={"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 Ke="data-theme",ze="data-color-mode",Ge="data-contrast-mode",Be="data-custom-theme",$e="--".concat("ds","-token-not-found"),Je="--".concat("ds","-elevation-surface-current");const qe=function(e,t){var r=Ve[e];return r||(r=$e),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")};const We=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=Ve[e],n=t;return"undefined"==typeof window?n:n=(n=window.getComputedStyle(document.documentElement).getPropertyValue(r).trim())||t};var He=function(e){return/^#[0-9A-F]{6}$/i.test(e)};var Qe=["light","dark","spacing","typography","shape"],Xe="UNSAFE_themeOptions",Ye=function(e){return void 0!==Qe.find(function(t){return t===e})},Ze=function(e){return void 0!==Te.find(function(t){return t===e})},et=function(e){return["light","dark","auto"].includes(e)},tt=function(e){return e.split(" ").map(function(e){return e.split(/:([^]*)/)}).reduce(function(e,t){var r=g(t,2),n=r[0],o=r[1];if("colorMode"===n&&et(o)&&(e[n]=o),Ye(n)&&Ze(o)&&(e[n]=o),n===Xe)try{e[Xe]=JSON.parse(o)}catch(e){new Error("Invalid custom theme string")}return e},{})},rt=function(e){return Object.entries(e).reduce(function(e,t){var r=g(t,2),n=r[0],a=r[1];return"colorMode"===n&&"string"==typeof a&&et(a)||n===Xe&&"object"===o(a)||Ye(n)&&"string"==typeof a&&Ze(a)?e+"".concat(e?" ":"")+"".concat(n,":").concat("object"===o(a)?JSON.stringify(a):a):e},"")},nt=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 ot(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 at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}const st=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?Ne.colorMode:t,n=e.dark,o=void 0===n?Ne.dark:n,a=e.light,s=void 0===a?Ne.light:a,i=e.contrastMode,l=void 0===i?Ne.contrastMode:i,d=e.shape,u=void 0===d?Ne.shape:d,g=e.spacing,h=void 0===g?Ne.spacing:g,p=e.typography,v=void 0===p?Ne.typography():p,f=e.UNSAFE_themeOptions,b=void 0===f?Ne.UNSAFE_themeOptions:f,y=rt({dark:o,light:s,shape:u,spacing:h,typography:v}),_=c(c({},Ke,y),ze,"auto"===r?"light":r);if(Me("platform_increased-contrast-themes")&&(_=at(at({},_),{},c({},Ge,"auto"===l?"no-preference":l))),b&&He(b.brandColor)){var m=JSON.stringify(b),k=nt(m);_[Be]=k}return _};var it=r(1833);const ct={light:()=>()=>{},"light-future":()=>()=>{},dark:()=>()=>{},"dark-future":()=>()=>{},"legacy-light":()=>()=>{},"legacy-dark":()=>()=>{},spacing:()=>()=>{},shape:()=>()=>{},"typography-adg3":()=>()=>{},"typography-modernized":()=>()=>{},"typography-refreshed":()=>()=>{}};var lt=function(){var e=p(f().mark(function e(t){var r,n;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.head.querySelector("style[".concat(Ke,'="').concat(t,'"]:not([').concat(Be,"])"))){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,dt(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)}));return function(t){return e.apply(this,arguments)}}(),dt=function(){var e=p(f().mark(function e(t){var r,n;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return"light"!==t&&"dark"!==t||!Me("platform-component-visual-refresh")||(t+="-brand-refresh"),e.next=3,ct[t]();case 3:return r=e.sent,n=r.default,e.abrupt("return",n);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),ut="(prefers-color-scheme: dark)",gt="(prefers-contrast: more)";function ht(e){document.documentElement.setAttribute(ze,e.matches?"dark":"light")}var pt="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(ut);const vt=new(function(){return i(function e(){t(this,e),c(this,"unbindThemeChangeListener",null)},[{key:"getColorMode",value:function(){return pt&&null!=pt&&pt.matches?"dark":"light"}},{key:"bind",value:function(){pt&&null===this.unbindThemeChangeListener&&(this.unbindThemeChangeListener=(0,it.bind)(pt,{type:"change",listener:ht}))}},{key:"unbind",value:function(){this.unbindThemeChangeListener&&(this.unbindThemeChangeListener(),this.unbindThemeChangeListener=null)}}])}());function ft(e){document.documentElement.setAttribute(Ge,e.matches?"more":"no-preference")}var bt="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(gt);const yt=new(function(){return i(function e(){t(this,e),c(this,"unbindContrastChangeListener",null)},[{key:"getContrastMode",value:function(){return bt&&null!=bt&&bt.matches?"more":"no-preference"}},{key:"bind",value:function(){bt&&null===this.unbindContrastChangeListener&&(this.unbindContrastChangeListener=(0,it.bind)(bt,{type:"change",listener:ft}))}},{key:"unbind",value:function(){this.unbindContrastChangeListener&&(this.unbindContrastChangeListener(),this.unbindContrastChangeListener=null)}}])}());function _t(e){"auto"===e.colorMode?(e.colorMode=vt.getColorMode(),vt.bind()):vt.unbind(),Me("platform_increased-contrast-themes")&&("auto"===e.contrastMode?(e.contrastMode=yt.getContrastMode(),yt.bind()):yt.unbind());var t=st(e);return Object.entries(t).forEach(function(e){var t=g(e,2),r=t[0],n=t[1];document.documentElement.setAttribute(r,n)}),function(){vt.unbind(),Me("platform_increased-contrast-themes")&&yt.unbind()}}function mt(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e,t){var r=JSON.stringify(e),n=nt(r),o=[];return("auto"===t?["light","dark"]:[t]).forEach(function(e){var t=document.head.querySelector("style[".concat(Be,'="').concat(n,'"][').concat(Ke,'="').concat(e,'"]'));t?document.head.appendChild(t):o.push(e)}),o}function wt(e){var t;return null===(t=Object.entries(Re).find(function(t){return g(t,2)[1].increasesContrastFor===e}))||void 0===t?void 0:t[1].id}var Ot=function(e){var t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,s=e.spacing,i=e.typography,c=[o,n],l=[];if("auto"===t)"no-preference"!==r&&Me("platform_increased-contrast-themes")&&c.forEach(function(e){var t=wt(e);t&&c.push(t)}),l.push.apply(l,c);else if(l.push(e[t]),"no-preference"!==r&&Me("platform_increased-contrast-themes")){var d=wt(e[t]);d&&l.push(d)}return[a,s,i].forEach(function(e){e&&l.push(e)}),mt(new Set(l))},Et=function(e){return mt(new Set([]))};function xt(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 St(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)?St(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){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 new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){i=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function St(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}const Ct=function(){var e=p(f().mark(function e(){var t,r,n,o,a,s,i,c,l,d,u,g,h,v,b,y,_,m,k,w,O,E,x,S,C,D,j,P,I=arguments;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t=I.length>0&&void 0!==I[0]?I[0]:{}).colorMode,n=void 0===r?Ne.colorMode:r,o=t.contrastMode,a=void 0===o?Ne.contrastMode:o,s=t.dark,i=void 0===s?Ne.dark:s,c=t.light,l=void 0===c?Ne.light:c,d=t.shape,u=void 0===d?Ne.shape:d,g=t.spacing,h=void 0===g?Ne.spacing:g,v=t.typography,b=void 0===v?Ne.typography():v,y=t.UNSAFE_themeOptions,_=void 0===y?Ne.UNSAFE_themeOptions:y,m=I.length>1?I[1]:void 0,Me("platform_increased-contrast-themes")||("light-increased-contrast"===l&&(l="light"),"dark-increased-contrast"===i&&(i="dark")),w=Ot(k={colorMode:n,contrastMode:a,dark:i,light:l,shape:u,spacing:h,typography:b,UNSAFE_themeOptions:m?void 0:_}),O=m||lt,E=w.map(function(){var e=p(f().mark(function e(t){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O(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)}}()),!m&&_&&He(null==_?void 0:_.brandColor)&&(x=kt(_,n||Ne.colorMode)).length>0&&E.push(p(f().mark(function e(){var t;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(function(){var e=new Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 2:t=e.sent,(0,t.loadAndAppendCustomThemeCss)({colorMode:2===x.length?"auto":x[0],UNSAFE_themeOptions:_});case 5:case"end":return e.stop()}},e)}))()),e.next=10,Promise.all(E);case 10:S=Et(),C=xt(S),e.prev=12,C.s();case 14:if((D=C.n()).done){e.next=20;break}return j=D.value,e.next=18,O(j);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),C.e(e.t0);case 25:return e.prev=25,C.f(),e.finish(25);case 28:return P=_t(k),e.abrupt("return",P);case 30:case"end":return e.stop()}},e,null,[[12,22,25,28]])}));return function(){return e.apply(this,arguments)}}();const Dt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?Ne.colorMode:t,n=e.contrastMode,o=void 0===n?Ne.contrastMode:n,a=e.dark,s=void 0===a?Ne.dark:a,i=e.light,c=void 0===i?Ne.light:i,l=e.shape,d=void 0===l?Ne.shape:l,u=e.spacing,g=void 0===u?Ne.spacing:u,h=e.typography,p=void 0===h?Ne.typography():h,v=e.UNSAFE_themeOptions,f=arguments.length>1?arguments[1]:void 0,b={colorMode:r,contrastMode:o,dark:s,light:c,shape:d,spacing:g,typography:p,UNSAFE_themeOptions:f?void 0:void 0===v?Ne.UNSAFE_themeOptions:v},y=Ot(b);return f&&y.map(function(e){return f(e)}),_t(b)};const jt=function(){var e=p(f().mark(function e(t){var r,n,o,a;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],"all"===t?(r=Fe,Me("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})):(o={colorMode:(null==t?void 0:t.colorMode)||Ne.colorMode,contrastMode:(null==t?void 0:t.contrastMode)||Ne.contrastMode,dark:(null==t?void 0:t.dark)||Ne.dark,light:(null==t?void 0:t.light)||Ne.light,shape:(null==t?void 0:t.shape)||Ne.shape,spacing:(null==t?void 0:t.spacing)||Ne.spacing,typography:(null==t?void 0:t.typography)||Ne.typography()},r=Ot(o),n=Et()),e.next=4,Promise.all([].concat(mt([].concat(mt(r),mt(n)).map(function(){var e=p(f().mark(function e(t){var r;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dt(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)}}())),[p(f().mark(function e(){var r,n,o,a;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("all"===t||null==t||!t.UNSAFE_themeOptions||!He(null==t||null===(r=t.UNSAFE_themeOptions)||void 0===r?void 0:r.brandColor)){e.next=15;break}return e.prev=1,e.next=4,Promise.resolve().then(function(){var e=new Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 4:return n=e.sent,o=n.getCustomThemeStyles,e.next=8,o({colorMode:(null==t?void 0:t.colorMode)||Ne.colorMode,UNSAFE_themeOptions:null==t?void 0:t.UNSAFE_themeOptions});case 8:return a=e.sent,e.abrupt("return",a);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)}));return function(t){return e.apply(this,arguments)}}();const Pt=function(e,t){if("auto"===e||"auto"===t){var r="auto"===e?"\n try {\n const darkModeMql = window.matchMedia('".concat(ut,"');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat(ze,"', colorMode);\n } catch (e) {}"):"",n="auto"===t&&Me("platform_increased-contrast-themes")?"\n try {\n const contrastModeMql = window.matchMedia('".concat(gt,"');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(Ge,"', contrastMode);\n } catch (e) {}"):"";return"(() => {".concat(r).concat(n,"})()")}};var It=r(6039),At=r.n(It);function Ut(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 Mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ut(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}const Lt=function(){if("undefined"==typeof document)return{};var e=document.documentElement,t=e.getAttribute(ze)||"",r=e.getAttribute(Ke)||"";return Mt(Mt({},tt(r)),function(e){return void 0!==Le.find(function(t){return t===e})}(t)&&{colorMode:t})};var Tt=function(){function e(r){t(this,e),c(this,"legacyObserver",null),this.callback=r,e.callbacks.add(r)}return i(e,[{key:"observe",value:function(){e.observer||(e.observer=new MutationObserver(function(){var t=Lt();e.callbacks.forEach(function(e){return e(t)})}),e.observer.observe(document.documentElement,{attributeFilter:[Ke,ze]}))}},{key:"disconnect",value:function(){this.callback&&e.callbacks.delete(this.callback),0===e.callbacks.size&&e.observer&&(e.observer.disconnect(),e.observer=null)}}])}();c(Tt,"observer",null),c(Tt,"callbacks",new Set);const Ft="AJS";function Nt(){"object"!=typeof window[Ft]&&(window[Ft]={})}document.documentElement.hasAttribute("data-color-mode-auto")&&Ct({colorMode:"auto"});const{setGlobalTheme:Rt}=e;var Vt,Kt;Vt="DesignTokens",Kt={setGlobalTheme:Rt},Nt(),window[Ft][Vt]=Kt})(),n})());
16
11
  //# sourceMappingURL=aui-prototyping-design-tokens-api.js.map