try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a269305e-fd6a-4fd4-92ca-0841bde0b3dc",e._sentryDebugIdIdentifier="sentry-dbid-a269305e-fd6a-4fd4-92ca-0841bde0b3dc")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5133],{1921:(e,t,r)=>{"use strict";r.d(t,{NN:()=>eK,iX:()=>eW,KH:()=>eJ,Br:()=>eG,mf:()=>ez});var i,n,s=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,o={revert:function(){}},a=new Map,u=new Set;function l(e){var t=a.get(e);return t||(t={element:e,attributes:{}},a.set(e,t)),t}function c(e,t,r,i,n){var s=r(e),o={isDirty:!1,originalValue:s,virtualValue:s,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if("position"!==t||!o._positionTimeout){"position"===t&&(o._positionTimeout=setTimeout(function(){o._positionTimeout=null},1e3));var i=r(e);("position"!==t||i.parentNode!==o.virtualValue.parentNode||i.insertBeforeNode!==o.virtualValue.insertBeforeNode)&&i!==o.virtualValue&&(o.originalValue=i,n(o))}}),mutationRunner:n,setValue:i,getCurrentValue:r};return"position"===t&&e.parentNode?o.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):o.observer.observe(e,"html"===t?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[t]}),o}function d(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&"string"!=typeof e?r&&e.parentNode===r.parentNode&&e.insertBeforeNode===r.insertBeforeNode||(t.isDirty=!0,T()):e!==r&&(t.isDirty=!0,T())}function h(e){var t,r=e.originalValue;e.mutations.forEach(function(e){return r=e.mutate(r)}),d((t=r,i||(i=document.createElement("div")),i.innerHTML=t,i.innerHTML),e)}function f(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(e){return e.mutate(t)}),d(Array.from(t).filter(Boolean).join(" "),e)}function p(e){var t=e.originalValue;e.mutations.forEach(function(e){return t=e.mutate(t)}),d(t,e)}function g(e){var t=e.originalValue;e.mutations.forEach(function(e){t=function(e){var t=e.parentSelector,r=e.insertBeforeSelector,i=document.querySelector(t);if(!i)return null;var n=r?document.querySelector(r):null;return r&&!n?null:{parentNode:i,insertBeforeNode:n}}(e.mutate())||t}),d(t,e)}var m=function(e){return e.innerHTML},y=function(e,t){return e.innerHTML=t};function v(e){var t=l(e);return t.html||(t.html=c(e,"html",m,y,h)),t.html}var _=function(e){return{parentNode:e.parentElement,insertBeforeNode:e.nextElementSibling}},b=function(e,t){(!t.insertBeforeNode||t.parentNode.contains(t.insertBeforeNode))&&t.parentNode.insertBefore(e,t.insertBeforeNode)};function k(e){var t=l(e);return t.position||(t.position=c(e,"position",_,b,g)),t.position}var E=function(e,t){return t?e.className=t:e.removeAttribute("class")},w=function(e){return e.className};function A(e){var t=l(e);return t.classes||(t.classes=c(e,"class",w,E,f)),t.classes}function S(e,t){var r=l(e);return r.attributes[t]||(r.attributes[t]=c(e,t,function(e){var r;return null!=(r=e.getAttribute(t))?r:null},function(e,r){return null!==r?e.setAttribute(t,r):e.removeAttribute(t)},p)),r.attributes[t]}function x(e,t,r){if(r.isDirty){r.isDirty=!1;var i,n,s,o,u,l,c,d,h,f,p=r.virtualValue;!r.mutations.length&&(f=a.get(e))&&("html"===t?(null==(i=f.html)||null==(n=i.observer)||n.disconnect(),delete f.html):"class"===t?(null==(s=f.classes)||null==(o=s.observer)||o.disconnect(),delete f.classes):"position"===t?(null==(u=f.position)||null==(l=u.observer)||l.disconnect(),delete f.position):(null==(c=f.attributes)||null==(d=c[t])||null==(h=d.observer)||h.disconnect(),delete f.attributes[t])),r.setValue(e,p)}}function C(e,t){e.html&&x(t,"html",e.html),e.classes&&x(t,"class",e.classes),e.position&&x(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){x(t,r,e.attributes[r])})}function T(){a.forEach(C)}function B(e){if("position"!==e.kind||1!==e.elements.size){var t=new Set(e.elements);document.querySelectorAll(e.selector).forEach(function(r){if(!t.has(r)){var i;e.elements.add(r),i=null,"html"===e.kind?i=v(r):"class"===e.kind?i=A(r):"attribute"===e.kind?i=S(r,e.attribute):"position"===e.kind&&(i=k(r)),i&&(i.mutations.push(e),i.mutationRunner(i))}})}}function D(){u.forEach(B)}function F(e){return"undefined"==typeof document?o:(u.add(e),B(e),{revert:function(){e.elements.forEach(function(t){var r=null;if("html"===e.kind?r=v(t):"class"===e.kind?r=A(t):"attribute"===e.kind?r=S(t,e.attribute):"position"===e.kind&&(r=k(t)),r){var i=r.mutations.indexOf(e);-1!==i&&r.mutations.splice(i,1),r.mutationRunner(r)}}),e.elements.clear(),u.delete(e)}})}function V(e,t){return F({kind:"html",elements:new Set,mutate:t,selector:e})}function R(e,t){return F({kind:"class",elements:new Set,mutate:t,selector:e})}function $(e,t,r){return s.test(t)?"class"===t||"className"===t?R(e,function(e){var t=r(Array.from(e).join(" "));e.clear(),t&&t.split(/\s+/g).filter(Boolean).forEach(function(t){return e.add(t)})}):F({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):o}"undefined"!=typeof document&&(n||(n=new MutationObserver(function(){D()})),D(),n.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}));let L={declarative:function(e){var t,r,i=e.selector,n=e.action,s=e.value,a=e.attribute,u=e.parentSelector,l=e.insertBeforeSelector;if("html"===a){if("append"===n)return V(i,function(e){return e+(null!=s?s:"")});else if("set"===n)return V(i,function(){return null!=s?s:""})}else if("class"===a){if("append"===n)return R(i,function(e){s&&e.add(s)});else if("remove"===n)return R(i,function(e){s&&e.delete(s)});else if("set"===n)return R(i,function(e){e.clear(),s&&e.add(s)})}else if("position"===a){if("set"===n&&u){return t=i,r=function(){return{insertBeforeSelector:l,parentSelector:u}},F({kind:"position",elements:new Set,mutate:r,selector:t})}}else if("append"===n)return $(i,a,function(e){return null!==e?e+(null!=s?s:""):null!=s?s:""});else if("set"===n)return $(i,a,function(){return null!=s?s:""});else if("remove"===n)return $(i,a,function(){return null});return o}},N={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource};function I(e){let t=0x811c9dc5,r=e.length;for(let i=0;i>>0}function M(e,t,r){return 2===r?I(I(e+t)+"")%1e4/1e4:1===r?I(t+e)%1e3/1e3:null}function O(e,t){return e>=t[0]&&e{t.push([i.searchParams.get(r)||"",e,!1])}),!t.some(e=>!function(e,t,r){try{let i=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return r&&(i="\\/?"+i.replace(/(^\/|\/$)/g,"")+"\\/?"),RegExp("^"+i+"$","i").test(e)}catch(e){return!1}}(e[0],e[1],e[2]))}catch(e){}return!1}catch(e){return!1}}(e,t[n].type,t[n].pattern);if(!1===t[n].include){if(s)return!1}else r=!0,s&&(i=!0)}return i||!r}let j=e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0));async function K(e,t,r){if(t=t||"",!(r=r||globalThis.crypto&&globalThis.crypto.subtle||N.SubtleCrypto))throw Error("No SubtleCrypto implementation found");try{let i=await r.importKey("raw",j(t),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[n,s]=e.split("."),o=await r.decrypt({name:"AES-CBC",iv:j(n)},i,j(s));return new TextDecoder().decode(o)}catch(e){throw Error("Failed to decrypt")}}function H(e){return"string"==typeof e?e:JSON.stringify(e)}function q(e){"number"==typeof e&&(e+=""),e&&"string"==typeof e||(e="0");let t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return 3===t.length&&t.push("~"),t.map(e=>e.match(/^[0-9]+$/)?e.padStart(5," "):e).join("-")}function J(e){return"object"==typeof e&&null!==e}function G(e){return e.urlPatterns&&e.variations.some(e=>J(e)&&"urlRedirect"in e)?"redirect":e.variations.some(e=>J(e)&&(e.domMutations||"js"in e||"css"in e))?"visual":"unknown"}async function z(e,t){return new Promise(r=>{let i,n=!1,s=e=>{n||(n=!0,i&&clearTimeout(i),r(e||null))};t&&(i=setTimeout(()=>s(),t)),e.then(e=>s(e)).catch(()=>s())})}let W={staleTTL:6e4,maxAge:144e5,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:2e4,disableCache:!1},Y={fetchFeaturesCall:e=>{let{host:t,clientKey:r,headers:i}=e;return N.fetch(`${t}/api/features/${r}`,{headers:i})},fetchRemoteEvalCall:e=>{let{host:t,clientKey:r,payload:i,headers:n}=e,s={method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(i)};return N.fetch(`${t}/api/eval/${r}`,s)},eventSourceCall:e=>{let{host:t,clientKey:r,headers:i}=e;return i?new N.EventSource(`${t}/sub/${r}`,{headers:i}):new N.EventSource(`${t}/sub/${r}`)},startIdleListener:()=>{let e;if("undefined"==typeof window||"undefined"==typeof document)return;let t=()=>{"visible"===document.visibilityState?(window.clearTimeout(e),et.forEach(e=>{e&&"idle"===e.state&&ey(e)})):"hidden"===document.visibilityState&&(e=window.setTimeout(en,W.idleStreamInterval))};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},stopIdleListener:()=>{}};try{globalThis.localStorage&&(N.localStorage=globalThis.localStorage)}catch(e){}let Z=new Map,Q=!1,X=new Map,ee=new Map,et=new Map,er=new Set;async function ei(e){let{instance:t,timeout:r,skipCache:i,allowStale:n,backgroundSync:s}=e;return s||(W.backgroundSync=!1),eo({instance:t,allowStale:n,timeout:r,skipCache:i})}function en(){et.forEach(e=>{e&&(e.state="idle",em(e))})}async function es(){try{if(!N.localStorage)return;await N.localStorage.setItem(W.cacheKey,JSON.stringify(Array.from(X.entries())))}catch(e){}}async function eo(e){let{instance:t,allowStale:r,timeout:i,skipCache:n}=e,s=ea(t),o=eu(t),a=new Date,u=new Date(a.getTime()-W.maxAge+W.staleTTL);await el();let l=W.disableCache||n?void 0:X.get(o);return l&&(r||l.staleAt>a)&&l.staleAt>u?(l.sse&&er.add(s),l.staleAt{n[e]=r[e]});let s=e.getForcedVariations(),o=e.getUrl();return`${t}||${JSON.stringify({ca:n,fv:s,url:o})}`}async function el(){if(!Q){Q=!0;try{if(N.localStorage){let e=await N.localStorage.getItem(W.cacheKey);if(!W.disableCache&&e){let t=JSON.parse(e);t&&Array.isArray(t)&&t.forEach(e=>{let[t,r]=e;X.set(t,{...r,staleAt:new Date(r.staleAt)})}),ec()}}}catch(e){}if(!W.disableIdleStreams){let e=Y.startIdleListener();e&&(Y.stopIdleListener=e)}}}function ec(){let e=Array.from(X.entries()).map(e=>{let[t,r]=e;return{key:t,staleAt:r.staleAt.getTime()}}).sort((e,t)=>e.staleAt-t.staleAt),t=Math.min(Math.max(0,X.size-W.maxEntries),X.size);for(let r=0;reh(e,r))}async function eh(e,t){await e.setPayload(t||e.getPayload())}async function ef(e){let{apiHost:t,apiRequestHeaders:r}=e.getApiHosts(),i=e.getClientKey(),n="isRemoteEval"in e&&e.isRemoteEval(),s=ea(e),o=eu(e),a=ee.get(o);return a||(a=(n?Y.fetchRemoteEvalCall({host:t,clientKey:i,payload:{attributes:e.getAttributes(),forcedVariations:e.getForcedVariations(),forcedFeatures:Array.from(e.getForcedFeatures().entries()),url:e.getUrl()},headers:r}):Y.fetchFeaturesCall({host:t,clientKey:i,headers:r})).then(e=>{if(!e.ok)throw Error(`HTTP error: ${e.status}`);return"enabled"===e.headers.get("x-sse-support")&&er.add(s),e.json()}).then(t=>(ed(s,o,t),ep(e),ee.delete(o),{data:t,success:!0,source:"network"})).catch(e=>(ee.delete(o),{data:null,source:"error",success:!1,error:e})),ee.set(o,a)),a}function ep(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=ea(e),i=eu(e),{streamingHost:n,streamingHostRequestHeaders:s}=e.getApiHosts(),o=e.getClientKey();if(t&&er.add(r),W.backgroundSync&&er.has(r)&&N.EventSource){if(et.has(r))return;let e={src:null,host:n,clientKey:o,headers:s,cb:t=>{try{if("features-updated"===t.type){let e=Z.get(r);e&&e.forEach(e=>{ef(e)})}else if("features"===t.type){let e=JSON.parse(t.data);ed(r,i,e)}e.errors=0}catch(t){eg(e)}},errors:0,state:"active"};et.set(r,e),ey(e)}}function eg(e){if("idle"!==e.state&&(e.errors++,e.errors>3||e.src&&2===e.src.readyState)){let t=Math.pow(3,e.errors-3)*(1e3+1e3*Math.random());em(e),setTimeout(()=>{["idle","active"].includes(e.state)||ey(e)},Math.min(t,3e5))}}function em(e){e.src&&(e.src.onopen=null,e.src.onerror=null,e.src.close(),e.src=null,"active"===e.state&&(e.state="disabled"))}function ey(e){e.src=Y.eventSourceCall({host:e.host,clientKey:e.clientKey,headers:e.headers}),e.state="active",e.src.addEventListener("features",e.cb),e.src.addEventListener("features-updated",e.cb),e.src.onerror=()=>eg(e),e.src.onopen=()=>{e.errors=0}}function ev(e,t){em(e),et.delete(t)}function e_(e,t){if(t.streaming){if(!e.getClientKey())throw Error("Must specify clientKey to enable streaming");t.payload&&ep(e,!0);let r=ea(e),i=Z.get(r)||new Set;i.add(e),Z.set(r,i)}}let eb={};function ek(e,t,r){for(let[i,n]of(r=r||{},Object.entries(t)))switch(i){case"$or":if(!eA(e,n,r))return!1;break;case"$nor":if(eA(e,n,r))return!1;break;case"$and":if(!function(e,t,r){for(let i=0;iq(i);case"$vgte":return q(r)>=q(i);case"$vlt":return q(r)i;case"$gte":return r>=i;case"$exists":return i?null!=r:null==r;case"$in":if(!Array.isArray(i))return!1;return ew(r,i);case"$inGroup":return ew(r,n[i]||[]);case"$notInGroup":return!ew(r,n[i]||[]);case"$nin":if(!Array.isArray(i))return!1;return!ew(r,i);case"$not":return!e(i,r,n);case"$size":if(!Array.isArray(r))return!1;return e(i,r.length,n);case"$elemMatch":if(!Array.isArray(r))return!1;let s=eE(i)?t=>e(i,t,n):e=>ek(e,i,n);for(let e=0;e0&&t.filter(e=>"$"===e[0]).length===t.length}function ew(e,t){return Array.isArray(e)?e.some(e=>t.includes(e)):t.includes(e)}function eA(e,t,r){if(!t.length)return!0;for(let i=0;in(t,r,e.user)))}if(e.user.trackingCallback){let n=e.user.trackingCallback;i.push(eS(()=>n(t,r)))}if(e.global.eventLogger){let n=e.global.eventLogger;i.push(eS(()=>n("Experiment Viewed",{experimentId:t.key,variationId:r.key,hashAttribute:r.hashAttribute,hashValue:r.hashValue},e.user)))}return i}function eC(e,t){if(t.stack.evaluatedFeatures.has(e))return eB(t,e,null,"cyclicPrerequisite");t.stack.evaluatedFeatures.add(e),t.stack.id=e;let r=function(e){let t=new Map;return e.global.forcedFeatureValues&&e.global.forcedFeatureValues.forEach((e,r)=>t.set(r,e)),e.user.forcedFeatureValues&&e.user.forcedFeatureValues.forEach((e,r)=>t.set(r,e)),t}(t);if(r.has(e))return eB(t,e,r.get(e),"override");if(!t.global.features||!t.global.features[e])return eB(t,e,null,"unknownFeature");let i=t.global.features[e];if(i.rules){let r=new Set(t.stack.evaluatedFeatures);e:for(let n of i.rules){if(n.parentConditions)for(let i of n.parentConditions){t.stack.evaluatedFeatures=new Set(r);let n=eC(i.id,t);if("cyclicPrerequisite"===n.source)return eB(t,e,null,"cyclicPrerequisite");if(!ek({value:n.value},i.condition||{})){if(i.gate)return eB(t,e,null,"prerequisite");continue e}}if(n.filters&&eV(n.filters,t))continue;if("force"in n){if(n.condition&&!eF(n.condition,t)||!function(e,t,r,i,n,s,o){if(!n&&void 0===s)return!0;if(!n&&0===s)return!1;let{hashValue:a}=e$(e,r,i);if(!a)return!1;let u=M(t,a,o||1);return null!==u&&(n?O(u,n):void 0===s||u<=s)}(t,n.seed||e,n.hashAttribute,t.user.saveStickyBucketAssignmentDoc&&!n.disableStickyBucketing?n.fallbackAttribute:void 0,n.range,n.coverage,n.hashVersion))continue;return n.tracks&&n.tracks.forEach(e=>{!ex(t,e.experiment,e.result).length&&t.global.saveDeferredTrack&&t.global.saveDeferredTrack({experiment:e.experiment,result:e.result})}),eB(t,e,n.force,"force",n.id)}if(!n.variations)continue;let i={variations:n.variations,key:n.key||e};"coverage"in n&&(i.coverage=n.coverage),n.weights&&(i.weights=n.weights),n.hashAttribute&&(i.hashAttribute=n.hashAttribute),n.fallbackAttribute&&(i.fallbackAttribute=n.fallbackAttribute),n.disableStickyBucketing&&(i.disableStickyBucketing=n.disableStickyBucketing),void 0!==n.bucketVersion&&(i.bucketVersion=n.bucketVersion),void 0!==n.minBucketVersion&&(i.minBucketVersion=n.minBucketVersion),n.namespace&&(i.namespace=n.namespace),n.meta&&(i.meta=n.meta),n.ranges&&(i.ranges=n.ranges),n.name&&(i.name=n.name),n.phase&&(i.phase=n.phase),n.seed&&(i.seed=n.seed),n.hashVersion&&(i.hashVersion=n.hashVersion),n.filters&&(i.filters=n.filters),n.condition&&(i.condition=n.condition);let{result:s}=eT(i,e,t);if(t.global.onExperimentEval&&t.global.onExperimentEval(i,s),s.inExperiment&&!s.passthrough)return eB(t,e,s.value,"experiment",n.id,i,s)}}return eB(t,e,void 0===i.defaultValue?null:i.defaultValue,"defaultValue")}function eT(e,t,r){var i;let n=e.key,s=e.variations.length;if(s<2||!1===r.global.enabled||!1===r.user.enabled||(e=function(e,t){let r=e.key,i=t.global.overrides;return i&&i[r]&&"string"==typeof(e=Object.assign({},e,i[r])).url&&(e.url=U(e.url)),e}(e,r)).urlPatterns&&!P(r.user.url||"",e.urlPatterns))return{result:eR(r,e,-1,!1,t)};let o=function(e,t,r){if(!t)return null;let i=t.split("?")[1];if(!i)return null;let n=i.replace(/#.*/,"").split("&").map(e=>e.split("=",2)).filter(t=>{let[r]=t;return r===e}).map(e=>{let[,t]=e;return parseInt(t)});return n.length>0&&n[0]>=0&&n[0]0){for(let e=0;e<=o;e++)if(void 0!==l[eL(r,e)])return{variation:-1,versionIsBlocked:!0}}let c=l[u];if(void 0===c)return{variation:-1};let d=a.findIndex(e=>e.key===c);return d<0?{variation:-1}:{variation:d}}({ctx:r,expKey:e.key,expBucketVersion:e.bucketVersion,expHashAttribute:e.hashAttribute,expFallbackAttribute:e.fallbackAttribute,expMinBucketVersion:e.minBucketVersion,expMeta:e.meta});d=t>=0,c=t,h=!!i}if(!d){if(e.filters){if(eV(e.filters,r))return{result:eR(r,e,-1,!1,t)}}else if(e.namespace&&!function(e,t){let r=M("__"+t[0],e,1);return null!==r&&r>=t[1]&&r1&&(t=1);let i=e<=0?[]:Array(e).fill(1/e);(r=r||i).length!==e&&(r=i);let n=r.reduce((e,t)=>t+e,0);(n<.99||n>1.01)&&(r=i);let s=0;return r.map(e=>{let r=s;return s+=e,[r,r+t*e]})}(s,void 0===e.coverage?1:e.coverage,e.weights))),h)return{result:eR(r,e,-1,!1,t,void 0,!0)};if(c<0)return{result:eR(r,e,-1,!1,t)};if("force"in e)return{result:eR(r,e,void 0===e.force?-1:e.force,!1,t)};if(r.global.qaMode||r.user.qaMode||"stopped"===e.status)return{result:eR(r,e,-1,!1,t)};let p=eR(r,e,c,!0,t,f,d);if(r.user.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){let{changed:t,key:i,doc:n}=function(e,t,r,i){let n=eN(t,r),s=e.user.stickyBucketAssignmentDocs&&e.user.stickyBucketAssignmentDocs[n]&&e.user.stickyBucketAssignmentDocs[n].assignments||{},o={...s,...i},a=JSON.stringify(s)!==JSON.stringify(o);return{key:n,doc:{attributeName:t,attributeValue:r,assignments:o},changed:a}}(r,u,H(l),{[eL(e.key,e.bucketVersion)]:p.key});t&&(r.user.stickyBucketAssignmentDocs=r.user.stickyBucketAssignmentDocs||{},r.user.stickyBucketAssignmentDocs[i]=n,r.user.saveStickyBucketAssignmentDoc(n))}let g=ex(r,e,p);0===g.length&&r.global.saveDeferredTrack&&r.global.saveDeferredTrack({experiment:e,result:p});let m=g.length?1===g.length?g[0]:Promise.all(g).then(()=>{}):void 0;return"changeId"in e&&e.changeId&&r.global.recordChangeId&&r.global.recordChangeId(e.changeId),{result:p,trackingCall:m}}function eB(e,t,r,i,n,s,o){let a={value:r,on:!!r,off:!r,source:i,ruleId:n||""};return s&&(a.experiment=s),o&&(a.experimentResult=o),"override"!==i&&function(e,t,r){if(e.user.trackedFeatureUsage){let i=JSON.stringify(r.value);if(e.user.trackedFeatureUsage[t]===i)return;e.user.trackedFeatureUsage[t]=i,e.user.enableDevMode&&e.user.devLogs&&e.user.devLogs.push({featureKey:t,result:r,timestamp:Date.now().toString(),logType:"feature"})}if(e.global.onFeatureUsage){let i=e.global.onFeatureUsage;eS(()=>i(t,r,e.user))}if(e.user.onFeatureUsage){let i=e.user.onFeatureUsage;eS(()=>i(t,r))}if(e.global.eventLogger){let i=e.global.eventLogger;eS(()=>i("Feature Evaluated",{feature:t,source:r.source,value:r.value,ruleId:"defaultValue"===r.source?"$default":r.ruleId||"",variationId:r.experimentResult?r.experimentResult.key:""},e.user))}}(e,t,a),a}function eD(e){return{...e.user.attributes,...e.user.attributeOverrides}}function eF(e,t){return ek(eD(t),e,t.global.savedGroups||{})}function eV(e,t){return e.some(e=>{let{hashValue:r}=e$(t,e.attribute);if(!r)return!0;let i=M(e.seed,r,e.hashVersion||2);return null===i||!e.ranges.some(e=>O(i,e))})}function eR(e,t,r,i,n,s,o){let a=!0;(r<0||r>=t.variations.length)&&(r=0,a=!1);let{hashAttribute:u,hashValue:l}=e$(e,t.hashAttribute,e.user.saveStickyBucketAssignmentDoc&&!t.disableStickyBucketing?t.fallbackAttribute:void 0),c=t.meta?t.meta[r]:{},d={key:c.key||""+r,featureId:n,inExperiment:a,hashUsed:i,variationId:r,value:t.variations[r],hashAttribute:u,hashValue:l,stickyBucketUsed:!!o};return c.name&&(d.name=c.name),void 0!==s&&(d.bucket=s),c.passthrough&&(d.passthrough=c.passthrough),d}function e$(e,t,r){let i=t||"id",n="",s=eD(e);return s[i]&&(n=s[i]),!n&&r&&(s[r]&&(n=s[r]),n&&(i=r)),{hashAttribute:i,hashValue:n}}function eL(e,t){return t=t||0,`${e}__${t}`}function eN(e,t){return`${e}||${t}`}async function eI(e,t,r){let i=eM(e,r);return t.getAllAssignments(i)}function eM(e,t){let r={};return(function(e,t){let r=new Set,i=t&&t.features?t.features:e.global.features||{},n=t&&t.experiments?t.experiments:e.global.experiments||[];return Object.keys(i).forEach(e=>{let t=i[e];if(t.rules)for(let e of t.rules)e.variations&&(r.add(e.hashAttribute||"id"),e.fallbackAttribute&&r.add(e.fallbackAttribute))}),n.map(e=>{r.add(e.hashAttribute||"id"),e.fallbackAttribute&&r.add(e.fallbackAttribute)}),Array.from(r)})(e,t).forEach(t=>{let{hashValue:i}=e$(e,t);r[t]=H(i)}),r}async function eO(e,t,r){if((e={...e}).encryptedFeatures){try{e.features=JSON.parse(await K(e.encryptedFeatures,t,r))}catch(e){console.error(e)}delete e.encryptedFeatures}if(e.encryptedExperiments){try{e.experiments=JSON.parse(await K(e.encryptedExperiments,t,r))}catch(e){console.error(e)}delete e.encryptedExperiments}if(e.encryptedSavedGroups){try{e.savedGroups=JSON.parse(await K(e.encryptedSavedGroups,t,r))}catch(e){console.error(e)}delete e.encryptedSavedGroups}return e}function eU(e,t){return t.hashAttribute+t.hashValue+e.key+t.variationId}let eP="undefined"!=typeof window&&"undefined"!=typeof document,ej=function(){let e;try{e="1.5.1"}catch(t){e=""}return e}();class eK{constructor(e){if(e=e||{},this.version=ej,this._options=this.context=e,this._renderer=e.renderer||null,this._trackedExperiments=new Set,this._completedChangeIds=new Set,this._trackedFeatures={},this.debug=!!e.debug,this._subscriptions=new Set,this.ready=!1,this._assigned=new Map,this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._initialized=!1,this._redirectedUrl="",this._deferredTrackingCalls=new Map,this._autoExperimentsAllowed=!e.disableExperimentsOnLoad,this._destroyCallbacks=[],this.logs=[],this.log=this.log.bind(this),this._saveDeferredTrack=this._saveDeferredTrack.bind(this),this._fireSubscriptions=this._fireSubscriptions.bind(this),this._recordChangedId=this._recordChangedId.bind(this),e.remoteEval){if(e.decryptionKey)throw Error("Encryption is not available for remoteEval");if(!e.clientKey)throw Error("Missing clientKey");let t=!1;try{t=!!new URL(e.apiHost||"").hostname.match(/growthbook\.io$/i)}catch(e){}if(t)throw Error("Cannot use remoteEval on GrowthBook Cloud")}else if(e.cacheKeyAttributes)throw Error("cacheKeyAttributes are only used for remoteEval");if(e.stickyBucketService){let t=e.stickyBucketService;this._saveStickyBucketAssignmentDoc=e=>t.saveAssignments(e)}if(e.plugins)for(let t of e.plugins)t(this);if(e.features&&(this.ready=!0),eP&&e.enableDevMode&&(window._growthbook=this,document.dispatchEvent(new Event("gbloaded"))),e.experiments&&(this.ready=!0,this._updateAllAutoExperiments()),this._options.stickyBucketService&&this._options.stickyBucketAssignmentDocs)for(let e in this._options.stickyBucketAssignmentDocs){let t=this._options.stickyBucketAssignmentDocs[e];t&&this._options.stickyBucketService.saveAssignments(t).catch(()=>{})}this.ready&&this.refreshStickyBuckets(this.getPayload())}async setPayload(e){this._payload=e;let t=await eO(e,this._options.decryptionKey);this._decryptedPayload=t,await this.refreshStickyBuckets(t),t.features&&(this._options.features=t.features),t.savedGroups&&(this._options.savedGroups=t.savedGroups),t.experiments&&(this._options.experiments=t.experiments,this._updateAllAutoExperiments()),this.ready=!0,this._render()}initSync(e){this._initialized=!0;let t=e.payload;if(t.encryptedExperiments||t.encryptedFeatures)throw Error("initSync does not support encrypted payloads");return this._options.stickyBucketService&&!this._options.stickyBucketAssignmentDocs&&(this._options.stickyBucketAssignmentDocs=this.generateStickyBucketAssignmentDocsSync(this._options.stickyBucketService,t)),this._payload=t,this._decryptedPayload=t,t.features&&(this._options.features=t.features),t.experiments&&(this._options.experiments=t.experiments,this._updateAllAutoExperiments()),this.ready=!0,e_(this,e),this}async init(e){if(this._initialized=!0,(e=e||{}).cacheSettings&&(Object.assign(W,e.cacheSettings),W.backgroundSync||(er.clear(),et.forEach(ev),Z.clear(),Y.stopIdleListener())),e.payload)return await this.setPayload(e.payload),e_(this,e),{success:!0,source:"init"};{let{data:t,...r}=await this._refresh({...e,allowStale:!0});return e_(this,e),await this.setPayload(t||{}),r}}async loadFeatures(e){e=e||{},await this.init({skipCache:e.skipCache,timeout:e.timeout,streaming:(this._options.backgroundSync??!0)&&(e.autoRefresh||this._options.subscribeToChanges)})}async refreshFeatures(e){let t=await this._refresh({...e||{},allowStale:!1});t.data&&await this.setPayload(t.data)}getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){var e=this._options;let t=e.apiHost||"https://cdn.growthbook.io";return{apiHost:t.replace(/\/*$/,""),streamingHost:(e.streamingHost||t).replace(/\/*$/,""),apiRequestHeaders:e.apiHostRequestHeaders,streamingHostRequestHeaders:e.streamingHostRequestHeaders}}getClientKey(){return this._options.clientKey||""}getPayload(){return this._payload||{features:this.getFeatures(),experiments:this.getExperiments()}}getDecryptedPayload(){return this._decryptedPayload||this.getPayload()}isRemoteEval(){return this._options.remoteEval||!1}getCacheKeyAttributes(){return this._options.cacheKeyAttributes}async _refresh(e){let{timeout:t,skipCache:r,allowStale:i,streaming:n}=e;if(!this._options.clientKey)throw Error("Missing clientKey");return ei({instance:this,timeout:t,skipCache:r||this._options.disableCache,allowStale:i,backgroundSync:n??this._options.backgroundSync??!0})}_render(){if(this._renderer)try{this._renderer()}catch(e){console.error("Failed to render",e)}}setFeatures(e){this._options.features=e,this.ready=!0,this._render()}async setEncryptedFeatures(e,t,r){let i=await K(e,t||this._options.decryptionKey,r);this.setFeatures(JSON.parse(i))}setExperiments(e){this._options.experiments=e,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(e,t,r){let i=await K(e,t||this._options.decryptionKey,r);this.setExperiments(JSON.parse(i))}async setAttributes(e){if(this._options.attributes=e,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}async updateAttributes(e){return this.setAttributes({...this._options.attributes,...e})}async setAttributeOverrides(e){if(this._options.attributeOverrides=e,this._options.stickyBucketService&&await this.refreshStickyBuckets(),this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}async setForcedVariations(e){if(this._options.forcedVariations=e||{},this._options.remoteEval)return void await this._refreshForRemoteEval();this._render(),this._updateAllAutoExperiments()}setForcedFeatures(e){this._options.forcedFeatureValues=e,this._render()}async setURL(e){if(e!==this._options.url){if(this._options.url=e,this._redirectedUrl="",this._options.remoteEval){await this._refreshForRemoteEval(),this._updateAllAutoExperiments(!0);return}this._updateAllAutoExperiments(!0)}}getAttributes(){return{...this._options.attributes,...this._options.attributeOverrides}}getForcedVariations(){return this._options.forcedVariations||{}}getForcedFeatures(){return this._options.forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._options.stickyBucketAssignmentDocs||{}}getUrl(){return this._options.url||""}getFeatures(){return this._options.features||{}}getExperiments(){return this._options.experiments||[]}getCompletedChangeIds(){return Array.from(this._completedChangeIds)}subscribe(e){return this._subscriptions.add(e),()=>{this._subscriptions.delete(e)}}async _refreshForRemoteEval(){if(!this._options.remoteEval||!this._initialized)return;let e=await this._refresh({allowStale:!1});e.data&&await this.setPayload(e.data)}getAllResults(){return new Map(this._assigned)}onDestroy(e){this._destroyCallbacks.push(e)}isDestroyed(){return!!this._destroyed}destroy(){var e;this._destroyed=!0,this._destroyCallbacks.forEach(e=>{try{e()}catch(e){console.error(e)}}),this._subscriptions.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._completedChangeIds.clear(),this._deferredTrackingCalls.clear(),this._trackedFeatures={},this._destroyCallbacks=[],this._payload=void 0,this._saveStickyBucketAssignmentDoc=void 0,e=this,Z.forEach(t=>t.delete(e)),this.logs=[],eP&&window._growthbook===this&&delete window._growthbook,this._activeAutoExperiments.forEach(e=>{e.undo()}),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(e){this._renderer=e}forceVariation(e,t){if(this._options.forcedVariations=this._options.forcedVariations||{},this._options.forcedVariations[e]=t,this._options.remoteEval)return void this._refreshForRemoteEval();this._updateAllAutoExperiments(),this._render()}run(e){let{result:t}=eT(e,null,this._getEvalContext());return this._fireSubscriptions(e,t),t}triggerExperiment(e){return(this._triggeredExpKeys.add(e),this._options.experiments)?this._options.experiments.filter(t=>t.key===e).map(e=>this._runAutoExperiment(e)).filter(e=>null!==e):null}triggerAutoExperiments(){this._autoExperimentsAllowed=!0,this._updateAllAutoExperiments(!0)}_getEvalContext(){return{user:this._getUserContext(),global:this._getGlobalContext(),stack:{evaluatedFeatures:new Set}}}_getUserContext(){return{attributes:this._options.user?{...this._options.user,...this._options.attributes}:this._options.attributes,enableDevMode:this._options.enableDevMode,blockedChangeIds:this._options.blockedChangeIds,stickyBucketAssignmentDocs:this._options.stickyBucketAssignmentDocs,url:this._getContextUrl(),forcedVariations:this._options.forcedVariations,forcedFeatureValues:this._options.forcedFeatureValues,attributeOverrides:this._options.attributeOverrides,saveStickyBucketAssignmentDoc:this._saveStickyBucketAssignmentDoc,trackingCallback:this._options.trackingCallback,onFeatureUsage:this._options.onFeatureUsage,devLogs:this.logs,trackedExperiments:this._trackedExperiments,trackedFeatureUsage:this._trackedFeatures}}_getGlobalContext(){return{features:this._options.features,experiments:this._options.experiments,log:this.log,enabled:this._options.enabled,qaMode:this._options.qaMode,savedGroups:this._options.savedGroups,groups:this._options.groups,overrides:this._options.overrides,onExperimentEval:this._subscriptions.size>0?this._fireSubscriptions:void 0,recordChangeId:this._recordChangedId,saveDeferredTrack:this._saveDeferredTrack,eventLogger:this._options.eventLogger}}_runAutoExperiment(e,t){let r,i,n=this._activeAutoExperiments.get(e);if(e.manual&&!this._triggeredExpKeys.has(e.key)&&!n)return null;this._isAutoExperimentBlockedByContext(e)?r=eR(this._getEvalContext(),e,-1,!1,""):({result:r,trackingCall:i}=eT(e,null,this._getEvalContext()),this._fireSubscriptions(e,r));let s=JSON.stringify(r.value);if(!t&&r.inExperiment&&n&&n.valueHash===s)return r;if(n&&this._undoActiveAutoExperiment(e),r.inExperiment){let t=G(e);if("redirect"===t&&r.value.urlRedirect&&e.urlPatterns){let t=e.persistQueryString?function(e,t){let r,i;try{r=new URL(e),i=new URL(t)}catch(e){return console.error(`Unable to merge query strings: ${e}`),t}return r.searchParams.forEach((e,t)=>{i.searchParams.has(t)||i.searchParams.set(t,e)}),i.toString()}(this._getContextUrl(),r.value.urlRedirect):r.value.urlRedirect;if(P(t,e.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:e.key}),r;this._redirectedUrl=t;let{navigate:n,delay:s}=this._getNavigateFunction();if(n)if(eP)Promise.all([...i?[z(i,this._options.maxNavigateDelay??1e3)]:[],new Promise(e=>window.setTimeout(e,this._options.navigateDelay??s))]).then(()=>{try{n(t)}catch(e){console.error(e)}});else try{n(t)}catch(e){console.error(e)}}else if("visual"===t){let t=this._options.applyDomChangesCallback?this._options.applyDomChangesCallback(r.value):this._applyDOMChanges(r.value);t&&this._activeAutoExperiments.set(e,{undo:t,valueHash:s})}}return r}_undoActiveAutoExperiment(e){let t=this._activeAutoExperiments.get(e);t&&(t.undo(),this._activeAutoExperiments.delete(e))}_updateAllAutoExperiments(e){if(!this._autoExperimentsAllowed)return;let t=this._options.experiments||[],r=new Set(t);for(let i of(this._activeAutoExperiments.forEach((e,t)=>{r.has(t)||(e.undo(),this._activeAutoExperiments.delete(t))}),t)){let t=this._runAutoExperiment(i,e);if(null!=t&&t.inExperiment&&"redirect"===G(i))break}}_fireSubscriptions(e,t){let r=e.key,i=this._assigned.get(r);i&&i.result.inExperiment===t.inExperiment&&i.result.variationId===t.variationId||(this._assigned.set(r,{experiment:e,result:t}),this._subscriptions.forEach(r=>{try{r(e,t)}catch(e){console.error(e)}}))}_recordChangedId(e){this._completedChangeIds.add(e)}isOn(e){return this.evalFeature(e).on}isOff(e){return this.evalFeature(e).off}getFeatureValue(e,t){let r=this.evalFeature(e).value;return null===r?t:r}feature(e){return this.evalFeature(e)}evalFeature(e){return eC(e,this._getEvalContext())}log(e,t){this.debug&&(this._options.log?this._options.log(e,t):console.log(e,t))}getDeferredTrackingCalls(){return Array.from(this._deferredTrackingCalls.values())}setDeferredTrackingCalls(e){this._deferredTrackingCalls=new Map(e.filter(e=>e&&e.experiment&&e.result).map(e=>[eU(e.experiment,e.result),e]))}async fireDeferredTrackingCalls(){if(!this._options.trackingCallback)return;let e=[];this._deferredTrackingCalls.forEach(t=>{t&&t.experiment&&t.result?e.push(this._options.trackingCallback(t.experiment,t.result)):console.error("Invalid deferred tracking call",{call:t})}),this._deferredTrackingCalls.clear(),await Promise.all(e)}setTrackingCallback(e){this._options.trackingCallback=e,this.fireDeferredTrackingCalls()}setEventLogger(e){this._options.eventLogger=e}async logEvent(e,t){if(this._destroyed)return void console.error("Cannot log event to destroyed GrowthBook instance");if(this._options.enableDevMode&&this.logs.push({eventName:e,properties:t,timestamp:Date.now().toString(),logType:"event"}),this._options.eventLogger)try{await this._options.eventLogger(e,t||{},this._getUserContext())}catch(e){console.error(e)}else console.error("No event logger configured")}_saveDeferredTrack(e){this._deferredTrackingCalls.set(eU(e.experiment,e.result),e)}_getContextUrl(){return this._options.url||(eP?window.location.href:"")}_isAutoExperimentBlockedByContext(e){let t=G(e);if("visual"===t){if(this._options.disableVisualExperiments||this._options.disableJsInjection&&e.variations.some(e=>e.js))return!0}else{if("redirect"!==t||this._options.disableUrlRedirectExperiments)return!0;try{let t=new URL(this._getContextUrl());for(let r of e.variations){if(!r||!r.urlRedirect)continue;let e=new URL(r.urlRedirect);if(this._options.disableCrossOriginUrlRedirectExperiments&&(e.protocol!==t.protocol||e.host!==t.host))return!0}}catch(t){return this.log("Error parsing current or redirect URL",{id:e.key,error:t}),!0}}return!!(e.changeId&&(this._options.blockedChangeIds||[]).includes(e.changeId))}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){return this._options.navigate?{navigate:this._options.navigate,delay:0}:eP?{navigate:e=>{window.location.replace(e)},delay:100}:{navigate:null,delay:0}}_applyDOMChanges(e){if(!eP)return;let t=[];if(e.css){let r=document.createElement("style");r.innerHTML=e.css,document.head.appendChild(r),t.push(()=>r.remove())}if(e.js){let r=document.createElement("script");r.innerHTML=e.js,this._options.jsInjectionNonce&&(r.nonce=this._options.jsInjectionNonce),document.head.appendChild(r),t.push(()=>r.remove())}return e.domMutations&&e.domMutations.forEach(e=>{t.push(L.declarative(e).revert)}),()=>{t.forEach(e=>e())}}async refreshStickyBuckets(e){if(this._options.stickyBucketService){let t=this._getEvalContext(),r=await eI(t,this._options.stickyBucketService,e);this._options.stickyBucketAssignmentDocs=r}}generateStickyBucketAssignmentDocsSync(e,t){if(!("getAllAssignmentsSync"in e))return void console.error("generating StickyBucketAssignmentDocs docs requires StickyBucketServiceSync");let r=eM(this._getEvalContext(),t);return e.getAllAssignmentsSync(r)}inDevMode(){return!!this._options.enableDevMode}}var eH=r(12115);let eq=eH.createContext({});function eJ(e){return ez().isOn(e)}function eG(e,t){return ez().getFeatureValue(e,t)}function ez(){let{growthbook:e}=eH.useContext(eq);if(!e)throw Error("Missing or invalid GrowthBookProvider");return e}let eW=({children:e,growthbook:t})=>{let[r,i]=eH.useState(0);return eH.useEffect(()=>{if(t&&t.setRenderer)return t.setRenderer(()=>{i(e=>e+1)}),()=>{t.setRenderer(()=>{})}},[t]),eH.createElement(eq.Provider,{value:{growthbook:t}},e)}},29200:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r)if(!this._cachedTimeouts)return!1;else this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,i=0;i=r&&(t=n,r=o)}return t}},29674:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var i=r(84896);let n=Object.prototype.toString,s=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);class o extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}let a=(e,t,r)=>{let i=r.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=i,e};async function u(e,t){return new Promise((r,u)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;let l=i.operation(t),c=()=>{l.stop(),u(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",c,{once:!0});let d=()=>{t.signal?.removeEventListener("abort",c),l.stop()};l.attempt(async i=>{try{let t=await e(i);d(),r(t)}catch(e){try{if(!(e instanceof Error))throw TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof o)throw e.originalError;if(e instanceof TypeError&&!(e&&"[object Error]"===n.call(e)&&"TypeError"===e.name&&"string"==typeof e.message&&("Load failed"===e.message?void 0===e.stack:s.has(e.message))))throw e;if(a(e,i,t),await t.shouldRetry(e)||(l.stop(),u(e)),await t.onFailedAttempt(e),!l.retry(e))throw l.mainError()}catch(e){a(e,i,t),d(),u(e)}}})})}},34064:(e,t,r)=>{e.exports=r(59272)},59272:(e,t)=>{"use strict";function r(e){return(r="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)}var i,n="https://js.stripe.com/v3",s=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=function(){for(var e=document.querySelectorAll('script[src^="'.concat(n,'"]')),t=0;t element.");return i.appendChild(r),r},l=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:t})},c=null,d=null,h=null,f=function(e,t,r){if(null===e)return null;var i=e.apply(void 0,t);return l(i,r),i},p=function(e){var t="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==r(e))throw Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw Error(t)},g=!1,m=function(){for(var e,t=arguments.length,r=Array(t),n=0;n{e.exports=r(90342)},90342:(e,t,r)=>{var i=r(29200);t.operation=function(e){return new i(t.timeouts(e),{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n