@atlassian/aui 10.0.3 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/aui/aui-css-deprecations.js +3 -1
  2. package/dist/aui/aui-css-deprecations.js.map +1 -1
  3. package/dist/aui/aui-prototyping-browserfocus.css +1 -1
  4. package/dist/aui/aui-prototyping-browserfocus.css.map +1 -1
  5. package/dist/aui/aui-prototyping-design-tokens-api-full.js +4 -15
  6. package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
  7. package/dist/aui/aui-prototyping-design-tokens-api.js +1 -15
  8. package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
  9. package/dist/aui/aui-prototyping-design-tokens-compatibility.css.map +1 -1
  10. package/dist/aui/aui-prototyping.css +10 -10
  11. package/dist/aui/aui-prototyping.css.map +1 -1
  12. package/dist/aui/aui-prototyping.js +64 -104
  13. package/dist/aui/aui-prototyping.js.map +1 -1
  14. package/dist/aui/aui-prototyping.nodeps.css +10 -10
  15. package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
  16. package/dist/aui/aui-prototyping.nodeps.js +64 -104
  17. package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
  18. package/dist/aui/fonts/adgs-icons.eot +0 -0
  19. package/dist/aui/fonts/adgs-icons.ttf +0 -0
  20. package/dist/aui/fonts/adgs-icons.woff +0 -0
  21. package/package.json +8 -7
  22. package/src/js/aui/blanket.js +1 -1
  23. package/src/js/aui/flag.js +1 -1
  24. package/src/js/aui/form-validation.js +1 -1
  25. package/src/js/aui/inline-dialog.js +30 -23
  26. package/src/js/aui/layer.js +1 -1
  27. package/src/js/aui/query-input.js +1 -1
  28. package/src/js/aui/restful-table/entry-model.js +2 -2
  29. package/src/js/aui/restful-table/event-handlers.js +1 -1
  30. package/src/js/aui/restful-table/row.js +1 -1
  31. package/src/js/aui/restful-table.js +2 -2
  32. package/src/js/aui/select2.js +3 -3
  33. package/src/js/aui/tabs.js +2 -2
  34. package/src/js/aui/when-i-type.js +2 -2
  35. package/src/js-vendor-effective/jquery.hotkeys/jquery.hotkeys.js +2 -2
  36. package/src/js-vendor-effective/select2/select2.js +31 -29
  37. package/src/js-vendor-effective/tablesorter/jquery.tablesorter.js +35 -35
  38. package/src/less/imports/aui-theme/theme.less +31 -31
@@ -1,16 +1,2 @@
1
- /*!!
2
- * @atlassian/aui - Atlassian User Interface library
3
- * @version v10.0.3
4
- * @link https://aui.atlassian.com
5
- * @license Apache-2.0
6
- * @author Atlassian Pty Ltd.
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})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@atlassian/aui",[],t):"object"==typeof exports?exports["@atlassian/aui"]=t():(e.AJS=e.AJS||{},e.AJS.DesignTokens=t())}(window,()=>(()=>{var e={6572:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var o=r(1634);function a(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,r){var i=t.map(function(t){var i=null==r?t:n(n({},t),{options:n(n({},a(r)),a(t.options))});return(0,o.bind)(e,i)});return function(){i.forEach(function(e){return e()})}}},1634:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var r=t.type,n=t.listener,o=t.options;return e.addEventListener(r,n,o),function(){e.removeEventListener(r,n,o)}}},1833:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=t.bind=void 0;var n=r(1634);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return n.bind}});var o=r(6572);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return o.bindAll}})},2646:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,a||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,g=u.length;for(c=0;c<g;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},2027:function(){},1660:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},1657:function(e,t,r){var n=r(7090);function o(){var t,r,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function l(e,o,a,i){var s=Object.create((o&&o.prototype instanceof u?o:u).prototype);return n(s,"_invoke",function(e,n,o){var a,i,s,l=0,u=o||[],d=!1,h={p:0,n:0,v:t,a:g,f:g.bind(t,4),d:function(e,r){return a=e,i=0,s=t,h.n=r,c}};function g(e,n){for(i=e,s=n,r=0;!d&&l&&!o&&r<u.length;r++){var o,a=u[r],g=h.p,p=a[2];e>3?(o=p===n)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=g&&((o=e<2&&g<a[1])?(i=0,h.v=n,h.n=a[1]):g<p&&(o=e<3||a[0]>n||n>p)&&(a[4]=e,a[5]=n,h.n=p,i=0))}if(o||e>1)return c;throw d=!0,n}return function(o,u,p){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&g(u,p),i=u,s=p;(r=i<2?t:s)||!d;){a||(i?i<3?(i>1&&(h.n=-1),g(i,s)):h.n=s:h.v=s);try{if(l=2,a){if(i||(o="next"),r=a[o]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((r=(d=h.n<0)?s:e.call(n,h))!==c)break}catch(e){a=t,i=1,s=e}finally{l=1}}return{value:r,done:d}}}(e,a,i),!0),s}var c={};function u(){}function d(){}function h(){}r=Object.getPrototypeOf;var g=h.prototype=u.prototype=Object.create([][i]?r(r([][i]())):(n(r={},i,function(){return this}),r));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return d.prototype=h,n(g,"constructor",h),n(h,"constructor",d),d.displayName="GeneratorFunction",n(h,s,"GeneratorFunction"),n(g),n(g,s,"Generator"),n(g,i,function(){return this}),n(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},1333:function(e,t,r){var n=r(2239);e.exports=function(e,t,r,o,a){var i=n(e,t,r,o,a);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},2239:function(e,t,r){var n=r(1657),o=r(6711);e.exports=function(e,t,r,a,i){return new o(n().w(e,t,r,a),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},6711:function(e,t,r){var n=r(1660),o=r(7090);e.exports=function e(t,r){var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,o,i){function s(){return new r(function(o,a){!function e(o,a,i,s){try{var l=t[o](a),c=l.value;return c instanceof n?r.resolve(c.v).then(function(t){e("next",t,i,s)},function(t){e("throw",t,i,s)}):r.resolve(c).then(function(e){l.value=e,i(l)},function(t){return e("throw",t,i,s)})}catch(e){s(e)}}(e,i,o,a)})}return a=a?a.then(s,s):s()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},7090:function(e){function t(r,n,o,a){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}e.exports=t=function(e,r,n,o){function a(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3037:function(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},1777:function(e,t,r){var n=r(1660),o=r(1657),a=r(1333),i=r(2239),s=r(6711),l=r(3037),c=r(8955);function u(){"use strict";var t=o(),r=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var g={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,g[e],t)},delegateYield:function(e,o,a){return t.resultName=o,r(n.d,c(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,r,n,o){return t.w(p(e),r,n,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,o){return(h(t)?i:a)(p(e),t,r,n,o)},keys:l,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},8955:function(e,t,r){var n=r(7250).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},7250:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8972:function(e,t,r){var n=r(1777)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},1917:function(e,t,r){"use strict";var n,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let i=r(1392);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:d}catch(e){return d}},t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&i.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),r.firstInstance)};let s="__STATSIG__",l="undefined"!=typeof window?window:{},c=void 0!==r.g?r.g:{},u="undefined"!=typeof globalThis?globalThis:{},d=null!=(a=null!=(o=null!=(n=l[s])?n:c[s])?o:u[s])?a:{instance:t._getInstance};l[s]=d,c[s]=d,u[s]=d},833:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let n=r(902);function o(e,t,r){var o;if(r)return r(e,t);let a=t&&t.customIDs?t.customIDs:{},i=[`uid:${null!=(o=null==t?void 0:t.userID)?o:""}`,`cids:${Object.keys(a).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${a[e]}`).join(",")}`,`k:${e}`];return(0,n._DJB2)(i.join("|"))}t._getUserStorageKey=o,t._getStorageKey=function(e,t,r){return t?o(e,t,r):(0,n._DJB2)(`k:${e}`)}},9171:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},830:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let o=r(1392),a=r(826),i=r(5466),s=r(9982),l=r(9217);function c(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,i._getFullUserHash)(n)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new u}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,i._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n&&this._getIsCacheValueValid(n))return n;let o=this._loadFromCache(r);return o&&this._getIsCacheValueValid(o)?(this._inMemoryCache.add(r,o,this._cacheLimit),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,i._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,c("Bootstrap",e,null,r),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===a.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,r){return n(this,void 0,void 0,function*(){s.Storage.isReady()||(yield s.Storage.isReadyResolver());let n=null!=e?e:this.getDataSync(t),a=[this._fetchAndPrepFromNetwork(n,t,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(o.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(e,t){return n(this,void 0,void 0,function*(){let r=e&&(0,i._normalizeUser)(e,this._options),n=this._getCacheKey(r),o=yield this._getDataAsyncImpl(null,r,t);o&&this._inMemoryCache.add(n,Object.assign(Object.assign({},o),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,r){return n(this,void 0,void 0,function*(){var n;let i=null!=(n=null==e?void 0:e.data)?n:null,s=null!=e&&this._isCachedResultValidFor204(e,t),u=yield this._fetchFromNetwork(i,t,r,s);if(!u)return o.Log.debug("No response returned for latest value"),null;let d=(0,l._typedJsonParse)(u,"has_updates","Response"),h=this._getSdkKey(),g=a.StableID.get(h),p=null;if((null==d?void 0:d.has_updates)===!0)p=c("Network",u,g,t);else{if(!i||(null==d?void 0:d.has_updates)!==!1)return null;p=c("NetworkNotModified",i,g,t)}let f=this._getCacheKey(t);return this._inMemoryCache.add(f,p,this._cacheLimit),this._writeToCache(f,p),p})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(o.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null==(t=s.Storage.getItem)?void 0:t.call(s.Storage,e);if(null==r)return null;let n=(0,l._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){let r=JSON.stringify(t);for(let t=0;t<8;t++)try{s.Storage.setItem(e,r);break}catch(t){if(!(t instanceof Error)||"QuotaExceededError"!==t.name||this._cacheLimit<=1)throw t;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r;let n=null!=(r=(0,s._getObjectFromStorage)(this._lastModifiedStoreKey))?r:{};for(let r of(n[e]=Date.now(),d(n,t)))delete n[r],s.Storage.removeItem(r);(0,s._setObjectInStorage)(this._lastModifiedStoreKey,n)}},t._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(e,t){var r;let n=this._data[e],a=null==n?void 0:n.stableID,i=null==(r=null==t?void 0:t.customIDs)?void 0:r.stableID;return i&&a&&i!==a?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t,r){for(let e of d(this._data,r-1))delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function d(e,t){let r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{let n=e[t],o=e[r];return"object"==typeof n&&"object"==typeof o?n.receivedAt-o.receivedAt:n-o}).slice(0,r.length-t)}},5930:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let r=new Map,n="start";function o(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function a(e,t){var n;let o=null!=(n=r.get(e))?n:[];o.push(t),r.set(e,o)}function i(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{a(e,o({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{a(e,o({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,o(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,o(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{a(e,o({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,o(t,"end","initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:i(e,"code"),name:i(e,"name"),message:i(e,"message")}},_getDiagnosticsData(e,r,n,o){var a;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null==(a=null==e?void 0:e.headers)?void 0:a.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:r,error:t.Diagnostics._formatError(o)}},_enqueueDiagnosticsEvent(e,r,n,o){let a=t.Diagnostics._getMarkers(n);if(null==a||a.length<=0)return -1;let i=a[a.length-1].timestamp-a[0].timestamp;t.Diagnostics._clearMarkers(n);let s={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:a.slice(),statsigOptions:o},time:Date.now()};return r.enqueue(s),i}}},1681:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;let n=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),o=["i","e","d"];t._fetchTxtRecords=function(e){return r(this,void 0,void 0,function*(){let t=yield e("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:n});if(!t.ok){let e=Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}return function(e){let t=e.findIndex((t,r)=>r<200&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(e[r-1])));if(-1===t){let e=Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let r="";for(let n=t-1;n<e.length;n++)r+=String.fromCharCode(e[n]);return r.split(",")}(new Uint8Array((yield t.arrayBuffer())))})}},2443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6510:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let o=r(1392),a=r(2470),i=r(8808);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let s="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=class{constructor(e,t,r,n){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=n,this._seen=new Set}wrap(e,t){try{(function(e){let t=new Set,r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null==r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)})(e).forEach(r=>{let n=e[r];"$EB"in n||(e[r]=(...o)=>this._capture(t?`${t}:${r}`:r,()=>n.apply(e,o)),e[r].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{let r=t();if(r&&r instanceof Promise)return r.catch(t=>this._onError(e,t));return r}catch(t){return this._onError(e,t),null}}_onError(e,r){try{o.Log.warn(`Caught error in ${e}`,{error:r}),n(this,void 0,void 0,function*(){var n,o,c,u,d,h,g;let p=r||Error(s),f=p instanceof Error,b=f?p.name:"No Name",v=l(p);if(this._lastSeenError=v,this._seen.has(b))return;if(this._seen.add(b),null==(o=null==(n=this._options)?void 0:n.networkConfig)?void 0:o.preventAllNetworkTraffic){null==(c=this._emitter)||c.call(this,{name:"error",error:r,tag:e});return}let y=a.SDKType._get(this._sdkKey),_=i.StatsigMetadataProvider.get(),m=f?p.stack:function(e){try{return JSON.stringify(e)}catch(e){return s}}(p),k=Object.assign({tag:e,exception:b,info:m,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];switch(typeof n){case"number":case"bigint":case"boolean":t[String(r)]=n;break;case"string":n.length<50?t[String(r)]=n:t[String(r)]="set";break;case"object":"environment"===r?t.environment=n:"networkConfig"===r?t.networkConfig=n:t[String(r)]=null!=n?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},_),{sdkType:y})),w=null!=(h=null==(d=null==(u=this._options)?void 0:u.networkConfig)?void 0:d.networkOverrideFunc)?h:fetch;yield w(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(y),"STATSIG-SDK-VERSION":String(_.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(k)}),null==(g=this._emitter)||g.call(this,{name:"error",error:r,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},5154:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},882:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let o=r(833),a=r(902),i=r(1392),s=r(3549),l=r(7734),c=r(4349),u=r(5714),d=r(9982),h=r(7617),g=r(2837),p={},f="startup",b="gained_focus";class v{static _safeFlushAndForget(e){var t;null==(t=p[e])||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null==(t=p[e])||t._retryFailedLogs(b)}constructor(e,t,r,n){var o,a;this._sdkKey=e,this._emitter=t,this._network=r,this._options=n,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!=(o=null==n?void 0:n.loggingEnabled)?o:(null==n?void 0:n.disableLogging)===!0?u.LoggingEnabledOption.disabled:u.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&i.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!=(a=null==n?void 0:n.loggingBufferMaxSize)?a:100;const l=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){let e=this._getStorageKey(),t=(0,d._getObjectFromStorage)(e);t&&this._queue.push(...t),d.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&v._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let r=null!=(t=this._nonExposedChecks[e])?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;let t=(0,l._isServerEnv)();t&&(null==(e=this._options)?void 0:e.loggingEnabled)!=="always"||(p[this._sdkKey]=this,t||(0,g._subscribeToVisiblityChanged)(e=>{"background"===e?v._safeFlushAndForget(this._sdkKey):"foreground"===e&&v._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(f),this._startBackgroundFlushInterval())}stop(){return n(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete p[this._sdkKey],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>v._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if((null==(t=this._options)?void 0:t.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;let r=e.user?e.user:{statsigEnvironment:void 0},n=(0,o._getUserStorageKey)(this._sdkKey,r),a=e.metadata?e.metadata:{},i=[e.eventName,n,a.gate,a.config,a.ruleID,a.allocatedExperiment,a.parameterName,String(a.isExplicitParameter),a.reason].join("|"),s=this._lastExposureTimeMap[i],u=Date.now();return(!s||!(u-s<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[i]=u,!0)}_sendEvents(e){return n(this,void 0,void 0,function*(){var t,r;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{let n=(0,g._isUnloading)()&&this._network.isBeaconSupported()&&(null==(r=null==(t=this._options)?void 0:t.networkConfig)?void 0:r.networkOverrideFunc)==null;if(this._emitter({name:"pre_logs_flushed",events:e}),(n?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success)return this._emitter({name:"logs_flushed",events:e}),!0;return i.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return i.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return n(this,void 0,void 0,function*(){var t;let r=yield this._network.post(this._getRequestData(e)),n=null!=(t=null==r?void 0:r.code)?t:-1;return{success:n>=200&&n<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[s.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{let r=this._getFailedLogsFromStorage(t);(0,d._setObjectInStorage)(t,[...r,...e])}catch(e){i.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{let r=(0,d._getObjectFromStorage)(e);return Array.isArray(r)&&(t=r),t}catch(e){return[]}}_retryFailedLogs(e){let t=this._getStorageKey();n(this,void 0,void 0,function*(){d.Storage.isReady()||(yield d.Storage.isReadyResolver());let r=(0,d._getObjectFromStorage)(t);!r||(e===f&&d.Storage.removeItem(t),(yield this._sendEvents(r))&&e===b&&d.Storage.removeItem(t))}).catch(()=>{i.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,a._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});let n=Object.assign(Object.assign({},e),t);i.Log.debug("Enqueued Event:",n),this._queue.push(n)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null==(e=this._options)?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let r=setInterval(()=>{let e=p[this._sdkKey];e&&e._flushIntervalId===r?v._safeFlushAndForget(this._sdkKey):clearInterval(r)},null!=(t=null==(e=this._options)?void 0:e.loggingIntervalMs)?t:1e4);this._flushIntervalId=r}}t.EventLogger=v},902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let n=r(7730);t._DJB2=e=>{let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return String(t>>>0)},t._DJB2Object=(e,r)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r))),t._getSortedObject=(e,r)=>{if(null==e)return null;let o=Object.keys(e).sort(),a={};return o.forEach(o=>{let i=e[o];if(0===r||"object"!==(0,n._typeOf)(i)){a[o]=i;return}a[o]=(0,t._getSortedObject)(i,null!=r?r-1:r)}),a}},6765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1392:function(e,t){"use strict";function r(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...e){n.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){n.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){n.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){n.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}t.Log=n,n.level=t.LogLevel.Warn},547:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let a=`${e}|${t}`;if(!o)return a;for(let e of Object.keys(o)){if(n.has(e))return;r.has(e)?a+=`|${e}=true`:a+=`|${e}=${o[e]}`}return a}},3549:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},7:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(1917);let o=r(1917),a=r(5930),i=r(1392),s=r(3549),l=r(9180),c=r(2235),u=r(2470),d=r(7734),h=r(599),g=r(826),p=r(1556),f=r(8808),b=r(5714),v=r(2837),y=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!_(e))return!1;let t=this._getInternalRequestArgs("POST",e),r=this._getPopulatedURL(t),n=navigator;return n.sendBeacon.bind(n)(r,t.body)}post(e){return n(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return n(this,void 0,void 0,function*(){var t,r,o,l,c,u,d,h,g;if(!_(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:f,body:b,retries:m,attempt:w}=e,O=e.urlConfig.endpoint;if(this._isRateLimited(O))return i.Log.warn(`Request to ${O} was blocked because you are making requests too frequently.`),null;let E=null!=w?w:1,x=!1,S=this._getPopulatedURL(e),C=null,D=(0,v._isUnloading)();try{let r,n={method:f,body:b,headers:Object.assign({},e.headers),priority:e.priority,keepalive:D};c=e,u=E,c.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqStart(c.sdkKey,{attempt:u});let o=this._leakyBucket[O];o&&(o.lastRequestTime=Date.now(),this._leakyBucket[O]=o);let i=null!=(t=this._netConfig.networkOverrideFunc)?t:fetch;if(!(C=yield Promise.race([i(S,n).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{x=!0,t(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield C.text().catch(()=>"No Text"),t=Error(`NetworkError: ${S} ${e}`);throw t.name="NetworkError",t}let l=yield C.text();return k(e,C,E,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:C.status}}catch(s){let t="string"==typeof(d=s)?d:d instanceof Error?`${d.name}: ${d.message}`:"Unknown Error",a=(h=null!=t?t:"",g=x,h.includes("Timeout")||g);if(k(e,C,E,"",s),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,a))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!m||E>m||!y.has(null!=(r=null==C?void 0:C.status)?r:500)){null==(o=this._emitter)||o.call(this,{name:"error",error:s,tag:p.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${f} request to ${S}.`;return i.Log.error(r,t,s),null==(l=this._errorBoundary)||l.attachErrorIfNoneExists(r),null}return yield function(e){return n(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(E),this._sendRequest(Object.assign(Object.assign({},e),{retries:m,attempt:E+1}))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||(null==e?void 0:e.disableCompression)!==!0||(t=b.LogEventCompressionMode.Disabled),t||(t=b.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;let r=Date.now(),n=null!=(t=this._leakyBucket[e])?t:{count:0,lastRequestTime:r},o=Math.floor((r-n.lastRequestTime)*.05);return n.count=Math.max(0,n.count-o),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;let r=null!=(t=e.fallbackUrl)?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===s.Endpoint._initialize||e.urlConfig.endpoint===s.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let n=Object.assign({[s.NetworkParam.SdkKey]:e.sdkKey,[s.NetworkParam.SdkType]:u.SDKType._get(e.sdkKey),[s.NetworkParam.SdkVersion]:f.SDK_VERSION,[s.NetworkParam.Time]:String(Date.now()),[s.NetworkParam.SessionID]:h.SessionID.get(e.sdkKey)},e.params),o=Object.keys(n).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&");return`${r}${o?`?${o}`:""}`}_tryEncodeBody(e){var t;let r=(0,d._getWindowSafe)(),n=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof n&&null==(0,o._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(n).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.StatsigEncoded]:"1"})}catch(t){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return n(this,void 0,void 0,function*(){var t;let r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable||null!=(0,o._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;let r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case b.LogEventCompressionMode.Disabled:return!1;case b.LogEventCompressionMode.Enabled:if(r&&!n)return!1;return!0;case b.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{let n,o=new TextEncoder().encode(r),a=new CompressionStream("gzip"),l=a.writable.getWriter();l.write(o).catch(i.Log.error),l.close().catch(i.Log.error);let c=a.readable.getReader(),u=[];for(;!(n=yield c.read()).done;)u.push(n.value);let d=u.reduce((e,t)=>e+t.length,0),h=new Uint8Array(d),g=0;for(let e of u)h.set(e,g),g+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!=(t=e.params)?t:{}),{[s.NetworkParam.IsGzipped]:"1"})}catch(t){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),n=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&m(n,t.data),n}};let _=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),m=(e,t)=>{let{sdkKey:r,fallbackUrl:n}=e,o=g.StableID.get(r),a=h.SessionID.get(r),i=u.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:o,sessionID:a,sdkType:i,fallbackUrl:n})}))};function k(e,t,r,n,o){e.urlConfig.endpoint===s.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqEnd(e.sdkKey,a.Diagnostics._getDiagnosticsData(t,r,n,o))}},9180:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let o=r(1681),a=r(902),i=r(1392),s=r(9982);function l(e,t){var r;let n=null!=(r=null==e?void 0:e.toLowerCase())?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function c(e){return`statsig.network_fallback.${(0,a._DJB2)(e)}`}function u(e,t){let r=c(e);t&&0!==Object.keys(t).length?s.Storage.setItem(r,JSON.stringify(t)):s.Storage.removeItem(r)}t.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null==(t=e.networkConfig)?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r;let n=null==(r=this._fallbackInfo)?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+6048e5,u(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:n})))}getActiveFallbackUrl(e,t){var r,n;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let o=this._fallbackInfo;null==o&&(o=null!=(r=function(e){let t=c(e),r=s.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return i.Log.error("Failed to parse FallbackInfo"),null}}(e))?r:{},this._fallbackInfo=o);let a=o[t.endpoint];return!a||Date.now()>(null!=(n=a.expiryTime)?n:0)||t.getChecksum()!==a.urlConfigChecksum?(delete o[t.endpoint],this._fallbackInfo=o,u(e,this._fallbackInfo),null):a.url?a.url:null}tryFetchUpdatedFallbackInfo(e,t,r,o){return n(this,void 0,void 0,function*(){var n,a;try{if(!l(r,o))return!1;let a=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,i=this._pickNewFallbackUrl(null==(n=this._fallbackInfo)?void 0:n[t.endpoint],a);if(!i)return!1;return this._updateFallbackInfoWithNewUrl(e,t,i),!0}catch(e){return null==(a=this._errorBoundary)||a.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var n,o,a;let i={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},s=t.endpoint,l=null==(n=this._fallbackInfo)?void 0:n[s];l&&i.previous.push(...l.previous),i.previous.length>10&&(i.previous=[]);let c=null==(a=null==(o=this._fallbackInfo)?void 0:o[s])?void 0:a.url;null!=c&&i.previous.push(c),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[s]:i}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return n(this,void 0,void 0,function*(){var t;let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;let n=[],a=yield(0,o._fetchTxtRecords)(null!=(t=this._networkOverrideFunc)?t:fetch),i=function(e){try{return new URL(e).pathname}catch(e){return null}}(e.defaultUrl);for(let t of a){if(!t.startsWith(e.endpointDnsKey+"="))continue;let r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${i}`)}}return n})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let n=new Set(null!=(r=null==e?void 0:e.previous)?r:[]),o=null==e?void 0:e.url,a=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!n.has(e)&&t!==o){a=t;break}}return a}},t._isDomainFailure=l},6229:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},585:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{var n,o;return null!=(o=null==(n=r[e])?void 0:n[t])&&o}}},2470:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let n={};t.SDKType={_get:e=>{var t;return(null!=(t=n[e])?t:"js-mono")+(null!=r?r:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){r&&"-react"!==r||(r="-"+e)}}},7734:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"undefined"!=typeof window?window:null,t._getDocumentSafe=()=>{var e;let r=(0,t._getWindowSafe)();return null!=(e=null==r?void 0:r.document)?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||e},t._addWindowEventListenerSafe=(e,r)=>{let n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._addDocumentEventListenerSafe=(e,r)=>{let n=(0,t._getDocumentSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._getCurrentPageUrlSafe=()=>{var e;try{return null==(e=(0,t._getWindowSafe)())?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},599:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let n=r(1917),o=r(833),a=r(1392),i=r(9982),s=r(2127),l={};function c(e,t){return setTimeout(()=>{var t;let r=null==(t=(0,n._getStatsigGlobal)())?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})},t)}function u(e){return`statsig.session_id.${(0,o._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{var t;let r,n,o;return null==l[e]&&(l[e]=(n=(r=u(t=e),(0,i._getObjectFromStorage)(r)),o=Date.now(),n||(n={sessionID:(0,s.getUUID)(),startTime:o,lastUpdate:o}),{data:n,sdkKey:t})),function(e){let t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>18e5}(r)||function({startTime:e}){return Date.now()-e>144e5}(r)){r.sessionID=(0,s.getUUID)(),r.startTime=t;let e=null==__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){let r=u(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){a.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let o=t-r.startTime;return e.idleTimeoutID=c(n,18e5),e.ageTimeoutID=c(n,144e5-o),e}(l[e])},overrideInitialSessionID:(e,t)=>{var r,n;let o;l[t]=(r=e,n=t,{data:{sessionID:r,startTime:o=Date.now(),lastUpdate:o},sdkKey:n})}}},5096:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,r)=>{let n=0,o=Object.keys(e);for(let a=0;a<o.length;a++){let i=o[a],s=e[i];if(n+=i.length,"object"==typeof s&&null!==s?n+=(0,t._fastApproxSizeOf)(s,r)+2:n+=String(s).length+1,n>=r)break}return n}},826:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;let n=r(833),o=r(1392),a=r(7734),i=r(9982),s=r(2127),l={},c={},u={};function d(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function h(e,t){let r=d(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){o.Log.warn("Failed to save StableID to storage")}}function g(e,t){if(!c[t]||null==(0,a._getDocumentSafe)())return;let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`}function p(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{let t;if(u[e])return null;if(null!=l[e])return l[e];let r=null;return null!=(r=function(e){if(!c[e]||null==(0,a._getDocumentSafe)())return null;for(let t of document.cookie.split(";")){let[r,n]=t.trim().split("=");if(r===p(e))return decodeURIComponent(n)}return null}(e))?(l[e]=r,h(r,e)):(null==(t=d(e),r=(0,i._getObjectFromStorage)(t))&&(r=(0,s.getUUID)()),h(r,e),g(r,e),l[e]=r),r},setOverride:(e,t)=>{l[t]=e,h(e,t),g(e,t)},_setCookiesEnabled:(e,t)=>{c[e]=t},_setDisabled:(e,t)=>{u[e]=t}},t.getCookieName=p},2999:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(1917);let o=r(1917),a=r(6510),i=r(882),s=r(1392),l=r(547),c=r(7734),u=r(599),d=r(826),h=r(5714),g=r(9982);t.StatsigClientBase=class{constructor(e,t,r,n){var l,h,p,f;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const b=this.$emt.bind(this);(null==n?void 0:n.logLevel)!=null&&(s.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&g.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&u.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&g.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&d.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!=(l=null==n?void 0:n.overrideAdapter)?l:null,this._logger=new i.EventLogger(e,b,r,n),this._errorBoundary=new a.ErrorBoundary(e,n,b),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,n,r),this.storageProvider=g.Storage,null==(f=null==(p=null==(h=this.overrideAdapter)?void 0:h.loadFromStorage)?void 0:p.call(h))||f.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,c._isServerEnv)())return;let n=(0,o._getStatsigGlobal)(),a=null!=(r=n.instances)?r:{};null!=a[e]&&s.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),a[e]=t,n.firstInstance||(n.firstInstance=t),n.instances=a,__STATSIG__=n}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,g.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(h.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return n(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){let r=this._listeners[e].indexOf(t);-1!==r&&this._listeners[e].splice(r,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;let r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,r);s.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>r(e)),null==(t=this._listeners["*"])||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){(null==r?void 0:r.disableExposureLog)===!0?this._logger.incrementNonExposureCount(e):this._logger.enqueue(t)}_memoize(e,t){return(r,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);let o=(0,l.createMemoKey)(e,r,n);return o?(o in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[o]=t(r,n)),this._memoCache[o]):t(r,n)}}}},1556:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},5070:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},4349:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let r="statsig::config_exposure",n="statsig::gate_exposure",o="statsig::layer_exposure",a=(e,t,r,n,o)=>(r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:s(r,n),secondaryExposures:o,time:Date.now()});function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>e===n||e===r||e===o,t._createGateExposure=(e,t,r)=>{var o,s,l;let c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(c.configVersion=t.__evaluation.version),a(n,e,t.details,c,i(null!=(l=null==(s=t.__evaluation)?void 0:s.secondary_exposures)?l:[],r))},t._mapExposures=i,t._createConfigExposure=(e,t,n)=>{var o,s,l,c;let u={config:t.name,ruleID:t.ruleID};return(null==(o=t.__evaluation)?void 0:o.version)!=null&&(u.configVersion=t.__evaluation.version),(null==(s=t.__evaluation)?void 0:s.passed)!=null&&(u.rulePassed=String(t.__evaluation.passed)),a(r,e,t.details,u,i(null!=(c=null==(l=t.__evaluation)?void 0:l.secondary_exposures)?c:[],n))},t._createLayerParameterExposure=(e,t,r,n)=>{var s,l,c,u,d,h,g;let p=t.__evaluation,f=(null==(s=null==p?void 0:p.explicit_parameters)?void 0:s.includes(r))===!0,b="",v=null!=(l=null==p?void 0:p.undelegated_secondary_exposures)?l:[];f&&(b=null!=(c=p.allocated_experiment_name)?c:"",v=null!=(u=p.secondary_exposures)?u:[]);let y=null==(d=t.__evaluation)?void 0:d.parameter_rule_ids,_={config:t.name,parameterName:r,ruleID:null!=(h=null==y?void 0:y[r])?h:t.ruleID,allocatedExperiment:b,isExplicitParameter:String(f)};return(null==(g=t.__evaluation)?void 0:g.version)!=null&&(_.configVersion=t.__evaluation.version),a(o,e,t.details,_,i(v,n))};let s=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},8808:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.26.0";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},5714:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},7682:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let n=r(1392),o=r(7730);function a(e,t,r,n){var o;return{name:e,details:t,ruleID:null!=(o=null==r?void 0:r.rule_id)?o:"",__evaluation:r,value:n}}function i(e,t,r){var n;let o=null!=(n=null==r?void 0:r.value)?n:{};return Object.assign(Object.assign({},a(e,t,r,o)),{get:s(e,null==r?void 0:r.value)})}function s(e,t,r){return(a,i)=>{var s;let l=null!=(s=null==t?void 0:t[a])?s:null;return null==l?null!=i?i:null:null==i||(0,o._isTypeMatch)(l,i)?(null==r||r(a),l):(n.Log.warn(`Parameter type mismatch. '${e}.${a}' was found to be type '${typeof l}' but fallback/return type is '${typeof i}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=i?i:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},a(e,t,r,(null==r?void 0:r.value)===!0)),{idType:null!=(n=null==r?void 0:r.id_type)?n:null})},t._makeDynamicConfig=i,t._makeExperiment=function(e,t,r){var n;return Object.assign(Object.assign({},i(e,t,r)),{groupName:null!=(n=null==r?void 0:r.group_name)?n:null})},t._makeLayer=function(e,t,r,n){var o,i;return Object.assign(Object.assign({},a(e,t,r,void 0)),{get:s(e,null==r?void 0:r.value,n),groupName:null!=(o=null==r?void 0:r.group_name)?o:null,__value:null!=(i=null==r?void 0:r.value)?i:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:s(e.name,r,n)})},t._makeTypedGet=s},8860:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4196:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,r,n,o,a)=>({duration:r,source:t,success:e,error:n,sourceUrl:o,warnings:a}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},5466:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let n=r(902),o=r(1392);t._normalizeUser=function(e,t,r){try{let n=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?n.statsigEnvironment=t.environment:null!=r&&(n.statsigEnvironment={tier:r}),n}catch(e){return o.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,n._DJB2Object)(e):null}},9982:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let n=r(1392),o=r(7734),a={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>a[e]?a[e]:null,setItem:(e,t)=>{a[e]=t},removeItem:e=>{delete a[e]},getAllKeys:()=>Object.keys(a)},s=null;try{let e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,r)=>e.localStorage.setItem(t,r),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(e){n.Log.warn("Failed to setup localStorageProvider.")}let l=null!=s?s:i,c=l;function u(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(i),null;if(e instanceof Error&&"QuotaExceededError"===e.name){let r=t.Storage.getAllKeys().filter(e=>e.startsWith("statsig."));e.message=`${e.message}. Statsig Keys: ${r.length}`}throw e}}t.Storage={isReady:()=>c.isReady(),isReadyResolver:()=>c.isReadyResolver(),getProviderName:()=>c.getProviderName(),getItem:e=>u(()=>c.getItem(e)),setItem:(e,t)=>u(()=>c.setItem(e,t)),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?i:l}},t._getObjectFromStorage=function(e){let r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},9217:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let n=r(1392);t._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return n.Log.error(`Failed to parse ${r}`),null}},7730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},2127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,r="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${r}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,r=>{let n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)})}},7617:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let n=r(902),o=r(3549),a={[o.Endpoint._initialize]:"i",[o.Endpoint._rgstr]:"e",[o.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=a[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),n&&(this.fallbackUrls=n);const i=o.NetworkDefault[e];this.defaultUrl=`${i}/${e}`}getUrl(){var e;return null!=(e=this.customUrl)?e:this.defaultUrl}getChecksum(){var e;let t=(null!=(e=this.fallbackUrls)?e:[]).sort().join(",");return(0,n._DJB2)(this.customUrl+t)}}},2837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let n=r(7734),o="foreground",a="background",i=[],s=o,l=!1;t._isCurrentlyVisible=()=>s===o,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{i.unshift(e)},t._notifyVisibilityChanged=e=>{e!==s&&(s=e,i.forEach(t=>t(e)))},(0,n._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(o)}),(0,n._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(a)),(0,n._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?o:a)}),(0,n._addWindowEventListenerSafe)((0,n._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(a)})},2874:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(1917);let a=r(1917),i=r(5930);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});let s=r(882);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return s.EventLogger}});let l=r(1392);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});let c=r(8808),u=r(9982);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return u.Storage}}),o(r(1917),t),o(r(833),t),o(r(9171),t),o(r(830),t),o(r(5930),t),o(r(2443),t),o(r(6510),t),o(r(5154),t),o(r(9161),t),o(r(902),t),o(r(6765),t),o(r(1392),t),o(r(547),t),o(r(3549),t),o(r(7),t),o(r(6229),t),o(r(585),t),o(r(7734),t),o(r(2470),t),o(r(599),t),o(r(5096),t),o(r(826),t),o(r(2999),t),o(r(1556),t),o(r(5070),t),o(r(4349),t),o(r(8808),t),o(r(5714),t),o(r(7682),t),o(r(2131),t),o(r(8860),t),o(r(5466),t),o(r(9982),t),o(r(9217),t),o(r(7730),t),o(r(7617),t),o(r(2127),t),o(r(2837),t),o(r(4196),t),o(r(2235),t),Object.assign((0,a._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:c.SDK_VERSION})},8070:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let n=r(2874);function o(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r,a,i;let s=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!s)return{hadBadDeltaChecksum:!0};let l=(o((i=(r=e,a=s,Object.assign(Object.assign(Object.assign({},r),a),{feature_gates:Object.assign(Object.assign({},r.feature_gates),a.feature_gates),layer_configs:Object.assign(Object.assign({},r.layer_configs),a.layer_configs),dynamic_configs:Object.assign(Object.assign({},r.dynamic_configs),a.dynamic_configs)}))).deleted_gates,i.feature_gates),delete i.deleted_gates,o(i.deleted_configs,i.dynamic_configs),delete i.deleted_configs,o(i.deleted_layers,i.layer_configs),delete i.deleted_layers,i),c=(0,n._DJB2Object)({feature_gates:l.feature_gates,dynamic_configs:l.dynamic_configs,layer_configs:l.layer_configs},2);return c!==s.checksumV2?{hadBadDeltaChecksum:!0,badChecksum:c,badMergedConfigs:l,badFullResponse:s.deltas_full_response}:JSON.stringify(l)}},5365:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(2874);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,o;if(!e)return!1;let a=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=a&&(this._source=e.source,(null==a?void 0:a.has_updates)!==!0||(null!=(r=a.time)?r:0)<this._lcut||(this._rawValues=e.data,this._lcut=a.time,this._receivedAt=e.receivedAt,this._values=a,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,a),e.source&&a.user&&this._setWarningState(t,a),n.SDKFlags.setFlags(this._sdkKey,null!=(o=a.sdk_flags)?o:{}),!0))}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.dynamic_configs,e)}getConfigList(){var e;return(null==(e=this._values)?void 0:e.dynamic_configs)?Object.values(this._values.dynamic_configs).map(e=>e.name):[]}getLayer(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null==(t=this._values)?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null==(e=this._values)?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let r={};return t.user&&(r.user=t.user),t.sdkInfo&&(r.generatorSDKInfo=t.sdkInfo),r.lcut=t.time,r}_getDetailedStoreResult(e,t){let r=null;return e&&(r=e[t]?e[t]:e[(0,n._DJB2)(t)]),{result:r,details:this._getDetails(null==r)}}_setWarningState(e,t){var r,o;let a=n.StableID.get(this._sdkKey);if((null==(r=e.customIDs)?void 0:r.stableID)!==a&&((null==(o=e.customIDs)?void 0:o.stableID)||a))return void this._warnings.add("StableIDMismatch");if("user"in t){let r=t.user,o=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,n._getFullUserHash)(o)!==(0,n._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let n=this.getCurrentSourceDetails(),o=n.reason,a=null!=(t=n.warnings)?t:[];"Bootstrap"===this._source&&a.length>0&&(o+=a[0]),"Uninitialized"!==o&&"NoValues"!==o&&(o=`${o}:${e?"Unrecognized":"Recognized"}`);let i="Bootstrap"===this._source&&null!=(r=this._bootstrapMetadata)?r:void 0;return i&&(n.bootstrapMetadata=i),Object.assign(Object.assign({},n),{reason:o})}}},1896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(2874),a=r(8070);class i extends o.NetworkCore{constructor(e,t){super(e,t);const r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new o.UrlConfiguration(o.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,a,i){return n(this,void 0,void 0,function*(){var n,s,l,c,u,d;let h=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null,g={user:a,hash:null!=(l=null==(s=null==(n=this._option)?void 0:n.networkConfig)?void 0:s.initializeHashAlgorithm)?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==h?void 0:h.has_updates){let e=(null==h?void 0:h.hash_used)!==(null!=(d=null==(u=null==(c=this._option)?void 0:c.networkConfig)?void 0:u.initializeHashAlgorithm)?d:"djb2");g=Object.assign(Object.assign({},g),{sinceTime:i&&!e?h.time:0,previousDerivedFields:"derived_fields"in h&&i?h.derived_fields:{},deltasResponseRequested:!0,full_checksum:h.full_checksum,partialUserMatchSinceTime:e?0:h.time})}return this._fetchEvaluations(e,h,g,r)})}_fetchEvaluations(e,t,r,o){return n(this,void 0,void 0,function*(){var n,i;let s=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:o});if((null==s?void 0:s.code)===204)return'{"has_updates": false}';if((null==s?void 0:s.code)!==200)return null!=(n=null==s?void 0:s.body)?n:null;if((null==t?void 0:t.has_updates)!==!0||(null==(i=s.body)?void 0:i.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return s.body;let l=(0,a._resolveDeltasResponse)(t,s.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),o)})}}t.default=i},9031:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let n=r(2874),o={disableExposureLog:!0};function a(e){return null==e||!1===e.disableExposureLog}function i(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(s,l)=>{if(null==t)return l;let c=t[s];if(null==c||null!=l&&(0,n._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return c.value;case"gate":return e.getFeatureGate(c.gate_name,a(r)?void 0:o).value?c.pass_value:c.fail_value;case"dynamic_config":let u;return i(u=e.getDynamicConfig(c.config_name,a(r)?void 0:o).get(c.param_name),l)?l:u;case"experiment":let d;return i(d=e.getExperiment(c.experiment_name,a(r)?void 0:o).get(c.param_name),l)?l:d;case"layer":let h;return i(h=e.getLayer(c.layer_name,a(r)?void 0:o).get(c.param_name),l)?l:h;default:return l}}}},3374:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let o=r(2874),a=r(5365),i=r(1896),s=r(9031),l=r(155);class c extends o.StatsigClientBase{static instance(e){let t=(0,o._getStatsigGlobal)().instance(e);return t instanceof c?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new c(null!=e?e:"",{}))}constructor(e,t,r=null){var n,s;o.SDKType._setClientType(e,"javascript-client");const c=new i.default(r,e=>{this.$emt(e)});for(const i of(super(e,null!=(n=null==r?void 0:r.dataAdapter)?n:new l.StatsigEvaluationsDataAdapter,c,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=c,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,o.getUUID)(),null!=(s=null==r?void 0:r.plugins)?s:[]))i.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!=(t=this._store.getWarnings())?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return n(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(e,t){let r=performance.now();try{return this._updateUserSyncImpl(e,t,r)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}}_updateUserSyncImpl(e,t,r){var n;let a=[...null!=(n=this._store.getWarnings())?n:[]];this._resetForUser(e);let i=this.dataAdapter.getDataSync(this._user);null==i&&a.push("NoCachedValues"),this._store.setValues(i,this._user),this._finalizeUpdate(i);let s=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===s||null==s&&(null==i?void 0:i.source)==="Bootstrap"||this._runPostUpdate(null!=i?i:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),a)}updateUserAsync(e,t){return n(this,void 0,void 0,function*(){let r=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}})}_updateUserAsyncImpl(e,t){return n(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;o.Diagnostics._markInitOverallStart(this._sdkKey);let n=this.dataAdapter.getDataSync(r);if(this._store.setValues(n,this._user),this._setStatus("Loading",n),n=yield this.dataAdapter.getDataAsync(n,r,t),r!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let a=!1;null!=n&&(o.Diagnostics._markInitProcessStart(this._sdkKey),a=this._store.setValues(n,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:a})),this._finalizeUpdate(n),a||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,a,this._store.getCurrentSourceDetails());let i=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(a,this._store.getSource(),i,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){let n="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:n}),this._logger.enqueue(Object.assign(Object.assign({},n),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return n(this,void 0,void 0,function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var r;return(0,o.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!=(r=this._store.getWarnings())?r:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{o.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var r,n,a;let i=(0,o._normalizeUser)(e,t),s=null==(r=i.customIDs)?void 0:r.stableID;if(s){let e=null==(a=(n=this.storageProvider).isReadyResolver)?void 0:a.call(n);e?e.then(()=>o.StableID.setOverride(s,this._sdkKey),()=>o.StableID.setOverride(s,this._sdkKey)):o.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(i.analyticsOnlyMetadata=Object.assign(Object.assign({},i.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),i}_getFeatureGateImpl(e,t){var r,n;let{result:a,details:i}=this._store.getGate(e),s=(0,o._makeFeatureGate)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getGateOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,t){var r,n;let{result:a,details:i}=this._store.getConfig(e),s=(0,o._makeDynamicConfig)(e,i,a),l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getDynamicConfigOverride)?void 0:n.call(r,s,this._user,t),c=null!=l?l:s;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,t){var r,n,a,i;let{result:s,details:l}=this._store.getConfig(e),c=(0,o._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,o._mapExposures)(null!=(n=null==(r=c.__evaluation)?void 0:r.secondary_exposures)?n:[],this._store.getExposureMapping()));let u=null==(i=null==(a=this.overrideAdapter)?void 0:a.getExperimentOverride)?void 0:i.call(a,c,this._user,t),d=null!=u?u:c;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,d,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:d}),d}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var r,n,a;let{result:i,details:s}=this._store.getLayer(e),l=(0,o._makeLayer)(e,s,i),c=null==(n=null==(r=this.overrideAdapter)?void 0:r.getLayerOverride)?void 0:n.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let u=(0,o._mergeOverride)(l,c,null!=(a=null==c?void 0:c.__value)?a:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,u,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:u}),u}_getParameterStoreImpl(e,t){var r,n;let{result:o,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let i={name:e,details:a,__configuration:o,get:(0,s._makeParamStoreGetter)(this,o,t)},l=null==(n=null==(r=this.overrideAdapter)?void 0:r.getParamStoreOverride)?void 0:n.call(r,i,t);return null!=l&&(i.__configuration=l.config,i.details=l.details,i.get=(0,s._makeParamStoreGetter)(this,l.config,t)),i}}t.default=c},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let o=r(2874),a=r(1896);class i extends o.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof a.default?this._network=r:this._network=new a.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,o._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,o._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):o.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(e,t,r,o){return n(this,void 0,void 0,function*(){var n;let a=yield null==(n=this._network)?void 0:n.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,o);return null!=a?a:null})}_getCacheKey(e){var t;let r=(0,o._getStorageKey)(this._getSdkKey(),e,null==(t=this._options)?void 0:t.customUserCacheKeyFunc);return`${o.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,o._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=i},6122:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let a=r(2874),i=r(3374);t.StatsigClient=i.default,o(r(2874),t),t.default=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:i.default})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{setGlobalTheme:()=>t$});var e,t,o,a,i,s,l={};function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}function h(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,d(n.key),n)}}function g(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(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 v(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||v(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){_(a,n,o,i,s,"next",e)}function s(e){_(a,n,o,i,s,"throw",e)}i(void 0)})}}r.r(l),r.d(l,{CURRENT_SURFACE_CSS_VAR:()=>tr,ThemeMutationObserver:()=>tB,enableGlobalTheme:()=>tT,getGlobalTheme:()=>tG,getSSRAutoScript:()=>tR,getThemeHtmlAttrs:()=>tb,getThemeStyles:()=>tF,getTokenValue:()=>to,setGlobalTheme:()=>tL,themeConfig:()=>e7,themeObjectToString:()=>th,themeStringToObject:()=>td,token:()=>tn,useThemeObserver:()=>tV()});var k=r(8972),w=r.n(k),O=r(6122),E=r(2646),x=r.n(E);function S(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 C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var D="@all-features",j=g(function e(){c(this,e),p(this,"eventToValue",new Map),this.emitter=new(x())},[{key:"onGateUpdated",value:function(e,t,r,n){var o=this,a=r(e,C(C({},n),{},{fireGateExposure:!1}));void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,a);var i=function(){var a=r(e,C(C({},n),{},{fireGateExposure:!1}));o.eventToValue.get(t)!==a&&(o.eventToValue.set(t,a),t(a))};return this.emitter.on(e,i),function(){o.emitter.off(e,i)}}},{key:"onExperimentValueUpdated",value:function(e,t,r,n,o,a){var i=this,s="".concat(e,".").concat(t),l=o(e,t,r,C(C({},a),{},{fireExperimentExposure:!1}));void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,l);var c=function(){var s=o(e,t,r,C(C({},a),{},{fireExperimentExposure:!1}));i.eventToValue.get(n)!==s&&(i.eventToValue.set(n,s),n(s))};return this.emitter.on(s,c),function(){i.emitter.off(s,c)}}},{key:"onAnyUpdated",value:function(e){var t=this;return this.emitter.on(D,e),function(){t.emitter.off(D,e)}}},{key:"anyUpdated",value:function(){var e=this;this.emitter.emit(D),this.emitter.eventNames().filter(function(e){return e!==D}).forEach(function(t){e.emitter.emit(t)})}}]),P=((eO={}).Error="Error",eO.LocalOverride="LocalOverride",eO.Unrecognized="Unrecognized",eO.Uninitialized="Uninitialized",eO.NetworkNotModified="NetworkNotModified",eO.Network="Network",eO.InvalidBootstrap="InvalidBootstrap",eO.Bootstrap="Bootstrap",eO.Cache="Cache",eO.Unknown="Unknown",eO),I=((eE={}).Development="development",eE.Staging="staging",eE.Production="production",eE),A=((ex={}).COMMERCIAL="commercial",ex.FEDRAMP_MODERATE="fedramp-moderate",ex),U=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];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 L(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){p(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 T=function(e){return L({perimeter:!function(){var e,t=globalThis,r=t.MICROS_PERIMETER||t.UNSAFE_ATL_CONTEXT_BOUNDARY;if(r)return"fedramp-moderate"===r;var n=null==(e=t.location)||null==(e=e.hostname)?void 0:e.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return!!n&&n.length>0}()?A.COMMERCIAL:A.FEDRAMP_MODERATE},e)},F=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=y(e,1)[0],n=y(t,1)[0];return r.localeCompare(n)};r.sort(o),n.sort(o);for(var a=0;a<r.length;a++)if(y(r[a],2)[1]!==y(n[a],2)[1])return!1;return!0},R=function(e,t){var r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},N=function(e){var t=e.api,r=e.disableCurrentPageLogging,n=e.loggingIntervalMillis,o=e.loggingBufferMaxSize,a=e.localMode,i=e.eventLoggingApi,s=e.eventLoggingApiForRetries,l=e.disableLocalStorage,c=e.ignoreWindowUndefined,u=e.disableAllLogging;return L(L({},(e.initTimeoutMs,e.disableNetworkKeepalive,e.overrideStableID,e.disableErrorLogging,e.disableAutoMetricsLogging,f(e,U))),{},{networkConfig:{api:t,logEventUrl:i?i+"rgstr":void 0,logEventFallbackUrls:s?[s]:void 0,preventAllNetworkTraffic:a||!c&&"undefined"==typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:o,disableStorage:void 0===l?a:l,disableLogging:void 0===u?a:u})},V=Object.entries(P).map(function(e){var t=y(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]}),K=function(e){var t,r,n,o=e.reason.toLowerCase();return{reason:null!=(t=null==(r=V.find(function(e){var t=y(e,1)[0];return o.includes(t)}))?void 0:r[1])?t:P.Unknown,time:null!=(n=e.receivedAt)?n:Date.now()}},z=function(e){return e.map(function(e){return"string"==typeof e?{gate:e}:e})},G=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;c(this,e),this.value=r,this._name=t,this._ruleID=n,this._secondaryExposures=a,this._allocatedExperimentName=i,this._evaluationDetails=o,this._onDefaultValueFallback=s}return g(e,[{key:"get",value:function(e,t,r){var n,o,a=this.getValue(e,t);if(null==a)return t;var i=Array.isArray(t)?"array":u(t),s=Array.isArray(a)?"array":u(a);return r?r(a)?(this.fireExposure(e),a):(null==(o=this._onDefaultValueFallback)||o.call(this,this,e,i,s),t):null==t||i===s?(this.fireExposure(e),a):(null==(n=this._onDefaultValueFallback)||n.call(this,this,e,i,s),t)}},{key:"getValue",value:function(e,t){return null==e?this.value:(null==t&&(t=null),null==this.value[e])?t:(this.fireExposure(e),this.value[e])}},{key:"fireExposure",value:function(e){this.experiment&&this.experiment.get(e)}}],[{key:"fromExperiment",value:function(t){var r,n,o,a=new e(t.name,t.value,t.ruleID,K(t.details),z(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),null!=(o=t.groupName)?o:void 0);return a.experiment=t,a}}])}(),B=function(){function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];c(this,e),this._logParameterFunction=a,this._name=t,this._value=JSON.parse(JSON.stringify(null!=r?r:{})),this._ruleID=null!=n?n:"",this._evaluationDetails=o,this._secondaryExposures=i,this._undelegatedSecondaryExposures=s,this._allocatedExperimentName=l,this._explicitParameters=u}return g(e,[{key:"get",value:function(e,t,r){var n=this,o=this._value[e];if(null==o)return t;var a=function(){return n._logLayerParameterExposure(e),o};return r?r(o)?a():t:null==t||u(o)===u(t)&&Array.isArray(t)===Array.isArray(o)?a():t}},{key:"getValue",value:function(e,t){void 0==t&&(t=null);var r=this._value[e];return null!=r&&this._logLayerParameterExposure(e),null!=r?r:t}},{key:"_logLayerParameterExposure",value:function(e){var t;null==(t=this._logParameterFunction)||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,n,o,a,i,s;return new e(t.name,t.__value,t.ruleID,K(t.details),function(e,r){return t.get(r)},z(null!=(r=null==(n=t.__evaluation)?void 0:n.secondary_exposures)?r:[]),z(null!=(o=null==(a=t.__evaluation)?void 0:a.undelegated_secondary_exposures)?o:[]),null==(i=t.__evaluation)?void 0:i.allocated_experiment_name,null==(s=t.__evaluation)?void 0:s.explicit_parameters)}}])}(),$="0.0.0-development";function J(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function H(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Q=function(){return!!e})()}function X(e){var t="function"==typeof Map?new Map:void 0;return(X=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(Q())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&W(o,r.prototype),o}(e,arguments,q(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),W(r,e)})(e)}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y=function(){return!!e})()}var Z=function(e){function t(e){var r,n;return c(this,t),r=t,n=[e],r=q(r),J(this,Y()?Reflect.construct(r,n||[],q(this).constructor):r.apply(this,n))}return H(t,e),g(t)}(X(Error));function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var et=function(){var e,t,r,n,o;function a(){c(this,a)}return g(a,null,[{key:"fetchClientSdk",value:(e=m(w().mark(function e(t){var r,n;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.targetApp,n="/api/v2/frontend/clientSdkKey/".concat(r),e.prev=2,e.next=5,this.fetchRequest(n,"GET",t);case 5:return e.abrupt("return",e.sent);case 8:if(e.prev=8,e.t0=e.catch(2),!(e.t0 instanceof Error)){e.next=12;break}throw e.t0;case 12:throw Error("Failed to retrieve client sdk key");case 13:case"end":return e.stop()}},e,this,[[2,8]])})),function(t){return e.apply(this,arguments)})},{key:"fetchExperimentValues",value:(t=m(w().mark(function e(t,r,n){var o;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={identifiers:r,customAttributes:n,targetApp:t.targetApp},e.prev=1,e.next=4,this.fetchRequest("/api/v2/frontend/experimentValues","POST",t,o);case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),!(e.t0 instanceof Error)){e.next=11;break}throw e.t0;case 11:throw Error("Failed to retrieve experiment values");case 12:case"end":return e.stop()}},e,this,[[1,7]])})),function(e,r,n){return t.apply(this,arguments)})},{key:"handleResponseError",value:(r=m(w().mark(function e(t){var r;return w().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 Z("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 Z("Unexpected 204 response");case 7:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"extractResponseBody",value:(n=m(w().mark(function e(t){var r;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.text();case 2:return r=e.sent,e.abrupt("return",JSON.parse(r));case 4:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getBaseUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t)return"/gateway/api/flags";if(r===A.FEDRAMP_MODERATE)switch(e){case I.Production:return"https://api.atlassian-us-gov-mod.com/flags";case I.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw Error('Invalid environment "'.concat(e,'" for "').concat(r,'" perimeter'))}if(r===A.COMMERCIAL)switch(e){case I.Development:return"https://api.dev.atlassian.com/flags";case I.Staging:var o=this.getApiUrl(n);if(null!==o)return o;return"https://api.stg.atlassian.com/flags";default:var a=this.getApiUrl(n);if(null!==a)return a;return"https://api.atlassian.com/flags"}throw Error('Invalid perimeter "'.concat(r,'"'))}},{key:"fetchRequest",value:(o=m(w().mark(function e(t,r,n,o){var i,s,l,c,u;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.getBaseUrl(n.environment,n.useGatewayURL,n.perimeter,n.isolationContextId),s=n.fetchTimeoutMs||5e3,AbortSignal.timeout?l=AbortSignal.timeout(s):AbortController&&(l=(c=new AbortController).signal,setTimeout(function(){return c.abort()},s)),e.next=5,fetch("".concat(i).concat(t),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({method:r,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":$,"X-API-KEY":n.apiKey},signal:l},o&&{body:JSON.stringify(o)}));case 5:return u=e.sent,e.next=8,this.handleResponseError(u);case 8:return e.next=10,this.extractResponseBody(u);case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return o.apply(this,arguments)})},{key:"getApiUrl",value:function(e){var t=this.getWindowLocation();if(void 0===t)return e?"https://atlassian-statsig-proxy-archetype.atl-paas.%s.atl-ic.net".replace("%s",e):null;var r=t.protocol,n=t.hostname,o=n.match(/([^.]+)\.oasis-stg\.com$/);if(o)return"".concat(r,"//api.").concat(o[1],".").concat("oasis-stg.com/flags");var a=n.match(/([^.]+)\.atlassian-isolated\.net$/);return a?"".concat(r,"//api.").concat(a[1],".").concat("atlassian-isolated.net/flags"):null}},{key:"getWindowLocation",value:function(){if("undefined"!=typeof window&&window.location)return window.location}}])}();function er(){return(er="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=q(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}}).apply(null,arguments)}function en(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 eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ea(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ea=function(){return!!e})()}var ei=function(e){var t,r,n;function o(){var e,t,r;return c(this,o),r=["NoFetchDataAdapter","nofetch"],t=q(t=o),p(e=J(this,ea()?Reflect.construct(t,r||[],q(this).constructor):t.apply(this,r)),"bootstrapResult",null),e}return H(o,e),g(o,[{key:"setBootstrapData",value:function(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:O.StableID.get(this._getSdkKey()),fullUserHash:null}:null}},{key:"prefetchData",value:(t=m(w().mark(function e(t,r){return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"getDataAsync",value:(r=m(w().mark(function e(t,r,n){return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bootstrapResult&&eo(eo({},this.bootstrapResult),{},{fullUserHash:(0,O._getFullUserHash)(r)}));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"getDataSync",value:function(e){return this.bootstrapResult&&eo(eo({},this.bootstrapResult),{},{fullUserHash:(0,O._getFullUserHash)(e)})}},{key:"_fetchFromNetwork",value:(n=m(w().mark(function e(t,r,n){return w().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,O._getStorageKey)(this._getSdkKey(),e);return"".concat(O.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(t)}},{key:"_isCachedResultValidFor204",value:function(e,t){return!1}},{key:"setDataLegacy",value:function(e,t){var r,n;(r=this,"function"==typeof(n=er(q(o.prototype),"setData",r))?function(e){return n.apply(r,e)}:n)([e,t])}},{key:"toJSON",value:function(){var e=eo({},this);return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}])}(O.DataAdapterCore),es=r(2874);function el(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 ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?el(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eu(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 ed="LocalOverride:Recognized",eh="STATSIG_JS_LITE_LOCAL_OVERRIDES",eg=function(){return{gates:{},configs:{},layers:{}}},ep=function(e,t){return t+":"+e},ef=g(function e(t){c(this,e),this._overrides=eg(),this._djb2Map=new Map,this._localStorageKey=t},[{key:"parseStoredOverrides",value:function(e){try{var t=window.localStorage.getItem(e);if(!t)return eg();return JSON.parse(t)}catch(e){return eg()}}},{key:"mergeOverrides",value:function(){for(var e=eg(),t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var o=0;o<r.length;o++){for(var a=r[o],i=0,s=Object.entries(null!=(l=a.gates)?l:{});i<s.length;i++){var l,c=y(s[i],2),u=c[0],d=c[1];e.gates[u]=d}for(var h=0,g=Object.entries(null!=(p=a.configs)?p:{});h<g.length;h++){var p,f=y(g[h],2),b=f[0],v=f[1];e.configs[b]=v}for(var _=0,m=Object.entries(null!=(k=a.layers)?k:{});_<m.length;_++){var k,w=y(m[_],2),O=w[0],E=w[1];e.layers[O]=E}}return e}},{key:"initFromStoredOverrides",value:function(){var e=this.mergeOverrides(this._overrides,this.parseStoredOverrides(eh),this.parseStoredOverrides(this._localStorageKey));try{window.localStorage.removeItem(eh)}catch(e){}for(var t=0,r=Object.values(e);t<r.length;t++){var n,o=r[t],a=new Set(Object.keys(o)),i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return eu(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eu(e,void 0):void 0}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}(a);try{for(i.s();!(n=i.n()).done;){var s=n.value,l=(0,es._DJB2)(s);a.has(l)&&delete o[l]}}catch(e){i.e(e)}finally{i.f()}}this.applyOverrides(e)}},{key:"saveOverrides",value:function(){try{window.localStorage.setItem(this._localStorageKey,JSON.stringify(this._overrides))}catch(e){}}},{key:"getOverrides",value:function(){return this.mergeOverrides(this._overrides)}},{key:"applyOverrides",value:function(e){var t=ec(ec({},eg()),e);this._djb2Map.clear();for(var r=0,n=Object.entries(t);r<n.length;r++)for(var o=y(n[r],2),a=o[0],i=o[1],s=0,l=Object.entries(i);s<l.length;s++){var c=y(l[s],2),u=c[0],d=c[1];this._djb2Map.set(ep((0,es._DJB2)(u),a),d)}this._overrides=t}},{key:"setOverrides",value:function(e){this.applyOverrides(e),this.saveOverrides()}},{key:"overrideGate",value:function(e,t){this._overrides.gates[e]=t,this._djb2Map.set(ep((0,es._DJB2)(e),"gates"),t),this.saveOverrides()}},{key:"removeGateOverride",value:function(e){delete this._overrides.gates[e],this._djb2Map.delete(ep((0,es._DJB2)(e),"gates")),this.saveOverrides()}},{key:"getGateOverride",value:function(e,t){var r,n=null!=(r=this._overrides.gates[e.name])?r:this._djb2Map.get(ep(e.name,"gates"));return null==n?null:ec(ec({},e),{},{value:n,details:ec(ec({},e.details),{},{reason:ed})})}},{key:"overrideDynamicConfig",value:function(e,t){this._overrides.configs[e]=t,this._djb2Map.set(ep((0,es._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeDynamicConfigOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ep((0,es._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(ep((0,es._DJB2)(e),"configs"),t),this.saveOverrides()}},{key:"removeExperimentOverride",value:function(e){delete this._overrides.configs[e],this._djb2Map.delete(ep((0,es._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(ep((0,es._DJB2)(e),"layers"),t),this.saveOverrides()}},{key:"removeLayerOverride",value:function(e){delete this._overrides.layers[e],this._djb2Map.delete(ep((0,es._DJB2)(e),"layers")),this.saveOverrides()}},{key:"removeAllOverrides",value:function(){this._overrides=eg();try{window.localStorage.removeItem(this._localStorageKey)}catch(e){}}},{key:"getLayerOverride",value:function(e,t){var r,n=null!=(r=this._overrides.layers[e.name])?r:this._djb2Map.get(ep(e.name,"layers"));return null==n?null:ec(ec({},e),{},{__value:n,get:(0,es._makeTypedGet)(e.name,n),details:ec(ec({},e.details),{},{reason:ed})})}},{key:"_getConfigOverride",value:function(e,t){var r,n=null!=(r=t[e.name])?r:this._djb2Map.get(ep(e.name,"configs"));return null==n?null:ec(ec({},e),{},{value:n,get:(0,es._makeTypedGet)(e.name,n),details:ec(ec({},e.details),{},{reason:ed})})}}]),eb=["sdkKey","environment","updateUserCompletionCallback","perimeter"];function ev(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 ey(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var e_="client-default-key",em=g(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.localStorageKey,o=r.overrideAdapter;c(this,e),p(this,"initPromise",null),p(this,"initCompleted",!1),p(this,"initWithDefaults",!1),p(this,"hasCheckGateErrorOccurred",!1),p(this,"hasGetExperimentErrorOccurred",!1),p(this,"hasGetExperimentValueErrorOccurred",!1),p(this,"hasGetLayerErrorOccurred",!1),p(this,"hasGetLayerValueErrorOccurred",!1),p(this,"subscriptions",new j),p(this,"dataAdapter",new ei),p(this,"statsigValuesUpdated",function(){t.user&&t.statsigClient.updateUserSync(t.user,{disableBackgroundCacheRefresh:!0}),t.subscriptions.anyUpdated()}),this.overrideAdapter=o||new ef(void 0===n?"STATSIG_OVERRIDES":n)},[{key:"initialize",value:(eS=m(w().mark(function e(t,r,n){var o,a,i=this;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=T(t),!this.initPromise){e.next=4;break}return F(o,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return a=performance.now(),this.initOptions=o,this.initPromise=this.init(o,r,n).then(function(){i.initCompleted=!0,i.initWithDefaults=!0}).finally(function(){var e=performance.now()-a;i.fireClientEvent(a,e,"initialize",i.initCompleted,o.apiKey)}),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}},e,this)})),function(e,t,r){return eS.apply(this,arguments)})},{key:"initializeWithProvider",value:(eC=m(w().mark(function e(t,r,n,o){var a,i,s=this;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=T(t),!this.initPromise){e.next=4;break}return F(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return i=performance.now(),this.initOptions=a,this.provider=r,this.provider.setClientVersion($),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeWithProvider",s.initCompleted,r.getApiKey?r.getApiKey():void 0)}),e.abrupt("return",this.initPromise);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return eC.apply(this,arguments)})},{key:"applyUpdateCallback",value:function(e){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(e.experimentValues),this.dataAdapter.setData(JSON.stringify(e.experimentValues)),this.statsigValuesUpdated())}catch(e){console.warn("Error when attempting to apply update",e)}}},{key:"fireClientEvent",value:function(e,t,r,n){var o,a=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null==(o=this.initOptions.analyticsWebClient)||o.then(function(o){var s=ey({targetApp:a.initOptions.targetApp,clientVersion:$,success:n,startTime:e,totalTime:t},i&&{apiKey:i});o.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:s,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(e){a.initOptions.environment!==I.Production&&console.error("Analytics web client promise did not resolve",e)})}},{key:"initializeFromValues",value:(eD=m(w().mark(function e(t,r,n){var o,a,i,s=this,l=arguments;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>3&&void 0!==l[3]?l[3]:{},a=T(t),!this.initPromise){e.next=5;break}return F(a,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 5:return Object.prototype.hasOwnProperty.call(o,"has_updates")||(o.has_updates=!0),i=performance.now(),this.initOptions=a,this.initPromise=this.initFromValues(a,r,n,o).then(function(){s.initCompleted=!0,s.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;s.fireClientEvent(i,e,"initializeFromValues",s.initCompleted)}),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}},e,this)})),function(e,t,r){return eD.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw Error("Client must be initialized before using this method")}},{key:"updateUser",value:(ej=m(w().mark(function e(t,r,n){var o,a;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),o=T(t),a=function(){return et.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 ej.apply(this,arguments)})},{key:"updateUserWithProvider",value:(eP=m(w().mark(function e(t,r){var n=this;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw Error("Cannot update user using provider as the client was not initialised with a provider");case 3:return e.next=5,this.provider.setProfile(this.initOptions,t,r);case 5:return e.next=7,this.updateUserUsingInitializeValuesProducer(function(){return n.provider.getExperimentValues()},t,r);case 7:case"end":return e.stop()}},e,this)})),function(e,t){return eP.apply(this,arguments)})},{key:"updateUserWithValues",value:(eI=m(w().mark(function e(t,r){var n,o,a=arguments;return w().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 eI.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"waitUntilInitializeCompleted",value:(eA=m(w().mark(function e(){return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.initPromise){e.next=2;break}throw Error("The client must be initialized before you can wait until initialized.");case 2:if(!this.initCompleted){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this.initPromise;case 6:case"end":return e.stop()}},e,this)})),function(){return eA.apply(this,arguments)})},{key:"checkGate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireGateExposure;return this.statsigClient.checkGate(e,{disableExposureLog:!(void 0===r||r)})}catch(t){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:e,error:t}),this.hasCheckGateErrorOccurred=!0),!1}}},{key:"isGateExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getFeatureGate(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check FeatureGate: ".concat(e)),!0}}},{key:"isExperimentExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getExperiment(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check Experiment: ".concat(e)),!0}}},{key:"manuallyLogGateExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(e)}},{key:"getExperiment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireExperimentExposure;return G.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:e,error:t}),this.hasGetExperimentErrorOccurred=!0),new G(e,{},"",{time:Date.now(),reason:P.Error})}}},{key:"getExperimentValue",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getExperiment(e,n);try{var a=n.typeGuard;return o.get(t,r,a)}catch(t){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),this.hasGetExperimentValueErrorOccurred=!0),r}}},{key:"manuallyLogExperimentExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(e)}},{key:"manuallyLogLayerExposure",value:function(e,t){var r;this.assertInitialized(this.statsigClient),null==(r=this.statsigClient.getLayer(e))||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){if(this.overrideAdapter.overrideGate(e,t),this.user){var r;null==(r=this.statsigClient)||r.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0})}this.statsigValuesUpdated()}},{key:"clearGateOverride",value:function(e){this.overrideAdapter.removeGateOverride(e),this.statsigValuesUpdated()}},{key:"overrideConfig",value:function(e,t){this.overrideAdapter.overrideDynamicConfig(e,t),this.statsigValuesUpdated()}},{key:"clearConfigOverride",value:function(e){this.overrideAdapter.removeDynamicConfigOverride(e),this.statsigValuesUpdated()}},{key:"setOverrides",value:function(e){this.overrideAdapter.setOverrides(e),this.statsigValuesUpdated()}},{key:"getOverrides",value:function(){return this.overrideAdapter.getOverrides()}},{key:"clearAllOverrides",value:function(){this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}},{key:"isCurrentUser",value:function(e,t){return F(this.currentIdentifiers,e)&&F(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:(eU=m(w().mark(function e(t,r,n){var o,a,i,s,l,c;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=ey({},t),e.prev=1,s=et.fetchClientSdk(t).then(function(e){return o.sdkKey=e.clientSdkKey}),l=et.fetchExperimentValues(t,r,n),e.next=6,Promise.all([s,l]);case 6:a=(c=y(e.sent,2)[1]).experimentValues,i=c.customAttributes,e.next=20;break;case 13:return e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=19,this.initFromValues(o,r,n);case 19:throw e.t0;case 20:return e.abrupt("return",this.initFromValues(o,r,i,a));case 21:case"end":return e.stop()}},e,this,[[1,13]])})),function(e,t,r){return eU.apply(this,arguments)})},{key:"initWithProvider",value:(eM=m(w().mark(function e(t,r,n,o){var a,i,s,l,c,u;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=ey(ey({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,n,o);case 4:return l=r.getClientSdkKey().then(function(e){return a.sdkKey=e}),c=r.getExperimentValues(),e.next=8,Promise.all([l,c]);case 8:i=(u=y(e.sent,2)[1]).experimentValues,s=u.customAttributesFromFetch,e.next=22;break;case 15:return e.prev=15,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=21,this.initFromValues(a,n,o);case 21:throw e.t0;case 22:return e.abrupt("return",this.initFromValues(a,n,s,i));case 23:case"end":return e.stop()}},e,this,[[1,15]])})),function(e,t,r,n){return eM.apply(this,arguments)})},{key:"initFromValues",value:(eL=m(w().mark(function e(t,r,n){var o,a,i,s,l,c,u,d=arguments;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>3&&void 0!==d[3]?d[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=n,(i=N(t)).sdkKey||(i.sdkKey=e_),null!=(o=i.networkConfig)&&o.logEventUrl||(i.networkConfig=ey(ey({},i.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),i.perimeter===A.FEDRAMP_MODERATE&&(i.disableLogging=!0),s=i.sdkKey,l=i.environment,i.updateUserCompletionCallback,i.perimeter,c=f(i,eb),this.user=R(r,n),u=ey(ey({},c),{},{environment:{tier:l},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter,logEventCompressionMode:O.LogEventCompressionMode.Forced}),r.stableId?O.StableID.setOverride(r.stableId,s):u.disableStableID=!0,e.prev=12,this.statsigClient=new O.StatsigClient(s,this.user,u),this.dataAdapter.setBootstrapData(a),e.next=17,this.statsigClient.initializeAsync();case 17:e.next=29;break;case 19:return e.prev=19,e.t0=e.catch(12),e.t0 instanceof Error&&console.error("Error occurred when trying to initialise the Statsig client, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new O.StatsigClient(e_,this.user,u),this.dataAdapter.setBootstrapData(),e.next=27,this.statsigClient.initializeAsync();case 27:throw this.initWithDefaults=!0,e.t0;case 29:case"end":return e.stop()}},e,this,[[12,19]])})),function(e,t,r){return eL.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(eT=m(w().mark(function e(t,r,n){var o,a,i,s=this;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw Error("The client must be initialized before you can update the user.");case 3:if(!this.isCurrentUser(r,n)){e.next=5;break}return e.abrupt("return",this.initPromise);case 5:return o=this.initPromise,e.prev=6,e.next=9,this.initPromise;case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(6);case 13:return a=t(),i=this.updateStatsigClientUser(a,r,n),this.initPromise=i.catch(m(w().mark(function e(){return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s.initPromise=o,!s.provider){e.next=4;break}return e.next=4,s.provider.setProfile(s.initOptions,s.currentIdentifiers,s.currentAttributes);case 4:case"end":return e.stop()}},e)}))),e.abrupt("return",i);case 17:case"end":return e.stop()}},e,this,[[6,11]])})),function(e,t,r){return eT.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(eF=m(w().mark(function e(t,r,n){var o,a,i,s,l,c,u,d,h;return w().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=R(r,(i=e.sent).customAttributesFromFetch),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),u=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null==(l=(c=this.initOptions).updateUserCompletionCallback)||l.call(c,!1,u),e.t0;case 13:if(d=!0,h=null,e.prev=15,this.dataAdapter.setBootstrapData(i.experimentValues),this.user=s,!this.user){e.next=21;break}return e.next=21,this.statsigClient.updateUserAsync(this.user);case 21:e.next=27;break;case 23:e.prev=23,e.t1=e.catch(15),d=!1,h=String(e.t1);case 27:if(null==(o=this.initOptions)||null==(a=o.updateUserCompletionCallback)||a.call(o,d,h),!d){e.next=34;break}this.currentIdentifiers=r,this.currentAttributes=n,this.subscriptions.anyUpdated(),e.next=35;break;case 34:throw Error("Failed to update user. An unexpected error occured.");case 35:case"end":return e.stop()}},e,this,[[1,8],[15,23]])})),function(e,t,r){return eF.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return $}},{key:"getLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireLayerExposure;return B.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:e,error:t}),this.hasGetLayerErrorOccurred=!0),B.fromLayer((0,O._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}}}]),ek=g(function e(){c(this,e)},null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}]);p(ek,"client",new em),p(ek,"hasCheckGateErrorOccurred",!1),p(ek,"hasGetExperimentValueErrorOccurred",!1),p(ek,"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){ek.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}),ek.hasCheckGateErrorOccurred=!0)}return ek.client.checkGate(e,t)}),p(ek,"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 ek.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}),ek.hasGetExperimentValueErrorOccurred=!0),r}return ek.client.getExperimentValue(e,t,r,n)}),p(ek,"initializeCalled",ek.client.initializeCalled.bind(ek.client)),p(ek,"initializeCompleted",ek.client.initializeCompleted.bind(ek.client)),p(ek,"waitUntilInitializeCompleted",ek.client.waitUntilInitializeCompleted.bind(ek.client)),p(ek,"initialize",ek.client.initialize.bind(ek.client)),p(ek,"initializeWithProvider",ek.client.initializeWithProvider.bind(ek.client)),p(ek,"initializeFromValues",ek.client.initializeFromValues.bind(ek.client)),p(ek,"manuallyLogGateExposure",ek.client.manuallyLogGateExposure.bind(ek.client)),p(ek,"getExperiment",ek.client.getExperiment.bind(ek.client)),p(ek,"manuallyLogExperimentExposure",ek.client.manuallyLogExperimentExposure.bind(ek.client)),p(ek,"manuallyLogLayerExposure",ek.client.manuallyLogLayerExposure.bind(ek.client)),p(ek,"shutdownStatsig",ek.client.shutdownStatsig.bind(ek.client)),p(ek,"overrideGate",ek.client.overrideGate.bind(ek.client)),p(ek,"clearGateOverride",ek.client.clearGateOverride.bind(ek.client)),p(ek,"overrideConfig",ek.client.overrideConfig.bind(ek.client)),p(ek,"clearConfigOverride",ek.client.clearConfigOverride.bind(ek.client)),p(ek,"setOverrides",ek.client.setOverrides.bind(ek.client)),p(ek,"getOverrides",ek.client.getOverrides.bind(ek.client)),p(ek,"clearAllOverrides",ek.client.clearAllOverrides.bind(ek.client)),p(ek,"isCurrentUser",ek.client.isCurrentUser.bind(ek.client)),p(ek,"onGateUpdated",ek.client.onGateUpdated.bind(ek.client)),p(ek,"onExperimentValueUpdated",ek.client.onExperimentValueUpdated.bind(ek.client)),p(ek,"onAnyUpdated",ek.client.onAnyUpdated.bind(ek.client)),p(ek,"updateUser",ek.client.updateUser.bind(ek.client)),p(ek,"updateUserWithProvider",ek.client.updateUserWithProvider.bind(ek.client)),p(ek,"updateUserWithValues",ek.client.updateUserWithValues.bind(ek.client)),p(ek,"getPackageVersion",ek.client.getPackageVersion.bind(ek.client)),p(ek,"getLayer",ek.client.getLayer.bind(ek.client)),p(ek,"getLayerValue",ek.client.getLayerValue.bind(ek.client));var ew=ek;if("undefined"!=typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=ek;else{var eO,eE,ex,eS,eC,eD,ej,eP,eI,eA,eU,eM,eL,eT,eF,eR,eN,eV=(null==(eR=ew=window.__FEATUREGATES_JS__)||null==(eN=eR.getPackageVersion)?void 0:eN.call(eR))||"4.10.0 or earlier";eV!==$&&console.warn("Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(eV," when module version ").concat($," was loading."))}let eK=ew;var ez=(null==globalThis||null==(i=globalThis.process)||null==(i=i.env)?void 0:i.JEST_WORKER_ID)===void 0&&(null==globalThis||null==(s=globalThis.process)||null==(s=s.env)?void 0:s.NODE_ENV)!=="production",eG=function(){var e;ez&&(e=console).debug.apply(e,arguments)},eB="__PLATFORM_FEATURE_FLAGS__",e$="undefined"==typeof process&&!1,eJ="undefined"!=typeof window?window:globalThis;function eq(e){if(e$)return eG('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',"@atlaskit/platform-feature-flags",e),!0;try{if((null==(t=eJ[eB])?void 0:t.booleanResolver)===void 0||(null==(r=eJ[eB])?void 0:r.booleanResolver)===null)return eK.checkGate(e);var t,r,n,o=null==(n=eJ[eB])?void 0:n.booleanResolver(e);if("boolean"!=typeof o)return console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1;return o}catch(e){return!1}}eJ[eB]=eJ[eB]||{booleanResolver:void 0};var eW=["light","dark","auto"],eH=["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"],eQ=[].concat(eH,[]),eX="auto",eY="auto",eZ="dark",e0="light",e1=void 0,e2="spacing",e3=function(){if(eq("platform-default-typography-modernized"))return"typography-modernized"},e5=void 0;let e7={"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"}}},e4={"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 e8="data-theme",e9="data-color-mode",e6="data-contrast-mode",te="data-custom-theme",tt="--".concat("ds","-token-not-found"),tr="--".concat("ds","-elevation-surface-current");let tn=function(e,t){var r=e4[e];return r||(r=tt),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")},to=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e4[e],n=t;return"undefined"==typeof window?n:n=(n=window.getComputedStyle(document.documentElement).getPropertyValue(r).trim())||t};var ta=function(e){return/^#[0-9A-F]{6}$/i.test(e)},ti=["light","dark","spacing","typography","shape"],ts="UNSAFE_themeOptions",tl=function(e){return void 0!==ti.find(function(t){return t===e})},tc=function(e){return void 0!==eH.find(function(t){return t===e})},tu=function(e){return["light","dark","auto"].includes(e)},td=function(e){return e.split(" ").map(function(e){return e.split(/:([^]*)/)}).reduce(function(e,t){var r=y(t,2),n=r[0],o=r[1];if("colorMode"===n&&tu(o)&&(e[n]=o),tl(n)&&tc(o)&&(e[n]=o),n===ts)try{e[ts]=JSON.parse(o)}catch(e){Error("Invalid custom theme string")}return e},{})},th=function(e){return Object.entries(e).reduce(function(e,t){var r=y(t,2),n=r[0],o=r[1];return"colorMode"===n&&"string"==typeof o&&tu(o)||n===ts&&"object"===u(o)||tl(n)&&"string"==typeof o&&tc(o)?e+"".concat(e?" ":"")+"".concat(n,":").concat("object"===u(o)?JSON.stringify(o):o):e},"")},tg=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 tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tb=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=void 0===t?eX:t,n=e.dark,o=e.light,a=e.contrastMode,i=void 0===a?eY:a,s=e.shape,l=e.spacing,c=e.typography,u=void 0===c?e3():c,d=e.UNSAFE_themeOptions,h=void 0===d?e5:d,g=p(p({},e8,th({dark:void 0===n?eZ:n,light:void 0===o?e0:o,shape:void 0===s?e1:s,spacing:void 0===l?e2:l,typography:u})),e9,"auto"===r?"light":r);if(eq("platform_increased-contrast-themes")&&(g=tf(tf({},g),{},p({},e6,"auto"===i?"no-preference":i))),h&&ta(h.brandColor)){var f=tg(JSON.stringify(h));g[te]=f}return g};var tv=r(1833);let ty={light:()=>()=>{},"light-future":()=>()=>{},dark:()=>()=>{},"dark-future":()=>()=>{},"legacy-light":()=>()=>{},"legacy-dark":()=>()=>{},spacing:()=>()=>{},shape:()=>()=>{},"typography-adg3":()=>()=>{},"typography-modernized":()=>()=>{},"typography-refreshed":()=>()=>{}};var t_=(e=m(w().mark(function e(t){var r,n;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!document.head.querySelector("style[".concat(e8,'="').concat(t,'"]:not([').concat(te,"])"))){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,tm(t);case 6:r=e.sent,(n=document.createElement("style")).textContent=r,n.dataset.theme=t,document.head.appendChild(n);case 11:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}),tm=(t=m(w().mark(function e(t){var r;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return("light"===t||"dark"===t)&&eq("platform-component-visual-refresh")&&(t+="-brand-refresh"),e.next=3,ty[t]();case 3:return r=e.sent.default,e.abrupt("return",r);case 6:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),tk="(prefers-color-scheme: dark)",tw="(prefers-contrast: more)";function tO(e){document.documentElement.setAttribute(e9,e.matches?"dark":"light")}var tE="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(tk),tx=new(g(function e(){c(this,e),p(this,"unbindThemeChangeListener",null)},[{key:"getColorMode",value:function(){return tE&&null!=tE&&tE.matches?"dark":"light"}},{key:"bind",value:function(){tE&&null===this.unbindThemeChangeListener&&(this.unbindThemeChangeListener=(0,tv.bind)(tE,{type:"change",listener:tO}))}},{key:"unbind",value:function(){this.unbindThemeChangeListener&&(this.unbindThemeChangeListener(),this.unbindThemeChangeListener=null)}}]));function tS(e){document.documentElement.setAttribute(e6,e.matches?"more":"no-preference")}var tC="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia(tw),tD=new(g(function e(){c(this,e),p(this,"unbindContrastChangeListener",null)},[{key:"getContrastMode",value:function(){return tC&&null!=tC&&tC.matches?"more":"no-preference"}},{key:"bind",value:function(){tC&&null===this.unbindContrastChangeListener&&(this.unbindContrastChangeListener=(0,tv.bind)(tC,{type:"change",listener:tS}))}},{key:"unbind",value:function(){this.unbindContrastChangeListener&&(this.unbindContrastChangeListener(),this.unbindContrastChangeListener=null)}}]));function tj(e){return"auto"===e.colorMode?(e.colorMode=tx.getColorMode(),tx.bind()):tx.unbind(),eq("platform_increased-contrast-themes")&&("auto"===e.contrastMode?(e.contrastMode=tD.getContrastMode(),tD.bind()):tD.unbind()),Object.entries(tb(e)).forEach(function(e){var t=y(e,2),r=t[0],n=t[1];document.documentElement.setAttribute(r,n)}),function(){tx.unbind(),eq("platform_increased-contrast-themes")&&tD.unbind()}}function tP(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tI(e){var t;return null==(t=Object.entries(e7).find(function(t){return y(t,2)[1].increasesContrastFor===e}))?void 0:t[1].id}var tA=function(e){var t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=[o,n],c=[];if("auto"===t)"no-preference"!==r&&eq("platform_increased-contrast-themes")&&l.forEach(function(e){var t=tI(e);t&&l.push(t)}),c.push.apply(c,l);else if(c.push(e[t]),"no-preference"!==r&&eq("platform_increased-contrast-themes")){var u=tI(e[t]);u&&c.push(u)}return[a,i,s].forEach(function(e){e&&c.push(e)}),tP(new Set(c))},tU=function(e){return tP(new Set([]))};function tM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let tL=(o=m(w().mark(function e(){var t,r,n,o,a,i,s,l,c,u,d,h,g,p,f,b,v,y,_,k,O,E,x,S,C,D,j,P=arguments;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0===(r=(t=P.length>0&&void 0!==P[0]?P[0]:{}).colorMode)?eX:r,a=void 0===(o=t.contrastMode)?eY:o,s=void 0===(i=t.dark)?eZ:i,c=void 0===(l=t.light)?e0:l,d=void 0===(u=t.shape)?e1:u,g=void 0===(h=t.spacing)?e2:h,f=void 0===(p=t.typography)?e3():p,v=void 0===(b=t.UNSAFE_themeOptions)?e5:b,y=P.length>1?P[1]:void 0,eq("platform_increased-contrast-themes")||("light-increased-contrast"===c&&(c="light"),"dark-increased-contrast"===s&&(s="dark")),k=tA(_={colorMode:n,contrastMode:a,dark:s,light:c,shape:d,spacing:g,typography:f,UNSAFE_themeOptions:y?void 0:v}),O=y||t_,E=k.map(function(){var e=m(w().mark(function e(t){return w().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)}}()),!y&&v&&ta(null==v?void 0:v.brandColor)&&(x=function(e,t){var r=tg(JSON.stringify(e)),n=[];return("auto"===t?["light","dark"]:[t]).forEach(function(e){var t=document.head.querySelector("style[".concat(te,'="').concat(r,'"][').concat(e8,'="').concat(e,'"]'));t?document.head.appendChild(t):n.push(e)}),n}(v,n||eX)).length>0&&E.push(m(w().mark(function e(){return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 2:(0,e.sent.loadAndAppendCustomThemeCss)({colorMode:2===x.length?"auto":x[0],UNSAFE_themeOptions:v});case 5:case"end":return e.stop()}},e)}))()),e.next=10,Promise.all(E);case 10:S=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tM(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tM(e,void 0):void 0}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}(tU(_)),e.prev=12,S.s();case 14:if((C=S.n()).done){e.next=20;break}return D=C.value,e.next=18,O(D);case 18:e.next=14;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(12),S.e(e.t0);case 25:return e.prev=25,S.f(),e.finish(25);case 28:return j=tj(_),e.abrupt("return",j);case 30:case"end":return e.stop()}},e,null,[[12,22,25,28]])})),function(){return o.apply(this,arguments)}),tT=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorMode,r=e.contrastMode,n=e.dark,o=e.light,a=e.shape,i=e.spacing,s=e.typography,l=void 0===s?e3():s,c=e.UNSAFE_themeOptions,u=arguments.length>1?arguments[1]:void 0,d={colorMode:void 0===t?eX:t,contrastMode:void 0===r?eY:r,dark:void 0===n?eZ:n,light:void 0===o?e0:o,shape:void 0===a?e1:a,spacing:void 0===i?e2:i,typography:l,UNSAFE_themeOptions:u?void 0:void 0===c?e5:c},h=tA(d);return u&&h.map(function(e){return u(e)}),tj(d)},tF=(a=m(w().mark(function e(t){var r,n,o,a;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],"all"===t?(r=eQ,eq("platform_increased-contrast-themes")||(r=r.filter(function(e){return"light-increased-contrast"!==e&&"dark-increased-contrast"!==e})),r=r.filter(function(e){return"light-brand-refresh"!==e&&"dark-brand-refresh"!==e})):(r=tA(o={colorMode:(null==t?void 0:t.colorMode)||eX,contrastMode:(null==t?void 0:t.contrastMode)||eY,dark:(null==t?void 0:t.dark)||eZ,light:(null==t?void 0:t.light)||e0,shape:(null==t?void 0:t.shape)||e1,spacing:(null==t?void 0:t.spacing)||e2,typography:(null==t?void 0:t.typography)||e3()}),n=tU(o)),e.next=4,Promise.all([].concat(tP([].concat(tP(r),tP(n)).map(function(){var e=m(w().mark(function e(t){var r;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,tm(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)}}())),[m(w().mark(function e(){var r,n,o;return w().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!("all"!==t&&null!=t&&t.UNSAFE_themeOptions&&ta(null==t||null==(r=t.UNSAFE_themeOptions)?void 0:r.brandColor))){e.next=15;break}return e.prev=1,e.next=4,Promise.resolve().then(function(){var e=Error("Cannot find module './custom-theme'");throw e.code="MODULE_NOT_FOUND",e});case 4:return n=e.sent.getCustomThemeStyles,e.next=8,n({colorMode:(null==t?void 0:t.colorMode)||eX,UNSAFE_themeOptions:null==t?void 0:t.UNSAFE_themeOptions});case 8:return o=e.sent,e.abrupt("return",o);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}},e,null,[[1,12]])}))()]));case 4:return a=e.sent,e.abrupt("return",a.flat().filter(function(e){return void 0!==e}));case 6:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),tR=function(e,t){if("auto"===e||"auto"===t){var r="auto"===e?"\n try {\n const darkModeMql = window.matchMedia('".concat(tk,"');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat(e9,"', colorMode);\n } catch (e) {}"):"",n="auto"===t&&eq("platform_increased-contrast-themes")?"\n try {\n const contrastModeMql = window.matchMedia('".concat(tw,"');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(e6,"', contrastMode);\n } catch (e) {}"):"";return"(() => {".concat(r).concat(n,"})()")}};var tN=r(2027),tV=r.n(tN);function tK(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 tz(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tK(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tK(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tG=function(){if("undefined"==typeof document)return{};var e=document.documentElement,t=e.getAttribute(e9)||"";return tz(tz({},td(e.getAttribute(e8)||"")),void 0!==eW.find(function(e){return e===t})&&{colorMode:t})};var tB=function(){function e(t){c(this,e),p(this,"legacyObserver",null),this.callback=t,e.callbacks.add(t)}return g(e,[{key:"observe",value:function(){e.observer||(e.observer=new MutationObserver(function(){var t=tG();e.callbacks.forEach(function(e){return e(t)})}),e.observer.observe(document.documentElement,{attributeFilter:[e8,e9]}))}},{key:"disconnect",value:function(){this.callback&&e.callbacks.delete(this.callback),0===e.callbacks.size&&e.observer&&(e.observer.disconnect(),e.observer=null)}}])}();p(tB,"observer",null),p(tB,"callbacks",new Set),document.documentElement.hasAttribute("data-color-mode-auto")&&tL({colorMode:"auto"});let{setGlobalTheme:t$}=l;"object"!=typeof window.AJS&&(window.AJS={}),window.AJS.DesignTokens={setGlobalTheme:t$}})(),n})());
16
2
  //# sourceMappingURL=aui-prototyping-design-tokens-api.js.map