PageSourceSearch

https://sharethemeal.org/assets/root-DVUCUhYG.js

js sharethemeal.org collected 2026-09-24 08:43:39 UTC 130,336 bytes, 13 lines download raw bytes

1import{l as Vr,R as mt,t as w,z as Me,L as Y,B as qn,D as qt,u as zn,w as qr,C as $n,I as zr,A as $r,G as zt,q as lr,M as Wr,a as Kr,S as Qr,J as Wn,y as Kn,O as Qn,d as Yn}from"./chunk-4N6VE7H7-Exqj4PTM.js";import{Q as s,k as be,l as Xn,R as E,T as we,u as cr,n as ur,p as dr,I as at,c as $t,E as wt,e as Jn,G as Zn,d as Yr,U as fr,w as ei,S as ti,O as ri,M as ni,D as hr,h as ii}from"./constants-CmaRX5ba.js";import{k as D,w as R,m as Xr,v as Jr,u as ai}from"./index-Cp7v22Jw.js";import{R as Se,C as Z}from"./Col-CPLGU30n.js";import{B as te}from"./Button-Dw9IA_-S.js";import{M as Wt,b as Zr,C as Kt,a as Qt}from"./closeButton-CXJaCLQQ.js";import{u as Yt,l as oi,D as si}from"./errorHandling-CJ53Cpo-.js";import{S as gt}from"./storeBadge-DrLPzcRx.js";import{u as ue}from"./usePathWithLocale-CLIIL5Qu.js";import{S as li}from"./stmDropdown-ChDSBrXd.js";import{u as en,C as ci}from"./currencyContext-BMcdKPhl.js";import{g as ui}from"./currencies-CvTwy-6S.js";import{u as V}from"./useTranslation-AnhJcB0n.js";import{m as Mt,a as z,t as tn}from"./utils-DIUWyMmR.js";import{u as et,N as yt,a as le,b as Xt,S as di}from"./signInModalContext-BotCBKQ8.js";import{A as fi}from"./adaptiveModal-DCL95nM5.js";import{u as rn,a as nn,E as hi,U as an}from"./userAvatar-BsFPTHAV.js";import{u as on}from"./useGenerateErrorModalContent-HjzkqIQ8.js";import{u as ae}from"./useRootData-fFXhC2hW.js";import{F as vi,S as pi}from"./Spinner-BqCeoXYw.js";import{F as mi}from"./FormGroup-BrC4eXxe.js";import{S as gi}from"./stmInput-B6qy2IGd.js";import{i as yi}from"./emails-BcsGL0LJ.js";import{T as bi}from"./Trans-DOU_MTl2.js";import{D as Jt,c as Zt,b as er,a as bt}from"./DropdownToggle-Du-YaCKd.js";import{i as Lt,u as _i,A as lt}from"./amplitudeContext-Cg1Mbi4A.js";import{c as xi,D as wi,S as _t,a as vr}from"./locales-QwQpF3yu.js";import{C as pr}from"./Collapse-CCqyTvVl.js";import{N as Si,l as Ei}from"./metaPixel-DS3Ng3O8.js";import{C as xt}from"./Container-DWJKY1CI.js";import{C as Ni}from"./campaignCard-DXLo-35X.js";import{C as Ai}from"./campaignsSlider-D2vM7L5i.js";import{s as sn,u as mr}from"./useClientScript-DqzkkIH4.js";import{i as Ii}from"./debug-build-0tuuP5J3.js";import"./responsiveImage-B1E4D8Vd.js";import"./index-Abd3mBA_.js";import"./Fade-C8nx6FSZ.js";import"./Transition-DDGySKfU.js";import"./context-DUpo4M3t.js";import"./FormFeedback-D8Pg5soT.js";import"./i18next-4KZcn6jV.js";import"./Popper-v69imOPF.js";import"./preload-helper-BXl3LOEh.js";import"./Card-OzfGG4Um.js";import"./CardBody-Bm__oHqp.js";import"./donationMatchingBadge-BelOBz0R.js";import"./useLocalisedNumbers-ByBoLc07.js";import"./timeDifference-Brf6XDqA.js";import"./luxon-BDx6lZXm.js";var ot={},gr;function Oi(){if(gr)return ot;
1gr=1,Object.defineProperty(ot,"__esModule",{value:!0});var t=function(r){console.warn("[react-gtm]",r)};return ot.default=t,ot}var It,yr;function ki(){if(yr)return It;yr=1;var t=Oi(),e=r(t);function r(i){return i&&i.__esModule?i:{default:i}}var n={tags:function(a){var o=a.id,l=a.events,u=a.dataLayer,c=a.dataLayerName,d=a.preview,m=a.auth,f="&gtm_auth="+m,v="&gtm_preview="+d;o||(0,e.default)("GTM Id is required");var h=`
2      <iframe src="https://www.googletagmanager.com/ns.html?id=`+o+f+v+`&gtm_cookies_win=x"
3        height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,p=`
4      (function(w,d,s,l,i){w[l]=w[l]||[];
5        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(l).slice(1,-1)+`});
6        var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
7        j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+f+v+`&gtm_cookies_win=x';
8        f.parentNode.insertBefore(j,f);
9      })(window,document,'script','`+c+"','"+o+"');",g=this.dataLayer(u,c);return{iframe:h,script:p,dataLayerVar:g}},dataLayer:function(a,o){return`
10      window.`+o+" = window."+o+` || [];
11      window.`+o+".push("+JSON.stringify(a)+")"}};return It=n,It}var Ot,br;function Ci(){if(br)return Ot;br=1;var t=ki(),e=r(t);function r(i){return i&&i.__esModule?i:{default:i}}var n={dataScript:function(a){var o=document.createElement("script");return o.innerHTML=a,o},gtm:function(a){var o=e.default.tags(a),l=function(){var m=document.createElement("noscript");return m.innerHTML=o.iframe,m},u=function(){var m=document.createElement("script");return m.innerHTML=o.script,m},c=this.dataScript(o.dataLayerVar);return{noScript:l,script:u,dataScript:c}},initialize:function(a){var o=a.gtmId,l=a.events,u=l===void 0?{}:l,c=a.dataLayer,d=a.dataLayerName,m=d===void 0?"dataLayer":d,f=a.auth,v=f===void 0?"":f,h=a.preview,p=h===void 0?"":h,g=this.gtm({id:o,events:u,dataLayer:c||void 0,dataLayerName:m,auth:v,preview:p});c&&document.head.appendChild(g.dataScript),document.head.insertBefore(g.script(),document.head.childNodes[0]),document.body.insertBefore(g.noScript(),document.body.childNodes[0])},dataLayer:function(a){var o=a.dataLayer,l=a.dataLayerName,u=l===void 0?"dataLayer":l;if(window[u])return window[u].push(o);var c=e.default.dataLayer(o,u),d=this.dataScript(c);document.head.insertBefore(d,document.head.childNodes[0])}};return Ot=n,Ot}var kt,_r;function ji(){if(_r)return kt;_r=1;var t=Ci(),e=r(t);function r(n){return n&&n.__esModule?n:{default:n}}return kt=e.default,kt}var Ti=ji();const Pi=Vr(Ti);var Ri=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function Ut(){return Ut=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ut.apply(this,arguments)}function Ct(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mi(t,e){if(t==null)return{};var r=Li(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Li(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Ui={children:z.node,className:z.string,color:z.string,container:z.oneOfType([z.bool,z.string]),cssModule:z.object,dark:z.bool,expand:z.oneOfType([z.bool,z.string]),fixed:z.string,light:z.bool,role:z.string,sticky:z.string,tag:tn},Di=function(e){return e===!1?!1:e===!0||e==="xs"?"navbar-expand":"navbar-expand-".concat(e)};function ln(t){var e,r=t.expand,n=r===void 0?!1:r,i=t.className,a=t.cssModule,o=t.light,l=t.dark,u=t.fixed,c=t.sticky,d=t.color,m=t.container,f=m===void 0?"fluid":m,v=t.tag,h=v===void 0?"nav":v,p=t.children,g=Mi(t,Ri),N=Mt(D(i,"navbar",Di(n),(e={"navbar-light":o,"navbar-dark":l},Ct(e,"bg-".concat(d),d),Ct(e,"fixed-".concat(u),u),Ct(e,"sticky-".concat(c),c),e)),a),I=f&&f===!0?"container":"container-".concat(f);return mt.createElement(h,Ut({},g,{className:N}),f?mt.createElement("div",{className:I},p):p)}ln.propTypes=Ui;var Fi=["className","cssModule","children","tag"];function Dt(){return Dt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dt.apply(this,arguments)}function xr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Bi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xr(Object(r),!0).forEach(function(n){Gi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Gi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hi(t,e){if(t==null)return{};var r=Vi(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Vi(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var qi={className:z.string,cssModule:z.object,tag:tn,type:z.string,children:z.node};function cn(t){var e=t.className,r=t.cssModule,n=t.children,i=t.tag,a=i===void 0?"button":i,o=Hi(t,Fi),l=Mt(D(e,"navbar-toggler"),r);return mt.createElement(a,Dt({"aria-label":"Toggle navigation"},Bi({type:"button"},o),{className:l}),n||mt.createElement("span",{className:Mt("navbar-toggler-icon",r)}))}cn.propTypes=qi;const un=(t,e)=>{const r=w.useRef(null),{pathname:n,search:i}=Me();w.useEffect(()=>{if(!t||r.current===t)return;r.current=t;const a=`${n}${i}`,o=document.referrer||void 0;(async()=>(e!==void 0?R("payment_error",{stm_error_code:e,page_url:a,referrer:o}):R("error_triggered",{message:t,page_url:a,referrer:o}),await Xr().promise))()},[t,e])},dn=({dialogModalProps:t,isErrorBoundary:e=!1})=>{let{isDialogModalOpen:r,setIsDialogModalOpen:n,dialogModalContent:i}=Yt();t&&(r=t.isDialogModalOpen,n=t.setIsDialogModalOpen,i=t.dialogModalContent),un(i.errorTrackingMessage||"",i.stmErrorCode);const a=i?.image||{src:"/icons/empty-bowl.svg",width:100,height:100},o=w.useCallback(()=>{n(!r),i?.onCloseAction&&i.onCloseAction()},[n,r,i]),l=u=>{u&&(u.callback&&u.callback(),u.close&&n(!1))};return i?s.jsxs(Wt,{backdrop:i.closable?!0:"static",centered:!0,isOpen:r,keyboard:i.closable,toggle:o,className:D("modal-dialog--tight","modal
11-dialog--dialog",{"modal-dialog--error-boundary":e}),children:[i.closable&&s.jsx(Zr,{close:s.jsx(Kt,{onClickAction:o}),toggle:o,className:"modal-header--no-title"}),s.jsxs(Qt,{className:D("modal-body--tight",{"modal-body--closable":i.closable}),children:[(i.image||i.isError)&&s.jsx("img",{src:a.src,alt:i.header,className:"modal-dialog__image",width:a.width,height:a.height}),i.header&&s.jsx("h2",{className:D("heading--2","mb-0","text-center",{"modal-dialog--error-boundary__header":e}),children:i.header}),i.body&&s.jsx("p",{className:"mb-0 text-center dimmed-text modal-dialog__text",children:i.body}),(i.buttonPrimary||i.buttonSecondary)&&s.jsxs(Se,{className:"justify-content-center modal-dialog__actions",children:[i.buttonPrimary&&s.jsx(Z,{xs:"12",children:s.jsx(te,{type:"button",block:!0,color:be,size:"lg",onClick:()=>l(i.buttonPrimary),children:i.buttonPrimary.text})}),i.buttonSecondary&&s.jsx(Z,{xs:"12",className:D({"mt-3":i.buttonPrimary&&i.buttonSecondary}),children:s.jsx(te,{type:"button",block:!0,color:Xn,outline:!0,size:"lg",onClick:()=>l(i.buttonSecondary),children:i.buttonSecondary.text})})]})]})]}):s.jsx("div",{})};var ye;(t=>{(e=>{e.APPLE="apple",e.EMAIL="email",e.FACEBOOK="facebook",e.GOOGLE="google"})(t.provider||(t.provider={})),(e=>{e.LIMITED_LOGIN="limitedLogin",e.ACCESS_TOKEN="accessToken",e.AUTHORIZATION_CODE="authorizationCode"})(t.tokenType||(t.tokenType={}))})(ye||(ye={}));const zi=()=>{const{selectableCurrency:t,changeCurrency:e}=en(),{t:r}=V(),{currencies:n}=ui(),i=n.map(o=>({value:o.code,label:o.code})),a=o=>{if(!o)return;const l=o.value;n.find(c=>c.code===l)&&(R("currency_adjusted",{currency:l}),e(l,{updateUserProfile:!0}))};return s.jsxs(s.Fragment,{children:[s.jsx("label",{htmlFor:"footer__currency-input",className:"footer__currency-label",children:r("footer.currency.label")}),s.jsx(li,{id:"footer__currency-input",classNamePrefix:"currency-picker",placement:"top",options:i,onChange:a,defaultValue:t.code})]})},fn=({IS_ANDROID:t,IS_IOS:e})=>{const{getPath:r}=ue(),{t:n}=V(),{pathname:i}=Me(),[a]=Object.entries(E).find(([d,m])=>m===i)||[],o=we[a],l=new Date().getFullYear(),u={height:26,width:26},c=()=>s.jsxs(s.Fragment,{children:[!e&&s.jsx(gt,{className:"footer__store-button",height:40,location:o,store:"googleplay"}),!t&&s.jsx(gt,{height:40,location:o,store:"appstore"})]});return s.jsx("footer",{className:"footer",children:s.jsxs("div",{className:"container",children:[s.jsxs(Se,{className:"g-0 footer__row-1",children:[s.jsxs(Z,{xs:"12",md:"6",className:"footer__logo--desktop",children:[s.jsx("div",{className:"footer__logo-label",children:n("footer.wfp.label")}),s.jsx("img",{src:"/icons/wfp-logo.svg",alt:"WFP",loading:"lazy",width:125,height:54})]}),s.jsx(Z,{xs:"12",md:"6",className:"footer__col-currency",children:s.jsx(zi,{})})]}),s.jsxs(Se,{className:"g-0 footer__row-2 d-flex align-items-center",children:[s.jsxs(Z,{xs:"12",md:"auto",className:"footer__links-container",children:[s.jsx("div",{className:"footer__store--desktop",children:c()}),s.jsxs("div",{className:"footer__links",children:[s.jsx(Y,{className:"col-12 col-md-auto footer__link",to:r(E.FAQ),onClick:()=>R("footer_item_clicked",{item:we.FAQ}),children:n("footer.faq.label")}),s.jsx("a",{className:"col-12 col-md-auto footer__link",href:`mailto:support@${cr}.${ur}`,onClick:()=>R("footer_item_clicked",{item:"contact"}),children:n("footer.contact.label")}),s.jsx(Y,{className:"col-12 col-md-auto footer__link",to:r(E.TERMS),onClick:()=>R("footer_item_clicked",{item:we.TERMS}),children:n("footer.terms.label")}),s.jsx(Y,{className:"col-12 col-md-auto footer__link",to:r(E.PRIVACY),onClick:()=>R("footer_item_clicked",{item:we.PRIVACY}),children:n("footer.privacy.label")})]})]}),s.jsxs(Z,{xs:"12",md:"auto",className:"footer__store--mobile",children:[s.jsx("div",{className:"footer__store-label",children:n("footer.appDownload.label")}),c()]}),s.jsxs(Z,{xs:"12",md:"auto",className:"footer__logo--mobile",children:[s.jsx("div",{className:"footer__logo-label",children:n("footer.wfp.label")}),s.jsx("img",{src:"/icons/wfp-logo.svg",alt:"WFP",loading:"lazy",width:125,height:54})]}),s.jsxs(Z,{xs:"12",md:"auto",className:"align-items-md-center justify-content-md-end",children:[s.jsxs("div",{className:"footer__social col-12",children:[s.jsx("a",{href:"https://www.facebook.com/sharethemeal",className:"footer__social-icon footer__social-icon--fb",target:"_blank",rel:"noopener noreferrer",onClick:()=>R("footer_item_clicked",{item:"Facebook"}),children:s.jsx("img",{src:"/icons/facebook-secondary.svg",alt:"facebook",...u,loading:"lazy"})}),s.jsx("a",{href:"https://x.com/ShareTheMealorg",className:"footer__social-icon footer__social-icon--fb",target:"_blank",rel:"noopener noreferrer",onClick:()=>R("footer_item_clicked",{item:"X"}),children:s.jsx("img",{src:"/icons/x-blue.svg",alt:"x",...u,loading:"lazy"})}),s.jsx("a",{href:"https://www.youtube.com/channel/UCksI-TAGtkWdLfmwwCK1hug",className:"footer__social-icon",target:"_blank",rel:"noopener noreferrer",onClick:()=>R("footer_item_clicked",{item:"YouTube"}),children:s.jsx("img",{src:"/icons/youtube.svg",alt:"youtube",...u,loading:"lazy"})}),s.jsx("a",{href:"https://www.instagram.com/sharethemeal",className:"footer__social-icon",target:"_blank",rel:"noopener noreferrer",onClick:()=>R("footer_item_clicked",{item:"Instagram"}),children:s.jsx("img",{src:"/icons/instagram.svg",alt:"instagram",...u,loading:"lazy"})}),s.jsx("a",{href:`mailto:support@${cr}.${ur}`,className:"footer__social-icon",onClick:()=>R("footer_item_clicked",{item:"Email"}),children:s.jsx("img",{src:"/icons/email.svg",alt:"email",...u,loading:"lazy"})})]}
11),s.jsx("div",{className:"footer__copy col-12",children:n("footer.copyright.label",{year:l.toString()})})]})]})]})})},$i=()=>{const{t}=V();return s.jsxs("div",{id:"legacyBrowserModal",children:[s.jsx("div",{className:"modal fade show","aria-modal":"true",role:"dialog",tabIndex:-1,style:{display:"block",zIndex:1055},children:s.jsx("div",{className:"modal-dialog modal-dialog-centered",role:"document",style:{maxWidth:"500px"},children:s.jsx("div",{className:"modal-content",style:{backgroundColor:"#fff"},children:s.jsxs("div",{className:"modal-body--tight modal-body",children:[s.jsx(Kt,{id:"legacyBrowserModalCloseBtn"}),s.jsx("img",{src:"/icons/deprecated-browser.svg",alt:t("error.decrecatedbrowser.description"),className:"modal-dialog__image",width:130,height:164}),s.jsx("h2",{className:"heading--2 mb-0 text-center modal-dialog--error-boundary__header",children:t("error.decrecatedbrowser.title")}),s.jsx("p",{className:"mb-0 text-center dimmed-text modal-dialog__text",children:t("error.decrecatedbrowser.description")}),s.jsx("div",{className:"justify-content-center modal-dialog__actions row",children:s.jsx("div",{className:"col-12",children:s.jsx("button",{id:"legacyBrowserModalCta",type:"button",className:"btn btn-primary btn-lg d-block w-100",children:t("cta.continueanyway")})})})]})})})}),s.jsx("div",{className:"modal-backdrop fade show",style:{backgroundColor:"#000",opacity:.5,zIndex:1050}})]})},Wi=()=>{const t=qn(),{t:e}=V(),[r,n]=w.useState(),[i,a]=w.useState();return w.useEffect(()=>{if(t.state==="loading")n(!0);else if(r&&t.state==="idle"){a(!0);const o=setTimeout(()=>{n(!1),a(!1)},500);return()=>clearTimeout(o)}},[t.state,r]),s.jsxs("div",{className:D("progress-bar-container",{"progress-bar-container--navigating":r}),children:[s.jsx("div",{role:"progressbar","aria-label":e("global.loading"),className:D("progress-bar",{"progress-bar--navigating":r,"progress-bar--navigation-finished":i})}),s.jsx("div",{className:D("transition-complete-bar",{"transition-complete-bar--navigation-finished":i})})]})};var Ft=function(t,e){return Ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ft(t,e)};function hn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ft(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var xe=function(){return xe=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},xe.apply(this,arguments)};function vn(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(d){try{c(n.next(d))}catch(m){o(m)}}function u(d){try{c(n.throw(d))}catch(m){o(m)}}function c(d){d.done?a(d.value):i(d.value).then(l,u)}c((n=n.apply(t,[])).next())})}function pn(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ne(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function rr(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}var _={IS:"is",IS_NOT:"is not",CONTAINS:"contains",DOES_NOT_CONTAIN:"does not contain",LESS_THAN:"less",LESS_THAN_EQUALS:"less or equal",GREATER_THAN:"greater",GREATER_THAN_EQUALS:"greater or equal",VERSION_LESS_THAN:"version less",VERSION_LESS_THAN_EQUALS:"version less or equal",VERSION_GREATER_THAN:"version greater",VERSION_GREATER_THAN_EQUALS:"version greater or equal",SET_IS:"set is",SET_IS_NOT:"set is not",SET_CONTAINS:"set contains",SET_DOES_NOT_CONTAIN:"set does not contain",SET_CONTAINS_ANY:"set contains any",SET_DOES_NOT_CONTAIN_ANY:"set does not contain any",REGEX_MATCH:"regex match",REGEX_DOES_NOT_MATCH:"regex does not match"},Ki=function(t){for(var e=[],r=0,n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?e[r++]=i:i<2048?(e[r++]=i>>6|192,e[r++]=i&63|128):(i&64512)==55296&&n+1<t.length&&(t.charCodeAt(n+1)&64512)==56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++n)&1023),e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=i&63|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=i&63|128)}return Uint8Array.from(e)},ct=-862048943,ut=461845907,dt=15,Qi=13,Yi=5,Xi=-430675100,Ji=function(t,e){e===void 0&&(e=0);for(var r=Ki(t),n=r.length,i=n>>2,a=e,o=0;o<i;o++){var l=o<<2,u=ta(r,l);a=Zi(u,a)}var c=i<<2,d=0;switch(n-c){case 3:d^=r[c+2]<<16,d^=r[c+1]<<8,d^=r[c],d=Math.imul(d,ct),d=Ze(d,dt),d=Math.imul(d,ut),a^=d;break;case 2:d^=r[c+1]<<8,d^=r[c],d=Math.imul(d,ct),d=Ze(d,dt),d=Math.imul(d,ut),a^=d;break;case 1:d^=r[c],d=Math.imul(d,ct),d=Ze(d,dt),d=Math.imul(d,ut),a^=d;break}return a^=n,ea(a)>>>0},Zi=function(t,e){var r=t,n=e;return r=Math.imul(r,ct),r=Ze(r,dt),r=Math.imul(r,ut),n^=r,n=Ze(n,Qi),n=Math.imul(n,Yi),n+Xi|0},ea=function(t){var e=t;return e^=e>>>16,e=Math.imul(e,-2048144789),e^=e>>>13,e=Math.imul(e,-1028477387),e^=e>>>16,e},Ze=function(t,e,r){r===void 0&&(r=32),e>r&&(e=e%r);var n=4294967295<<r-e>>>0,i=(t&n)>>>0>>>r-e>>>0;return(t<<e|i)>>>0},ta=function(t,e){e===void 0&&(e=0);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return ra(r)},ra=function(t){return(t&-16777216)>>>24|(t&16711680)>>>8|(t&65280)<<8|(t&255)<<24},wr=function(t,e){var r,n;if(!(!e||e.length===0)){try{for(var i=ne(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(!o||!t||typeof t!="object")return;t=t[o]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(t!=null)return t}}
vendor: 11,154 bytes, line 11
11,na="(\\d+)\\.(\\d+)",ia="(\\d+)",aa="(-(([-\\w]+\\.?)*))?",oa="^".concat(na,"(\\.").concat(ia).concat(aa,")?$"),sa=(function(){function t(e,r,n,i){i===void 0&&(i=void 0),this.major=e,this.minor=r,this.patch=n,this.preRelease=i}return t.parse=function(e){if(e){var r=new RegExp(oa).exec(e);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i))){var a=Number(r[4])||0,o=r[5]||void 0;return new t(n,i,a,o)}}}},t.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},t})(),la=(function(){function t(){}return t.prototype.evaluate=function(e,r){var n,i,a={},o={context:e,result:a};try{for(var l=ne(r),u=l.next();!u.done;u=l.next()){var c=u.value,d=this.evaluateFlag(o,c);d&&(a[c.key]=d)}}catch(m){n={error:m}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return a},t.prototype.evaluateFlag=function(e,r){var n,i,a;try{for(var o=ne(r.segments),l=o.next();!l.done;l=o.next()){var u=l.value;if(a=this.evaluateSegment(e,r,u),a){var c=xe(xe(xe({},r.metadata),u.metadata),a.metadata);a=xe(xe({},a),{metadata:c});break}}}catch(d){n={error:d}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a},t.prototype.evaluateSegment=function(e,r,n){if(!n.conditions){var i=this.bucket(e,n);return i!==void 0?r.variants[i]:void 0}var a=this.evaluateConditions(e,n.conditions);if(a){var i=this.bucket(e,n);return i!==void 0?r.variants[i]:void 0}},t.prototype.evaluateConditions=function(e,r){var n,i,a,o;try{for(var l=ne(r),u=l.next();!u.done;u=l.next()){var c=u.value,d=!0;try{for(var m=(a=void 0,ne(c)),f=m.next();!f.done;f=m.next()){var v=f.value;if(d=this.matchCondition(e,v),!d)break}}catch(h){a={error:h}}finally{try{f&&!f.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}if(d)return!0}}catch(h){n={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return!1},t.prototype.matchCondition=function(e,r){var n=wr(e,r.selector);if(n==null)return this.matchNull(r.op,r.values);if(this.isSetOperator(r.op)){var i=this.coerceStringArray(n);return i?this.matchSet(i,r.op,r.values):!1}else{var a=this.coerceString(n);return a!==void 0?this.matchString(a,r.op,r.values):!1}},t.prototype.getHash=function(e){return Ji(e)},t.prototype.bucket=function(e,r){var n,i,a,o;if(!r.bucket)return r.variant;var l=this.coerceString(wr(e,r.bucket.selector));if(!l||l.length===0)return r.variant;var u="".concat(r.bucket.salt,"/").concat(l),c=this.getHash(u),d=c%100,m=Math.floor(c/100);try{for(var f=ne(r.bucket.allocations),v=f.next();!v.done;v=f.next()){var h=v.value,p=h.range[0],g=h.range[1];if(d>=p&&d<g)try{for(var N=(a=void 0,ne(h.distributions)),I=N.next();!I.done;I=N.next()){var y=I.value,x=y.range[0],b=y.range[1];if(m>=x&&m<b)return y.variant}}catch(k){a={error:k}}finally{try{I&&!I.done&&(o=N.return)&&o.call(N)}finally{if(a)throw a.error}}}}catch(k){n={error:k}}finally{try{v&&!v.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return r.variant},t.prototype.matchNull=function(e,r){var n=this.containsNone(r);switch(e){case _.IS:case _.CONTAINS:case _.LESS_THAN:case _.LESS_THAN_EQUALS:case _.GREATER_THAN:case _.GREATER_THAN_EQUALS:case _.VERSION_LESS_THAN:case _.VERSION_LESS_THAN_EQUALS:case _.VERSION_GREATER_THAN:case _.VERSION_GREATER_THAN_EQUALS:case _.SET_IS:case _.SET_CONTAINS:case _.SET_CONTAINS_ANY:return n;case _.IS_NOT:case _.DOES_NOT_CONTAIN:case _.SET_DOES_NOT_CONTAIN:case _.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},t.prototype.matchSet=function(e,r,n){switch(r){case _.SET_IS:return this.setEquals(e,n);case _.SET_IS_NOT:return!this.setEquals(e,n);case _.SET_CONTAINS:return this.matchesSetContainsAll(e,n);case _.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,n);case _.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,n);case _.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,n);default:return!1}},t.prototype.matchString=function(e,r,n){var i=this;switch(r){case _.IS:return this.matchesIs(e,n);case _.IS_NOT:return!this.matchesIs(e,n);case _.CONTAINS:return this.matchesContains(e,n);case _.DOES_NOT_CONTAIN:return!this.matchesContains(e,n);case _.LESS_THAN:case _.LESS_THAN_EQUALS:case _.GREATER_THAN:case _.GREATER_THAN_EQUALS:return this.matchesComparable(e,r,n,function(a){return i.parseNumber(a)},this.comparator);case _.VERSION_LESS_THAN:case _.VERSION_LESS_THAN_EQUALS:case _.VERSION_GREATER_THAN:case _.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,r,n,function(a){return sa.parse(a)},this.versionComparator);case _.REGEX_MATCH:return this.matchesRegex(e,n);case _.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,n);default:return!1}},t.prototype.matchesIs=function(e,r){if(this.containsBooleans(r)){var n=e.toLowerCase();if(n==="true"||n==="false")return r.some(function(i){return i.toLowerCase()===n})}return r.some(function(i){return e===i})},t.prototype.matchesContains=function(e,r){var n,i;try{for(var a=ne(r),o=a.next();!o.done;o=a.next()){var l=o.value;if(e.toLowerCase().includes(l.toLowerCase()))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},t.prototype.matchesComparable=function(e,r,n,i,a){var o=this,l=i(e),u=n.map(function(c){return i(c)}).filter(function(c){return c!==void 0});return l===void 0||u.length===0?n.some(function(c){return o.comparator(e,r,c)}):u.some(function(c){return a(l,r,c)})},t.prototype.comparator=function(e,r,n){switch(r){case _.LESS_THAN:case _.VERSION_LESS_THAN:return e<n;case _.LESS_THAN_EQUALS:case _.VERSION_LESS_THAN_EQUALS:return e<=n;case _.GREATER_THAN:case _.VERSION_GREATER_THAN:return e>n;case _.GREATER_THAN_EQUALS:case _.VERSION_GREATER_THAN_EQUALS:return e>=n;default:return!1}},t.prototype.versionComparator=function(e,r,n){var i=e.compareTo(n);switch(r){case _.LESS_THAN:case _.VERSION_LESS_THAN:return i<0;case _.LESS_THAN_EQUALS:case _.VERSION_LESS_THAN_EQUALS:return i<=0;case _.GREATER_THAN:case _.VERSION_GREATER_THAN:return i>0;case _.GREATER_THAN_EQUALS:case _.VERSION_GREATER_THAN_EQUALS:return i>=0;default:return!1}},t.prototype.matchesRegex=function(e,r){return r.some(function(n){return!!new RegExp(n).exec(e)})},t.prototype.containsNone=function(e){return e.some(function(r){return r==="(none)"})},t.prototype.containsBooleans=function(e){return e.some(function(r){switch(r.toLowerCase()){case"true":case"false":return!0;default:return!1}})},t.prototype.parseNumber=function(e){var r;return(r=Number(e))!==null&&r!==void 0?r:void 0},t.prototype.coerceString=function(e){if(e!=null)return typeof e=="object"?JSON.stringify(e):String(e)},t.prototype.coerceStringArray=function(e){var r=this;if(Array.isArray(e)){var n=e;return n.map(function(l){return r.coerceString(l)}).filter(Boolean)}var i=String(e);try{var a=JSON.parse(i);if(Array.isArray(a)){var n=e;return n.map(function(u){return r.coerceString(u)}).filter(Boolean)}else{var o=this.coerceString(i);return o?[o]:void 0}}catch{var o=this.coerceString(i);return o?[o]:void 0}},t.prototype.isSetOperator=function(e){switch(e){case _.SET_IS:case _.SET_IS_NOT:case _.SET_CONTAINS:case _.SET_DOES_NOT_CONTAIN:case _.SET_CONTAINS_ANY:case _.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},t.prototype.setEquals=function(e,r){var n=new Set(e),i=new Set(r);return n.size===i.size&&rr([],tr(i),!1).every(function(a){return n.has(a)})},t.prototype.matchesSetContainsAll=function(e,r){var n,i;if(e.length<r.length)return!1;try{for(var a=ne(r),o=a.next();!o.done;o=a.next()){var l=o.value;if(!this.matchesIs(l,e))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!0},t.prototype.matchesSetContainsAny=function(e,r){var n,i;try{for(var a=ne(r),o=a.next();!o.done;o=a.next()){var l=o.value;if(this.matchesIs(l,e))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},t})(),ca=function(t,e){var r,n,i=xe({},t),a=[],o=e||Object.keys(i);try{for(var l=ne(o),u=l.next();!u.done;u=l.next()){var c=u.value,d=mn(c,i);d&&a.push.apply(a,rr([],tr(d),!1))}}catch(m){r={error:m}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return a},mn=function(t,e,r){var n,i;r===void 0&&(r=[]);var a=e[t];if(a){if(!a.dependencies||a.dependencies.length===0)return delete e[a.key],[a]}else return;r.push(a.key);var o=[],l=function(m){if(r.some(function(v){return v===m}))throw Error("Detected a cycle between flags ".concat(r));var f=mn(m,e,r);f&&o.push.apply(o,rr([],tr(f),!1))};try{for(var u=ne(a.dependencies),c=u.next();!c.done;c=u.next()){var d=c.value;l(d)}}catch(m){n={error:m}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return o.push(a),r.pop(),delete e[a.key],o};const gn="3.7.7",ua=gn,Le=typeof Buffer=="function",Sr=typeof TextDecoder=="function"?new TextDecoder:void 0,Er=typeof TextEncoder=="function"?new TextEncoder:void 0,da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Xe=Array.prototype.slice.call(da),st=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Xe),fa=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Q=String.fromCharCode.bind(String),Nr=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),yn=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),bn=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),_n=t=>{let e,r,n,i,a="";const o=t.length%3;for(let l=0;l<t.length;){if((r=t.charCodeAt(l++))>255||(n=t.charCodeAt(l++))>255||(i=t.charCodeAt(l++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,a+=Xe[e>>18&63]+Xe[e>>12&63]+Xe[e>>6&63]+Xe[e&63]}return o?a.slice(0,o-3)+"===".substring(o):a},nr=typeof btoa=="function"?t=>btoa(t):Le?t=>Buffer.from(t,"binary").toString("base64"):_n,Bt=Le?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;n<i;n+=4096)r.push(Q.apply(null,t.subarray(n,n+4096)));return nr(r.join(""))},ft=(t,e=!1)=>e?yn(Bt(t)):Bt(t),ha=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Q(192|e>>>6)+Q(128|e&63):Q(224|e>>>12&15)+Q(128|e>>>6&63)+Q(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Q(240|e>>>18&7)+Q(128|e>>>12&63)+Q(128|e>>>6&63)+Q(128|e&63)}},va=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,xn=t=>t.replace(va,ha),Ar=Le?t=>Buffer.from(t,"utf8").toString("base64"):Er?t=>Bt(Er.encode(t)):t=>nr(xn(t)),Re=(t,e=!1)=>e?yn(Ar(t)):Ar(t),Ir=t=>Re(t,!0),pa=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ma=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return Q((r>>>10)+55296)+Q((r&1023)+56320);case 3:return Q((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Q((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},wn=t=>t.replace(pa,ma),Sn=t=>
11{if(t=t.replace(/\s+/g,""),!fa.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let a=0;a<t.length;)e=st[t.charAt(a++)]<<18|st[t.charAt(a++)]<<12|(n=st[t.charAt(a++)])<<6|(i=st[t.charAt(a++)]),r+=n===64?Q(e>>16&255):i===64?Q(e>>16&255,e>>8&255):Q(e>>16&255,e>>8&255,e&255);return r},ir=typeof atob=="function"?t=>atob(bn(t)):Le?t=>Buffer.from(t,"base64").toString("binary"):Sn,En=Le?t=>Nr(Buffer.from(t,"base64")):t=>Nr(ir(t).split("").map(e=>e.charCodeAt(0))),Nn=t=>En(An(t)),ga=Le?t=>Buffer.from(t,"base64").toString("utf8"):Sr?t=>Sr.decode(En(t)):t=>wn(ir(t)),An=t=>bn(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Gt=t=>ga(An(t)),ya=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},In=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),On=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,In(r));t("fromBase64",function(){return Gt(this)}),t("toBase64",function(e){return Re(this,e)}),t("toBase64URI",function(){return Re(this,!0)}),t("toBase64URL",function(){return Re(this,!0)}),t("toUint8Array",function(){return Nn(this)})},kn=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,In(r));t("toBase64",function(e){return ft(this,e)}),t("toBase64URI",function(){return ft(this,!0)}),t("toBase64URL",function(){return ft(this,!0)})},ba=()=>{On(),kn()},Ht={version:gn,VERSION:ua,atob:ir,atobPolyfill:Sn,btoa:nr,btoaPolyfill:_n,fromBase64:Gt,toBase64:Re,encode:Re,encodeURI:Ir,encodeURL:Ir,utob:xn,btou:wn,decode:Gt,isValid:ya,fromUint8Array:ft,toUint8Array:Nn,extendString:On,extendUint8Array:kn,extendBuiltins:ba};var Cn=(function(t){hn(e,t);function e(r,n){var i=t.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,e.prototype),i}return e})(Error),Vt=(function(t){hn(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e})(Error),_a=(function(){function t(e,r,n){this.deploymentKey=e,this.serverUrl=r,this.httpClient=n}return t.prototype.getVariants=function(e,r){return vn(this,void 0,void 0,function(){var n,i,a,o;return pn(this,function(l){switch(l.label){case 0:return n=Ht.encodeURL(JSON.stringify(e)),i={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},r?.flagKeys&&(i["X-Amp-Exp-Flag-Keys"]=Ht.encodeURL(JSON.stringify(r.flagKeys))),r?.trackingOption&&(i["X-Amp-Exp-Track"]=r.trackingOption),r?.exposureTrackingOption&&(i["X-Amp-Exp-Exposure-Track"]=r.exposureTrackingOption),a=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),r?.evaluationMode&&a.searchParams.append("eval_mode",r?.evaluationMode),r?.deliveryMethod&&a.searchParams.append("delivery_method",r?.deliveryMethod),[4,this.httpClient.request({requestUrl:a.toString(),method:"GET",headers:i,timeoutMillis:r?.timeoutMillis})];case 1:if(o=l.sent(),o.status!=200)throw new Cn(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},t})(),xa=(function(){function t(e,r,n){this.deploymentKey=e,this.serverUrl=r,this.httpClient=n}return t.prototype.getFlags=function(e){return vn(this,void 0,void 0,function(){var r,n,i;return pn(this,function(a){switch(a.label){case 0:return r={Authorization:"Api-Key ".concat(this.deploymentKey)},e?.libraryName&&e?.libraryVersion&&(r["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),e?.user&&(r["X-Amp-Exp-User"]=Ht.encodeURL(JSON.stringify(e.user))),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+(e?.deliveryMethod?"?delivery_method=".concat(e.deliveryMethod):""),method:"GET",headers:r,timeoutMillis:e?.timeoutMillis})];case 1:if(n=a.sent(),n.status!=200)throw Error("Flags error response: status=".concat(n.status));return i=JSON.parse(n.body),[2,i.reduce(function(o,l){return o[l.key]=l,o},{})]}})})},t})(),q=typeof globalThis<"u"?globalThis:global||self,je=function(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},wa=function(){var t=je();if(t)try{var e="EXP_test";return t.localStorage.setItem(e,e),t.localStorage.removeItem(e),!0}catch{return!1}return!1},Sa=(function(){function t(e,r){this.poller=void 0,this.action=e,this.ms=r}return t.prototype.start=function(){this.poller||(this.poller=q.setInterval(this.action,this.ms),this.action())},t.prototype.stop=function(){this.poller&&(q.clearInterval(this.poller),this.poller=void 0)},t})(),Ea=(function(){function t(){}return t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Na(),platform:"Web",os:void 0,deviceModel:void 0}},t})(),Na=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Aa=(function(){function t(){this.queue=[]}return t.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},t.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(r){e(r)}),this.queue=[])},t})(),_e=function(){return _e=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_e.apply(this,arguments)};function ht(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Or(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}var vt=function(t,e){var r,n,i=["string","number","boolean","undefined"],a=typeof t,o=typeof e;if(a!==o)return!1;try{for(var l=ht(i),u=l.next();!u.done;u=l.next()){var c=u.value;if(c===a)return t===e}}catch(g){r={error:g}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(t==null&&e==null)return!0;
vendor: 4,629 bytes, line 11
11if(t==null||e==null||t.length!==e.length)return!1;var d=Array.isArray(t),m=Array.isArray(e);if(d!==m)return!1;if(d&&m){for(var f=0;f<t.length;f++)if(!vt(t[f],e[f]))return!1}else{var v=Object.keys(t).sort(),h=Object.keys(e).sort();if(!vt(v,h))return!1;var p=!0;return Object.keys(t).forEach(function(g){vt(t[g],e[g])||(p=!1)}),p}return!0},Ia="$set",Oa="$unset",ka="$clearAll";Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),r=e.length,n=new Array(r);r--;)n[r]=[e[r],t[e[r]]];return n});var Ca=(function(){function t(){this.identity={userProperties:{}},this.listeners=new Set}return t.prototype.editIdentity=function(){var e=this,r=_e({},this.identity.userProperties),n=_e(_e({},this.identity),{userProperties:r});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var a,o,l,u,c,d,m=n.userProperties||{};try{for(var f=ht(Object.entries(i)),v=f.next();!v.done;v=f.next()){var h=Or(v.value,2),p=h[0],g=h[1];switch(p){case Ia:try{for(var N=(l=void 0,ht(Object.entries(g))),I=N.next();!I.done;I=N.next()){var y=Or(I.value,2),x=y[0],b=y[1];m[x]=b}}catch(M){l={error:M}}finally{try{I&&!I.done&&(u=N.return)&&u.call(N)}finally{if(l)throw l.error}}break;case Oa:try{for(var k=(c=void 0,ht(Object.keys(g))),F=k.next();!F.done;F=k.next()){var x=F.value;delete m[x]}}catch(M){c={error:M}}finally{try{F&&!F.done&&(d=k.return)&&d.call(k)}finally{if(c)throw c.error}}break;case ka:m={};break}}}catch(M){a={error:M}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return n.userProperties=m,this},commit:function(){return e.setIdentity(n),this}}},t.prototype.getIdentity=function(){return _e({},this.identity)},t.prototype.setIdentity=function(e){var r=_e({},this.identity);this.identity=_e({},e),vt(r,this.identity)||this.listeners.forEach(function(n){n(e)})},t.prototype.addIdentityListener=function(e){this.listeners.add(e)},t.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},t})(),We=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,ja=(function(){function t(){this.identityStore=new Ca,this.eventBridge=new Aa,this.applicationContextProvider=new Ea}return t.getInstance=function(e){return We.analyticsConnectorInstances||(We.analyticsConnectorInstances={}),We.analyticsConnectorInstances[e]||(We.analyticsConnectorInstances[e]=new t),We.analyticsConnectorInstances[e]},t})(),Je={exports:{}},Ta=Je.exports,kr;function Pa(){return kr||(kr=1,(function(t,e){(function(r,n){var i="0.7.33",a="",o="?",l="function",u="undefined",c="object",d="string",m="major",f="model",v="name",h="type",p="vendor",g="version",N="architecture",I="console",y="mobile",x="tablet",b="smarttv",k="wearable",F="embedded",M=350,H="Amazon",S="Apple",L="ASUS",he="BlackBerry",oe="Browser",ve="Chrome",tt="Edge",Ne="Firefox",Ae="Google",Ue="Huawei",De="LG",Fe="Microsoft",Be="Motorola",re="Opera",Ge="Samsung",rt="Sharp",Ie="Sony",He="Xiaomi",Ve="Zebra",qe="Facebook",Et=function(A,T){var C={};for(var G in A)T[G]&&T[G].length%2===0?C[G]=T[G].concat(A[G]):C[G]=A[G];return C},Oe=function(A){for(var T={},C=0;C<A.length;C++)T[A[C].toUpperCase()]=A[C];return T},nt=function(A,T){return typeof A===d?ke(T).indexOf(ke(A))!==-1:!1},ke=function(A){return A.toLowerCase()},Nt=function(A){return typeof A===d?A.replace(/[^\d\.]/g,a).split(".")[0]:n},ze=function(A,T){if(typeof A===d)return A=A.replace(/^\s\s*/,a),typeof T===u?A:A.substring(0,M)},pe=function(A,T){for(var C=0,G,j,me,B,Ce,de;C<T.length&&!Ce;){var or=T[C],sr=T[C+1];for(G=j=0;G<or.length&&!Ce;)if(Ce=or[G++].exec(A),Ce)for(me=0;me<sr.length;me++)de=Ce[++j],B=sr[me],typeof B===c&&B.length>0?B.length===2?typeof B[1]==l?this[B[0]]=B[1].call(this,de):this[B[0]]=B[1]:B.length===3?typeof B[1]===l&&!(B[1].exec&&B[1].test)?this[B[0]]=de?B[1].call(this,de,B[2]):n:this[B[0]]=de?de.replace(B[1],B[2]):n:B.length===4&&(this[B[0]]=de?B[3].call(this,de.replace(B[1],B[2])):n):this[B]=de||n;C+=2}},Te=function(A,T){for(var C in T)if(typeof T[C]===c&&T[C].length>0){for(var G=0;G<T[C].length;G++)if(nt(T[C][G],A))return C===o?n:C}else if(nt(T[C],A))return C===o?n:C;return A},At={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},it={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$e={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[g,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[g,[v,"E
11dge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,g],[/opios[\/ ]+([\w\.]+)/i],[g,[v,re+" Mini"]],[/\bopr\/([\w\.]+)/i],[g,[v,re]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[v,g],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[g,[v,"UC"+oe]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[g,[v,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[g,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[g,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[g,[v,"IE"]],[/yabrowser\/([\w\.]+)/i],[g,[v,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+oe],g],[/\bfocus\/([\w\.]+)/i],[g,[v,Ne+" Focus"]],[/\bopt\/([\w\.]+)/i],[g,[v,re+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[g,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[g,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[g,[v,re+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[g,[v,"MIUI "+oe]],[/fxios\/([-\w\.]+)/i],[g,[v,Ne]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360 "+oe]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1 "+oe],g],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],g],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[v,g],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,qe],g],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[v,g],[/\bgsa\/([\w\.]+) .*safari\//i],[g,[v,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[g,[v,ve+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,ve+" WebView"],g],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[g,[v,"Android "+oe]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,g],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[g,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[g,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[g,Te,At]],[/(webkit|khtml)\/([\w\.]+)/i],[v,g],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],g],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[g,[v,Ne+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[v,g],[/(cobalt)\/([\w\.]+)/i],[v,[g,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[N,"amd64"]],[/(ia32(?=;))/i],[[N,ke]],[/((?:i[346]|x)86)[;\)]/i],[[N,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[N,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[N,"armhf"]],[/windows (ce|mobile); ppc;/i],[[N,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[N,/ower/,a,ke]],[/(sun4\w)[;\)]/i],[[N,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[N,ke]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[p,Ge],[h,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[p,Ge],[h,y]],[/((ipod|iphone)\d+,\d+)/i],[f,[p,S],[h,y]],[/(ipad\d+,\d+)/i],[f,[p,S],[h,x]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[p,S],[h,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[p,S],[h,x]],[/(macintosh);/i],[f,[p,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[p,Ue],[h,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[p,Ue],[h,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[p,He],[h,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[p,He],[h,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[p,"OPPO"],[h,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[p,"Vivo"],[h,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[p,"Realme"],[h,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[p,Be],[h,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[p,Be],[h,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[p,De],[h,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[p,De],[h,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[p,"Lenovo"],[h,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[p,"Nokia"],[h,y]],[/(pixel c)\b/i],[f,[p,Ae],[h,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[p,Ae],[h,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[p,Ie],[h,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[p,Ie],[h,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[p,"OnePlus"],[h,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[p,H],[h,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[p,H],[h,y]],[/(playbook);[-\w\),; ]+(rim)/i],[f,p,[h,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[p,he],[h,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[p,L],[h,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[p,L],[h,y]],[/(nexus 9)/i],[f,[p,"HTC"],[h,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[f,/_/g," "],[h,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[p,"Acer"],[h,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[p,"Meizu"],[h,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[p,rt],[h,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 7,465 bytes, line 11
11s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,f,[h,y]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,f,[h,x]],[/(surface duo)/i],[f,[p,Fe],[h,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[p,"Fairphone"],[h,y]],[/(u304aa)/i],[f,[p,"AT&T"],[h,y]],[/\bsie-(\w*)/i],[f,[p,"Siemens"],[h,y]],[/\b(rct\w+) b/i],[f,[p,"RCA"],[h,x]],[/\b(venue[\d ]{2,7}) b/i],[f,[p,"Dell"],[h,x]],[/\b(q(?:mv|ta)\w+) b/i],[f,[p,"Verizon"],[h,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[p,"Barnes & Noble"],[h,x]],[/\b(tm\d{3}\w+) b/i],[f,[p,"NuVision"],[h,x]],[/\b(k88) b/i],[f,[p,"ZTE"],[h,x]],[/\b(nx\d{3}j) b/i],[f,[p,"ZTE"],[h,y]],[/\b(gen\d{3}) b.+49h/i],[f,[p,"Swiss"],[h,y]],[/\b(zur\d{3}) b/i],[f,[p,"Swiss"],[h,x]],[/\b((zeki)?tb.*\b) b/i],[f,[p,"Zeki"],[h,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],f,[h,x]],[/\b(ns-?\w{0,9}) b/i],[f,[p,"Insignia"],[h,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[p,"NextBook"],[h,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],f,[h,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],f,[h,y]],[/\b(ph-1) /i],[f,[p,"Essential"],[h,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[p,"Envizen"],[h,x]],[/\b(trio[-\w\. ]+) b/i],[f,[p,"MachSpeed"],[h,x]],[/\btu_(1491) b/i],[f,[p,"Rotor"],[h,x]],[/(shield[\w ]+) b/i],[f,[p,"Nvidia"],[h,x]],[/(sprint) (\w+)/i],[p,f,[h,y]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[p,Fe],[h,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[p,Ve],[h,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[p,Ve],[h,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,f,[h,I]],[/droid.+; (shield) bui/i],[f,[p,"Nvidia"],[h,I]],[/(playstation [345portablevi]+)/i],[f,[p,Ie],[h,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[p,Fe],[h,I]],[/smart-tv.+(samsung)/i],[p,[h,b]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[p,Ge],[h,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,De],[h,b]],[/(apple) ?tv/i],[p,[f,S+" TV"],[h,b]],[/crkey/i],[[f,ve+"cast"],[p,Ae],[h,b]],[/droid.+aft(\w)( bui|\))/i],[f,[p,H],[h,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[p,rt],[h,b]],[/(bravia[\w ]+)( bui|\))/i],[f,[p,Ie],[h,b]],[/(mitv-\w{5}) bui/i],[f,[p,He],[h,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,ze],[f,ze],[h,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,b]],[/((pebble))app/i],[p,f,[h,k]],[/droid.+; (glass) \d/i],[f,[p,Ae],[h,k]],[/droid.+; (wt63?0{2,3})\)/i],[f,[p,Ve],[h,k]],[/(quest( 2)?)/i],[f,[p,qe],[h,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,F]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[h,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[h,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,y]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[g,[v,tt+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[g,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[v,g],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[g,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,g],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[v,[g,Te,it]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,"Windows"],[g,Te,it]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[g,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,"Mac OS"],[g,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[g,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,g],[/\(bb(10);/i],[g,[v,he]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[g,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[g,[v,Ne+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[g,[v,"webOS"]],[/crkey\/([\d\.]+)/i],[g,[v,ve+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[v,"Chromium OS"],g],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,g],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],g],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[v,g]]},ee=function(A,T){if(typeof A===c&&(T=A,A=n),!(this instanceof ee))return new ee(A,T).getResult();var C=A||(typeof r!==u&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:a),G=T?Et($e,T):$e;return this.getBrowser=function(){var j={};return j[v]=n,j[g]=n,pe.call(j,C,G.browser),j.major=Nt(j.version),j},this.getCPU=function(){var j={};return j[N]=n,pe.call(j,C,G.cpu),j},this.getDevice=function(){var j={};return j[p]=n,j[f]=n,j[h]=n,pe.call(j,C,G.device),j},this.getEngine=function(){var j={};return j[v]=n,j[g]=n,pe.call(j,C,G.engine),j},this.getOS=function(){var j={};return j[v]=n,j[g]=n,pe.call(j,C,G.os),j},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return C},this.setUA=function(j){return C=typeof j===d&&j.length>M?ze(j,M):j,this},this.setUA(C),this};ee.VERSION=i,ee.BROWSER=Oe([v,g,m]),ee.CPU=Oe([N]),ee.DEVICE=Oe([f,p,h,I,y,b,x,k,F]),ee.ENGINE=ee.OS=Oe([v,g]),t.exports&&(e=t.exports=ee),e.UAParser=ee;var O=typeof r!==u&&(r.jQuery||r.Zepto);if(O&&!O.ua){var P=new ee;O.ua=P.getResult(),O.ua.get=function(){return P.getUA()},O.ua.set=function(A){P.setUA(A);var T=P.getResult();for(var C in T)O.ua[C]=T[C]}}})(typeof window=="object"?window:Ta)})(Je,Je.exports)),Je.exports}var Ra=Pa(),U=function(){return U=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},U.apply(this,arguments)};function W(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(d){try{c(n.next(d))}catch(m){o(m)}}function u(d){try{c(n.throw(d))}catch(m){o(m)}}function c(d){d.done?a(d.value):i(d.value).then(l,u)}c((n=n.apply(t,e||[])).next())})}function K(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);
vendor: 6,771 bytes, line 11
11return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ee(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function ie(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}var Cr=function(t,e){var r,n;e===void 0&&(e=!1);var i=ar(t,e),a=void 0,o=q.document.cookie.split("; ");try{for(var l=Ee(o),u=l.next();!u.done;u=l.next()){var c=u.value,d=X(c.split("=",2),2),m=d[0],f=d[1];m===i&&(a=decodeURIComponent(f))}}catch(g){r={error:g}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(a)try{if(e){var v=atob(a);return JSON.parse(decodeURIComponent(v))}var h=a.split("."),p=void 0;return h.length>=2&&h[1]&&(p=atob(h[1])),{deviceId:h[0],userId:p}}catch{return}},Ma=function(t){var e=ar(t,!0);try{var r=q.localStorage.getItem(e);if(!r)return;var n=JSON.parse(r);return typeof n!="object"?void 0:n}catch{return}},La=function(t){var e=ar(t,!0);try{var r=q.sessionStorage.getItem(e);if(!r)return;var n=JSON.parse(r);return typeof n!="object"?void 0:n}catch{return}},ar=function(t,e){if(e)return t?.length<10?void 0:"AMP_".concat(t.substring(0,10));if(!(t?.length<6))return"amp_".concat(t.substring(0,6))},Ua=(function(){function t(e,r,n){this.type="integration",this.apiKey=e,this.identityStore=r.identityStore,this.eventBridge=r.eventBridge,this.contextProvider=r.applicationContextProvider,this.timeoutMillis=n,this.loadPersistedState(),n<=0&&(this.setup=void 0)}return t.prototype.setup=function(e,r){return W(this,void 0,void 0,function(){return K(this,function(n){return e?.automaticFetchOnAmplitudeIdentityChange&&this.identityStore.addIdentityListener(function(){r?.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},t.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},t.prototype.track=function(e){return this.eventBridge.receiver?(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0):!1},t.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=Cr(this.apiKey,!0);return e?(this.commitIdentityToConnector(e),!0):(e=Cr(this.apiKey,!1),e?(this.commitIdentityToConnector(e),!0):(e=Ma(this.apiKey),e?(this.commitIdentityToConnector(e),!0):(e=La(this.apiKey),e?(this.commitIdentityToConnector(e),!0):!1)))},t.prototype.commitIdentityToConnector=function(e){var r=this.identityStore.editIdentity();r.setDeviceId(e.deviceId),e.userId&&r.setUserId(e.userId),r.commit()},t.prototype.waitForConnectorIdentity=function(e){return W(this,void 0,void 0,function(){var r,n=this;return K(this,function(i){return r=this.identityStore.getIdentity(),!r.userId&&!r.deviceId?[2,Promise.race([new Promise(function(a){var o=function(){a(),n.identityStore.removeIdentityListener(o)};n.identityStore.addIdentityListener(o)}),new Promise(function(a,o){q.setTimeout(o,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]:[2]})})},t})();function Da(t,e){return e=e||{},new Promise(function(r,n){var i=new XMLHttpRequest,a=[],o=[],l={},u=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return a},entries:function(){return o},get:function(d){return l[d.toLowerCase()]},has:function(d){return d.toLowerCase()in l}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(d,m,f){a.push(m=m.toLowerCase()),o.push([m,f]),l[m]=l[m]?l[m]+","+f:f}),r(u())},i.onerror=n,i.withCredentials=e.credentials=="include",e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)})}var Fa=q.fetch||Da,Ba=function(t,e){return e==null||e<=0?t:new Promise(function(r,n){q.setTimeout(function(){n(new Vt("Request timeout after "+e+" milliseconds"))},e),t.then(r,n)})},Ga=function(t,e,r,n,i){var a=function(){return W(void 0,void 0,void 0,function(){var o,l,u;return K(this,function(c){switch(c.label){case 0:return[4,Fa(t,{method:e,headers:r,body:n})];case 1:return o=c.sent(),u={status:o.status},[4,o.text()];case 2:return l=(u.body=c.sent(),u),[2,l]}})})};return Ba(a(),i)},Ha=(function(){function t(e){this.client=e}return t.prototype.request=function(e){return W(this,void 0,void 0,function(){return K(this,function(r){switch(r.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,r.sent()]}})})},t})(),jn={request:Ga},ce;(function(t){t[t.Disable=0]="Disable",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Info=3]="Info",t[t.Debug=4]="Debug",t[t.Verbose=5]="Verbose"})(ce||(ce={}));var ge;(function(t){t.LocalStorage="localStorage",t.InitialVariants="initialVariants"})(ge||(ge={}));var $;(function(t){t.LocalStorage="storage",t.InitialVariants="initial",t.SecondaryLocalStorage="secondary-storage",t.SecondaryInitialVariants="secondary-initial",t.FallbackInline="fallback-inline",t.FallbackConfig="fallback-config",t.L
vendor: 16,384 bytes, line 11
11ocalEvaluation="local-evaluation"})($||($={}));var jr=function(t){return!t||t===$.FallbackInline||t===$.FallbackConfig||t===$.SecondaryInitialVariants},Pe={debug:!1,logLevel:ce.Error,loggerProvider:null,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:ge.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,throwOnError:!1,automaticExposureTracking:!0,pollOnStart:!0,flagConfigPollingIntervalMillis:3e5,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:jn},Tr="1.20.3",Va=512,qa=(function(){function t(e,r){var n=this,i;this.isReady=new Promise(function(o){n.resolve=o}),this.config=e,this.client=r;var a=(i=e.instanceName)!==null&&i!==void 0?i:Pe.instanceName;this.queue=new $a(a),this.cache=new za(a)}return t.prototype.ready=function(){return this.integration?this.isReady:Promise.resolve()},t.prototype.setIntegration=function(e){var r=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){r.queue.setTracker(r.integration.track.bind(e)),r.resolve()},function(){r.queue.setTracker(r.integration.track.bind(e)),r.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},t.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},t.prototype.track=function(e,r){if(this.cache.shouldTrack(e,r)){var n=this.getExposureEvent(e);this.queue.push(n)}},t.prototype.getExposureEvent=function(e){var r,n,i,a={eventType:"$exposure",eventProperties:e};return!((r=e.metadata)===null||r===void 0)&&r.exposureEvent?a={eventType:(n=e.metadata)===null||n===void 0?void 0:n.exposureEvent,eventProperties:e}:((i=e.metadata)===null||i===void 0?void 0:i.deliveryMethod)==="web"&&(a={eventType:"$impression",eventProperties:e}),a},t})(),za=(function(){function t(e){this.isSessionStorageAvailable=Wa(),this.inMemoryCache={},this.identity={},this.storageKey="EXP_sent_v3_".concat(e),this.isSessionStorageAvailable&&(q.sessionStorage.removeItem("EXP_sent_".concat(e)),q.sessionStorage.removeItem("EXP_sent_v2_".concat(e)))}return t.prototype.shouldTrack=function(e,r){var n,i;if(((n=e.metadata)===null||n===void 0?void 0:n.deliveryMethod)==="web")return!0;var a={userId:r?.user_id,deviceId:r?.device_id};this.identityEquals(this.identity,a)||this.clearCache(),this.identity=a,this.loadCache();var o=e.flag_key in this.inMemoryCache,l=this.inMemoryCache[e.flag_key],u=(i=e.variant)!==null&&i!==void 0?i:null,c=l??null,d=!1;return(!o||c!==u)&&(d=!0,this.inMemoryCache[e.flag_key]=u),this.storeCache(),d},t.prototype.clearCache=function(){this.inMemoryCache={},this.isSessionStorageAvailable&&q.sessionStorage.removeItem(this.storageKey)},t.prototype.identityEquals=function(e,r){return e.userId&&r.userId?e.userId===r.userId:!e.userId&&!r.userId?e.deviceId===r.deviceId:!1},t.prototype.loadCache=function(){if(this.isSessionStorageAvailable){var e=q.sessionStorage.getItem(this.storageKey);this.inMemoryCache=e?JSON.parse(e):{}}},t.prototype.storeCache=function(){if(this.isSessionStorageAvailable)try{q.sessionStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))}catch{}},t})(),$a=(function(){function t(e,r){r===void 0&&(r=Va),this.isLocalStorageAvailable=wa(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=r}return t.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},t.prototype.setTracker=function(e){var r=this;this.tracker=e,this.poller=q.setInterval(function(){r.loadFlushStore()},1e3),this.loadFlushStore()},t.prototype.flush=function(){if(this.tracker&&this.inMemoryQueue.length!==0){for(var e=0;e<this.inMemoryQueue.length;e++)try{if(!this.tracker(this.inMemoryQueue[e]))break}catch{break}this.inMemoryQueue=this.inMemoryQueue.slice(e),this.inMemoryQueue.length===0&&this.poller&&(q.clearInterval(this.poller),this.poller=void 0)}},t.prototype.loadQueue=function(){if(this.isLocalStorageAvailable){var e=q.localStorage.getItem(this.storageKey);this.inMemoryQueue=e?JSON.parse(e):[]}},t.prototype.storeQueue=function(){this.isLocalStorageAvailable&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),q.localStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},t.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},t})(),Wa=function(){var t=je();if(t)try{var e="EXP_test";return t.sessionStorage.setItem(e,e),t.sessionStorage.removeItem(e),!0}catch{return!1}return!1},Ka=(function(){function t(e,r){r===void 0&&(r=ce.Error),this.logger=e,this.logLevel=r}return t.prototype.error=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=ce.Error&&(r=this.logger).error.apply(r,ie([e],X(n),!1))},t.prototype.warn=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=ce.Warn&&(r=this.logger).warn.apply(r,ie([e],X(n),!1))},t.prototype.info=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=ce.Info&&(r=this.logger).info.apply(r,ie([e],X(n),!1))},t.prototype.debug=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=ce.Debug&&(r=this.logger).debug.apply(r,ie([e],X(n),!1))},t.prototype.verbose=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=ce.Verbose&&(r=this.logger).verbose.apply(r,ie([e],X(n),!1))},t})(),Qa=(function(){function t(){}return t.prototype.error=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.error.apply(console,ie([e],X(r),!1))},t.prototype.warn=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.warn.apply(console,ie([e],X(r),!1))},t.prototype.info=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.info.apply(console,ie([e],X(r),!1))},t.prototype.debug=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.debug.apply(console,ie([e],X(r),!1))},t.prototype.verbose=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.debug.apply(console,ie([e],X(r),!1))},t})(),St=(function(){function t(){this.globalScope=je()}return t.prototype.get=function(e){var r;return(r=this.globalScope)===null||r===void 0?void 0:r.localStorage.getItem(e)},t.prototype.put=function(e,r){var n;(n=this.globalScope)===null||n===void 0||n.localStorage.setItem(e,r)},t.prototype.delete=function(e){var r;(r=this.globalScope)===null||r===void 0||r.localStorage.removeItem(e)},t})(),Ya=function(t,e,r){var n=t.substring(t.length-6),i="amp-exp-".concat(e,"-").concat(n);return new Tn(i,r,Pn)},Xa=function(t,e,r){r===void 0&&(r=new St);var n=t.substring(t.length-6),i="amp-exp-".concat(e,"-").concat(n,"-flags");return new Tn(i,r)},Ja=function(t,e,r){r===void 0&&(r=new St);var n=t.substring(t.length-6),i="amp-exp-".concat(e,"-").concat(n,"-variants-options");return new Za(i,r)},Za=(function(){function t(e,r){this.namespace=e,this.storage=r}return t.prototype.get=function(){return this.value},t.prototype.put=function(e){this.value=e},t.prototype.load=function(){var e=this.storage.get(this.namespace);e&&(this.value=JSON.parse(e))},t.prototype.store=function(){this.value===void 0?this.storage.delete(this.namespace):this.storage.put(this.namespace,JSON.stringify(this.value))},t})(),Tn=(function(){function t(e,r,n){this.cache={},this.namespace=e,this.storage=r,this.transformer=n}return t.prototype.get=function(e){return this.cache[e]},t.prototype.getAll=function(){return U({},this.cache)},t.prototype.put=function(e,r){this.cache[e]=r},t.prototype.putAll=function(e){var r,n;try{for(var i=Ee(Object.keys(e)),a=i.next();!a.done;a=i.next()){var o=a.value;this.cache[o]=e[o]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.remove=function(e){delete this.cache[e]},t.prototype.clear=function(){this.cache={}},t.prototype.load=function(){var e,r,n=this.storage.get(this.namespace),i;try{i=JSON.parse(n)||{}}catch{return}var a={};try{for(var o=Ee(Object.keys(i)),l=o.next();!l.done;l=o.next()){var u=l.value;try{var c=void 0;this.transformer?c=this.transformer(i[u]):c=i[u],c&&(a[u]=c)}catch{}}}catch(d){e={error:d}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(a)},t.prototype.store=function(e){e===void 0&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},t})(),Pn=function(t){if(typeof t=="string")return{key:t,value:t};if(typeof t=="object"){var e=t.key,r=t.value,n=t.payload,i=t.metadata,a=t.expKey;i&&i.experimentKey?a=i.experimentKey:a&&(i=i||{},i.experimentKey=a);var o={};return e?o.key=e:r&&(o.key=r),r&&(o.value=r),i&&(o.metadata=i),n&&(o.payload=n),a&&(o.expKey=a),o}},Rn=(function(){function t(){this.globalScope=je()}return t.prototype.get=function(e){var r;return(r=this.globalScope)===null||r===void 0?void 0:r.sessionStorage.getItem(e)},t.prototype.put=function(e,r){var n;(n=this.globalScope)===null||n===void 0||n.sessionStorage.setItem(e,r)},t.prototype.delete=function(e){var r;(r=this.globalScope)===null||r===void 0||r.sessionStorage.removeItem(e)},t})(),eo=function(t,e,r,n){var i,a="[Experiment] Exposure",o=r?.value,l="[Experiment] ".concat(e);return{name:a,user:t,key:e,variant:r,userProperty:l,properties:{key:e,variant:o,source:n},userProperties:(i={},i[l]=o,i)}},se=function(t){return t==null},jt=function(t){return se(t)?!0:t&&Object.keys(t).length===0},to=function(t){var e,r;if(!t||typeof t!="object")return{};var n={};try{for(var i=Ee(Object.entries(t)),a=i.next();!a.done;a=i.next()){var o=X(a.value,2),l=o[0],u=o[1];se(u)||(n[l]=u)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n},Pr=function(t){var e;return((e=t?.metadata)===null||e===void 0?void 0:e.evaluationMode)==="local"},ro=(function(){function t(e,r,n,i){this.started=!1,this.done=!1,this.attempts=e,this.min=r,this.max=n,this.scalar=i}return t.prototype.start=function(e){return W(this,void 0,void 0,function(){return K(this,function(r){switch(r.label){case 0:if(!this.started)this.started=!0;else throw Error("Backoff already started");return[4,this.backoff(e,0,this.min)];case 1:return r.sent(),[2]}})})},t.prototype.cancel=function(){this.done=!0,clearTimeout(this.timeoutHandle)},t.prototype.backoff=function(e,r,n){return W(this,void 0,void 0,function(){var i=this;return K(this,function(a){return this.done?[2]:(this.timeoutHandle=q.setTimeout(function(){return W(i,void 0,void 0,function(){var o,l;return K(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,e()];case 1:return u.sent(),[3,3];case 2:return u.sent(),o=r+1,o<this.attempts&&(l=Math.min(n*this.scalar,this.max),this.backoff(e,o,l)),[3,3];case 3:return[2]}})})},n),[2])})})},t})(),no=function(t){var e,r,n,i;if(!t)return{};var a={user:t},o=je();o&&(a.page={url:o.location.href});var l={};if(!t.groups)return a;try{for(var u=Ee(Object.keys(t.groups)),c=u.next();!c.done;c=u.next()){var d=c.value,m=t.groups[d];if(m.length>0&&m[0]){var f=m[0],v={group_name:f},h=(i=(n=t.group_properties)===null||n===void 0?void 0:n[d])===null||i===void 0?void 0:i[f];h&&Object.keys(h).length>0&&(v.group_properties=h),l[d]=v}}}catch(p){e={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return Object.keys(l).length>0&&(a.groups=l),delete a.user.groups,delete a.user.group_properties,a},J=function(t){return t==null?{}:typeof t=="string"?{key:t,value:t}:t},Rr=function(t){if(!t)return{};var e=void 0;t.metadata&&(e=t.metadata.experimentKey);var r={};return t.key&&(r.key=t.key),t.value&&(r.value=t.value),t.payload&&(r.payload=t.payload),e&&(r.expKey=e),t.metadata&&(r.metadata=t.metadata),r},io=(function(){function t(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return t.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},t.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},t.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},t})(),ao=(function(){function t(e){this.tracked={},this.identity={},this.exposureTrackingProvider=e}return t.prototype.track=function(e,r){var n={userId:r?.user_id,deviceId:r?.device_id};this.identityEquals(this.identity,n)||(this.tracked={}),this.identity=n;var i=e.flag_key in this.tracked,a=this.tracked[e.flag_key];i&&a===e.variant||(this.tracked[e.flag_key]=e.variant,this.exposureTrackingProvider.track(e))},t.prototype.identityEquals=function(e,r){return e.userId===r.userId&&e.deviceId===r.deviceId},t})(),oo=1e4,so=8,lo=500,co=1e4,uo=1.5,Mr=6e4,fo="https://api.lab.eu.amplitude.com",ho="https://flag.lab.eu.amplitude.com",vo=(function(){function t(e,r){var n=this,i,a,o,l;this.engine=new la,this.isRunning=!1,this.apiKey=e,r=to(r),this.config=U(U(U({},Pe),r),{serverUrl:r?.serverUrl||(((i=r?.serverZone)===null||i===void 0?void 0:i.toLowerCase())==="eu"?fo:Pe.serverUrl),flagsServerUrl:r?.flagsServerUrl||(((a=r?.serverZone)===null||a===void 0?void 0:a.toLowerCase())==="eu"?ho:Pe.flagsServerUrl),flagConfigPollingIntervalMillis:r.flagConfigPollingIntervalMillis<Mr?Mr:(o=r.flagConfigPollingIntervalMillis)!==null&&o!==void 0?o:Pe.flagConfigPollingIntervalMillis}),this.logger=new Ka(this.config.loggerProvider||new Qa,t.getLogLevel(r));var u=(l=this.config)===null||l===void 0?void 0:l.internalInstanceNameSuffix;if(this.isWebExperiment=u==="web",this.poller=new Sa(function(){return n.doFlags()},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var c in this.config.initialVariants)this.config.initialVariants[c]=Pn(this.config.initialVariants[c]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new io(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new ao(this.config.exposureTrackingProvider)),this.integrationManager=new qa(this.config,this);var d=new Ha(this.config.httpClient||jn);this.flagApi=new xa(this.apiKey,this.config.flagsServerUrl,d),this.evaluationApi=new _a(this.apiKey,this.config.serverUrl,d);var m,f=u?"".concat(this.config.instanceName,"-").concat(u):this.config.instanceName;this.isWebExperiment?m=new Rn:m=new St,this.variants=Ya(this.apiKey,f,m),this.flags=Xa(this.apiKey,f,m),this.fetchVariantsOptions=Ja(this.apiKey,f,m);try{this.flags.load(),this.variants.load(),this.fetchVariantsOptions.load()}catch{}this.mergeInitialFlagsWithStorage()}return t.prototype.start=function(e){return W(this,void 0,void 0,function(){var r,n,i,a;return K(this,function(o){switch(o.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(e),o.label=1;case 1:return o.trys.push([1,6,,7]),r=this.doFlags(),n=(a=this.config.fetchOnStart)!==null&&a!==void 0?a:!0,n?[4,Promise.all([this.fetch(e),r])]:[3,3];case 2:return o.sent(),[3,5];case 3:return[4,r];case 4:o.sent(),o.label=5;case 5:return[3,7];case 6:if(i=o.sent(),this.config.throwOnError)throw i;return[3,7];case 7:return this.config.pollOnStart&&this.poller.start(),[2]}})})},t.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},t.prototype.fetch=function(){return W(this,arguments,void 0,function(e,r){var n;return e===void 0&&(e=this.user),K(this,function(i){switch(i.label){case 0:this.setUser(e||{}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,r)];case 2:return i.sent(),[3,4];case 3:if(n=i.sent(),this.config.throwOnError)throw n;return n instanceof Vt?this.logger.debug(n):this.logger.error(n),[3,4];case 4:return[2,this]}})})},t.prototype.variant=function(e,r){var n,i;if(!this.apiKey)return{value:void 0};var a=this.variantAndSource(e,r);
vendor: 11,007 bytes, line 11
11return this.config.automaticExposureTracking&&this.exposureInternal(e,a),this.logger.debug("[Experiment] variant for ".concat(e," is ").concat(((n=a.variant)===null||n===void 0?void 0:n.key)||((i=a.variant)===null||i===void 0?void 0:i.value))),a.variant||{}},t.prototype.exposure=function(e){var r=this.variantAndSource(e);this.exposureInternal(e,r)},t.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var r in e){var n=this.flags.get(r);Pr(n)||delete e[r]}return U(U(U({},this.secondaryVariants()),this.sourceVariants()),e)},t.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch{}},t.prototype.getUser=function(){var e;if(!this.user)return this.user;if(!((e=this.user)===null||e===void 0)&&e.user_properties){var r=U({},this.user.user_properties);return U(U({},this.user),{user_properties:r})}else return U({},this.user)},t.prototype.setUser=function(e){var r;if(!e){this.user=null;return}if(!((r=this.user)===null||r===void 0)&&r.user_properties){var n=U({},e.user_properties);this.user=U(U({},e),{user_properties:n})}else this.user=U({},e)},t.prototype.getUserProvider=function(){return this.userProvider},t.prototype.setUserProvider=function(e){return this.userProvider=e,this},t.prototype.mergeInitialFlagsWithStorage=function(){var e=this;if(this.config.initialFlags){var r=JSON.parse(this.config.initialFlags);r.forEach(function(n){e.flags.get(n.key)||e.flags.put(n.key,n)})}},t.prototype.evaluate=function(e){var r,n,i=this.addContext(this.user),a=ca(this.flags.getAll(),e),o=no(i),l=this.engine.evaluate(o,a),u={};try{for(var c=Ee(Object.keys(l)),d=c.next();!d.done;d=c.next()){var m=d.value;u[m]=Rr(l[m])}}catch(f){r={error:f}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return u},t.prototype.variantAndSource=function(e,r){var n={};this.config.source===ge.LocalStorage?n=this.localStorageVariantAndSource(e,r):this.config.source===ge.InitialVariants&&(n=this.initialVariantsVariantAndSource(e,r));var i=this.flags.get(e);return(Pr(i)||!n.variant&&i)&&(n=this.localEvaluationVariantAndSource(e,i,r)),n},t.prototype.localEvaluationVariantAndSource=function(e,r,n){var i,a={},o=this.evaluate([r.key])[e],l=$.LocalEvaluation,u=(i=o?.metadata)===null||i===void 0?void 0:i.default;if(!se(o)&&!u)return{variant:J(o),source:l,hasDefaultVariant:!1};if(u&&(a={variant:J(o),source:l,hasDefaultVariant:!0}),!se(n))return{variant:J(n),source:$.FallbackInline,hasDefaultVariant:a.hasDefaultVariant};var c=this.config.initialVariants[e];if(!se(c))return{variant:J(c),source:$.SecondaryInitialVariants,hasDefaultVariant:a.hasDefaultVariant};var d=J(this.config.fallbackVariant),m={variant:d,source:$.FallbackConfig,hasDefaultVariant:a.hasDefaultVariant};return jt(d)?a:m},t.prototype.localStorageVariantAndSource=function(e,r){var n,i={},a=this.variants.get(e),o=(n=a?.metadata)===null||n===void 0?void 0:n.default;if(!se(a)&&!o)return{variant:J(a),source:$.LocalStorage,hasDefaultVariant:!1};if(o&&(i={variant:J(a),source:$.LocalStorage,hasDefaultVariant:!0}),!se(r))return{variant:J(r),source:$.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var l=this.config.initialVariants[e];if(!se(l))return{variant:J(l),source:$.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var u=J(this.config.fallbackVariant),c={variant:u,source:$.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return jt(u)?i:c},t.prototype.initialVariantsVariantAndSource=function(e,r){var n,i={},a=this.config.initialVariants[e];if(!se(a))return{variant:J(a),source:$.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),l=(n=o?.metadata)===null||n===void 0?void 0:n.default;if(!se(o)&&!l)return{variant:J(o),source:$.LocalStorage,hasDefaultVariant:!1};if(l&&(i={variant:J(o),source:$.LocalStorage,hasDefaultVariant:!0}),!se(r))return{variant:J(r),source:$.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var u=J(this.config.fallbackVariant),c={variant:u,source:$.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return jt(u)?i:c},t.prototype.fetchInternal=function(e,r,n,i){return W(this,void 0,void 0,function(){var a,o,l;return K(this,function(u){switch(u.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.logger.debug("[Experiment] Fetch all: retry=".concat(n)),n&&this.stopRetries(),u.label=1;case 1:return u.trys.push([1,4,,5]),[4,this.doFetch(e,r,U({trackingOption:(l=this.fetchVariantsOptions.get())===null||l===void 0?void 0:l.trackingOption},i))];case 2:return a=u.sent(),[4,this.storeVariants(a,i)];case 3:return u.sent(),[2,a];case 4:throw o=u.sent(),n&&this.shouldRetryFetch(o)&&this.startRetries(e,i),o;case 5:return[2]}})})},t.prototype.setTracksAssignment=function(e){return W(this,void 0,void 0,function(){return K(this,function(r){return this.fetchVariantsOptions.put(U(U({},this.fetchVariantsOptions.get()||{}),{trackingOption:e?"track":"no-track"})),this.fetchVariantsOptions.store(),[2]})})},t.prototype.cleanUserPropsForFetch=function(e){var r=U({},e);return delete r.cookie,r},t.prototype.doFetch=function(e,r,n){return W(this,void 0,void 0,function(){var i,a,o,l,u,c,d;return K(this,function(m){switch(m.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=m.sent(),e=this.cleanUserPropsForFetch(e),this.logger.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,U({timeoutMillis:r},n))];case 2:i=m.sent(),a={};try{for(o=Ee(Object.keys(i)),l=o.next();!l.done;l=o.next())u=l.value,a[u]=Rr(i[u])}catch(f){c={error:f}}finally{try{l&&!l.done&&(d=o.return)&&d.call(o)}finally{if(c)throw c.error}}return this.logger.debug("[Experiment] Received variants: ",a),[2,a]}})})},t.prototype.doFlags=function(){return W(this,void 0,void 0,function(){var e,r,n;return K(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e=void 0,this.isWebExperiment?[4,this.addContextOrWait(this.getUser())]:[3,2];case 1:e=i.sent(),i.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:Tr,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:e?.user_id||e?.device_id?{user_id:e?.user_id,device_id:e?.device_id}:void 0})];case 3:return r=i.sent(),this.flags.clear(),this.flags.putAll(r),[3,5];case 4:if(n=i.sent(),n instanceof Vt){if(this.logger.debug(n),this.config.throwOnError)throw n}else throw n;return[3,5];case 5:try{this.flags.store()}catch{}return this.mergeInitialFlagsWithStorage(),[2]}})})},t.prototype.storeVariants=function(e,r){return W(this,void 0,void 0,function(){var n,i,a,o,o;return K(this,function(l){n=r&&r.flagKeys?r.flagKeys:[],n.length===0&&this.variants.clear(),i=function(u){n=n.filter(function(c){return c!==u}),a.variants.put(u,e[u])},a=this;for(o in e)i(o);for(o in n)this.variants.remove(o);try{this.variants.store()}catch{}return this.logger.debug("[Experiment] Stored variants: ",e),[2]})})},t.prototype.startRetries=function(e,r){return W(this,void 0,void 0,function(){var n=this;return K(this,function(i){return this.logger.debug("[Experiment] Retry fetch"),this.retriesBackoff=new ro(so,lo,co,uo),this.retriesBackoff.start(function(){return W(n,void 0,void 0,function(){return K(this,function(a){switch(a.label){case 0:return[4,this.fetchInternal(e,oo,!1,r)];case 1:return a.sent(),[2]}})})}),[2]})})},t.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},t.prototype.addContext=function(e){var r,n=(r=this.userProvider)===null||r===void 0?void 0:r.getUser(),i=this.integrationManager.getUser(),a=U(U(U({},n?.user_properties),i.user_properties),e?.user_properties);return U(U(U(U({library:"experiment-js-client/".concat(Tr)},n),i),e),{user_properties:a})},t.prototype.addContextOrWait=function(e){return W(this,void 0,void 0,function(){return K(this,function(r){switch(r.label){case 0:return[4,this.integrationManager.ready()];case 1:return r.sent(),[2,this.addContext(e)]}})})},t.prototype.sourceVariants=function(){if(this.config.source==ge.LocalStorage)return this.variants.getAll();if(this.config.source==ge.InitialVariants)return this.config.initialVariants},t.prototype.secondaryVariants=function(){if(this.config.source==ge.LocalStorage)return this.config.initialVariants;if(this.config.source==ge.InitialVariants)return this.variants.getAll()},t.prototype.exposureInternal=function(e,r){var n,i,a,o,l,u,c,d,m,f=(a=(i=(n=r.variant)===null||n===void 0?void 0:n.metadata)===null||i===void 0?void 0:i.trackExposure)!==null&&a!==void 0?a:!0;if(f){this.legacyExposureInternal(e,r.variant,r.source);var v={flag_key:e},h=jr(r.source);if(!(h&&!r.hasDefaultVariant)){!((o=r.variant)===null||o===void 0)&&o.expKey&&(v.experiment_key=(l=r.variant)===null||l===void 0?void 0:l.expKey);var p=(u=r.variant)===null||u===void 0?void 0:u.metadata;if(!h&&!p?.default&&(!((c=r.variant)===null||c===void 0)&&c.key?v.variant=r.variant.key:!((d=r.variant)===null||d===void 0)&&d.value&&(v.variant=r.variant.value)),p&&(v.metadata=p),this.isWebExperiment&&(v.time=Date.now()),this.isWebExperiment){var g=je();if(g?.location)try{var N=g.location.href;v.metadata.url=N.split("?")[0]||""}catch{}}var I=this.addContext(this.getUser());(m=this.userSessionExposureTracker)===null||m===void 0||m.track(v,I),this.integrationManager.track(v,I)}}},t.prototype.legacyExposureInternal=function(e,r,n){var i,a,o,l,u;if(this.analyticsProvider){var c=this.addContext(this.getUser()),d=eo(c,e,r,n);jr(n)||!r?.value?(a=(i=this.analyticsProvider)===null||i===void 0?void 0:i.unsetUserProperty)===null||a===void 0||a.call(i,d):r?.value&&((l=(o=this.analyticsProvider)===null||o===void 0?void 0:o.setUserProperty)===null||l===void 0||l.call(o,d),(u=this.analyticsProvider)===null||u===void 0||u.track(d))}},t.getLogLevel=function(e){var r;return e.debug===!0?ce.Debug:(r=e.logLevel)!==null&&r!==void 0?r:ce.Error},t.prototype.shouldRetryFetch=function(e){return e instanceof Cn?e.statusCode<400||e.statusCode>=500||e.statusCode===429:!0},t.prototype.addPlugin=function(e){e.type==="integration"&&this.integrationManager.setIntegration(e)},t})(),po=(function(){function t(e,r){var n,i,a;this.globalScope=je(),this.userAgent=typeof((n=this.globalScope)===null||n===void 0?void 0:n.navigator)<"u"?(i=this.globalScope)===null||i===void 0?void 0:i.navigator.userAgent:void 0,this.ua=new Ra.UAParser(this.userAgent).getResult(),this.localStorage=new St,this.sessionStorage=new Rn,this.userProvider=e,this.apiKey=r,this.storageKey="EXP_".concat((a=this.apiKey)===null||a===void 0?void 0:a.slice(0,10),"_DEFAULT_USER_PROVIDER")}return t.prototype.getUser=function(){var e,r,n,i,a,o=((e=this.userProvider)===null||e===void 0?void 0:e.getUser())||{};return U({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:(n=(r=this.ua.device)===null||r===void 0?void 0:r.type)!==null&&n!==void 0?n:"desktop",referring_url:(a=(i=this.globalScope)===null||i===void 0?void 0:i.document)===null||a===void 0?void 0:a.referrer.replace(/\/$/,""),cookie
11:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},t.prototype.getLanguage=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},t.prototype.getOs=function(e){var r,n;return[(r=e.browser)===null||r===void 0?void 0:r.name,(n=e.browser)===null||n===void 0?void 0:n.major].filter(function(i){return i!=null}).join(" ")},t.prototype.getDeviceModel=function(e){var r;return(r=e.os)===null||r===void 0?void 0:r.name},t.prototype.getBrowser=function(e){var r,n=(r=e.browser)===null||r===void 0?void 0:r.name;return n?.includes("Chrom")&&(n="Chrome"),n?.includes("Firefox")&&(n="Firefox"),n?.includes("Safari")&&(n="Safari"),n?.includes("Edge")&&(n="Edge"),n?.includes("Opera")&&(n="Opera"),n},t.prototype.getCookie=function(){var e,r,n,i,a;if(!((r=(e=this.globalScope)===null||e===void 0?void 0:e.document)===null||r===void 0)&&r.cookie)return Object.fromEntries((a=(i=(n=this.globalScope)===null||n===void 0?void 0:n.document)===null||i===void 0?void 0:i.cookie)===null||a===void 0?void 0:a.split("; ").map(function(o){return o.split("=")}))},t.prototype.getLandingUrl=function(){var e,r;try{var n=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return n.landing_url||(n.landing_url=(r=(e=this.globalScope)===null||e===void 0?void 0:e.location)===null||r===void 0?void 0:r.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(n))),n.landing_url}catch{return}},t.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch{return}},t.prototype.getUrlParam=function(){var e,r,n;if(this.globalScope){var i={};try{var a=new URL(this.globalScope.location.href);try{for(var o=Ee(a.searchParams),l=o.next();!l.done;l=o.next()){var u=X(l.value,2),c=u[0],d=u[1];i[c]=ie(ie([],X((n=i[c])!==null&&n!==void 0?n:[]),!1),X(d.split(",")),!1)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}catch{return}return Object.entries(i).reduce(function(m,f){var v=X(f,2),h=v[0],p=v[1];return m[h]=p.length==1?p[0]:p,m},{})}},t})();q.experimentInstances={};var Lr=q.experimentInstances,mo=function(t,e){return Ln(t,e)},go=function(t,e){var r=function(){return new Ua(t,ja.getInstance(Mn(e)),1e4)};return Ln(t,e,r)},Mn=function(t){return t?.instanceName||Pe.instanceName},yo=function(t,e){var r=Mn(e),n=e?.internalInstanceNameSuffix;return n?"".concat(r,".").concat(t,".").concat(n):"".concat(r,".").concat(t)},bo=function(t,e){return new vo(t,U(U({},e),{userProvider:new po(e?.userProvider,t)}))},Ln=function(t,e,r){var n=yo(t,e),i=Lr[n];return i||(i=bo(t,e),r&&i.addPlugin(r()),Lr[n]=i,i)},_o={initialize:mo,initializeWithAmplitudeAnalytics:go};let Ke;const Un=({shouldInitExperiment:t=!0}={})=>{const{envVars:e}=ae(),[r,n]=w.useState(),i=async()=>{if(Ke){n(Ke);return}try{const{AMPLITUDE_EXPERIMENT_API_KEY:l,BASE_URL:u}=e,c=_o.initializeWithAmplitudeAnalytics(l,{fetchTimeoutMillis:15e3,serverUrl:`${u}/amp-exp`,serverZone:"EU"});await c.start(),Ke=c,n(c)}catch{}};return w.useEffect(()=>{t&&i()},[t]),{isInitialised:!!r,fetchExperimentData:async()=>await Ke?.fetch(),getVariant:l=>Ke?.variant(l)}},Dn=()=>{const{fetchExperimentData:t}=Un({shouldInitExperiment:!1}),{selectableCurrency:e,changeCurrency:r}=en(),{i18n:n}=V();return{syncUserAcrossClientSystems:a=>{const{locale:o}=a;o&&o!==n.language&&n.changeLanguage(o);const{currency:l}=a;l&&l!==e.code&&r(l,{updateUserProfile:!1}),a.email&&(Jr(a.id),t())}}};var fe=(t=>(t.SIGN_IN_FORM="signInForm",t.EMAIL_VERIFICATION_FORM="emailVerificationForm",t.SIGN_UP_CONFIRMATION="thankYou",t))(fe||{});const Fn=(t,e,r,n,i,a,o,l,u)=>{if((t.status===200||t.status===201)&&R("signin_success",{account_type:i}),a&&t.status===200){a(dr.STEP_2_PAYMENT),r(at.EXISTING_USER),o?.();return}if(a&&t.status===201){a(dr.STEP_2_PAYMENT),r(at.NEW_USER);return}if(!a&&t.status===200){e(),r(at.EXISTING_USER);return}if(!a&&t.status===201){u?(e(),r(at.NEW_USER)):(l?.(!0),n(fe.SIGN_UP_CONFIRMATION));return}t.error?.stmErrorCode===$t.USER_ALREADY_CONNECTED&&!a&&e()},xo=({email:t,setStep:e,setDonationStep:r})=>{const[n,i]=w.useState(!1),{openDialog:a}=Yt(),{emailVerification:o}=rn(),{completeSignInModalFlow:l,onSignInComplete:u,setInitialisedMessage:c,setIsShowingSignUpConfirmation:d,skipNewUserConfirmation:m}=et(),{signInAPI:f}=nn(),{syncUserAcrossClientSystems:v}=Dn(),{t:h}=V(),p=on(),g=w.useMemo(()=>/^[0-9]{4}$/,[]),N=qt(),I=(b,k,F,M)=>{b&&b.preventDefault(),F(!0);const H=Object.values(k).join("");g.test(H)&&(i(!0),f(H,ye.provider.EMAIL,void 0,{onSuccess:(S,L)=>{y(S,null,L)},onError:(S,L,he)=>{if(S.stmErrorCode!==$t.USER_ALREADY_CONNECTED){if(i(!1),L===403)M(h("emailVerification.error.code.invalid"));else{const oe=p(wt.LOGIN_FAIL,()=>e(fe.SIGN_IN_FORM));a(oe)}return}y(L??500,S,he)}}))},y=(b,k,F)=>{b===201&&!m&&d(!0),F&&v(F),Fn({status:b,error:k},l,c,e,ye.provider.EMAIL,r,r?()=>N.revalidate():void 0,d,m),u?.(F)},x=b=>{b.preventDefault(),o(t,"usi",{onSuccess:()=>{a({body:h("emailVerification.resend.text"),buttonPrimary:{close:!0,text:h("emailVerification.resend.cta.retry")},header:h("emailVerification.resend.header")})},onError:()=>{a({body:h("signIn.form.error.verification",{EmailAddress:t}),header:h("global.error.header"),isError:!0})}})};return s.jsx(hi,{email:t,handleCodeSubmit:I,handleResendCode:x,isLoading:n,isDonationSignIn:!0})};var Qe={},Ye={},Ur;function wo(){return Ur||(Ur=1,(function(t){var e=Ye&&Ye.__rest||function(o,l){var u={};for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&l.indexOf(c)<0&&(u[c]=o[c]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(o);d<c.length;
11d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(o,c[d])&&(u[c[d]]=o[c[d]]);return u};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=void 0;var r=zn();t.scripts={};var n=function(o){var l=document.querySelector('script[src="'+o+'"]');if(l)return t.scripts[o]={loading:!1,error:null,scriptEl:l}};function i(o){var l=o.src,u=o.checkForExisting,c=u===void 0?!1:u,d=e(o,["src","checkForExisting"]),m=l?t.scripts[l]:void 0;!m&&c&&l&&a&&(m=n(l));var f=(0,r.useState)(m?m.loading:!!l),v=f[0],h=f[1],p=(0,r.useState)(m?m.error:null),g=p[0],N=p[1],I=(0,r.useState)(!1),y=I[0],x=I[1];return(0,r.useEffect)(function(){if(!(!a||!l||y||g)){m=t.scripts[l],!m&&c&&(m=n(l));var b;m?b=m.scriptEl:(b=document.createElement("script"),b.src=l,Object.keys(d).forEach(function(M){b[M]===void 0?b.setAttribute(M,d[M]):b[M]=d[M]}),m=t.scripts[l]={loading:!0,error:null,scriptEl:b});var k=function(){m&&(m.loading=!1),h(!1),x(!0)},F=function(M){m&&(m.error=M),N(M)};return b.addEventListener("load",k),b.addEventListener("error",F),document.body.appendChild(b),function(){b.removeEventListener("load",k),b.removeEventListener("error",F)}}},[l]),[v,g]}t.default=i;var a=typeof window<"u"&&typeof window.document<"u"})(Ye)),Ye}var Dr;function So(){return Dr||(Dr=1,(function(t){var e=Qe&&Qe.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=t.default=void 0;var r=wo();Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e(r).default}}),Object.defineProperty(t,"scripts",{enumerable:!0,get:function(){return r.scripts}})})(Qe)),Qe}var Eo=So();const Tt=Vr(Eo),No=({emailAddress:t,setEmailAddress:e,setStep:r,title:n,description:i,setDonationStep:a})=>{const{envVars:o,user:l}=ae(),u=qt(),[c,d]=w.useState(""),[m,f]=w.useState(!1),[v,h]=w.useState(!1),{openDialog:p}=Yt(),{emailVerification:g,isLoading:N}=rn(),{signInAPI:I}=nn(),{closeSignInModal:y,completeSignInModalFlow:x,onSignInComplete:b,setInitialisedMessage:k,setIsShowingSignUpConfirmation:F,skipNewUserConfirmation:M}=et(),{i18n:H,t:S}=V(),{syncUserAcrossClientSystems:L}=Dn(),{getPath:he}=ue(),oe=on(),ve=w.useRef(null),tt=w.useRef(null),Ne=w.useRef(null),Ae=w.useRef(null);w.useEffect(()=>{const O=ve.current?.getBoundingClientRect().width;[tt,Ne,Ae].some(A=>(A.current?.getBoundingClientRect().width||0)>(O||0)*.75)&&h(!0)},[]);const Ue=H.language.replace("-","_"),{BASE_URL:De,FACEBOOK_APP_ID:Fe}=o,Be=`${De}/signedin`,re=O=>{if(O?.error==="popup_closed_by_user"||O?.type==="popup_closed")return;const P=oe(wt.LOGIN_FAIL);p(P)},Ge={ar_001:"ar_SA",nb_NO:"en_GB"}[Ue]||Ue,[rt,Ie]=Tt({onload:()=>He(),src:`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/${Ge}/appleid.auth.js`}),He=()=>{const O={clientId:Jn,redirectURI:Be,scope:"name email",usePopup:!0};window.AppleID.auth.init(O),document.addEventListener("AppleIDSignInOnFailure",P=>{re(P?.detail)})},[Ve,qe]=Tt({onload:()=>nt(),src:"https://connect.facebook.net/en_US/sdk.js"}),[Et,Oe]=Tt({onload:()=>ke(),src:`https://accounts.google.com/gsi/client?hl=${H.language}`}),nt=()=>{FB.init({appId:Fe,cookie:!0,status:!0,version:"v23.0",xfbml:!0})},ke=()=>{window.googleOAuthClient=google.accounts.oauth2.initCodeClient({client_id:Zn,scope:"email openid profile",callback:O=>{if(O.error){re();return}pe(O.code,ye.provider.GOOGLE,{tokenType:ye.tokenType.AUTHORIZATION_CODE})},error_callback:O=>re(O)})},Nt=w.useCallback(O=>{const P=O.target;f(!1),e(P.value.trim())},[e]),ze=O=>{O.preventDefault(),f(!0),!c&&g(t,"usi",{onSuccess:()=>{R("signin_started",{account_type:"email"}),r(fe.EMAIL_VERIFICATION_FORM)},onError:()=>{re()}})},pe=(O,P,A)=>{const{firstName:T,lastName:C,appleRedirectURI:G,tokenType:j}=A||{};I(O,P,{firstName:T,lastName:C,appleRedirectURI:G,tokenType:j},{onSuccess:(me,B)=>{Te(me,P,null,B)},onError:(me,B,Ce)=>{if(me.stmErrorCode!==$t.USER_ALREADY_CONNECTED){re();return}Te(B??500,P,me,Ce)}})},Te=(O,P,A,T)=>{O===201&&!M&&F(!0),T&&L(T),Fn({status:O,error:A},x,k,r,P,a,a?()=>u.revalidate():void 0,F,M),b?.(T)},At=()=>{const O=ye.provider.FACEBOOK;R("signin_started",{account_type:O}),FB.login(P=>{if(P.status!=="unknown"){if(P.status!=="connected"||!P.authResponse.accessToken||!P.authResponse.grantedScopes?.includes("email")){re();return}pe(P.authResponse.accessToken,O)}},{auth_type:"rerequest",return_scopes:!0,scope:"public_profile, user_friends, email"})},it=async()=>{const O=ye.provider.APPLE;R("signin_started",{account_type:O});try{const P=await window.AppleID.auth.signIn();P.authorization&&pe(P.authorization.code,O,{firstName:P.user?.name.firstName,lastName:P.user?.name.lastName,appleRedirectURI:Be})}catch(P){re(P)}},$e=w.useCallback(O=>{let P="";
11return O?yi(O)||(P=S("signIn.form.email.error.invalid")):P=S("signIn.form.email.error.required"),P},[S]);w.useEffect(()=>{d($e(t))},[t,$e]);const ee=()=>{const O=ye.provider.GOOGLE;R("signin_started",{account_type:O}),window.googleOAuthClient?.requestCode()};return s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:D("modal__title","sign-in__title",{"heading--2":!i,"subtitle mb-2":i}),children:n||S("signIn.header")}),i&&s.jsx("p",{className:"paragraph sign-in__description dimmed-text",children:i}),s.jsx(te,{block:!0,className:D("sign-in__button","sign-in__button--google",{"d-none":Oe,"sign-in__button--extended-text":v}),disabled:Et||!!Oe,onClick:ee,innerRef:ve,size:"lg",type:"button",children:s.jsxs("div",{className:"sign-in__button__content",children:[s.jsx("span",{className:"sign-in__button-icon-wrapper",children:s.jsx("img",{src:"/icons/google.svg",alt:"google",className:"sign-in__button-icon sign-in__button-icon--google",width:26,height:24})}),s.jsx("span",{ref:tt,children:S("signIn.cta.google")})]})}),s.jsx(te,{block:!0,className:D("sign-in__button","sign-in__button--facebook",{"d-none":qe,"sign-in__button--extended-text":v}),disabled:Ve||!!qe,onClick:At,size:"lg",type:"button",children:s.jsxs("div",{className:"sign-in__button__content",children:[s.jsx("span",{className:"sign-in__button-icon-wrapper",children:s.jsx("img",{src:"/icons/facebook-secondary.svg",alt:"facebook",className:"sign-in__button-icon sign-in__button-icon--facebook",width:32,height:31})}),s.jsx("span",{ref:Ne,children:S("signIn.cta.facebook")})]})}),s.jsx(te,{block:!0,className:D("sign-in__button","sign-in__button--apple",{"d-none":Ie,"sign-in__button--extended-text":v}),disabled:rt||!!Ie,onClick:it,size:"lg",type:"button",children:s.jsxs("div",{className:"sign-in__button__content",children:[s.jsx("span",{className:"sign-in__button-icon-wrapper",children:s.jsx("img",{src:"/icons/apple.svg",alt:"apple",className:"sign-in__button-icon sign-in__button-icon--apple",width:256,height:315})}),s.jsx("span",{ref:Ae,children:S("signIn.cta.apple")})]})}),s.jsx("p",{className:"sign-in__divider dimmed-text",children:S("signIn.divider")}),s.jsxs(vi,{noValidate:!0,onSubmit:ze,children:[s.jsx(mi,{children:s.jsx(gi,{type:"email",name:"email-address",placeholder:S("signIn.form.email.hint"),value:t,onChange:Nt,disabled:N,errorMessage:c,forceShowError:m})}),s.jsxs(te,{block:!0,color:be,type:"submit",disabled:N||!l,size:"lg",children:[S("signIn.form.cta.verify"),(N||!l)&&s.jsx(pi,{className:"btn__spinner",size:"sm"})]}),s.jsx("p",{className:"sign-in__legal-text dimmed-text",children:s.jsx(bi,{i18nKey:"signIn.legalText",components:[s.jsx(Y,{to:he(E.PRIVACY),onClick:y,children:"Privacy Policy"},"PrivacyPolicy"),s.jsx(Y,{to:he(E.TERMS),onClick:y,children:"Terms of Use"},"TermsOfUse")],children:"signIn.legalText"})})]})]})},Ao=()=>{const{closeSignInModal:t,isSignInModalOpen:e,email:r,setEmail:n}=et(),[i,a]=w.useState(fe.SIGN_IN_FORM),{t:o}=V(),l={[fe.SIGN_IN_FORM]:s.jsx("div",{className:"adaptive-modal__container",children:s.jsx(No,{emailAddress:r,setEmailAddress:n,setStep:a})}),[fe.EMAIL_VERIFICATION_FORM]:s.jsx(xo,{email:r,setStep:a}),[fe.SIGN_UP_CONFIRMATION]:s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"/images/welcome.svg",alt:"welcome",className:"adaptive-modal__welcome-image"}),s.jsxs("div",{className:"adaptive-modal__welcome-content",children:[s.jsx("h2",{className:"heading--2 text-center adaptive-modal__welcome-title",children:`${o("signIn.confirmationNewUser.header")} 🙌`}),s.jsx("p",{className:"text-center dimmed-text adaptive-modal__welcome-text",children:o("signIn.confirmation.text")}),s.jsx(te,{block:!0,color:be,size:"lg",type:"button",onClick:t,children:o("cta.getStarted")})]})]})},u=w.useCallback(()=>{n(""),a(fe.SIGN_IN_FORM)},[n]);return s.jsx(fi,{isOpen:e,closeModal:t,onClosed:u,bodyContent:l[i],classNamesList:{main:"sign-in-modal",content:"sign-in-modal__content",body:i===fe.SIGN_UP_CONFIRMATION?"adaptive-modal__modal-body--no-padding":""}})},Io=({handleLogOut:t,user:e})=>{const{getPath:r,routeWithoutLocale:n}=ue(),{subscription:i}=ae(),{t:a}=V(),o=(m,f)=>s.jsx(Y,{className:"dropdown-link",to:r(m),children:s.jsx(bt,{className:D("user-dropdown__menu-item",{"user-dropdown__menu-item--active":n===m}),onClick:()=>R("navigation_item_clicked",{item:m}),children:f})}
11),{clientData:l}=ae(),[u,c]=w.useState(!1),d=()=>c(m=>!m);return s.jsxs(Jt,{nav:!0,inNavbar:!0,className:"user-dropdown",isOpen:u,toggle:d,...l.IS_DESKTOP&&{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1)},children:[s.jsx(Zt,{nav:!0,className:"user-dropdown__toggle",tag:"button",children:s.jsx(an,{user:e})}),s.jsxs(er,{end:!0,className:"user-dropdown__dropdown-menu","data-bs-popper":"static","data-bs-boundary":"viewport",children:[o(E.PROFILE,a("navbar.profile")),o(E.PAYMENT_METHODS,a("navbar.paymentMethods")),i&&o(E.SUBSCRIPTION_MANAGEMENT,a("navbar.subscription")),o(E.TRANSACTION_HISTORY,a("navbar.transactionHistory")),s.jsx(bt,{className:"user-dropdown__menu-item",onClick:t,children:a("navbar.logOut")})]})]})},Oo=()=>{const t=qr(),{fetchExperimentData:e}=Un({shouldInitExperiment:!1}),{getPath:r}=ue(),{pathname:n}=Me(),{deviceId:i}=ae(),[a,o]=w.useState(),l=w.useRef(t.data);w.useEffect(()=>{if(!(!a||t.state!=="idle")){if(t.data!==l.current&&t.data?.error){console.error("Sign out failed!"),o(void 0);return}n===r(E.HOME)&&(ai(i),Jr(void 0),e(),a.onSuccess(),o(void 0))}},[a,i,e,t.data,t.state,r,n]);const u=c=>{o(c),l.current=t.data,t.submit(null,{method:"post",action:r(Yr.SIGN_OUT)})};return{isLoading:t.state!=="idle",signOutAPI:u}},Fr=t=>{if(t.length===0||t=="/")return we.HOME;const e=t.split("/");return/^\/campaigns\/.+/.test(t)&&e[2]?`${we.CAMPAIGN}_${e[2]}`:t.startsWith(E.CHALLENGES)&&e[2]?`${we.CHALLENGE}_${e[2]}`:t.startsWith(E.THANK_YOU)?we.THANK_YOU:e[1]},ko=()=>{const t=Me(),{lang:e}=$n(),[r]=zr();return{getNewLocalisedPath:w.useCallback(i=>{const a=xi(i),o=a?`/${a}`:"",l=r.get(fr.REDIRECT);if(l)return r.delete(fr.REDIRECT),`${o}/${l}`;let u=r.toString();if(u=u&&`?${u}`,e?e===a:i===wi)return null;if(!e){const m=t.pathname==="/"?"":t.pathname;return`/${a}${m}${u}`}return`${t.pathname.replace(`/${e}`,o)}${u}`},[e,t.pathname,r])}},Co=()=>{const t=qr(),{getPath:e}=ue();return{updateUserLocale:(n,i)=>{const a=new FormData;a.append("locale",n),i&&a.append("userId",i),t.submit(a,{method:"PATCH",action:e(Yr.LOCALE)})},updateUserLocaleData:t.data,updateUserLocaleState:t.state}},jo=({handleLanguageChange:t,isLangModalOpen:e,selectedLanguage:r,setIsLangModalOpen:n})=>{const{t:i}=V(),a=o=>{r&&t(r,o),n(!e)};return s.jsx(Wt,{isOpen:e,toggle:a,keyboard:!1,className:"lang-modal",contentClassName:"lang-modal__content",children:s.jsxs(Qt,{className:"lang-modal__body",children:[s.jsx("h2",{className:"heading--1 lang-modal__header",children:i("navbar.language.header")}),s.jsx(yt,{className:"lang-modal__menu",children:_t.map(o=>s.jsx(le,{className:D("lang-modal__menu-item",{"lang-modal__menu-item--active":o.value===r.value}),children:s.jsx(Xt,{href:"#",onClick:l=>t(o,l,!1),className:D("lang-modal__menu-link",{"lang-modal__menu-link--active":o.value===r.value}),children:o.label})},o.value))}),s.jsx("div",{className:"lang-modal__confirm",children:s.jsx(te,{block:!0,color:be,size:"lg",type:"button",onClick:o=>a(o),children:i("navbar.language.confirm")})})]})})},To=({isLangModalOpen:t,setIsLangModalOpen:e})=>{const{updateUserLocale:r,updateUserLocaleData:n,updateUserLocaleState:i}=Co(),{getNewLocalisedPath:a}=ko(),o=$r(),{i18n:l}=V(),{locale:u,user:c}=ae(),d=w.useRef(null),m=w.useRef(null),[f,v]=w.useState(vr(u)||_t[2]),h=[0,2,4,6,8,10,12,1,3,5,7,9,11,13];w.useEffect(()=>{if(c?.locale&&c.locale!==f.value){const b=vr(c.locale);b&&v(b)}},[c?.locale]),w.useEffect(()=>{i!=="idle"||!n||!m.current||(o(m.current,{preventScrollReset:!0}),m.current=null)},[o,n,i]);const p=(b,k,F=!0)=>{if(k.preventDefault(),v(b),b&&F){const M=b.value;l.changeLanguage(M);const H=a(M);m.current=H===""?E.HOME:H,r(M,c?.id)}},g=(b,k)=>{d.current?.closest("button")?.focus(),p(b,k)},{clientData:N}=ae(),[I,y]=w.useState(!1),x=()=>y(b=>!b);return s.jsxs(s.Fragment,{children:[s.jsxs(Jt,{nav:!0,inNavbar:!0,className:"lang-dropdown",isOpen:I,toggle:x,...N.IS_DESKTOP&&{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1)},children:[s.jsx(Zt,{nav:!0,className:"lang-dropdown__toggle",tag:"button",onClick:()=>R("language_adjust_clicked"),children:s.jsxs("div",{className:"lang-dropdown__toggle-content",children:[s.jsx("img",{className:"lang-dropdown__toggle-icon",alt:"Globe icon",src:"/icons/globe.svg",height:22,width:22,ref:d}),s.jsx("span",{className:"navbar__link lang-dropdown__toggle-text",children:f.value.slice(0,2)})]})}),s.jsx(er,{end:!0,className:"lang-dropdown__dropdown-menu","data-bs-popper":"static","data-bs-boundary":"viewport",children:s.jsx(Se,{className:"g
11-0",children:_t.map((b,k)=>s.jsx(Z,{xs:"6",style:{order:h[k]},children:s.jsx(bt,{className:D("lang-dropdown__menu-item",{"lang-dropdown__menu-item--active":b.value===f.value}),onClick:F=>g(b,F),children:b.label})},b.value))})})]}),t&&s.jsx(jo,{handleLanguageChange:p,isLangModalOpen:t,selectedLanguage:f,setIsLangModalOpen:e})]})},Po=({handleLogOut:t,handleOpenLanguageModal:e,handleSignIn:r,handleToggleNavbar:n,hideDonateNowButton:i,isBrandedCampaign:a,isNavbarOpen:o,menuItems:l,user:u,isSignInModalClosing:c})=>{const{getPath:d,routeWithoutLocale:m}=ue(),{i18n:f,t:v}=V(),h=zt(),{subscription:p}=ae(),g=_t.find(S=>S.value===f.language)?.label,[N,I]=w.useState(!1),[y,x]=w.useState(!1),b=S=>S===E.HOME?m===`${S}`:m.includes(S),k=S=>{if(n(),S===E.CAMPAIGNS){R("navigation_donate_clicked");return}R("navigation_item_clicked",{item:S})},F=()=>{I(!N)},M=()=>{x(!y)},H=(S,L)=>s.jsx(le,{className:D("menu-modal__item","menu-modal__item--menu",{"menu-modal__item--active":m===S}),children:s.jsx(Y,{className:"menu-modal__link",to:d(S),onClick:()=>k(S),children:L})});return s.jsxs(Wt,{isOpen:o,toggle:n,keyboard:!1,className:"menu-modal__dialog",contentClassName:"menu-modal__content",modalClassName:"menu-modal",children:[s.jsx(Zr,{tag:"div",className:"p-0",children:s.jsxs(Se,{className:"container-fluid m-0 menu-modal__header",children:[s.jsx(Z,{className:"d-flex justify-content-start p-0",children:s.jsx(Y,{className:"navbar__logo-link",to:d(E.HOME),onClick:()=>k(E.HOME),children:s.jsx("img",{height:"38",width:"152",src:"/icons/stm-logo-secondary.svg",alt:"Share The Meal logo",className:"navbar__logo"})})}),s.jsxs(Z,{className:"d-flex justify-content-end p-0",children:[s.jsx("div",{className:D("navbar__item--donate","px-sm-0",{"d-none":i}),children:s.jsx(Y,{className:"navbar__button-link mr-3",to:d(E.CAMPAIGNS),children:s.jsx(te,{type:"button",color:be,className:"navbar__button",onClick:()=>k(E.CAMPAIGNS),children:v("cta.donate")})})}),s.jsx(Kt,{onClickAction:n,color:"blue"})]})]})}),s.jsx(Qt,{className:"menu-modal__body",children:s.jsxs(yt,{className:"menu-modal__nav",children:[s.jsxs("div",{className:"menu-modal__item--center",children:[l.map((S,L)=>s.jsx(le,{className:D("menu-modal__item",{"menu-modal__item--active":b(S.pathname),"pt-5":L===0}),children:s.jsx(Y,{className:"menu-modal__link",to:d(S.pathname),onClick:()=>k(S.pathname),children:S.label})},S.pathname)),s.jsxs("span",{className:D({"d-none":a}),children:[s.jsx(le,{className:"menu-modal__item menu-modal__item--separated menu-modal__link",children:s.jsxs("button",{type:"button",className:"btn-reset menu-modal__link d-flex justify-content-between",onClick:M,children:[s.jsx("div",{children:v("navbar.about.us")}),y?s.jsx("img",{src:"/icons/subtract.svg",alt:"About us dropdown",width:24,height:24}):s.jsx("img",{src:"/icons/add.svg",alt:"About us dropdown",width:24,height:24})]})}),s.jsxs(pr,{isOpen:y,children:[H(E.ABOUT,v("navbar.missionAndTeam")),H(E.FAQ,v("navbar.faqs"))]})]}),u&&Lt(u)?s.jsxs("span",{className:D({"d-none":h}),children:[s.jsx(le,{className:"menu-modal__item pt-5 pb-2",children:s.jsxs("button",{type:"button",className:"btn-reset menu-modal__link d-flex justify-content-between",onClick:F,children:[s.jsxs("div",{className:"d-flex",children:[s.jsx(an,{user:u,className:"menu-modal__user-avatar"}),v("navbar.myAccount")]}),N?s.jsx("img",{src:"/icons/subtract.svg",alt:"User dropdown",width:24,height:24}):s.jsx("img",{src:"/icons/add.svg",alt:"User dropdown",width:24,height:24})]})}),s.jsxs(pr,{isOpen:N,children:[H(E.PROFILE,v("navbar.profile")),H(E.PAYMENT_METHODS,v("navbar.paymentMethods")),p&&H(E.SUBSCRIPTION_MANAGEMENT,v("navbar.subscription")),H(E.TRANSACTION_HISTORY,v("navbar.transactionHistory")),s.jsx(le,{className:"menu-modal__item menu-modal__item--menu",children:s.jsx("button",{type:"button",className:"btn-reset menu-modal__link py-0",onClick:t,children:v("navbar.logOut")})})]})]}):s.jsx(le,{className:D("menu-modal__item","pt-5",{"d-none":h}),children:s.jsxs("button",{type:"button",className:"btn-reset menu-modal__link d-flex",onClick:r,disabled:c,children:[s.jsx("img",{alt:"Avatar",className:"avatar__image menu-modal__user-avatar",src:"/icons/avatar.svg",width:24,height:24}),v("navbar.signIn")]})})]}),s.jsx(le,{className:D("menu-modal__item","menu-modal__item--language",{"d-none":h||a}),children:s.jsxs(Xt,{href:"#",onClick:S=>e(S),className:"menu-modal__link",children:[g,s.jsx("img",{src:"/icons/chevron-right.svg",alt:"chevron",className:"chevron",width:24,height:24})]})})]})})]})},Ro=({isRouteActive:t})=>{const{getPath:e,routeWithoutLocale:r}=ue(),{t:n}=V(),{clientData:i}=ae(),[a,o]=w.useState(!1),l=()=>o(d=>!d),u=t(E.ABOUT)||t(E.FAQ),c=(d,m)=>s.jsx(Y,{className:"dropdown-link",to:e(d),children:s.jsx(bt,{className:D("dropdown-item",{"dropdown-item--active":r===d}),onClick:()=>R("navigation_item_clicked",{item:d}),children:m})});return s.jsxs(Jt,{nav:!0,inNavbar:!0,isOpen:a,toggle:l,...i.IS_DESKTOP&&{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1)},children:[s.jsx(Zt,{nav:!0,className:D("navbar__dropdown-toggle navbar__dropdown-toggle--about",{"navbar__item navbar__link":!0,"navbar__item--active":u}),children:n("navbar.about.us")}),s.jsxs(er,{"data-bs-popper":"static",children:[c(E.ABOUT,n("navbar.missionAndTeam")),c(E.FAQ,n("navbar.faqs"))]})]})},Bn=()=>{const[t,e]=w.useState(!1),{getPath:r,routeWithoutLocale:n}=ue(),{isSignInModalOpen:i,openSignInModal:a,isSignInModalClosing:o}=et(),[l,u]=w.useState(!1),{signOutAPI:c}=Oo(),[d,m]=w.useState(!1),[f]=zr(),{t:v}=V(),{clientData:h,user:p}=ae(),{IS_DESKTOP:g}=h,N=zt(),I=f.has("brand"),y=n.includes(E.CAMPAIGNS)||n.includes(E.CHALLENGES)||n.includes(E.DONATE_MONTHLY)||I,x=I?[]:[{label:v("navbar.takeAction"),pathname:E.CAMPAIGNS},{label:v("navbar.donateMonthly"),pathname:E.DONATE_MONTHLY},{label:v("navbar.becomePartner"),pathname:E.PARTNERSHIPS}],b=()=>{Lt(p)&&(R("signout_clicked",{screen_name:Fr(n)}),c({onSuccess:()=>{R("signout_success"),u(!1)}}))},k=L=>{L.preventDefault(),R("signin_clicked",{screen_name:Fr(n)}),a(),u(!1)},F=L=>L===E.HOME?n===`${L}`:n.includes(L),M=()=>{u(!l)},H=L=>{L.preventDefault(),R("language_adjust_clicked"),m(!0),u(!1)},S=()=>s.jsx(le,{className:"navbar__item navbar__item--sign-in",children:s.jsx(Xt,{className:"navbar__link",tag:"button",onClick:L=>k(L),disabled:o,children:v("navbar.signIn")})});return w.useEffect(()=>{const L=()=>{const he=window.scrollY,ve=t?20:20+97;e(he>ve)};return window.addEventListener("scroll",L,{passive:!0}),()=>{window.removeEventListener("scroll",L)}},[t]),s.jsxs(s.Fragment,{children:[s.jsxs(ln,{className:D({"navbar--scrolled":t}),container:"fluid",expand:"xl",children:[s.jsx(Wi,{}),s.jsx("div",{className:"navbar__logo-wrapper",children:s.jsxs(Y,{className:"navbar__logo-link",to:r(E.HOME),onClick:()=>R("navigation_item_clicked",{item:E.HOME}),children:[s.jsx("img",{src:ei,alt:"",className:"navbar__logo navbar__logo--desktop",width:126,height:72,loading:g?"eager":"lazy"}),s.jsx("img",{src:ti,alt:"Share The Meal logo",className:"navbar__logo navbar__logo--mobile",width:152,height:38,loading:g?"lazy":"eager"})]})}),s.jsxs(yt,{className:"navbar__section--menu",children:[x.map(L=>s.jsx(le,{className:D("navbar__item",{"navbar__item--active":F(L.pathname)}),children:s.jsx(Y,{className:"paragraph navbar__link",to:r(L.pathname),onClick:()=>R("navigation_item_clicked",{item:L.pathname}),children:L.label})},L.label)),!I&&s.jsx(Ro,{isRouteActive:F})]}),s.jsxs(yt,{className:D("navbar__section--donate",{"d-none":N}),children:[!I&&s.jsx(To,{isLangModalOpen:d,setIsLangModalOpen:m}),p&&Lt(p)?s.jsx(Io,{handleLogOut:b,user:p}):S(),s.jsx(le,{className:D("navbar__item","navbar__item--donate",{"d-none":y}),children:s.jsx(Y,{className:"navbar__button-link",to:r(E.CAMPAIGNS),children:s.jsx(te,{type:"button",color:be,className:"navbar__button","data-testid":"nav-donate-button",onClick:()=>R("navigation_donate_clicked"),children:v("cta.donate")})})})]}),s.jsx(cn,{onClick:M,className:"navbar__toggler"})]}),i&&s.jsx(Ao,{}),l&&s.jsx(Po,{handleLogOut:b,handleOpenLanguageModal:H,handleSignIn:k,handleToggleNavbar:M,hideDonateNowButton:y,isBrandedCampaign:I,isNavbarOpen:l,menuItems:x,user:p,isSignInModalClosing:o})]})},Mo=({className:t})=>{const{welcomeMessage:e,welcomeImageUrl:r,clearWelcomeMessage:n}=et();return s.jsx(Si,{text:e,imageUrl:r,className:t,onProgressEnd:n})},Gn=({analyticsLocation:t,campaignList:e,description:r,headingLevel:n=2,onCtaClick:i,title:a})=>{const{t:o}=V(),{getPath:l}=ue(),u=n===1?"h1":"h2";return!e||e.length===0?null:s.jsxs("div",{className:"campaign-list-section",children:[s.jsxs(xt,{children:[s.jsx(u,{className:"heading--2--new campaign-list-section__title",children:a}),s.jsx("p",{className:"paragraph campaign-list-section__description",children:r}),s.jsx("div",{className:"campaign-list-section--desktop",children:s.jsx(Se,{children:e.slice(0,3).map(c=>s.jsx(Z,{xs:"12",md:"6",lg:"4",className:"campaign-list-section__col",children:s.jsx(Ni,{analyticsLocation:t,campaign:c,featured:!0,imageDimensions:ri,lazyLoadImg:!0})},c.campaignId))})})]}),s.jsx("div",{className:"campaign-list-section--mobile",children:s.jsx(Ai,{analyticsLocation:t,campaignList:e.slice(0,3),featured:!0})}),s.jsx(xt,{children:s.jsxs("div",{className:"campaign-list-section__cta",children:[s.jsx(Y,{to:l(E.CAMPAIGNS),className:"d-lg-none",children:s.jsx(te,{color:be,size:"lg",onClick:i,children:o("cta.viewall")})}),s.jsx(Y,{to:l(E.CAMPAIGNS),className:"d-none d-lg-block",children:s.jsx(te,{color:be,size:"lg",className:"campaign-list-section__cta-btn",onClick:i,children:o("cta.viewallgoals")})})]})})]})},Hn=({imageName:t,...e})=>{const{i18n:r}=V(),n=r.dir?.()==="rtl"?`${t}-desktop-flipped`:`${t}-desktop`;return s.jsxs("picture",{children:[s.jsx("source",{media:ni.MIN_MD,srcSet:`/images/${n}.webp`}),s.jsx("img",{src:`/images/${t}-mobile.webp`,alt:"",...e})]})};Hn.displayName="LocaledImage";const Pt="404",Vn=({campaignList:t})=>{const{t:e}=V(),r=Me(),n=qt(),i=w.useRef(!1),{getPath:a}=ue(),{clientData:o}=ae(),{IS_IOS:l,IS_ANDROID:u}=o;return w.useEffect(()=>{const c=`${r.pathname}${r.search}`,d=document.referrer||void 0;(async()=>(R("page_not_found",{page_url:c,referrer:d}),await Xr().promise))()},[]),w.useEffect(()=>{const c=e("error.404.metaTitle");document.title!==c&&(document.title=c)},[e]),w.useEffect(()=>{if(!i.current){i.current=!0;return}n.revalidate()},[r.key]),s.jsxs("div",{className:"not-found",children:[s.jsx("div",{className:"not-found__hero",children:s.jsx(xt,{children:s.jsxs(Se,{children:[s.jsxs(Z,{xs:{order:2,size:12},md:{order:1,size:6},className:"not-found__hero-copy",children:[s.jsx("h1",{className:"heading--1 not-found__hero-title",children:e("error.404.metaTitle")}),s.jsx("p",{className:"paragraph not-found__hero-description",children:e("error.404.hero.description")}),s.jsx(Y,{className:"navbar__button-link",to:a(E.HOME),children:s.jsx(te,{type:"button",color:be,className:"not-found__cta",size:"lg",onClick:()=>R("click_404_home_button"),children:e("cta.backtohome")})})]}),s.jsx(Z,{xs:{order:1,size:12},md:{order:2,size:6},className:"not-found__hero-image",children:s.jsx("img",{src:"/images/404.
11webp",alt:"",className:"not-found__hero-svg",width:160})})]})})}),s.jsx(Gn,{analyticsLocation:Pt,campaignList:t,description:e("error.404.campaigns.description"),onCtaClick:()=>R("click_404_all_campaigns_button"),title:e("campaignList.title")}),s.jsxs("div",{className:"not-found__store",children:[s.jsx(Hn,{imageName:"404-store",className:"not-found__store-bg",alt:"","aria-hidden":"true",height:656,width:375}),s.jsx(xt,{className:"not-found__store-content",children:s.jsx(Se,{children:s.jsxs(Z,{xs:12,md:6,children:[s.jsx("h2",{className:"heading--2--new not-found__store-title",children:e("error.404.store.title")}),s.jsx("p",{className:"paragraph not-found__store-description",children:e("error.404.store.description")}),s.jsxs("div",{className:"not-found__store-badges",children:[!l&&s.jsx(gt,{store:"googleplay",height:48,location:Pt}),!u&&s.jsx(gt,{store:"appstore",height:48,location:Pt})]})]})})})]})]})},Br="/assets/global-ifcwgl0V.css",Lo=()=>`
12    document.getElementById('legacyBrowserModalCta').onclick = function() { document.getElementById('legacyBrowserModal').style.display = 'none'; };
13    document.getElementById('legacyBrowserModalCloseBtn').onclick = function() { document.getElementById('legacyBrowserModal').style.display = 'none'; };`,Gr="/assets/root-bundle-8ltcA5Yq.css",Uo=()=>[{rel:"preload",href:"/fonts/Open_Sans/OpenSans-Regular.ttf",as:"font",type:"font/ttf",crossOrigin:"anonymous"},{rel:"preload",href:"/fonts/Open_Sans/OpenSans-SemiBold.ttf",as:"font",type:"font/ttf",crossOrigin:"anonymous"},{rel:"preload",href:"/fonts/Open_Sans/OpenSans-Bold.ttf",as:"font",type:"font/ttf",crossOrigin:"anonymous"}],Do=()=>[{rel:"preload",href:Gr,as:"style"},{rel:"stylesheet",href:Gr}],Fo=(t,e,r)=>{const n=[{title:t.title},{name:"robots",content:"index, follow"},{name:"description",content:t.description},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:site",content:"@ShareTheMealorg"},{name:"twitter:title",content:t.title},{name:"twitter:description",content:t.description},{name:"twitter:url",content:e},{name:"twitter:image",content:hr},{property:"og:site_name",content:"ShareTheMeal"},{property:"og:type",content:"website"},{property:"og:app_id",content:"890828120950097"},{property:"og:title",content:t.title},{property:"og:description",content:t.description},{property:"og:url",content:e},{property:"og:image",content:hr}];return n.push({tagName:"link",rel:"canonical",href:e}),r||n.push({tagName:"link",rel:"preload",href:"/icons/hamburger.svg",fetchpriority:"high",as:"image"}),n},pt=({user:t})=>{const{initialiseAmplitude:e}=_i();return w.useEffect(()=>{sn(()=>{e(t)})},[]),null},Bo="deactivated_campaign",Go=`410:${wt.DEACTIVATED_CAMPAIGN}`,Ho=({campaignList:t})=>{const{t:e}=V();return un(Go),s.jsx(Gn,{analyticsLocation:Bo,campaignList:t,description:e("error.unavailableCampaign.description"),headingLevel:1,onCtaClick:()=>R("expired_campaigns_view_all_goals"),title:e("error.unavailableCampaign.title")})},Rt=({title:t,children:e})=>{const{i18n:r}=V();return s.jsxs("html",{dir:r.dir(),lang:r.language,children:[s.jsxs("head",{children:[s.jsx("title",{children:t}),s.jsx("meta",{charSet:"utf-8"}),s.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),s.jsx(Wr,{}),s.jsx(Kr,{})]}),s.jsxs("body",{children:[s.jsxs("div",{className:"layout",children:[s.jsx(Bn,{}),e,s.jsx(fn,{})]}),s.jsx(Qr,{})]})]})},Hr=t=>!t||typeof t!="object"||!("campaignList"in t)?null:t.campaignList,Vo=t=>!t||typeof t!="object"||!("message"in t)||typeof t.message!="string"?null:t.message,Bs=()=>{const t=zt(),[e,r]=w.useState(!0),{t:n}=V(),i=$r(),{getPath:a}=ue(),{user:o}=ae(),l=c=>i(a(c),{replace:!0});if(lr(t)&&t.status===404)return s.jsx(Rt,{title:n("error.404.metaTitle"),children:s.jsx(lt,{children:s.jsxs(s.Fragment,{children:[s.jsx(pt,{user:o||null}),s.jsx(Vn,{campaignList:Hr(t.data)})]})})});if(lr(t)&&Vo(t.data)===wt.DEACTIVATED_CAMPAIGN)return s.jsx(Rt,{title:n("error.unavailableCampaign.title"),children:s.jsx(lt,{children:s.jsxs(s.Fragment,{children:[s.jsx(pt,{user:o||null}),s.jsx(Ho,{campaignList:Hr(t.data)})]})})});t instanceof Error&&typeof window<"u"&&Ii(t);const u={isDialogModalOpen:e,setIsDialogModalOpen:r,dialogModalContent:oi({error:t,t:n,navigateWithLang:l})};return s.jsx(Rt,{title:"ShareTheMeal",children:s.jsx(lt,{children:s.jsxs(s.Fragment,{children:[s.jsx(pt,{user:o||null}),s.jsx(dn,{dialogModalProps:u,isErrorBoundary:!0})]})})})},Gs=()=>
13[...Uo(),{rel:"preconnect",href:"https://images.ctfassets.net"},{rel:"preconnect",href:"https://o274918.ingest.sentry.io"},{rel:"preload",href:Br,as:"style"},{rel:"stylesheet",href:Br},...Do(),{rel:"icon",href:"/favicon.ico"},{rel:"icon",href:"/favicon.svg",sizes:"any",type:"image/svg+xml"}],Hs=({data:t,location:e})=>{const{clientData:r,metadata:n,envVars:i}=t,a=`${i.BASE_URL}${e.pathname}`;return Fo(n,a,r.IS_DESKTOP)},qo=()=>{const{i18n:t}=V(),e=Me(),{campaignList:r,clientData:n,envVars:i,isLegacyBrowser:a,locale:o,notFound:l,user:u,userAgentIsBot:c}=Kn();return w.useEffect(()=>{if(c)return;const d=()=>{Pi.initialize({gtmId:i.GTM_ID}),Ei(i.FACEBOOK_PIXEL_ID)};e.pathname.includes(E.THANK_YOU_CONFIRMATION)?d():setTimeout(()=>{sn(d)},5e3)},[i.FACEBOOK_PIXEL_ID,i.GTM_ID,c]),mr(i.BASE_URL===ii?"https://b8599167844a.edge.sdk.awswaf.com/b8599167844a/eaf7ec170659/challenge.js":null,{requestIdleCallback:!0}),mr("//l.getsitecontrol.com/y79qvogw.js",{loadOnScroll:!0}),s.jsxs("html",{dir:t.dir(),lang:o,children:[s.jsxs("head",{children:[s.jsx("meta",{charSet:"utf-8"}),s.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),s.jsx("meta",{name:"stm-version",content:i.version}),s.jsx("meta",{name:"stm-commit",content:i.CommitSha}),n.IS_DESKTOP&&s.jsx("script",{type:"text/javascript",src:`https://cdn.eu.amplitude.com/script/${i.AmplitudeApiKey}.experiment.js`}),s.jsx(Wr,{}),s.jsx(Kr,{}),s.jsx("script",{dangerouslySetInnerHTML:{__html:`window.ENV = '{"VERSION": "${i.version}"}'`}})]}),s.jsx("body",{children:s.jsx(lt,{children:s.jsx(ci,{children:s.jsx(si,{children:s.jsx(di,{children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"layout",children:[s.jsx("div",{className:"page-header",children:s.jsx(Bn,{})}),l?s.jsx(Vn,{campaignList:r}):s.jsx(Qn,{}),s.jsx(fn,{IS_ANDROID:n.IS_ANDROID,IS_IOS:n.IS_IOS})]}),s.jsx(pt,{user:u}),s.jsx(Mo,{className:D({"amp-mask":u?.firstname})}),s.jsx(dn,{}),a&&s.jsxs(s.Fragment,{children:[s.jsx($i,{}),s.jsx("script",{dangerouslySetInnerHTML:{__html:Lo()}})]}),s.jsx(Yn,{}),s.jsx(Qr,{})]})})})})})})]})},Vs=Wn(qo);export{Bs as ErrorBoundary,Vs as default,Gs as links,Hs as meta};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.