1import{bc as St}from"./CJVn3ZQ4.js";const c={init:function(i){i===void 0&&c.zg!==void 0||(c.zg=!!i),c.i||(c.i=!0)},destroy:function(){c.i=!1,c.zg=void 0,c.vd=void 0},setLogger:function(i){typeof i=="function"?(c.init(),c.vd=i):c.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){c.init(),c.zg?c.zg=!1:c.zg=!0},info:function(i){if(c.zg){const t="Braze: "+i;c.vd!=null&&c.vd(t)}},warn:function(i){if(c.zg){const t="Braze SDK Warning: "+i+" (v6.7.1)";c.vd!=null&&c.vd(t)}},error:function(i){if(c.zg){const t="Braze SDK Error: "+i+" (v6.7.1)";c.vd!=null&&c.vd(t)}}},ei={Nu:function(i){const t=(i+"=".repeat((4-i.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),e=atob(t),s=new Uint8Array(e.length);for(let n=0;n<e.length;++n)s[n]=e.charCodeAt(n);return s}},O={CustomEvent:"ce",Pr:"p",Uc:"pc",gl:"i",Ya:"ie",ds:"cci",js:"ccic",os:"ccc",cs:"ccd",wm:"ss",hm:"se",Fn:"si",On:"sc",Xn:"sbc",om:"iec",Oc:"lr",Nc:"uae",Kc:"lcaa",Jc:"lcar",Zu:"inc",Qu:"add",Xu:"rem",Yu:"set",Vu:"ncam",Wc:"sgu",xo:"ffi",ro:"bi",Dt:"bc",Ft:"bd"},Lt={de:function(){if(typeof window<"u"&&window.crypto){if(typeof window.crypto.randomUUID=="function")return window.crypto.randomUUID();if(typeof window.crypto.getRandomValues=="function")try{const t=new Uint8Array(16);window.crypto.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;const e=Array.from(t,s=>("0"+s.toString(16)).slice(-2));return[e.slice(0,4).join(""),e.slice(4,6).join(""),e.slice(6,8).join(""),e.slice(8,10).join(""),e.slice(10,16).join("")].join("-")}catch{}}const i=(t=!1)=>{const e=(Math.random().toString(16)+"000000000").substr(2,8);return t?"-"+e.substr(0,4)+"-"+e.substr(4,4):e};return i()+i(!0)+i(!0)+i()}};class U{constructor(t,e){this.database=t,this.vd=e,this.parent=typeof window>"u"?self:window,this.database=t,this.vd=e}Dd(){if("indexedDB"in this.parent)return this.parent.indexedDB}isSupported(){var t;try{if(this.Dd()==null)return!1;{const e=(t=this.Dd())===null||t===void 0?void 0:t.open("Braze IndexedDB Support Test");if(e&&(e.onupgradeneeded=()=>e.result.close(),e.onsuccess=()=>e.result.close()),typeof window<"u"){const s=window,n=s.chrome||s.browser||s.Bd;if(n&&n.runtime&&n.runtime.id)return this.vd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}}catch(e){return this.vd.info("Not using IndexedDB for storage due to following error: "+e),!1}}Cd(t,e){var s;const n=(s=this.Dd())===null||s===void 0?void 0:s.open(this.database.xd,this.database.VERSION);if(n==null)return typeof e=="function"&&e(),!1;const a=this;return n.onupgradeneeded=r=>{var o;a.vd.info("Upgrading indexedDB "+a.database.xd+" to v"+a.database.VERSION+"...");const l=(o=r.target)===null||o===void 0?void 0:o.result;for(const u in a.database.Os){const h=u;a.database.Os.hasOwnProperty(u)&&!l.objectStoreNames.contains(a.database.Os[h])&&l.createObjectStore(a.database.Os[h])}},n.onsuccess=r=>{var o;const l=(o=r.target)===null||o===void 0?void 0:o.result;l.onversionchange=()=>{l.close(),typeof e=="function"&&e(),a.vd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},t(l)},n.onerror=r=>{var o;const l=r;return a.vd.info("Could not open indexedDB "+a.database.xd+" v"+a.database.VERSION+": "+((o=l.target)===null||o===void 0?void 0:o.errorCode)),typeof e=="function"&&e(),!0},!0}setItem(t,e,s,n,a){if(!this.isSupported())return typeof a=="function"&&a(),!1;const r=this;return this.Cd(o=>{if(!o.objectStoreNames.contains(t))return r.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.database.xd+" - "+t+" is not a valid objectStore"),typeof a=="function"&&a(),void o.close();const l=o.transaction([t],"readwrite");l.oncomplete=()=>o.close();const u=l.objectStore(t).put(s,e);u.onerror=()=>{r.vd.error("Could not store object "+e+" in "+t+" on indexedDB "+r.database.xd),typeof a=="function"&&a()},u.onsuccess=()=>{typeof n=="function"&&n()}},a)}getItem(t,e,s){if(!this.isSupported())return!1;const n=this;return this.Cd(a=>{if(!a.objectStoreNames.contains(t))return n.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.xd+" - "+t+" is not a valid objectStore"),void a.close();const r=a.transaction([t],"readonly");r.oncomplete=()=>a.close();const o=r.objectStore(t).get(e);o.onerror=()=>{n.vd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.xd)},o.onsuccess=l=>{var u;const h=(u=l.target)===null||u===void 0?void 0:u.result;h!=null&&s(h)}})}kr(t,e,s){if(!this.isSupported())return typeof s=="function"&&s(),!1;const n=this;return this.Cd(a=>{if(!a.objectStoreNames.contains(t))return n.vd.error("Could not retrieve last record from "+t+" on indexedDB "+n.database.xd+" - "+t+" is not a valid objectStore"),typeof s=="function"&&s(),void a.close();const r=a.transaction([t],"readonly");r.oncomplete=()=>a.close();const o=r.objectStore(t).openCursor(null,"prev");o.onerror=()=>{n.vd.error("Could not open cursor for "+t+" on indexedDB "+n.database.xd),typeof s=="function"&&s()},o.onsuccess=l=>{var u;const h=(u=l.target)===null||u===void 0?void 0:u.result;h!=null&&h.value!=null&&h.key!=null?e(h.key,h.value):typeof s=="function"&&s()}},s)}ge(t,e){if(!this.isSupported())return!1;const s=this;return this.Cd(n=>{if(!n.objectStoreNames.contains(t))return s.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+s.database.xd+" - "+t+" is not a valid objectStore"),void n.close();const a=n.transaction([t],"readwrite");a.oncomplete=()=>n.close(),a.objectStore(t).delete(e).onerror=()=>{s.vd.error("Could not delete record "+e+" from "+t+" on indexedDB "+s.database.xd)}})}Xs(t,e){if(!this.isSupported())return!1;const s=this;return this.Cd(n=>{if(!n.objectStoreNames.contains(t))return s.vd.error("Could not retrieve objects from "+t+" on indexedDB "+s.database.xd+" - "+t+" is not a valid objectStore"),void n.close();const a=n.transaction([t],"readwrite");a.oncomplete=()=>n.close();const r=a.objectStore(t),o=r.openCursor(),l=[];o.onerror=()=>{l.length>0?(s.vd.info("Cursor closed midway through for "+t+" on indexedDB "+s.database.xd),e(l)):s.vd.error("Could not open cursor for "+t+" on indexedDB "+s.database.xd)},o.onsuccess=u=>{var h;const d=(h=u.target)===null||h===void 0?void 0:h.result;d!=null?(d.value!=null&&d.key!=null&&(r.delete(d.key).onsuccess=()=>{l.push(d.value)}),typeof d.continue=="function"&&d.continue()):l.length>0&&e(l)}})}clearData(){if(!this.isSupported())return!1;const t=[];for(const s in this.database.Os){const n=s;this.database.Os.hasOwnProperty(s)&&this.database.Os[n]!==this.database.Os.pe&&t.push(this.database.Os[n])}const e=this;return this.Cd(function(s){const n=s.transaction(t,"readwrite");n.oncomplete=()=>s.close();for(let a=0;a<t.length;a++){const r=t[a];n.objectStore(r).clear().onerror=function(){e.vd.error("Could not clear "+this.source.name+" on indexedDB "+e.database.xd)}}n.onerror=function(){e.vd.error("Could not clear object stores on indexedDB "+e.database.xd)}})}}U.Ps={$s:{xd:"AppboyServiceWorkerAsyncStorage",VERSION:6,Os:{pn:"data",$r:"pushClicks",Fu:"pushSubscribed",yd:"fallbackDevice",_s:"cardUpdates",pe:"optOut",qr
1:"pendingData",wh:"sdkAuthenticationSignature"},be:1}};const rs={_h:"allowCrawlerActivity",Nh:"baseUrl",se:"cookieExpiryInDays",Oh:"noCookies",Th:"devicePropertyAllowlist",ka:"disablePushTokenMaintenance",Rh:"enableLogging",Ph:"enableSdkAuthentication",_a:"manageServiceWorkerExternally",Dh:"minimumIntervalBetweenTriggerActionsInSeconds",Lh:"sessionTimeoutInSeconds",yh:"appVersion",Mh:"appVersionNumber",xa:"serviceWorkerLocation",Ma:"safariWebsitePushId",qa:"localization",sr:"contentSecurityNonce",nr:"allowUserSuppliedJavascript",ja:"inAppMessageZIndex",ba:"openInAppMessagesInNewTab",oh:"requireExplicitInAppMessageDismissal",Uh:"doNotLoadFontAwesome",Wh:"deviceId",ya:"serviceWorkerScope",Qe:"dustHost",Bh:"sdkFlavor",tn:"openCardsInNewTab"};function Ne(i){const t=[];let e;for(const s in i)e=s,Object.prototype.hasOwnProperty.call(i,e)&&i[e]!==void 0&&t.push(i[e]);return t}function It(i,t,e,s){const n=Ne(i);return n.indexOf(t)!==-1||(c.error(`${e} Valid values from ${s} are "${n.join('"/"')}".`),!1)}function K(i){return Array.isArray?Array.isArray(i):Object.prototype.toString.call(i)==="[object Array]"}function xt(i){return Object.prototype.toString.call(i)==="[object Date]"}function de(i){return Object.prototype.toString.call(i)==="[object Object]"}function nt(i){const t=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.push(e);return t}function jt(i,t){if(i===t)return i!==0||1/i==1/t;if(i==null||t==null)return i===t;const e=i.toString();if(e!==t.toString())return!1;switch(e){case"[object RegExp]":case"[object String]":return""+i==""+t;case"[object Number]":return+i!=+i?+t!=+t:+i==0?1/+i==1/t:+i==+t;case"[object Date]":case"[object Boolean]":return+i==+t}const s=e==="[object Array]";if(!s){if(typeof i!="object"||typeof t!="object")return!1;const o=i.constructor,l=t.constructor;if(o!==l&&!(typeof o=="function"&&o instanceof o&&typeof l=="function"&&l instanceof l)&&"constructor"in i&&"constructor"in t)return!1}const n=[],a=[];let r=n.length;for(;r--;)if(n[r]===i)return a[r]===t;if(n.push(i),a.push(t),s){if(r=i.length,r!==t.length)return!1;for(;r--;)if(!jt(i[r],t[r]))return!1}else{const o=nt(i);let l;if(r=o.length,nt(t).length!==r)return!1;for(;r--;)if(l=o[r],!Object.prototype.hasOwnProperty.call(t,l)||!jt(i[l],t[l]))return!1}return n.pop(),a.pop(),!0}function pe(i,t=!1){let e=i/1e3;return t&&(e=Math.floor(e)),e}function si(i){return 1e3*i}function zt(i){if(i==null)return null;const t=parseInt(i.toString());return isNaN(t)?null:new Date(1e3*t)}function ve(i){return i!=null&&xt(i)?i.toISOString().replace(/\.[0-9]{3}Z$/,""):i}function le(i){return i==null||i===""?null:new Date(i)}function ii(i){return i==null||i===""?new Date().valueOf():i}function os(i){return(new Date().valueOf()-i.valueOf())/1e3}function ls(i){return(i.valueOf()-new Date().valueOf())/1e3}const us=100,ni=500,ai=30,ri=30,oi=72e5,li=15,Le=1,vs=200,Vt=1e4,Jt=3,Yt=3e5,tt={ee:"Braze must be initialized before calling methods.",je:"logCustomEvent",Ku:"setCustomUserAttribute"};class W{constructor(){this.In={}}Kt(t){if(typeof t!="function")return null;const e=Lt.de();return this.In[e]=t,e}removeSubscription(t){delete this.In[t]}removeAllSubscriptions(){this.In={}}Le(){return Object.keys(this.In).length}A(t){const e=[];for(const s in this.In){const n=this.In[s];e.push(n(t))}return e}}class m{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S){this.id=t,this.viewed=e,this.title=s,this.imageUrl=n,this.description=a,this.updated=r,this.expiresAt=o,this.url=l,this.linkText=u,this.aspectRatio=h,this.extras=d,this.pinned=g,this.dismissible=b,this.clicked=w,this.language=y,this.altImageText=S,this.id=t,this.viewed=e||!1,this.title=s||"",this.imageUrl=n,this.description=a||"",this.updated=r||null,this.expiresAt=o||null,this.url=l,this.linkText=u,h==null?this.aspectRatio=null:(h=parseFloat(h.toString()),this.aspectRatio=isNaN(h)?null:h),this.extras=d||{},this.pinned=g||!1,this.dismissible=b||!1,this.dismissed=!1,this.clicked=w||!1,this.isControl=!1,this.language=y||null,this.altImageText=S||null,this.test=!1,this.ti=null,this.ii=null,this.si=null}subscribeToClickedEvent(t){return this.hi().Kt(t)}subscribeToDismissedEvent(t){return this.li().Kt(t)}removeSubscription(t){this.hi().removeSubscription(t),this.li().removeSubscription(t)}removeAllSubscriptions(){this.hi().removeAllSubscriptions(),this.li().removeAllSubscriptions()}dismissCard(){if(!this.dismissible||this.dismissed)return;typeof this.logCardDismissal=="function"&&this.logCardDismissal();let t=this.te;!t&&this.id&&(t=document.getElementById(this.id)),t&&(t.style.height=t.offsetHeight+"px",t.className=t.className+" ab-hide",setTimeout(function(){t&&t.parentNode&&(t.style.height="0",t.style.margin="0",setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},m.ni))},ni))}hi(){return this.ti==null&&(this.ti=new W),this.ti}li(){return this.ii==null&&(this.ii=new W),this.ii}gs(){const t=new Date().valueOf();return!(this.si!=null&&t-this.si<m.ei)&&(this.si=t,this.viewed=!0,!0)}ss(){this.viewed=!0,this.clicked=!0,this.hi().A()}ls(){return!(!this.dismissible||this.dismissed)&&(this.dismissed=!0,this.li().A(),!0)}ri(t){if(t==null||t[m.ui.qs]!==this.id)return!0;
1if(t[m.ui.Ei])return!1;if(t[m.ui.Bs]!=null&&this.updated!=null&&parseInt(t[m.ui.Bs])<pe(this.updated.valueOf()))return!0;if(t[m.ui.vs]&&!this.viewed&&(this.viewed=!0),t[m.ui.Is]&&!this.clicked&&(this.clicked=t[m.ui.Is]),t[m.ui.ws]!=null&&(this.title=t[m.ui.ws]),t[m.ui.ys]!=null&&(this.imageUrl=t[m.ui.ys]),t[m.ui.As]!=null&&(this.description=t[m.ui.As]),t[m.ui.Bs]!=null){const e=zt(t[m.ui.Bs]);e!=null&&(this.updated=e)}if(t[m.ui.Cs]!=null){let e;e=t[m.ui.Cs]===m.Ti?null:zt(t[m.ui.Cs]),this.expiresAt=e}if(t[m.ui.URL]!=null&&(this.url=t[m.ui.URL]),t[m.ui.Ds]!=null&&(this.linkText=t[m.ui.Ds]),t[m.ui.Es]!=null){const e=parseFloat(t[m.ui.Es].toString());this.aspectRatio=isNaN(e)?null:e}return t[m.ui.Fs]!=null&&(this.extras=t[m.ui.Fs]),t[m.ui.Gs]!=null&&(this.pinned=t[m.ui.Gs]),t[m.ui.Hs]!=null&&(this.dismissible=t[m.ui.Hs]),t[m.ui.Js]!=null&&(this.language=t[m.ui.Js]),t[m.ui.Ks]!=null&&(this.altImageText=t[m.ui.Ks]),t[m.ui.Ls]!=null&&(this.test=t[m.ui.Ls]),!0}qt(){c.error("Must be implemented in a subclass")}}m.Ti=-1,m.ui={qs:"id",vs:"v",Hs:"db",Ei:"r",Bs:"ca",Gs:"p",Cs:"ea",Fs:"e",xs:"tp",ys:"i",ws:"tt",As:"ds",URL:"u",Ds:"dm",Es:"ar",Is:"cl",Ls:"t",Js:"language",Ks:"image_alt"},m.ks={zs:"captioned_image",oi:"text_announcement",ai:"short_news",Ii:"banner_image",Ni:"control"},m.bs={qs:"id",vs:"v",Hs:"db",Ai:"cr",Bs:"ca",Gs:"p",ci:"t",Cs:"ea",Fs:"e",xs:"tp",ys:"i",ws:"tt",As:"ds",URL:"u",Ds:"dm",Es:"ar",Is:"cl",Ls:"s",Js:"l",Ks:"ia"},m.mi={Si:"ADVERTISING",Di:"ANNOUNCEMENTS",pi:"NEWS",di:"SOCIAL"},m.ni=400,m.ei=1e4;class ui extends m{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b){super(t,e,null,s,null,n,a,r,null,o,l,u,h,d,g,b),this.ae="ab-image-only",this.oe=!1,this.test=!1}qt(){const t={};return t[m.bs.xs]=m.ks.Ii,t[m.bs.qs]=this.id,t[m.bs.vs]=this.viewed,t[m.bs.ys]=this.imageUrl,t[m.bs.Bs]=this.updated,t[m.bs.Cs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Es]=this.aspectRatio,t[m.bs.Fs]=this.extras,t[m.bs.Gs]=this.pinned,t[m.bs.Hs]=this.dismissible,t[m.bs.Is]=this.clicked,t[m.bs.Js]=this.language,t[m.bs.Ks]=this.altImageText,t[m.bs.Ls]=this.test,t}}class ci extends m{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S){super(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S),this.ae="ab-captioned-image",this.oe=!0,this.test=!1}qt(){const t={};return t[m.bs.xs]=m.ks.zs,t[m.bs.qs]=this.id,t[m.bs.vs]=this.viewed,t[m.bs.ws]=this.title,t[m.bs.ys]=this.imageUrl,t[m.bs.As]=this.description,t[m.bs.Bs]=this.updated,t[m.bs.Cs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Ds]=this.linkText,t[m.bs.Es]=this.aspectRatio,t[m.bs.Fs]=this.extras,t[m.bs.Gs]=this.pinned,t[m.bs.Hs]=this.dismissible,t[m.bs.Is]=this.clicked,t[m.bs.Js]=this.language,t[m.bs.Ks]=this.altImageText,t[m.bs.Ls]=this.test,t}}class hi extends m{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S){super(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S),this.ae="ab-classic-card",this.oe=!0}qt(){const t={};return t[m.bs.xs]=m.ks.ai,t[m.bs.qs]=this.id,t[m.bs.vs]=this.viewed,t[m.bs.ws]=this.title,t[m.bs.ys]=this.imageUrl,t[m.bs.As]=this.description,t[m.bs.Bs]=this.updated,t[m.bs.Cs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Ds]=this.linkText,t[m.bs.Es]=this.aspectRatio,t[m.bs.Fs]=this.extras,t[m.bs.Gs]=this.pinned,t[m.bs.Hs]=this.dismissible,t[m.bs.Is]=this.clicked,t[m.bs.Js]=this.language,t[m.bs.Ks]=this.altImageText,t[m.bs.Ls]=this.test,t}}class _e extends m{constructor(t,e,s,n,a,r){super(t,e,null,null,null,s,n,null,null,null,a,r),this.isControl=!0,this.ae="ab-control-card",this.oe=!1}qt(){const t={};return t[m.bs.xs]=m.ks.Ni,t[m.bs.qs]=this.id,t[m.bs.vs]=this.viewed,t[m.bs.Bs]=this.updated,t[m.bs.Cs]=this.expiresAt,t[m.bs.Fs]=this.extras,t[m.bs.Gs]=this.pinned,t[m.bs.Ls]=this.test,t}}function Ge(i){const t=i?.Rt(p.Tt.SS);let e;return t&&(e={label:t.l,name:t.a}),e}class ht{constructor(t,e,s,n,a){this.userId=t,this.type=e,this.time=s,this.sessionId=n,this.data=a,this.userId=t,this.type=e,this.time=ii(s),this.sessionId=n,this.data=a}ta(){var t;const e={name:this.type,time:pe(this.time),data:this.data||{},session_id:this.sessionId};this.userId!=null&&(e.user_id=this.userId);const s=((t=f.Br())===null||t===void 0?void 0:t.Fh())||!1;if(!e.user_id&&!s){const n=Ge(f.p());n&&(e.alias=n)}return e}
1qt(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(t){return new ht(t.user_id,t.name,t.time,t.session_id,t.data)}static hS(t){return t!=null&&de(t)&&t.t!=null&&t.t!==""}static _u(t){return new ht(t.u,t.t,t.ts,t.s,t.d)}}const vt=i=>i instanceof Error?i.message:String(i);class Et{constructor(t,e,s){this.Tu=t,t==null&&(t=Lt.de()),!s||isNaN(s)?this.lm=new Date().valueOf():this.lm=s,this.Tu=t,this.pm=new Date().valueOf(),this.fm=e}qt(){return`g:${encodeURIComponent(this.Tu)}|e:${this.fm}|c:${this.lm}|l:${this.pm}`}static cS(t){if(typeof t!="string")return null;const e=t.lastIndexOf("|e:"),s=t.substring(0,e),n=s.split("g:")[1];let a;return a=/[|:]/.test(n)?encodeURIComponent(n):n,t=t.replace(s,`g:${a}`)}static _u(t){let e;if(typeof t=="string")try{const s=t.split("|");if(!K(s)||s.length!==4)return null;const n=r=>r.split(":")[1],a=r=>{const o=parseInt(n(r));if(!isNaN(o))return o};e=new Et(decodeURIComponent(n(s[0])),a(s[1]),a(s[2])),e.pm=a(s[3])}catch(s){c.info(`Unable to parse cookie string ${t}, failed with error: ${vt(s)}`)}else{if(t==null||t.g==null)return null;e=new Et(t.g,t.e,t.c),e.pm=t.l}return e}}function we(i){let t=i.length;for(let e=i.length-1;e>=0;e--){const s=i.charCodeAt(e);s>127&&s<=2047?t++:s>2047&&s<=65535&&(t+=2),s>=56320&&s<=57343&&e--}return t}function di(i){try{i=i.replace(/-/g,"+").replace(/_/g,"/");const t=window.atob(i),e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);const s=new Uint16Array(e.buffer);return String.fromCharCode(...s)}catch(t){return c.error("Unable to decode Base64: "+t),null}}const N={types:{io:"container",logCustomEvent:"logCustomEvent",setEmailNotificationSubscriptionType:"setEmailNotificationSubscriptionType",setPushNotificationSubscriptionType:"setPushNotificationSubscriptionType",setCustomUserAttribute:"setCustomUserAttribute",requestPushPermission:"requestPushPermission",addToSubscriptionGroup:"addToSubscriptionGroup",removeFromSubscriptionGroup:"removeFromSubscriptionGroup",addToCustomAttributeArray:"addToCustomAttributeArray",removeFromCustomAttributeArray:"removeFromCustomAttributeArray",mo:"openLink",uo:"openLinkInWebView"},properties:{type:"type",eo:"steps",so:"args"}},Xe={Un:"unknownBrazeAction"},ws=(i,t)=>i===Xe.Un?`${t} contains an unknown braze action type and will not be displayed.`:"";function Ve(i){try{const t=i.match(ue),e=t?t[0].length:null,s=e?i.substring(e):null;if(e==null||e>i.length-1||!s)return void c.error(`Did not find base64 encoded brazeAction in url to process : ${i}`);const n=di(s);return n?JSON.parse(n):void c.error(`Failed to decode base64 encoded brazeAction: ${s}`)}catch(t){return void c.error(`Failed to process brazeAction URL ${i} : ${vt(t)}`)}}function ys(i,t){let e=!1;if(t){for(const s of t)if(e=e||i(s),e)return!0}return!1}function Je(i){const t=N.properties.type,e=N.properties.eo;try{if(i==null)return!0;const s=i[t];return s===N.types.io?ys(Je,i[e]):!Si(s)}catch{return!0}}function Ss(i){if(!i||!xs(i))return!1;const t=N.properties.type,e=N.properties.eo,s=i[t];return s===N.types.io?ys(Ss,i[e]):s===N.types.requestPushPermission}const pi=/^[^\x00-\x1F\x22]+$/,fi=/[$.]/,mi=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],bi=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,ue=/^brazeActions:\/\/v\d+\//,gi=/^[^\s]+$/;function bt(i,t,e){const s=i!=null&&typeof i=="string"&&(i===""||i.match(pi)!=null);return s||c.error(`Cannot ${t} because ${e} "${i}" is invalid.`),s}function Ye(i){return i!=null&&i.match(fi)&&mi.indexOf(i)===-1&&c.warn("Custom attribute keys cannot contain '$' or '.'"),bt(i,"set custom user attribute","the given key")}function Ze(i){const t=typeof i;return i==null||t==="number"||t==="boolean"||xt(i)||t==="string"}function qe(i,t,e){const s=e!==-1;if(s&&e>50)return c.error("Nested attributes cannot be more than 50 levels deep."),!1;const n=s?e+1:-1;if(K(i)&&K(t)){for(let a=0;a<i.length&&a<t.length;a++)if(xt(i[a])&&(t[a]=ve(i[a])),!qe(i[a],t[a],n))return!1}else{if(!de(i))return Ze(i);for(const a of nt(i)){const r=i[a];if(s&&!Ye(a)||(xt(r)&&(t[a]=ve(r)),!qe(r,t[a],n)))return!1}}return!0}function vi(i,t,e,s,n){let a;return a=de(i)||K(i)?qe(i,t,n?1:-1):Ze(i),a||c.error(`Cannot ${e} because ${s} "${i}
1" is invalid.`),a}function ct(i,t,e,s=!1){const n=typeof i=="string"||i===null&&s;return n||c.error(`Cannot ${t} because ${e} "${i}" is invalid.`),n}function Oe(i,t,e,s,n){if(i==null&&(i={}),typeof i!="object"||K(i))return c.error(`${t} requires that ${e} be an object. Ignoring ${n}.`),[!1,null];let a,r;t===tt.Ku?(a=76800,r="75KB"):(a=51200,r="50KB");const o=JSON.stringify(i);if(we(o)>a)return c.error(`Could not ${s} because ${e} was greater than the max size of ${r}.`),[!1,null];let l;try{l=JSON.parse(o)}catch{return c.error(`Could not ${s} because ${e} did not contain valid JSON.`),[!1,null]}for(const u in i){if(t===tt.Ku&&!Ye(u))return[!1,null];if(!bt(u,s,`the ${n} property name`))return[!1,null];const h=i[u];if(t!==tt.Ku&&h==null){delete i[u],delete l[u];continue}if(xt(h)&&(l[u]=ve(h)),!vi(h,l[u],s,`the ${n} property "${u}"`,t===tt.Ku))return[!1,null]}return[!0,l]}function wi(i,t){let e=!1,s=!1;const n=()=>{c.error("Custom attribute arrays must be either string arrays or object arrays.")};for(const a of t)if(typeof a=="string"){if(s)return n(),[!1,!1];if(!bt(a,`set custom user attribute "${i}"`,"the element in the given array"))return[!1,!1];e=!0}else{if(!de(a))return n(),[!1,!1];if(e)return n(),[!1,!1];if(!Oe(a,tt.Ku,"attribute value",`set custom user attribute "${i}"`,"custom user attribute"))return[!1,!1];s=!0}return[e,s]}function yi(i){if(typeof i!="string")return!1;const t=i.length;return!(t===0||t>256)&&bi.test(i.toLowerCase())}function xs(i){if(!(N.properties.type in i))return!1;switch(i[N.properties.type]){case N.types.io:if(N.properties.eo in i)return!0;break;case N.types.logCustomEvent:case N.types.setEmailNotificationSubscriptionType:case N.types.setPushNotificationSubscriptionType:case N.types.setCustomUserAttribute:case N.types.addToSubscriptionGroup:case N.types.removeFromSubscriptionGroup:case N.types.addToCustomAttributeArray:case N.types.removeFromCustomAttributeArray:case N.types.mo:case N.types.uo:if(N.properties.so in i)return!0;break;case N.types.requestPushPermission:return!0;default:return!1}return!1}function Si(i){let t=!1;return Object.keys(N.types).forEach(e=>{N.types[e]!==i.toString()||(t=!0)}),t}function xi(i){return gi.test(i)}class M{constructor(t,e){this.Ss=t,this.Ru=e,this.Ss=t,this.Ru=e}getUserId(t){const e=this.Ss.getUserId();if(typeof t!="function")return e;c.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),t(e)}addAlias(t,e){return!ct(t,"add alias","the alias",!1)||t.length<=0?(c.error("addAlias requires a non-empty alias"),!1):!ct(e,"add alias","the label",!1)||e.length<=0?(c.error("addAlias requires a non-empty label"),!1):this.Ru.Gu(t,e).lt}setFirstName(t){return!!ct(t,"set first name","the firstName",!0)&&this.Ss.zu("first_name",t)}setLastName(t){return!!ct(t,"set last name","the lastName",!0)&&this.Ss.zu("last_name",t)}setEmail(t){return t===null||yi(t)?this.Ss.zu("email",t):(c.error(`Cannot set email address - "${t}" did not pass RFC-5322 validation.`),!1)}setGender(t){return typeof t=="string"&&(t=t.toLowerCase()),!(t!==null&&!It(M.Genders,t,`Gender "${t}" is not a valid gender.`,"User.Genders"))&&this.Ss.zu("gender",t)}setDateOfBirth(t,e,s){return t===null&&e===null&&s===null?this.Ss.zu("dob",null):(t=t!=null?parseInt(t.toString()):null,e=e!=null?parseInt(e.toString()):null,s=s!=null?parseInt(s.toString()):null,t==null||e==null||s==null||isNaN(t)||isNaN(e)||isNaN(s)||e>12||e<1||s>31||s<1?(c.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.Ss.zu("dob",`${t}-${e}-${s}`))}setCountry(t){return!!ct(t,"set country","the country",!0)&&this.Ss.zu("country",t)}setHomeCity(t){return!!ct(t,"set home city","the homeCity",!0)&&this.Ss.zu("home_city",t)}setLanguage(t){return!!ct(t,"set language","the language",!0)&&this.Ss.zu("language",t)}setEmailNotificationSubscriptionType(t){return!!It(M.NotificationSubscriptionTypes,t,`Email notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Ss.zu("email_subscribe",t)}setPushNotificationSubscriptionType(t){return!!It(M.NotificationSubscriptionTypes,t,`Push notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Ss.zu("push_subscribe",t)}setPhoneNumber(t){return!!ct(t,"set phone number","the phoneNumber",!0)&&(t===null||t.match(M.Hu)?this.Ss.zu("phone",t):(c.error(`Cannot set phone number - "${t}
1" did not pass validation.`),!1))}setLastKnownLocation(t,e,s,n,a){return t==null||e==null?(c.error("Cannot set last-known location - latitude and longitude are required."),!1):(t=parseFloat(t.toString()),e=parseFloat(e.toString()),s!=null&&(s=parseFloat(s.toString())),n!=null&&(n=parseFloat(n.toString())),a!=null&&(a=parseFloat(a.toString())),isNaN(t)||isNaN(e)||s!=null&&isNaN(s)||n!=null&&isNaN(n)||a!=null&&isNaN(a)?(c.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(c.error("Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively."),!1):s!=null&&s<0||a!=null&&a<0?(c.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Ru.setLastKnownLocation(this.Ss.getUserId(),t,e,n,s,a).lt)}setCustomUserAttribute(t,e,s){if(!Ye(t))return!1;const n=a=>{const[r]=Oe(a,tt.Ku,"attribute value",`set custom user attribute "${t}"`,"custom user attribute");return r};if(K(e)){const[a,r]=wi(t,e);if(!a&&!r&&e.length!==0)return!1;if(a||e.length===0)return this.Ru.Mu(O.Yu,t,e).lt;for(const o of e)if(!n(o))return!1}else if(de(e)){if(!n(e))return!1;if(s)return this.Ru.Mu(O.Vu,t,e).lt}else if(!(e!==void 0&&Ze(e))||(xt(e)&&(e=ve(e)),typeof e=="string"&&!bt(e,`set custom user attribute "${t}"`,"the element in the given array")))return!1;return this.Ss.setCustomUserAttribute(t,e)}addToCustomAttributeArray(t,e){return!!bt(t,"add to custom user attribute array","the given key")&&!(e!=null&&!bt(e,"add to custom user attribute array","the given value"))&&this.Ru.Mu(O.Qu,t,e).lt}removeFromCustomAttributeArray(t,e){return!!bt(t,"remove from custom user attribute array","the given key")&&!(e!=null&&!bt(e,"remove from custom user attribute array","the given value"))&&this.Ru.Mu(O.Xu,t,e).lt}incrementCustomUserAttribute(t,e){if(!bt(t,"increment custom user attribute","the given key"))return!1;e==null&&(e=1);const s=parseInt(e.toString());return isNaN(s)||s!==parseFloat(e.toString())?(c.error(`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`),!1):this.Ru.Mu(O.Zu,t,s).lt}setCustomLocationAttribute(t,e,s){return!!bt(t,"set custom location attribute","the given key")&&((e!==null||s!==null)&&(e=e!=null?parseFloat(e.toString()):null,s=s!=null?parseFloat(s.toString()):null,e==null&&s!=null||e!=null&&s==null||e!=null&&(isNaN(e)||e>90||e<-90)||s!=null&&(isNaN(s)||s>180||s<-180))?(c.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal."),!1):this.Ru.Na(t,e,s).lt)}
1addToSubscriptionGroup(t){return!ct(t,"add user to subscription group","subscription group ID",!1)||t.length<=0?(c.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ru.va(t,M.Ia.SUBSCRIBED).lt}removeFromSubscriptionGroup(t){return!ct(t,"remove user from subscription group","subscription group ID",!1)||t.length<=0?(c.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ru.va(t,M.Ia.UNSUBSCRIBED).lt}setLineId(t){return ct(t,"set LINE user ID","the ID",!0)&&t?.length!==0?t&&t.length>M.Ca?(c.error(`Rejected LINE user ID ${t} because it is longer than ${M.Ca} characters.`),!1):this.Ss.zu("native_line_id",t):(c.error("setLineId requires a non-empty ID"),!1)}gu(t,e,s,n,a){this.Ss.gu(t,e,s,n,a),this.Ru.Ea()}wu(t){this.Ss.wu(t)}}M.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},M.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},M.Hu=/^[0-9 .\\(\\)\\+\\-]+$/,M.Ia={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},M.Sa="user_id",M.Bu="custom",M.br=997,M.Ca=33;class Es{constructor(){}ef(){}ff(){}Fa(t){}static nf(t,e){if(t&&e){if(t=t.toLowerCase(),K(e.cf)){for(let s=0;s<e.cf.length;s++)if(t.indexOf(e.cf[s].toLowerCase())!==-1)return e.identity}else if(t.indexOf(e.cf.toLowerCase())!==-1)return e.identity}}}const rt={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox",Sg:"ChatGPTBrowser"},Ct={Dg:"Android",co:"iOS",Pg:"Mac",kg:"Windows"};class Qe extends Es{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){const t=this.hf();this.browser=t.browser||"Unknown Browser",this.version=t.version||"Unknown Version"}this.OS=null}ef(){return this.browser}ff(){return this.version}Fa(t){if(this.OS)return Promise.resolve(this.OS);const e=s=>{for(let n=0;n<t.length;n++){const a=Qe.nf(s,t[n]);if(a)return this.OS=a,this.OS}return s};return this.userAgentData.platform?Promise.resolve(e(this.userAgentData.platform)):this.getHighEntropyValues().then(s=>s.platform?e(s.platform):navigator.platform).catch(()=>navigator.platform)}hf(){const t={},e=this.userAgentData.brands;if(e&&e.length)for(const s of e){const n=this.uf(rt),a=s.brand.match(n);if(a&&a.length>0){t.browser=a[0],t.version=s.version;break}}return t}uf(t){const e=[];for(const s in t){const n=s;e.push(t[n])}return new RegExp("("+e.join("|")+")","i")}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()}}class ye extends Es{constructor(){super(),this.Sd=ye.hf(navigator.userAgent||"")}ef(){return this.Sd[0]||"Unknown Browser"}ff(){return this.Sd[1]||"Unknown Version"}Fa(t){for(let e=0;e<t.length;e++){const s=t[e].string;let n=ye.nf(s,t[e]);if(n)return n===Ct.Pg&&navigator.maxTouchPoints>1&&(n=Ct.co),Promise.resolve(n)}return Promise.resolve(navigator.platform)}static hf(t){let e,s=t.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chatgptbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(t.indexOf("(Web0S; Linux/SmartTV)")!==-1)return["LG Smart TV",null];if(t.indexOf("CrKey")!==-1)return["Chromecast",null];if(t.indexOf("BRAVIA")!==-1||t.indexOf("SonyCEBrowser")!==-1||t.indexOf("SonyDTV")!==-1)return["Sony Smart TV",null];if(t.indexOf("PhilipsTV")!==-1)return["Philips Smart TV",null];if(t.match(/\b(Roku)\b/))return["Roku",null];if(t.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(s[1]===rt.rO){if(t.includes(rt.Sg))return[rt.Sg,s[2]];if(e=t.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),e!=null)return e=e.slice(1),e[0]=e[0].replace("OPR",rt.oO),e[0]=e[0].replace("EdgA",rt.eO),e[0]==="Edg"&&(e[0]=rt.eO),[e[0],e[1]]}if(s[1]===rt.Bg&&(e=t.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),e!=null))return e=e.slice(1),e[0]=e[0].replace("EdgiOS",rt.eO),[e[0],e[1]];if(s=s[2]?[s[1],s[2]]:[null,null],s[0]===rt.Bg&&(e=t.match(/version\/(\.?\d+(\.\d+)*)/i))!=null&&s.splice(1,1,e[1]),(e=t.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))!=null&&s.splice(1,1,e[2]),s[0]===rt.oO&&(e=t.match(/mini\/(\.?\d+(\.\d+)*)/i))!=null)return["Opera Mini",e[1]||""];if(s[0]){const n=s[0].toLowerCase();n==="crios"&&(s[0]=rt.rO),n==="tizen"&&(s[0]="Samsung Smart TV",s[1]=null),n==="samsungbrowser"&&(s[0]="Samsung Browser")}return s}}class ce{constructor(){let t;t=navigator.userAgent.toLowerCase().includes(rt.Sg.toLowerCase())||!navigator.userAgentData?ye:Qe,this.vg=new t,this.userAgent=navigator.userAgent,this.browser=this.vg.ef(),this.version=this.vg.ff(),this.OS=null,this.Fa().then(s=>this.OS=s);const e=navigator;this.language=(e.userLanguage||e.language||e.browserLanguage||e.systemLanguage||"").toLowerCase(),this.il=ce.xg(this.userAgent)}IS(){return this.browser===rt.Bg}Aa(){return this.OS||null}Fa(){return this.OS?Promise.resolve(this.OS):this.vg.Fa(ce.Og).then(t=>(this.OS=t,t))}static xg(t){t=t.toLowerCase();const e=["bot","slurp","baiduspider","yandex","facebookexternalhit","sogou","ia_archiver","https://github.com/prerender/prerender","aolbuild","bingpreview","mediapartners-google","teoma","taiko","facebookexternalhit","facebookcatalog","meta-webindexer","meta-externalads","meta-externalagent","meta-externalfetcher"];for(let s=0;s<e.length;s++)if(t.indexOf(e[s])!==-1)return!0;return!1}}ce.Og=[{string:navigator.platform,cf:"Win",identity:Ct.kg},{string:navigator.platform,cf:"Mac",identity:Ct.Pg},{string:navigator.platform,cf:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,cf:"FreeBSD",identity:"FreeBSD"},{string:navigator.platform,cf:"OpenBSD",identity:"OpenBSD"},{string:navigator.platform,cf:"Nintendo",identity:"Nintendo"},{string:navigator.platform,cf:"SunOS",identity:"SunOS"},{string:navigator.platform,cf:"PlayStation",identity:"PlayStation"},{string:navigator.platform,cf:"X11",identity:"X11"},{string:navigator.userAgent,cf:["iPhone","iPad","iPod"],identity:Ct.co},{string:navigator.platform,cf:"Pike v",identity:Ct.co},{string:navigator.userAgent,cf:["Web0S"],identity:"WebOS"},{string:navigator.userAgent,cf:"Tizen",identity:"Tizen"},{string:navigator.userAgent,cf:"Coolita",identity:"Other Smart TV"},{string:navigator.userAgent,cf:"WhaleTV",identity:"Other Smart TV"},{string:navigator.platform,cf:["Linux armv7l","Android"],identity:Ct.Dg},{string:navigator.userAgent,cf:["Android"],identity:Ct.Dg},{string:navigator.platform,cf:"Linux",identity:"Linux"}];const ot=new ce,p={Ou:{Cu:"ab.storage.userId",Wh:"ab.storage.deviceId",um:"ab.storage.sessionId"},Tt:{_c:"ab.test",QE:"ab.storage.events",ZE:"ab.storage.attributes",$E:"ab.storage.attributes.anonymous_user",Ba:"ab.storage.device",Ka:"ab.storage.sdk_metadata",Pa:"ab.storage.session_id_for_cached_metadata",Uu:"ab.storage.pushToken",tS:"ab.storage.cardImpressions",tc:"ab.storage.serverConfig",eS:"ab.storage.triggers",sS:"ab.storage.triggers.ts",dm:"ab.storage.messagingSessionStart",Ci:"ab.storage.cc",gi:"ab.storage.ccLastFullSync",ji:"ab.storage.ccLastCardUpdated",Ml:"ab.storage.globalRateLimitCurrentTokenCount",Ll:"ab.storage.dynamicRateLimitCurrentTokenCount",ns:"ab.storage.ccClicks",hs:"ab.storage.ccImpressions",us:"ab.storage.ccDismissals",rS:"ab.storage.lastDisplayedTriggerTimesById",oS:"ab.storage.lastDisplayedTriggerTime",nS:"ab.storage.triggerFireInstancesById",fh:"ab.storage.signature",aS:"ab.storage.brazeSyncRetryCount",ki:"ab.storage.sdkVersion",Fo:"ab.storage.ff",jo:"ab.storage.ffImpressions",qo:"ab.storage.ff
1LastRefreshAt",Do:"ab.storage.ff.sessionId",iS:"ab.storage.lastReqToEndpoint",ES:"ab.storage.requestAttempts",pa:"ab.storage.deferredIam",Cl:"ab.storage.lastSdkReq",SS:"ab.storage.alias",St:"ab.storage.banners",Wt:"ab.storage.banners.impressions",Mt:"ab.storage.banners.dismissals",_t:"ab.storage.banners.sessionId",Gt:"ab.storage.banners.lastRequestedTime",Ke:"ab.storage.dust.mite",Qe:"ab.storage.dust.host",Ve:"ab.storage.dust.auth",Xe:"ab.storage.dust.expiration"},ce:"ab.optOut"};class Y{constructor(t,e){this.lS=t,this._S=e,this.lS=t,this._S=e}hl(t){const e=nt(p.Ou),s=new Y.le(t);for(const n of e)s.remove(p.Ou[n])}Iu(t,e){let s=null;e!=null&&e instanceof Et&&(s=e.qt()),this.lS.store(t,s)}uS(t){const e=this.$u(t);e!=null&&(e.pm=new Date().valueOf(),this.Iu(t,e))}$u(t){const e=this.lS.wr(t),s=(a=>{let r;try{r=JSON.parse(a)}catch{r=null}return r})(e);let n;if(s)n=Et._u(s)||null,n&&this.Iu(t,n);else{const a=Et.cS(e);n=Et._u(a)||null,a!==e&&n&&this.Iu(t,n)}return n}jm(t){this.lS.remove(t)}ll(){const t=nt(p.Ou);let e;for(const s of t)e=this.$u(p.Ou[s]),e!=null&&this.Iu(p.Ou[s],e)}ol(t){let e;if(t==null||t.length===0)return!1;e=K(t)?t:[t];let s=this._S.wr(p.Tt.QE);s!=null&&K(s)||(s=[]);for(let n=0;n<e.length;n++)s.push(e[n].qt());return this._S.store(p.Tt.QE,s)}gm(t){return t!=null&&this.ol([t])}TS(){let t=this._S.wr(p.Tt.QE);this._S.remove(p.Tt.QE),t==null&&(t=[]);const e=[];let s=!1,n=null;if(K(t))for(let a=0;a<t.length;a++)ht.hS(t[a])?e.push(ht._u(t[a])):n=a;else s=!0;if(s||n!=null){let a="Stored events could not be deserialized as Events";s&&(a+=", was "+Object.prototype.toString.call(t)+" not an array"),n!=null&&(a+=", value at index "+n+" does not look like an event"),a+=", serialized values were of type "+typeof t+": "+JSON.stringify(t),e.push(new ht(null,O.Ya,new Date().valueOf(),null,{e:a}))}return e}It(t,e){return!!It(p.Tt,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this._S.store(t,e)}Rt(t){return!!It(p.Tt,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this._S.wr(t)}Qt(t){return!!It(p.Tt,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this._S.remove(t),!0)}clearData(){const t=nt(p.Ou),e=nt(p.Tt);for(let s=0;s<t.length;s++){const n=t[s];this.lS.remove(p.Ou[n])}for(let s=0;s<e.length;s++){const n=e[s];this._S.remove(p.Tt[n])}}AS(t){return t||p.Tt.$E}vl(t){let e=this._S.wr(p.Tt.ZE);e==null&&(e={});const s=this.AS(t[M.Sa]),n=e[s];for(const a in t)a!==M.Sa&&(e[s]==null||n&&n[a]==null)&&this.Eu(t[M.Sa],a,t[a])}Eu(t,e,s){let n=this._S.wr(p.Tt.ZE);n==null&&(n={});const a=this.AS(t);let r=n[a];if(r==null&&(r={},t!=null&&(r[M.Sa]=t)),e===M.Bu){r[e]==null&&(r[e]={});for(const o in s)r[e][o]=s[o]}else r[e]=s;return n[a]=r,this._S.store(p.Tt.ZE,n)}gS(){const t=this._S.wr(p.Tt.ZE);this._S.remove(p.Tt.ZE);const e=[];for(const s in t)t[s]!=null&&e.push(t[s]);return e}Lu(t){const e=this._S.wr(p.Tt.ZE);if(e!=null){const r=this.AS(null),o=e[r];o!=null&&(e[r]=void 0,this._S.store(p.Tt.ZE,e),o[M.Sa]=t,this.vl(o))}const s=this.$u(p.Ou.um);let n=null;s!=null&&(n=s.Tu);const a=this.TS();if(a!=null)for(let r=0;r<a.length;r++){const o=a[r];o.userId==null&&o.sessionId==n&&(o.userId=t),this.gm(o)}}RS(){return this._S.dS}}Y.wc=class{constructor(i){this.tu=i,this.tu=i,this.dS=ot.IS()?3:10}bS(i){return i+"."+this.tu}store(i,t){const e={v:t};try{return localStorage.setItem(this.bS(i),JSON.stringify(e)),!0}catch(s){return c.info("Storage failure: "+vt(s)),!1}}wr(i){try{let t=null;const e=localStorage.getItem(this.bS(i));return e!=null&&(t=JSON.parse(e)),t==null?null:t.v}catch(t){return c.info("Storage retrieval failure: "+vt(t)),null}}remove(i){try{localStorage.removeItem(this.bS(i))}catch(t){return c.info("Storage removal failure: "+vt(t)),!1}}},Y.Rc=class{constructor(){this.fS={},this.mS=5242880,this.dS=3}store(i,t){const e={value:t},s=this.KS(t);return s>this.mS?(c.info("Storage failure: object is â"+s+" bytes which is greater than the max of "+this.mS),!1):(this.fS[i]=e,!0)}KS(i){const t=[],e=[i];let s=0;for(;e.length;){const n=e.pop();if(typeof n=="boolean")s+=4;else if(typeof n=="string")s+=2*n.length;else if(typeof n=="number")s+=8;else if(typeof n=="object"&&t.indexOf(n)===-1){let a,r;t.push(n);for(const o in n)r=n,a=o,e.push(r[a])}}return s}wr(i){const t=this.fS[i];return t==null?null:t.value}remove(i){this.fS[i]=null}},Y.le=class{constructor(i,t,e){this.tu=i,this.YS=t,this.tu=i,this.NS=this.DS();const s=typeof e=="number"&&e>0?e:400;this.GS=24*s*60,this.CS={},this.YS=!!t}bS(i){return this.tu!=null?i+"."+this.tu:i}DS(){let i=0,t=document.location.hostname;const e=t.split("."),s="ab._gd";
1for(;i<e.length-1&&document.cookie.indexOf(s+"="+s)===-1;)i++,t="."+e.slice(-1-i).join("."),document.cookie=s+"="+s+";domain="+t+";";return document.cookie=s+"=;expires="+new Date(0).toUTCString()+";domain="+t+";",t}me(){const i=new Date;return i.setTime(i.getTime()+60*this.GS*1e3),i.getFullYear()}MS(){const i=Ne(p.Ou),t=document.cookie.split(";");for(let e=0;e<t.length;e++){let s=t[e];for(;s.charAt(0)===" ";)s=s.substring(1);let n=!1;for(let a=0;a<i.length;a++)if(s.indexOf(i[a])===0){n=!0;break}if(n){const a=s.split("=")[0];a.indexOf("."+this.tu)===-1&&this.pS(a)}}}store(i,t){this.MS();const e=this.bS(i),s=new Date;s.setTime(s.getTime()+60*this.GS*1e3);const n="expires="+s.toUTCString(),a="domain="+this.NS;let r;r=this.YS?t:encodeURIComponent(t);const o=e+"="+r+";"+n+";"+a+";path=/";if(o.length>=4093)return c.info("Storage failure: string is "+o.length+" chars which is too large to store as a cookie."),this.CS[e]=!0,this.pS(e),!1;try{document.cookie=o}catch(u){return c.info("Storage failure: "+vt(u)),this.CS[e]=!0,!1}const l=this.YS?String(r):decodeURIComponent(r);return this.vS(e)!==l?(c.info(`Storage failure: unable to verify cookie write for "${e}". Falling back to other storage.`),this.CS[e]=!0,this.pS(e),!1):(delete this.CS[e],!0)}wr(i){const t=this.bS(i);return this.CS[t]?null:this.vS(t)}vS(i){const t=[],e=i+"=",s=document.cookie.split(";");for(let n=0;n<s.length;n++){let a=s[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(e)===0)try{let r;r=this.YS?a.substring(e.length,a.length):decodeURIComponent(a.substring(e.length,a.length)),t.push(r)}catch(r){return c.info("Storage retrieval failure: "+vt(r)),this.pS(i),null}}return t.length>0?t[t.length-1]:null}remove(i){this.pS(this.bS(i))}pS(i){const t=i+"=;expires="+new Date(0).toUTCString();document.cookie=t,document.cookie=t+";path=/";const e=t+";domain="+this.NS;document.cookie=e,document.cookie=e+";path=/"}},Y.Ec=class{constructor(i,t,e,s){this.tu=i,this.US=[],t&&this.US.push(new Y.le(i,void 0,s)),e&&this.US.push(new Y.wc(i)),this.US.push(new Y.Rc)}store(i,t){let e=!0;for(let s=0;s<this.US.length;s++)e=this.US[s].store(i,t)&&e;return e}wr(i){for(let t=0;t<this.US.length;t++){const e=this.US[t].wr(i);if(e!=null)return e}return null}remove(i){new Y.le(this.tu).remove(i);for(let t=0;t<this.US.length;t++)this.US[t].remove(i)}};class Ei{constructor(t,e,s){this.C=t,this.gh=e,this.bh=s,this.C=t,this.gh=e||!1,this.bh=s,this.Sh=new W,this.Ah=0,this.ph=1}Fh(){return this.gh}kh(){return this.C.Rt(p.Tt.fh)}setSdkAuthenticationSignature(t){const e=this.kh();this.C.It(p.Tt.fh,t);const s=U.Ps.$s;new U(s,c).setItem(s.Os.wh,this.ph,t),e!==t&&this.ct()}jh(){this.C.Qt(p.Tt.fh);const t=U.Ps.$s;new U(t,c).ge(t.Os.wh,this.ph)}subscribeToSdkAuthenticationFailures(t){return this.bh.Kt(t)}Ch(t){this.bh.A(t)}xh(){this.Sh.removeAllSubscriptions()}Eh(){this.Ah+=1}Ih(){return this.Ah}ct(){this.Ah=0}}class te{constructor(){}I(t){}changeUser(t=!1){}clearData(t=!1){}}class Ti{constructor(t){this.id=t,this.id=t}ta(){const t={};return this.browser!=null&&(t.browser=this.browser),this.Oa!=null&&(t.browser_version=this.Oa),this.os!=null&&(t.os_version=this.os),this.resolution!=null&&(t.resolution=this.resolution),this.language!=null&&(t.locale=this.language),this.timeZone!=null&&(t.time_zone=this.timeZone),this.userAgent!=null&&(t.user_agent=this.userAgent),t}}const Ot={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};class Ci{constructor(t,e){this.C=t,this.Da=e,this.C=t,e==null&&(e=Ne(Ot)),this.Da=e}ve(t=!0){let e=this.C.$u(p.Ou.Wh);e==null&&(e=new Et(Lt.de()),t&&this.C.Iu(p.Ou.Wh,e));const s=new Ti(e.Tu);for(let n=0;n<this.Da.length;n++)switch(this.Da[n]){case Ot.BROWSER:s.browser=ot.browser;break;case Ot.BROWSER_VERSION:s.Oa=ot.version;break;case Ot.OS:s.os=this.Fa();break;case Ot.RESOLUTION:s.Ga=screen.width+"x"+screen.height;break;case Ot.LANGUAGE:s.language=ot.language;break;case Ot.TIME_ZONE:s.timeZone=this.Ja(new Date);break;case Ot.USER_AGENT:s.userAgent=ot.userAgent}return s}Fa(){if(ot.Aa())return ot.Aa();const t=this.C.Rt(p.Tt.Ba);return t&&t.os_version?t.os_version:ot.Fa()}Ja(t){let e=!1;if(typeof Intl<"u"&&typeof Intl.DateTimeFormat=="function")try{if(typeof Intl.DateTimeFormat().resolvedOptions=="function"){const n=Intl.DateTimeFormat().resolvedOptions().timeZone;if(n!=null&&n!=="")return n}}catch(n){c.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+vt(n)),e=!0}if(e)return"";const s=t.getTimezoneOffset();return this.Ha(s)}Ha(t){const e=Math.trunc(t/60),s=Math.trunc(t%60);let n="GMT";return t!==0&&(n+=t<0?"+":"-",n+=("00"+Math.abs(e)).slice(-2)+":"+("00"+Math.abs(s)).slice(-2)),n}}const $t={Va:"invalid_api_key",Za:"blacklisted",dl:"no_device_identifier",Qa:"invalid_json_response",Wa:"empty_response",__:"sdk_auth_error"},T={it:{pn:"data",Ji:"content_cards/sync",Co:"feature_flags/sync",Yo:"template",st:"banners/sync"},Pl:i=>i?.Rt(p.Tt.iS),Am:i=>i?.Rt(p.Tt.ES),Rm:(i,t)=>{i?.It(p.Tt.iS,t)},qm:(i,t)=>{i?.It(p.Tt.ES,t)},ql:(i,t)=>{if(!i||!t)return-1;const e=T.Pl(i);if(e==null)return-1;const s=e[t];return s==null||isNaN(s)?-1:s},Al:(i,t)=>{let e=Le;if(!i||!t)return e;const s=T.Am(i);return s==null?e:(e=s[t],e==null||isNaN(e)?Le:e)},nt:(i,t,e)=>{if(!i||!t)return;let s=T.Pl(i);s==null&&(s={}),s[t]=e,T.Rm(i,s)},Dl:(i,t,e)=>{if(!i||!t)return;let s=T.Am(i);s==null&&(s={}),s[t]=e,T.qm(i,s)},Li:(i,t)=>{i&&t&&T.Dl(i,t,Le)},zl:(i,t)=>{if(!i||!t)return;const e=T.Al(i,t);T.Dl(i,t,e+1)}},ee={ot:i=>{let t,e;try{const s=()=>
1{c.error("This browser does not have any supported ajax options!")};let n=!1;if(window.XMLHttpRequest&&(n=!0),!n)return void s();t=new XMLHttpRequest;const a=o=>{typeof i.error=="function"&&i.error(t.status),typeof i.ft=="function"&&i.ft(!1,o)};t.onload=()=>{let o=!1;if(t.readyState!==4)return;o=t.status>=200&&t.status<300||t.status===304;const l=t.getAllResponseHeaders();if(o){if(typeof i.lt=="function"){let u;try{u=JSON.parse(t.responseText)}catch{const d={error:t.responseText===""?$t.Wa:$t.Qa,response:t.responseText};(0,i.lt)(d,l)}u&&i.lt(u,l)}typeof i.ft=="function"&&i.ft(!0,l)}else a(l)},t.onerror=()=>{a(t.getAllResponseHeaders())},t.ontimeout=()=>{a()},e=JSON.stringify(i.data),t.open("POST",i.url,!0),t.setRequestHeader("Content-type","application/json"),t.setRequestHeader("X-Requested-With","XMLHttpRequest");const r=i.headers||[];for(const o of r)t.setRequestHeader(o[0],o[1]);t.send(e)}catch(s){c.error(`Network request error: ${vt(s)}`)}}},ki=i=>{const t={},e=i.toString().split(`\r 2`);if(!e)return t;let s,n;for(const a of e)a&&(s=a.slice(0,a.indexOf(":")).toLowerCase().trim(),n=a.slice(a.indexOf(":")+1).trim(),t[s]=n);return t};class Ai{constructor(t,e,s,n,a,r,o,l,u,h,d,g){this.eu=t,this.C=e,this.Gh=s,this.Ss=n,this.j=a,this.h=r,this.tu=o,this.Yh=l,this.Vh=u,this.Kh=h,this.appVersion=d,this.Ra=g,this.$a=b=>b==null?"":`${b} `,this.eu=t,this.C=e,this.Gh=s,this.Ss=n,this.j=a,this.h=r,this.tu=o,this.Yh=l,this.Vh=u,this.Kh=h,this.appVersion=d,this.Ra=g,this.Xa=["npm"],this.La={}}Z(t,e=!1,s=!1){const n=this.eu.ve(!s),a=n.ta(),r=this.C.Rt(p.Tt.Ba);jt(r,a)||(t.device=a),t.api_key=this.tu,t.time=pe(new Date().valueOf(),!0);const o=this.C.Rt(p.Tt.Ka)||[],l=this.C.Rt(p.Tt.Pa)||"";this.Xa.length>0&&(!jt(o,this.Xa)||l!==this.j.kt())&&(t.sdk_metadata=this.Xa),t.sdk_version=this.Vh,this.Kh&&(t.sdk_flavor=this.Kh),t.app_version=this.appVersion,t.app_version_code=this.Ra,t.device_id=n.id;const u=this.Ss.getUserId();if(e&&u!==null&&(t.user_id=u),!u&&!this.Gh.Fh()){const h=Ge(this.C);h&&(t.alias=h)}return t}ut(t,e,s){const n=e.auth_error,a=e.error;if(!n&&!a)return!0;if(n){let r;this.Gh.Eh();const o={errorCode:n.error_code};for(const u of s)K(u)&&u[0]==="X-Braze-Auth-Signature"&&(o.signature=u[1]);t.respond_with&&t.respond_with.user_id?o.userId=t.respond_with.user_id:t.user_id&&(o.userId=t.user_id);const l=n.reason;return l?(o.reason=l,r=`due to ${l}`):r=`with error code ${n.error_code}.`,this.Gh.Fh()||(r+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),c.error(`SDK Authentication failed ${r}`),this.Ua(t.events||[],t.attributes||[]),this.Gh.Ch(o),!1}if(a){let r,o=a;switch(o){case $t.Wa:return r="Received successful response with empty body.",G.wt(O.Ya,{e:r}),c.info(r),!1;case $t.Qa:return r="Received successful response with invalid JSON",G.wt(O.Ya,{e:r+": "+e.response}),c.info(r),!1;case $t.Va:o=`The API key "${t.api_key}" is invalid for the baseUrl ${this.Yh}`;break;case $t.Za:o="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case $t.dl:o="No device identifier. Please contact [email protected]"}c.error("Backend error: "+o)}return!1}fl(t,e,s){return!!(t&&t.length!==0||e&&e.length!==0||s)}ml(t,e,s,n=!1){const a=[],r=w=>w||"",o=r(this.Ss.getUserId());let l=this.Zo(t);const u=[],h=[];let d,g=null;if(e.length>0){const w=[];for(const y of e){if(d=y.ta(),this.Gh.Fh()){if(o&&!d.user_id){g||(g={}),g.events||(g.events=[]),g.events.push(d);continue}
2if(r(d.user_id)!==o){h.push(d);continue}}w.push(d)}w.length>0&&(l.events=w)}if(s.length>0){const w=[];for(const y of s)y&&(this.Gh.Fh()&&r(y.user_id)!==o?u.push(y):w.push(y));w.length>0&&(l.attributes=w)}if(this.Ua(h,u),l=this.Z(l,!1,n),g){g=this.Z(g,!1,n);const w={requestData:g,headers:this.tt(g,T.it.pn)};a.push(w)}if(l&&!this.fl(l.events,l.attributes,t))return g?a:null;const b={requestData:l,headers:this.tt(l,T.it.pn)};return a.push(b),a}Ua(t,e){if(t){const s=[];for(const n of t){const a=ht.fromJson(n);a.time=si(a.time),s.push(a)}this.C.ol(s)}if(e)for(const s of e)this.C.vl(s)}dt(t,e){let s="HTTP error ";t!=null&&(s+=t+" "),s+=e,c.error(s)}Rl(t){return G.wt(O.gl,{n:t})}Zo(t,e){const s={};t&&(s.triggers=!0);const n=e??this.Ss.getUserId();if(n&&(s.user_id=n),!s.user_id&&!this.Gh.Fh()){const a=Ge(this.C);a&&(s.alias=a)}return s.config={config_time:this.h.Ot()},{respond_with:s}}bl(t){const e=new Date().valueOf();let s=oi.toString();const n=T.ql(this.C,t);return n!==-1&&(s=(e-n).toString()),s}tt(t,e,s=!1){const n=[["X-Braze-Api-Key",this.tu]],a=this.bl(e);n.push(["X-Braze-Last-Req-Ms-Ago",a]);const r=T.Al(this.C,e).toString();n.push(["X-Braze-Req-Attempt",r]);let o=!1;if(t.respond_with!=null&&t.respond_with.triggers&&(n.push(["X-Braze-TriggersRequest","true"]),o=!0),e===T.it.Ji){n.push(["X-Braze-ContentCardsRequest","true"]);let l=T.Al(this.C,T.it.Ji);l&&!s||(l=1,T.Dl(this.C,T.it.Ji,l));const u=Math.max(0,l-1);n.push(["BRAZE-SYNC-RETRY-COUNT",u.toString()]),o=!0}if(e===T.it.Co&&(n.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&n.push(["X-Braze-DataRequest","true"]),this.Gh.Fh()){const l=this.Gh.kh();l!=null&&n.push(["X-Braze-Auth-Signature",l])}return n}Tl(t,e,s,n){if(this.La[n])return;const a=window.setTimeout(()=>{c.info(`Retrying rate limited ${this.$a(n)}SDK request.`),this.et(e,s,n)},t);this.La[n]=a}fo(){for(const t in this.La){const e=this.La[t];window.clearTimeout(e)}this.La={}}et(t,e,s,n){if(!this.kl(s))return c.info(`${this.$a(s)}SDK request being rate limited.`),void(typeof n=="function"&&n());const a=this.yl();if(!a.wl)return this.Tl(a.Nl,t,e,s),void c.info(`${this.$a(s)}SDK request being rate limited. Request will be retried in ${Math.trunc(a.Nl/1e3)} seconds.`);this.C.It(p.Tt.Cl,new Date().valueOf());const r=t.device;r&&r.os_version instanceof Promise?r.os_version.then(o=>{t.device.os_version=o,e(a.Sl)}):e(a.Sl)}Bl(t){const e=t?ki(t):null;if(!e||!e["retry-after"])return null;const s=e["retry-after"];return isNaN(s)&&!isNaN(Date.parse(s))?{type:"date",value:Date.parse(s)}:isNaN(parseFloat(s.toString()))?(G.wt(O.Ya,{e:"Received unexpected value for retry-after header in /sync response"+": "+s}),null):{type:"timestamp",value:1e3*parseFloat(s.toString())}}yt(t,e,s,n,a,r){if(T.Al(this.C,s)>=li)return;let o;r=r||0;const l=this.Bl(t);a();const u=h=>{const d=window.setTimeout(()=>{e()},h);n(d),T.zl(this.C,s)};if(l&&!isNaN(l.value)){switch(l.type){case"date":o=l.value-new Date().getTime()+r,o<0&&e();break;case"timestamp":o=l.value+r}u(o)}else r?u(r):T.Li(this.C,s)}jl(t){var e;(e=this.C)===null||e===void 0||e.It(p.Tt.Ml,t)}$l(t,e){let s=this.Xl();s==null&&(s={}),s[t]=e,this.C.It(p.Tt.Ll,s)}El(){var t;return(t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Ml)}Xl(){var t;return(t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Ll)}Fl(t,e,s,n,a=""){let r;if(a){const l=this.Xl();r=l==null||isNaN(l[a])?e:l[a]}else r=this.El(),(r==null||isNaN(r))&&(r=e);const o=(t-n)/1e3;return r=Math.min(r+o/s,e),r}Kl(t,e){return Math.max(0,(1-t)*e*1e3)}Il(t,e=""){var s,n,a,r,o;const l={wl:!0,Sl:-1,Nl:0};if(t==null&&(t=!0),!t&&!e)return l;let u,h,d=null;if(t)d=(s=this.C)===null||s===void 0?void 0:s.Rt(p.Tt.Cl);else{const w=T.Pl(this.C);if(w==null||w[e]==null)return l;d=w[e]}if(d==null||isNaN(d)||(t?(u=((n=this.h)===null||n===void 0?void 0:n.Ul())||-1,h=((a=this.h)===null||a===void 0?void 0:a.xl())||-1):(u=((r=this.h)===null||r===void 0?void 0:r.Hl(e))||-1,h=((o=this.h)===null||o===void 0?void 0:o.Ol(e))||-1),u===-1||h===-1))return l;const g=new Date().valueOf();let b=this.Fl(g,u,h,d,e);return b<1?(l.wl=!1,l.Nl=this.Kl(b,h),l):(b=Math.trunc(b)-1,l.Sl=b,t?this.jl(b):this.$l(e,b),l)}yl(){return this.Il(!0)}kl(t){const e=this.Il(!1,t);return!(e&&!e.wl)}ct(){this.Gh.ct()}ht(){return this.Yh}addSdkMetadata(t){for(const e of t)this.Xa.indexOf(e)===-1&&this.Xa.push(e)}}const kt={EE:"inAppMessage must be an InAppMessage object",TE:"ab-pause-scrolling"},gt={IE:4281545523,AE:4294967295,_E:4278219733,OE:4293914607,LE:4283782485,SE:3224580915,NE:4288387995},Ts={RE:"hd",tE:"ias",ME:"of",eE:"do",oE:"umt",CE:"tf",DE:"te"},fe={TOP:"TOP",BOTTOM:"BOTTOM"},_t={URI:"URI",NONE:"NONE"}
2,se={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},me={NONE:"NONE",BLANK:"BLANK"},ts={TOP:"TOP",GRAPHIC:"GRAPHIC"},qt={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},Rt={START:"START",CENTER:"CENTER",END:"END"},be={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},j={sE:"SLIDEUP",aE:"MODAL",UE:"MODAL_STYLED",cE:"FULL",iE:"WEB_HTML",PE:"HTML",nE:"HTML_FULL"},Se={gr:500,pE:200},cs="ab-show",Ii="ab-hide",v={rE:"m",mE:"ma",GE:"sf",Fs:"e",FE:"ti",HE:"ca",URI:"u",xE:"oa",BE:"dt",lE:"d",bE:"i",ys:"iu",gE:"is",YE:"ic",KE:"ibc",XE:"bc",dE:"tc",hE:"cbc",yE:"ai",uE:"ao",WE:"h",fE:"ha",jE:"htc",kE:"fc",vE:"b",wE:"ct",zE:"o",VE:"hi",CSS:"css",xs:"type",qE:"messageFields",JE:"me",LANGUAGE:"l",Ks:"ia"};function Ni(){const i=document.querySelectorAll(".ab-iam-root");for(let e=0;e<i.length;e++){const s=i[e];if(s.id){const n=s.id+"-css",a=document.getElementById(n);a&&a.parentNode&&a.parentNode.removeChild(a)}s.parentNode&&s.parentNode.removeChild(s)}const t=document.getElementsByClassName(kt.TE);for(let e=0;e<t.length;e++){const s=t[e].classList;s.contains(kt.TE)&&s.remove(kt.TE)}}class Pt{constructor(t=!1,e=[]){this.lt=t,this.Ce=e,this.lt=t,this.Ce=e}ps(t){this.lt=this.lt&&t.lt,this.Ce.push(...t.Ce)}}const F={cu:()=>"serviceWorker"in navigator&&typeof ServiceWorkerRegistration<"u"&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,lu:()=>"safari"in window&&"pushNotification"in window.safari&&typeof window.safari.pushNotification.permission=="function"&&typeof window.safari.pushNotification.requestPermission=="function",isPushSupported:()=>F.cu()||F.lu(),isPushBlocked:()=>{const i=F.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="denied",t=F.isPushSupported()&&(!("Notification"in window)||window.Notification==null);return i||t},isPushPermissionGranted:()=>F.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="granted",Vn:()=>F.isPushBlocked()?{Wn:!1,reason:"blocked"}:F.isPushSupported()?F.isPushPermissionGranted()?{Wn:!1,reason:"permissionGranted"}:{Wn:!0}:{Wn:!1,reason:"unsupported"},Yn:(i,t)=>i==="blocked"?`${t} containing a push prompt is not being shown because the user has already declined push permission prompt.`:i==="unsupported"?`${t} containing a push prompt is not being shown because the browser doesn't support push notifications.`:`${t} containing a push prompt is not being shown because the user has already accepted the permission prompt.`},ie=(i,t)=>(i=Math.ceil(i),t=Math.floor(t),Math.floor(Math.random()*(t-i+1))+i);class _i{constructor(t,e,s,n,a,r,o,l,u,h){this.tu=t,this.baseUrl=e,this.j=s,this.eu=n,this.Ss=a,this.h=r,this.C=o,this.bc=l,this.Gh=u,this.B=h,this.tu=t,this.baseUrl=e,this.kc=0,this.dS=o.RS()||0,this.yc=null,this.j=s,this.eu=n,this.Ss=a,this.h=r,this.C=o,this.Gh=u,this.B=h,this.bc=l,this.jc=new W,this.Ac=null,this.Dc=50,this.$c=!1,this.qc=!1}Cc(t,e){return!t&&!e&&this.Gh.Ih()>=this.Dc}Mc(t){let e=this.j.am();if(t.length>0){const s=this.Ss.getUserId();for(const n of t){const a=!n.userId&&!s||n.userId===s;n.type===O.wm&&a&&(e=!0)}}return e}Tc(t=!1,e=!0,s,n,a,r=!1,o=!1){e&&this.Lc();const l=this.C.TS(),u=this.C.gS();let h=!1;const d=(S,x,E=-1)=>{const C=new Date().valueOf();T.nt(this.C,T.it.pn,C),E!==-1&&x.push(["X-Braze-Req-Tokens-Remaining",E.toString()]);let P=!1;ee.ot({url:this.baseUrl+"/data/",data:S,headers:x,lt:R=>{S.respond_with!=null&&S.respond_with.triggers&&(this.kc=Math.max(this.kc-1,0)),this.B.ut(S,R,x)?(this.Gh.ct(),this.h.sc(R),S.respond_with!=null&&S.respond_with.user_id!=this.Ss.getUserId()||(S.device!=null&&this.C.It(p.Tt.Ba,S.device),S.sdk_metadata!=null&&(this.C.It(p.Tt.Ka,S.sdk_metadata),this.C.It(p.Tt.Pa,this.j.kt())),this.bc(R),T.Dl(this.C,T.it.pn,1),typeof s=="function"&&s())):R.auth_error&&(P=!0)},error:()=>{P=!0,S.respond_with!=null&&S.respond_with.triggers&&(this.kc=Math.max(this.kc-1,0)),this.B.Ua(S.events,S.attributes),typeof n=="function"&&n()},ft:(R,$)=>{typeof a=="function"&&a(!P);const B=this.B.Bl($);let z=0;if(B)switch(B.type){case"date":z=Math.max(B.value-new Date().valueOf(),0);break;case"timestamp":z=B.value}
2if(e&&!h){if(P){T.zl(this.C,T.it.pn);const q=this.h.vt(),k=this.h.gt(),_=this.h.bt();let et=this.yc;(et==null||et<q)&&(et=q);const ut=Math.min(_,ie(q,et*k))+z;this.Fc(ut)}else this.Fc(Math.max(1e3*this.dS,z));h=!0}}})},g=this.Mc(l),b=t||g;if(this.Cc(r,g))return void c.info("Declining to flush data due to 50 consecutive authentication failures");if(e&&!this.B.fl(l,u,b))return this.Fc(),void(typeof a=="function"&&a(!0));const w=this.B.ml(b,l,u,o);b&&this.kc++;let y=!1;if(w)for(const S of w)this.B.et(S.requestData,x=>d(S.requestData,S.headers,x),T.it.pn,n),y=!0;this.Gh.Fh()&&e&&!y?this.Fc():g&&(c.info("Invoking new session subscriptions"),this.jc.A(),this.qc=!0)}Ic(){return this.kc>0}Fc(t=1e3*this.dS){this.$c||(this.Lc(),this.Ac=window.setTimeout(()=>{if(document.hidden){const e="visibilitychange",s=()=>{document.hidden||(document.removeEventListener(e,s,!1),this.Tc())};document.addEventListener(e,s,!1)}else this.Tc()},t),this.yc=t)}Lc(){this.Ac!=null&&(clearTimeout(this.Ac),this.Ac=null)}initialize(){this.$c=!1,this.Fc()}destroy(){this.jc.removeAllSubscriptions(),this.Gh.xh(),this.Lc(),this.$c=!0,this.Tc(void 0,!1,void 0,void 0,void 0,void 0,!0),this.Ac=null,this.qc=!1}rn(t){return this.qc?(t(),null):this.jc.Kt(t)}openSession(){const t=this.j.kt()!==this.j.el();t&&(this.C.uS(p.Ou.Wh),this.C.uS(p.Ou.Cu)),this.Tc(!1,void 0,()=>{t&&(this.C.Qt(p.Tt.jo),this.C.Qt(p.Tt.Wt))}),this.Ea(),t&&St(()=>Promise.resolve().then(()=>Pn),void 0,import.meta.url).then(e=>{if(this.$c)return;const s=e.default.ra();if(s!=null&&(F.isPushPermissionGranted()||F.isPushBlocked())){const n=()=>{s.du()?c.info("Push token maintenance is disabled, not refreshing token for backend."):s.subscribe()},a=(l,u)=>{u&&n()},r=()=>{const l=this.C.Rt(p.Tt.Uu);(l==null||l)&&n()},o=U.Ps.$s;new U(o,c).kr(o.Os.Fu,a,r)}})}Pc(){this.C.Qt(p.Tt.Fo),this.C.Qt(p.Tt.Ci),this.C.Qt(p.Tt.pa)}xc(){this.C.Qt(p.Tt.Cl),this.C.Qt(p.Tt.iS),this.C.Qt(p.Tt.Ml),this.C.Qt(p.Tt.Ll)}changeUser(t,e,s){const n=this.Ss.getUserId();if(n!==t){this.j.Sm(),this.Pc(),Ni(),n!=null&&this.Tc(void 0,!1,void 0,void 0,void 0),this.Ss.Ju(t),s?this.Gh.setSdkAuthenticationSignature(s):this.Gh.jh();for(let a=0;a<e.length;a++)e[a].changeUser(n==null);this.B.fo(),n!=null&&this.C.Qt(p.Tt.tS),this.C.Qt(p.Tt.Ba),this.C.Qt(p.Tt.SS),this.xc(),this.openSession(),c.info('Changed user to "'+t+'".')}else{let a="Doing nothing.";s&&this.Gh.kh()!==s&&(this.Gh.setSdkAuthenticationSignature(s),a="Updated SDK authentication signature"),c.info(`Current user is already ${t}. ${a}`)}}requestImmediateDataFlush(t){this.Lc(),this.j.el(),this.Tc(void 0,void 0,void 0,()=>{c.error("Failed to flush data, request will be retried automatically.")},t,!0)}Sr(t,e){this.j.el(),c.info("Requesting explicit trigger refresh."),this.Tc(!0,void 0,t,e)}Gu(t,e){const s=O.Nc,n={a:t,l:e},a=G.wt(s,n);return a&&(c.info(`Logged alias ${t} with label ${e}`),this.C.It(p.Tt.SS,n)),a}Mu(t,e,s){if(this.h.qu(e))return c.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new Pt;const n={key:e,value:s},a=G.wt(t,n);if(a){const r=typeof s=="object"?JSON.stringify(s,null,2):s;c.info(`Logged custom attribute: ${e} with value: ${r}`)}return a}setLastKnownLocation(t,e,s,n,a,r){const o={latitude:e,longitude:s};n!=null&&(o.altitude=n),a!=null&&(o.ll_accuracy=a),r!=null&&(o.alt_accuracy=r);const l=G.wt(O.Oc,o,t||void 0);return l&&c.info(`Set user last known location as ${JSON.stringify(o,null,2)}`),l}yr(t,e){const s=this.j.el();return new ht(this.Ss.getUserId(),O.Uc,t,s,{cid:e})}Bc(t,e){return new U(t,e)}Ea(){const t=U.Ps.$s;this.Bc(t,c).setItem(t.Os.pn,1,{baseUrl:this.baseUrl,data:{api_key:this.tu,device_id:this.eu.ve().id},userId:this.Ss.getUserId(),sdkAuthEnabled:this.Gh.Fh()})}Ar(t){for(const e of t)if(e.api_key===this.tu)this.B.Ua(e.events,e.attributes);else{const s=U.Ps.$s;new U(s,c).setItem(s.Os.qr,Lt.de(),e)}}Na(t,e,s){if(this.h.qu(t))return c.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new Pt;let n,a;return e===null&&s===null?(n=O.Jc,a={key:t}):(n=O.Kc,a={key:t,latitude:e,longitude:s}),G.wt(n,a)}va(t,e){const s={group_id:t,status:e};return G.wt(O.Wc,s)}}class re{constructor(t=0,e=[],s=[],n=[],a=null,r=null,o={enabled:!1},l={enabled:!1,refresh_rate_limit:void 0},u={enabled:!0,capacity:ai,refill_rate:ri,endpoint_overrides:{}},h=null,d=null,g=null,b=null){this.ec=t,this.uc=e,this.oc=s,this.ac=n,this.cc=a,this.rc=r,this.lc=o,this.Xr=l,this.nc=u,this.banners=h,this.dust=d,this.vc=g,this.fc=b}qt(){return{s:"6.7.1",l:this.ec,e:this.uc,a:this.oc,p:this.ac,m:this.cc,v:this.rc,c:this.lc,f:this.Xr,grl:this.nc,b:this.banners,d:this.dust,rb:this.vc,mst:this.fc}}static _u(t){let e=t.l;return t.s!=="6.7.1"&&(e=0),new re(e,t.e,t.a,t.p,t.m,t.v,t.c,t.f,t.grl,t.b,t.d,t.rb,t.mst)}}class Oi{constructor(t){this.C=t,this.C=t,this.Gl=new W,this._l=new W,this.Vl=new W,this.Jl=new W,this.Ql=new W,this.Wl=null,this.Yl=null}Zl(){if(this.Yl==null){const t=this.C.Rt(p.Tt.tc);this.Yl=t!=null?re._u(t):new re}return this.Yl}Ot(){return this.Zl().ec}sc(t){var e,s,n,a;if(t!=null&&t.config!=null){const r=t.config;if(r.time>this.Zl().ec){const o=w=>w??this.Zl().nc,l=new re(r.time,r.events_blacklist,r.attributes_blacklist,r.purchases_blacklist,r.messaging_session_timeout,r.vapid_public_key,r.content_cards,r.feature_flags,o(r.global_request_rate_limit),r.banners,r.dust,r.request_backoff,r.minimum_session_timeout);let u=!1;l.rc!=null&&this.ju()!==l.rc&&(u=!0);let h=!1;l.lc.enabled!=null&&this.Bi()!==l.lc.enabled&&(h=!0);let d=!1;l.Xr.enabled!=null&&this.lo()!==l.Xr.enabled&&(d=!0);let g=!1;((e=l.banners)===null||e===void 0?void 0:e.enabled)!=null&&this.Jt()!==((s=l.banners)===null||s===void 0?void 0:s.enabled)&&(g=!0);let b=!1;((n=l.dust)===null||n===void 0?void 0:n.enabled)!=null&&this.fn()!==((a=l.dust)===null||a===void 0?void 0:a.enabled)&&(b=!0),this.Yl=l,this.C.It(p.Tt.tc,l.qt()),u&&this.Gl.A(),h&&this._l.A(),d&&this.Vl.A(),g&&this.Jl.A(),b&&this.Ql.A()}}}xu(t){const e=this.Gl.Kt(t);return this.Wl&&this.Gl.removeSubscription(this.Wl),this.Wl=e,e}Mi(t){return this._l.Kt(t)}bo(t){return this.Vl.Kt(t)}V(t){return this.Jl.Kt(t)}Tr(t){return this.Ql.Kt(t)}$e(t){return this.Zl().uc.indexOf(t)!==-1}qu(t){return this.Zl().oc.indexOf(t)!==-1}Dr(t){return this.Zl().ac.indexOf(t)!==-1}hc(){return this.Zl().cc}ju(){return this.Zl().rc}Bi(){return this.Zl().lc.enabled||!1}dc(){const t=this.Zl().nc;return!(!t||t.enabled==null)&&t.enabled}Ul(){if(!this.dc())return-1;const t=this.Zl().nc;return t.capacity==null||t.capacity<10?-1:t.capacity}xl(){if(!this.dc())return-1;const t=this.Zl().nc;return t.refill_rate==null||t.refill_rate<=0?-1:t.refill_rate}mc(t){const e=this.Zl().nc.endpoint_overrides;return e==null?null:e[t]}Hl(t){const e=this.mc(t);return e==null||isNaN(e.capacity)||e.capacity<=0?-1:e.capacity}Ol(t){const e=this.mc(t);return e==null||isNaN(e.refill_rate)||e.refill_rate<=0?-1:e.refill_rate}lo(){return this.Zl().Xr.enabled&&this.Ro()==null?(G.wt(O.Ya,{e:"Missing feature flag refresh_rate_limit."}),!1):this.Zl().Xr.enabled||!1}Ro(){return this.Zl().Xr.refresh_rate_limit}Jt(){var t;return((t=this.Zl().banners)===null||t===void 0?void 0:t.enabled)||null}re(){var t;return((t=this.Zl().banners)===null||t===void 0?void 0:t.max_placements)||0}Xt(){var t;const e=(t=this.Zl().banners)===null||t===void 0?void 0:t.dismissals_cache_size;return e!=null&&typeof e=="number"&&e>0?e:vs}fn(){var t;return((t=this.Zl().dust)===null||t===void 0?void 0:t.enabled)||!1}vt(){var t;const e=(t=this.Zl().vc)===null||t===void 0?void 0:t.min_sleep_duration_ms;return e??Vt}gt(){var t;const e=(t=this.Zl().vc)===null||t===void 0?void 0:t.scale_factor;return e??Jt}bt(){var t;const e=(t=this.Zl().vc)===null||t===void 0?void 0:t.max_sleep_duration_ms;return e??Yt}gc(){return this.Zl().fc}}const Ri=1e4;class Di{constructor(t,e,s,n){this.C=t,this.Ss=e,this.h=s,this.tm=n,this.C=t,this.Ss=e,this.h=s;const a=this.h.gc();this.im=a?1e3*a:Ri,(n==null||isNaN(n))&&(n=1800),n<this.im/1e3&&c.info("Specified session timeout of "+n+"s is too small, using the minimum session timeout of "+this.im/1e3+"s instead."),this.tm=Math.max(n,this.im/1e3)}nm(t,e){return new ht(this.Ss.getUserId(),O.hm,t,e.Tu,{d:pe(t-e.lm)})}al(){return this.C.$u(p.Ou.um)}kt(){const t=this.C.$u(p.Ou.um);return t==null?null:t.Tu}am(){const t=new Date().valueOf(),e=this.h.hc();if(e==null)return!1;const s=this.C.Rt(p.Tt.dm),n=s==null||t-s>1e3*e;return n&&this.C.It(p.Tt.dm,t),n}ul(t,e){return e==null||e.fm==null||!(t-e.lm<this.im)&&e.fm<t}el(){const t=new Date().valueOf(),e=t+1e3*this.tm,s=this.C.$u(p.Ou.um);if(this.ul(t,s)){let n="Generating session start event with time "+t;if(s!=null){let r=s.pm;r-s.lm<this.im&&(r=s.lm+this.im),this.C.gm(this.nm(r,s)),n+=" (old session ended "+r+")"}n+=". Will expire "+e.valueOf(),c.info(n);const a=new Et(Lt.de(),e);return this.C.gm(new ht(this.Ss.getUserId(),O.wm,t,a.Tu)),this.C.Iu(p.Ou.um,a),this.C.Rt(p.Tt.dm)==null&&this.C.It(p.Tt.dm,t),a.Tu}if(s!=null)return s.pm=t,s.fm=e,this.C.Iu(p.Ou.um,s),s.Tu}Sm(){const t=this.C.$u(p.Ou.um);t!=null&&(this.C.jm(p.Ou.um),this.C.gm(this.nm(new Date().valueOf(),t)))}}const xe={rl:function(i,t=!1,e){const s=xe.Sc(),n=xe.sl(),a=new Y.Ec(i,s&&!t,n,e);let r;return r=n?new Y.wc(i):new Y.Rc,new Y(a,r)}
2,Sc:function(){return navigator.cookieEnabled||"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)},sl:function(){let i=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(p.Tt._c,"true"),localStorage.getItem(p.Tt._c)?(localStorage.removeItem(p.Tt._c),i=!0):i=!1}catch(t){if(!(t instanceof Error&&(t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&localStorage.length>0))throw t;i=!0}}catch{c.info("Local Storage not supported!")}return i}};class Nt{constructor(t,e){this.triggerId=t,this.messageExtras=e,this.triggerId=t,this.messageExtras=e,this.extras={},this.isControl=!0,this.Zt=!1}static fromJson(t){return new Nt(t.trigger_id,t.message_extras)}gs(){return!this.Zt&&(this.Zt=!0,!0)}sm(){return this.Zt}}function Mi(i,t=!1,e=!1,s=!1){if(i==null)return!1;t=t||!1,e=e||!1;const n=i.getBoundingClientRect();return n!=null&&(n.top>=0&&n.top<=(window.innerHeight||document.documentElement.clientHeight)||!t)&&(n.left>=0||!s)&&(n.bottom>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!e)&&(n.right<=(window.innerWidth||document.documentElement.clientWidth)||!s)}const Gt={lp:null,td:Mi},At={Uo:"up",Vo:"down",ie:"left",ne:"right"};function Cs(){if(Gt.lp==null){Gt.lp=!1;try{const i=Object.defineProperty({},"passive",{get:()=>{Gt.lp=!0}});window.addEventListener("testPassive",()=>{},i),window.removeEventListener("testPassive",()=>{},i)}catch(i){c.error(vt(i))}}return Gt.lp}function Zt(i,t,e=()=>{}){i.addEventListener(t,e,!!Cs()&&{passive:!0})}function ks(i){return Gt.td(i,!0,!1,!1)}function As(i){return Gt.td(i,!1,!0,!1)}function hs(i){if(i.onclick){const t=document.createEvent("MouseEvents");t.initEvent("click",!0,!0),i.onclick.apply(i,[t])}}function oe(i,t,e){let s=null,n=null;Zt(i,"touchstart",a=>{s=a.touches[0].clientX,n=a.touches[0].clientY}),Zt(i,"touchmove",a=>{if(s==null||n==null)return;const r=s-a.touches[0].clientX,o=n-a.touches[0].clientY;Math.abs(r)>Math.abs(o)&&Math.abs(r)>=25?((r>0&&t===At.ie||r<0&&t===At.ne)&&e(a),s=null,n=null):Math.abs(o)>=25&&((o>0&&t===At.Uo&&i.scrollTop===i.scrollHeight-i.offsetHeight||o<0&&t===At.Vo&&i.scrollTop===0)&&e(a),s=null,n=null)})}function Is(i,t,e){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg");n.setAttribute("viewBox",i),n.setAttribute("xmlns",s);const a=document.createElementNS(s,"path");return a.setAttribute("d",t),e!=null&&a.setAttribute("fill",e),n.appendChild(a),n}const Tt={Ao:32,Wo:9,Lo:13,rh:27},Ns=i=>i!==null&&i.tagName==="IFRAME";class D{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z,q,k,_,et,ut,at,dt,Ut){this.message=t,this.messageAlignment=e,this.slideFrom=s,this.extras=n,this.triggerId=a,this.clickAction=r,this.uri=o,this.openTarget=l,this.dismissType=u,this.duration=h,this.icon=d,this.imageUrl=g,this.imageStyle=b,this.iconColor=w,this.iconBackgroundColor=y,this.backgroundColor=S,this.textColor=x,this.closeButtonColor=E,this.animateIn=C,this.animateOut=P,this.header=R,this.headerAlignment=$,this.headerTextColor=B,this.frameColor=z,this.buttons=q,this.cropType=k,this.orientation=_,this.htmlId=et,this.css=ut,this.messageExtras=at,this.language=dt,this.altImageText=Ut,this.message=t,this.messageAlignment=e||Rt.CENTER,this.duration=h||5e3,this.slideFrom=s||fe.BOTTOM,this.extras=n||{},this.triggerId=a,this.clickAction=r||_t.NONE,this.uri=o,this.openTarget=l||me.NONE,this.dismissType=u||se.AUTO_DISMISS,this.icon=d,this.imageUrl=g,this.imageStyle=b||ts.TOP,this.iconColor=w||gt.AE,this.iconBackgroundColor=y||gt._E,this.backgroundColor=S||gt.AE,this.textColor=x||gt.IE,this.closeButtonColor=E||gt.NE,this.animateIn=C,this.animateIn==null&&(this.animateIn=!0),this.animateOut=P,this.animateOut==null&&(this.animateOut=!0),this.header=R,this.headerAlignment=$||Rt.CENTER,this.headerTextColor=B||gt.IE,this.frameColor=z||gt.SE,this.buttons=q||[],this.cropType=k||be.FIT_CENTER,this.orientation=_,this.htmlId=et,this.css=ut,this.isControl=!1,this.messageExtras=at,this.language=dt,this.altImageText=Ut,this.th=!1,this.Zt=!1,this.rd=!1,this.sh=!1,this.Eo=null,this.$o=null,this.ti=new W,this.ih=new W,this.Go=Rt.CENTER}subscribeToClickedEvent(t){return this.ti.Kt(t)}subscribeToDismissedEvent(t){return this.ih.Kt(t)}removeSubscription(t){this.ti.removeSubscription(t),this.ih.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions(),this.ih.removeAllSubscriptions()}closeMessage(){this.tl(this.Eo)}zo(){return!0}od(){return this.zo()}Bo(){return this.htmlId!=null&&this.htmlId.length>4}Mo(){return this.Bo()&&this.css!=null&&this.css.length>0}Oo(){if(this.Bo()&&this.Mo())return this.htmlId+"-css"}gs(){return!this.Zt&&(this.Zt=!0,!0)}sm(){return this.Zt}ss(t){return!this.rd&&(this.rd=!0,this.ti.A(),!0)}ls(){return!this.sh&&(this.sh=!0,this.ih.A(),!0)}hide(t){if(t&&t.parentNode){let e=t.closest(".ab-iam-root");
2if(e==null&&(e=t),this.zo()&&e.parentNode!=null){const s=e.parentNode.classList;s&&s.contains(kt.TE)&&s.remove(kt.TE),document.body.removeEventListener("touchmove",D.hh)}e.className=e.className.replace(cs,Ii)}return this.animateOut||!1}tl(t,e){if(t==null)return;let s;this.Eo=null,s=t.className.indexOf("ab-in-app-message")===-1?t.getElementsByClassName("ab-in-app-message")[0]:t;let n=!1;s&&(n=this.hide(s));const a=document.body;let r;a!=null&&(r=a.scrollTop);const o=()=>{if(t&&t.parentNode){let u=t.closest(".ab-iam-root");u==null&&(u=t),u.parentNode&&u.parentNode.removeChild(u)}const l=this.Oo();if(l!=null){const u=document.getElementById(l);u&&u.parentNode&&u.parentNode.removeChild(u)}a!=null&&ot.browser==="Safari"&&(a.scrollTop=r),e?e():this.ls()};n?setTimeout(o,Se.gr):o(),this.$o&&this.$o.focus()}Ko(){return document.createTextNode(this.message||"")}Ho(t){t.setAttribute("alt",this.altImageText||"")}static hh(t){if(t.targetTouches&&t.targetTouches.length>1)return;const e=t.target;e&&e.classList&&e.classList.contains("ab-message-text")&&e.scrollHeight>e.clientHeight||document.querySelector(`.${kt.TE}`)&&t.cancelable&&t.preventDefault()}eh(t){const e=t.parentNode;this.zo()&&e!=null&&this.orientation!==qt.LANDSCAPE&&(e.classList!=null&&e.classList.add(kt.TE),document.body.addEventListener("touchmove",D.hh,!!Cs()&&{passive:!1})),t.className+=" "+cs}static nh(t){if(t.keyCode===Tt.rh&&!f.er(I.oh)&&document.querySelectorAll(".ab-modal-interactions").length>0){const e=document.getElementsByClassName("ab-html-message");let s=!1;for(const n of e){let a=null;Ns(n)&&n.contentWindow&&(a=n.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),a!=null&&(hs(a),s=!0)}if(!s){const n=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];n!=null&&hs(n)}}}lh(){this.th||f.er(I.oh)||(document.addEventListener("keydown",D.nh,!1),f.uh(()=>{document.removeEventListener("keydown",D.nh)}),this.th=!0)}qt(t){const e={};return t&&(e[v.rE]=this.message,e[v.mE]=this.messageAlignment,e[v.GE]=this.slideFrom,e[v.Fs]=this.extras,e[v.FE]=this.triggerId,e[v.HE]=this.clickAction,e[v.URI]=this.uri,e[v.xE]=this.openTarget,e[v.BE]=this.dismissType,e[v.lE]=this.duration,e[v.bE]=this.icon,e[v.ys]=this.imageUrl,e[v.gE]=this.imageStyle,e[v.YE]=this.iconColor,e[v.KE]=this.iconBackgroundColor,e[v.XE]=this.backgroundColor,e[v.dE]=this.textColor,e[v.hE]=this.closeButtonColor,e[v.yE]=this.animateIn,e[v.uE]=this.animateOut,e[v.WE]=this.header,e[v.fE]=this.headerAlignment,e[v.jE]=this.headerTextColor,e[v.kE]=this.frameColor,e[v.vE]=this.buttons,e[v.wE]=this.cropType,e[v.zE]=this.orientation,e[v.VE]=this.htmlId,e[v.CSS]=this.css,e[v.xs]=t,e[v.JE]=this.messageExtras,e[v.LANGUAGE]=this.language,e[v.Ks]=this.altImageText),e}}D.ah=gt,D.mh=Ts,D.SlideFrom=fe,D.ClickAction=_t,D.DismissType=se,D.OpenTarget=me,D.ImageStyle=ts,D.Orientation=qt,D.TextAlignment=Rt,D.CropType=be,D.dh=j,D.gr=Se.gr,D.pE=Se.pE,D.bs=v;class Dt extends D{constructor(t,e,s,n,a,r,o,l,u,h,d,g){super(t,void 0,void 0,e,s,void 0,void 0,void 0,n=n||se.MANUAL,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,r,o,void 0,void 0,void 0,l,void 0,void 0,void 0,u,h,g,void 0,void 0),this.messageFields=d,this.messageFields=d}od(){return!1}ss(t){if(this.ko===j.iE){if(this.rd)return!1;this.rd=!0}return this.ti.A(t),!0}qt(){const t=super.qt(j.iE);return t[v.qE]=this.messageFields,t}static ha(t){return new Dt(t[v.rE],t[v.Fs],t[v.FE],t[v.BE],t[v.lE],t[v.yE],t[v.uE],t[v.kE],t[v.VE],t[v.CSS],t[v.qE],t[v.JE])}}class Bt{constructor(t,e,s,n,a,r,o){this.text=t,this.backgroundColor=e,this.textColor=s,this.borderColor=n,this.clickAction=a,this.uri=r,this.id=o,this.text=t||"",this.backgroundColor=e||gt._E,this.textColor=s||gt.AE,this.borderColor=n||this.backgroundColor,this.clickAction=a||_t.NONE,this.uri=r,o==null&&(o=Bt.Kn),this.id=o,this.rd=!1,this.ti=new W}subscribeToClickedEvent(t){return this.ti.Kt(t)}removeSubscription(t){this.ti.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions()}ss(){return!this.rd&&(this.rd=!0,this.ti.A(),!0)}static fromJson(t){return new Bt(t.text,t.bg_color,t.text_color,t.border_color,t.click_action,t.uri,t.id)}}Bt.Kn=-1;class Ht extends D{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z,q,k,_,et,ut,at,dt){l=l||se.MANUAL,k=k||qt.PORTRAIT,super(t,e,void 0,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z,q=q||be.CENTER_CROP,k,_,et,ut,at,dt),this.Go=Rt.CENTER}qt(){return super.qt(j.cE)}static ha(t){return new Ht(t[v.rE],t[v.mE],t[v.Fs],t[v.FE],t[v.HE],t[v.URI],t[v.xE],t[v.BE],t[v.lE],t[v.bE],t[v.ys],t[v.gE],t[v.YE],t[v.KE],t[v.XE],t[v.dE],t[v.hE],t[v.yE],t[v.uE],t[v.WE],t[v.fE],t[v.
2jE],t[v.kE],Os(t[v.vE]),t[v.wE],t[v.zE],t[v.VE],t[v.CSS],t[v.JE],t[v.LANGUAGE],t[v.Ks])}}class ne extends D{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z,q,k,_,et,ut,at){super(t,e,void 0,s,n,a,r,o,l=l||se.MANUAL,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z,q=q||be.FIT_CENTER,void 0,k,_,et,ut,at),this.Go=Rt.CENTER}qt(){return super.qt(j.aE)}static ha(t){return new ne(t[v.rE],t[v.mE],t[v.Fs],t[v.FE],t[v.HE],t[v.URI],t[v.xE],t[v.BE],t[v.lE],t[v.bE],t[v.ys],t[v.gE],t[v.YE],t[v.KE],t[v.XE],t[v.dE],t[v.hE],t[v.yE],t[v.uE],t[v.WE],t[v.fE],t[v.jE],t[v.kE],Os(t[v.vE]),t[v.wE],t[v.VE],t[v.CSS],t[v.JE],t[v.LANGUAGE],t[v.Ks])}}class Kt extends D{constructor(t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,P,R,$,B,z){S=S||gt.LE,y=y||gt.OE,super(t,e=e||Rt.START,s,n,a,r,o,l,u,h,d,g,void 0,b,w,y,S,x,E,C,void 0,void 0,void 0,void 0,void 0,void 0,void 0,P,R,$,B,z),this.Go=Rt.START}zo(){return!1}Ko(){const t=document.createElement("span");return t.appendChild(document.createTextNode(this.message||"")),t}eh(t){const e=t.getElementsByClassName("ab-in-app-message")[0];Gt.td(e,!0,!0)||(this.slideFrom===fe.TOP?e.style.top="0px":e.style.bottom="0px"),super.eh(t)}qt(){return super.qt(j.sE)}static ha(t){return new Kt(t[v.rE],t[v.mE],t[v.GE],t[v.Fs],t[v.FE],t[v.HE],t[v.URI],t[v.xE],t[v.BE],t[v.lE],t[v.bE],t[v.ys],t[v.YE],t[v.KE],t[v.XE],t[v.dE],t[v.hE],t[v.yE],t[v.uE],t[v.VE],t[v.CSS],t[v.JE],t[v.LANGUAGE],t[v.Ks])}}function _s(i){if(!i)return null;if(i.is_control)return Nt.fromJson(i);let t=i.type;t!=null&&(t=t.toUpperCase());const e=i.message,s=i.text_align_message,n=i.slide_from,a=i.extras,r=i.trigger_id,o=i.click_action,l=i.uri,u=i.open_target,h=i.message_close,d=i.duration,g=i.icon,b=i.image_url,w=i.image_style,y=i.icon_color,S=i.icon_bg_color,x=i.bg_color,E=i.text_color,C=i.close_btn_color,P=i.header,R=i.text_align_header,$=i.header_text_color,B=i.frame_color,z=[];let q=i.btns;q==null&&(q=[]);for(let ae=0;ae<q.length;ae++)z.push(Bt.fromJson(q[ae]));const k=i.crop_type,_=i.orientation,et=i.animate_in,ut=i.animate_out;let at=i.html_id,dt=i.css;at!=null&&at!==""&&dt!=null&&dt!==""||(at=void 0,dt=void 0);const Ut=i.message_extras,ze=i.language,Be=i.image_alt;let Ft;if(t===j.aE||t===j.UE)Ft=new ne(e,s,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,et,ut,P,R,$,B,z,k,at,dt,Ut,ze,Be);else if(t===j.cE)Ft=new Ht(e,s,a,r,o,l,u,h,d,g,b,w,y,S,x,E,C,et,ut,P,R,$,B,z,k,_,at,dt,Ut,ze,Be);else if(t===j.sE)Ft=new Kt(e,s,n,a,r,o,l,u,h,d,g,b,y,S,x,E,C,et,ut,at,dt,Ut,ze,Be);else{if(t!==j.iE&&t!==j.PE&&t!==j.nE)return void c.error("Ignoring message with unknown type "+t);{const ae=i.message_fields;Ft=new Dt(e,a,r,h,d,et,ut,B,at,dt,ae,Ut),Ft.trusted=i.trusted||!1}}return Ft.ko=t,Ft}function Os(i){const t=[];for(const e of i)t.push(new Bt(e.text,e.backgroundColor,e.textColor,e.borderColor,e.clickAction,e.uri,e.id));return t}class Ee{constructor(t){this.Gc=t,this.Gc=t}Hc(t){return this.Gc==null||this.Gc===t[0]}static fromJson(t){return new Ee(t?t.event_name:null)}qt(){return this.Gc}}class L{constructor(t,e,s,n){this.tT=t,this.sT=e,this.comparator=s,this.eT=n,this.tT=t,this.sT=e,this.comparator=s,this.eT=n,this.sT===L.lT.iT&&this.comparator!==L.hT.rT&&this.comparator!==L.hT.nT&&this.comparator!==L.hT.uT&&this.comparator!==L.hT.oT&&(this.eT=zt(this.eT))}Hc(t){let e=null;switch(t!=null&&(e=t[this.tT]),this.comparator){case L.hT.ET:return e!=null&&e.valueOf()===this.eT.valueOf();case L.hT.aT:return e==null||e.valueOf()!==this.eT.valueOf();case L.hT.TT:return e!=null&&typeof e==typeof this.eT&&e>this.eT;case L.hT.rT:return this.sT===L.lT.iT?e!=null&&xt(e)&&os(e)<=this.eT.valueOf():e!=null&&typeof e==typeof this.eT&&e>=this.eT;case L.hT.cT:return e!=null&&typeof e==typeof this.eT&&e<this.eT;case L.hT.nT:return this.sT===L.lT.iT?e!=null&&xt(e)&&os(e)>=this.eT.valueOf():e!=null&&typeof e==typeof this.eT&&e<=this.eT;case L.hT.AT:return e!=null&&typeof e=="string"&&typeof e==typeof this.eT&&e.match(this.eT)!=null;case L.hT._T:return e!=null;case L.hT.fT:return e==null;case L.hT.uT:return e!=null&&xt(e)&&ls(e)<this.eT;case L.hT.oT:return e!=null&&xt(e)&&ls(e)>this.eT;case L.hT.pT:return e==null||typeof e!=typeof this.eT||typeof e!="string"||e.match(this.eT)==null}return!1}static fromJson(t){return new L(t.property_key,t.property_type,t.comparator,t.property_value)}qt(){let t=this.eT;return xt(this.eT)&&(t=pe(t.valueOf())),{k:this.tT,t:this.sT,c:this.comparator,v:t}}static _u(t){return new L(t.k,t.t,t.c,t.v)}}L.lT={yT:"boolean",ST:"number",NT:"string",iT:"date"},L.hT={ET:1,aT:2,TT:3,rT:4,cT:5,nT:6,AT:10,_T:11,fT:12,uT:15,oT:16,pT:17};class Wt{constructor(t){this.filters=t,this.filters=t}Hc(t){let e=!0;for(let s=0;s<this.filters.length;s++){const n=this.filters[s];let a=!1;for(let r=0;r<n.length;r++)if(n[r].Hc(t)){a=!0;break}if(!a){e=!1;break}}return e}static fromJson(t){if(t==null||!K(t))return null;const e=[];for(let s=0;s<t.length;s++){const n=[],a=t[s];for(let r=0;r<a.length;r++)n.push(L.fromJson(a[r]));e.push(n)}return new Wt(e)}qt(){const t=[];for(let e=0;e<this.filters.length;e++){const s=this.filters[e],n=[];for(let a=0;a<s.length;a++)n.push(s[a].qt());t.push(n)}return t}static _u(t){const e=[];for(let s=0;s<t.length;s++){const n=[],a=t[s];for(let r=0;r<a.length;r++)n.push(L._u(a[r]));e.push(n)}return new Wt(e)}}class Te{constructor(t,e){this.Gc=t,this.tf=e,this.Gc=t,this.tf=e}Hc(t){if(this.Gc==null||this.tf==null)return!1;const e=t[0],s=t[1];return e===this.Gc&&this.tf.Hc(s)}static fromJson(t){return new Te(t?t.event_name:null,t?Wt.fromJson(t.property_filters):null)}qt(){return{e:this.Gc,pf:this.tf?this.tf.qt():null}}}class Ce{constructor(t,e){this.if=t,this.rf=e,this.if=t,this.rf=e}Hc(t){if(this.if==null)return!1;const e=A.sf(t[0],this.if);if(!e)return!1;let s=this.rf==null||this.rf.length===0;if(this.rf!=null){for(let n=0;n<this.rf.length;n++)if(this.rf[n]===t[1]){s=!0;break}}return e&&s}static fromJson(t){return new Ce(t?t.id:null,t?t.buttons:null)}qt(){return this.if}}class ke{constructor(t){this.productId=t,this.productId=t}Hc(t){return this.productId==null||t[0]===this.productId}static fromJson(t){return new ke(t?t.product_id:null)}qt(){return this.productId}}class Ae{constructor(t,e){this.productId=t,this.tf=e,this.productId=t,this.tf=e}Hc(t){if(this.productId==null||this.tf==null)return!1;const e=t[0],s=t[1];return e===this.productId&&this.tf.Hc(s)}static fromJson(t){return new Ae(t?t.product_id:null,t?Wt.fromJson(t.property_filters):null)}qt(){return{id:this.productId,pf:this.tf?this.tf.qt():null}}}class Ie{constructor(t){this.if=t,this.if=t}Hc(t){return this.if==null||A.sf(t[0],this.if)}static fromJson(t){return new Ie(t?t.campaign_id:null)}qt(){return this.if}}const J={OPEN:"open",Rr:"purchase",Fr:"push_click",he:"custom_event",rm:"iam_click",Ls:"test"};class A{constructor(t,e){this.type=t,this.data=e,this.type=t,this.data=e}Vc(t,e){return A.Yc[this.type]===t&&(this.data==null||this.data.Hc(e))}static sf(t,e){let s=null;try{s=window.atob(t)}catch(n){return c.info("Failed to unencode analytics id "+t+": "+vt(n)),!1}return e===s.split("_")[0]}static fromJson(t){const e=t.type;let s=null;switch(e){case A.la.OPEN:case A.la.Ls:break;case A.la.Rr:s=ke.fromJson(t.data);break;case A.la.Qc:s=Ae.fromJson(t.data);break;case A.la.Fr:s=Ie.fromJson(t.data);break;case A.la.he:s=Ee.fromJson(t.data);break;case A.la.Xc:s=Te.fromJson(t.data);break;case A.la.rm:s=Ce.fromJson(t.data)}return new A(e,s)}
2qt(){return{t:this.type,d:this.data?this.data.qt():null}}static _u(t){let e,s=null;switch(t.t){case A.la.OPEN:case A.la.Ls:break;case A.la.Rr:s=new ke(t.d);break;case A.la.Qc:e=t.d||{},s=new Ae(e.id,Wt._u(e.pf||[]));break;case A.la.Fr:s=new Ie(t.d);break;case A.la.he:s=new Ee(t.d);break;case A.la.Xc:e=t.d||{},s=new Te(e.e,Wt._u(e.pf||[]));break;case A.la.rm:s=new Ce(t.d)}return new A(t.t,s)}}A.la={OPEN:"open",Rr:"purchase",Qc:"purchase_property",Fr:"push_click",he:"custom_event",Xc:"custom_event_property",rm:"iam_click",Ls:"test"},A.Yc={},A.Yc[A.la.OPEN]=J.OPEN,A.Yc[A.la.Rr]=J.Rr,A.Yc[A.la.Qc]=J.Rr,A.Yc[A.la.Fr]=J.Fr,A.Yc[A.la.he]=J.he,A.Yc[A.la.Xc]=J.he,A.Yc[A.la.rm]=J.rm,A.Yc[A.la.Ls]=J.Ls;class lt{constructor(t,e=[],s,n,a=0,r,o,l=0,u=lt.sd,h,d,g){this.id=t,this.ed=e,this.startTime=s,this.endTime=n,this.priority=a,this.type=r,this.data=o,this.hd=l,this.nd=u,this.ca=h,this.ad=d,this.ud=g,this.id=t,this.ed=e||[],s===void 0&&(s=null),this.startTime=s,n===void 0&&(n=null),this.endTime=n,this.priority=a||0,this.type=r,this.hd=l||0,h==null&&(h=1e3*(this.hd+30)),this.ca=h,this.data=o,u!=null&&(this.nd=u),this.ad=d,this.ud=g||null}dd(t){return this.ud==null||this.nd!==lt.sd&&t-this.ud>=1e3*this.nd}md(t){this.ud=t}gd(t){const e=t+1e3*this.hd;return Math.max(e-new Date().valueOf(),0)}fd(t){const e=new Date().valueOf()-t,s=t==null||isNaN(e)||this.ca==null||e<this.ca;return s||c.info(`Trigger action ${this.type} is no longer eligible for display - fired ${e}ms ago and has a timeout of ${this.ca}ms.`),!s}static fromJson(t){const e=t.id,s=[];for(let b=0;b<t.trigger_condition.length;b++)s.push(A.fromJson(t.trigger_condition[b]));const n=zt(t.start_time),a=zt(t.end_time),r=t.priority,o=t.type,l=t.delay,u=t.re_eligibility,h=t.timeout,d=t.data,g=t.min_seconds_since_last_trigger;return It(lt.la,o,"Could not construct Trigger from server data","Trigger.Types")?new lt(e,s,n,a,r,o,d,l,u,h,g):null}qt(){const t=[];for(let e=0;e<this.ed.length;e++)t.push(this.ed[e].qt());return{i:this.id,c:t,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.hd,r:this.nd,tm:this.ca,ss:this.ad,ld:this.ud}}static _u(t){const e=[],s=t.c||[];for(let n=0;n<s.length;n++)e.push(A._u(s[n]));return new lt(t.i,e,le(t.s),le(t.e),t.p,t.t,t.da,t.d,t.r,t.tm,t.ss,t.ld)}}lt.la={oa:"inapp",pd:"templated_iam"},lt.sd=-1;function es(i,t,e){const s=document.querySelector("head"),n=`ab-${t}-css-definitions-${"6.7.1".replace(/\./g,"-")}`;if(!s)return;const a=s.ownerDocument||document;if(a.getElementById(n)==null){const r=a.createElement("style");r.innerHTML=e||"",r.id=n;const o=f.er(I.sr);o!=null&&r.setAttribute("nonce",o),s.appendChild(r)}}function Rs(){if(f.er(I.Uh))return;const i="https://use.fontawesome.com/7f85a56ba4.css";if(document.querySelector('link[rel=stylesheet][href="'+i+'"]')===null){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),document.getElementsByTagName("head")[0].appendChild(t)}}function Pi(i){es(i,"feed","body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
2ans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button[dir=rtl]{left:0}.ab-feed .ab-card .ab-close-button[dir=ltr]{right:0}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}
2.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
2ans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=ltr]{padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body[dir=rtl]{padding-right:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area[dir=rtl]{padding:20px 25px 25px 0}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}")}function zi(){Pi(),Rs()}function Bi(i){es(i,"iam",".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
2ans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
2ans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{dis
2play:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img img{width:100%;height:100%;object-fit:cover;object-position:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.827
258621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',s
2ans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100
2%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}")}function Ds(){Bi(),Rs()}function Li(i){es(i,"banner",".ab-html-banner{width:100%;height:100%;border:none;display:block}.ab-html-control-banner{width:0;height:0;margin:0;border:none}")}function Ui(){Li()}function Fi(i){let t="";return i.animateIn&&(t+=" ab-animate-in"),i.animateOut&&(t+=" ab-animate-out"),i instanceof Ht?t+=" ab-effect-fullscreen":i instanceof Dt?t+=" ab-effect-html":i instanceof ne?t+=" ab-effect-modal":i instanceof Kt&&(t+=" ab-effect-slide"),t}function Ms(i,t,e,s="ltr"){const n=document.createElement("button");n.setAttribute("aria-label",i),n.setAttribute("role","button"),n.dir=s,Zt(n,"touchstart"),n.className="ab-close-button";const a=Is("0 0 15 15","M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z",t);return n.appendChild(a),a.setAttribute("aria-hidden","true"),n.addEventListener("keydown",r=>{r.keyCode!==Tt.Ao&&r.keyCode!==Tt.Lo||(e(),r.stopPropagation())}),n.onclick=r=>{e(),r.stopPropagation()},n}function $i(i){return i!=null&&(i=parseInt(i.toString()),!isNaN(i)&&(4278190080&i)>>>24==0)}function yt(i,t){return i==null||(i=parseInt(i.toString()),isNaN(i))?"":(t&&!isNaN(parseFloat(t.toString()))||(t=1),"rgba("+[(16711680&(i>>>=0))>>>16,(65280&i)>>>8,255&i,((4278190080&i)>>>24)/255*t].join(",")+")")}function je(i){if(!f.rr())return!1;if(!(i instanceof D||i instanceof Nt))return c.error(kt.EE),!1;const t=i instanceof Nt?O.om:O.Fn;return V.ra().wt(i,t).lt}function Gi(i){if(!f.rr())return!1;if(!(i instanceof D))return c.error(kt.EE),!1;const t=V.ra().wt(i,O.On);if(t){i.sm()||je(i);for(let e=0;e<t.Ce.length;e++)X.o().Ee(J.rm,[i.triggerId],t.Ce[e])}return t.lt}const Mt={PORTRAIT:0,LANDSCAPE:1};function qi(){return screen.width<=600}function ji(){if("orientation"in window)return Math.abs(window.orientation)===90||window.orientation===270?Mt.LANDSCAPE:Mt.PORTRAIT;const i=window;if("screen"in i){let t=i.screen.orientation||screen.mozOrientation||screen.msOrientation;return t!=null&&typeof t=="object"&&(t=t.type),t==="landscape-primary"||t==="landscape-secondary"?Mt.LANDSCAPE:Mt.PORTRAIT}return Mt.PORTRAIT}function Hi(i,t,e){i&&(t||e!=null&&e.metaKey?window.open(i):window.location=i)}function Wi(){return window.location.href}const Qt={openUri:Hi,da:qi,ga:ji,Qh:Wi};function Ps(){if(f.rr())return f.zr()}function Re(i,t,e){if(f.rr())if(ue.test(i)){const s=Ve(i);if(!s)return;const n=a=>{if(!xs(a))return void c.error(`Decoded Braze Action json is invalid: ${JSON.stringify(a,null,2)}`);const r=N.properties.type,o=N.properties.eo,l=N.properties.so,u=a[r];
2if(u===N.types.io){const h=a[o];for(const d of h)n(d)}else{const h=a[l];let d,g;switch(u){case N.types.logCustomEvent:St(async()=>{const{logCustomEvent:b}=await Promise.resolve().then(()=>Vs);return{logCustomEvent:b}},void 0,import.meta.url).then(({logCustomEvent:b})=>{f.ao()?(g=Array.prototype.slice.call(h),b(...g)):c.error(tt.ee)});break;case N.types.requestPushPermission:St(async()=>{const{requestPushPermission:b}=await Promise.resolve().then(()=>Js);return{requestPushPermission:b}},void 0,import.meta.url).then(({requestPushPermission:b})=>{f.ao()?ot.browser==="Safari"&&ot.OS===Ct.co?window.navigator.standalone&&b():b():c.error(tt.ee)});break;case N.types.setEmailNotificationSubscriptionType:case N.types.setPushNotificationSubscriptionType:case N.types.setCustomUserAttribute:case N.types.addToSubscriptionGroup:case N.types.removeFromSubscriptionGroup:case N.types.addToCustomAttributeArray:case N.types.removeFromCustomAttributeArray:d=Ps(),d&&d[u](...Array.prototype.slice.call(h));break;case N.types.mo:case N.types.uo:g=Array.prototype.slice.call(h),Qt.openUri(...g);break;default:c.info(`Ignoring unknown Braze Action: ${u}`)}}};n(s)}else Qt.openUri(i,t,e)}function ia(i,t){Re(i,t)}function zs(i){i==null&&(i="");const t=i.split("?").slice(1).join("?"),e={};if(t!=null){const s=t.split("&");for(let n=0;n<s.length;n++){const a=s[n].split("=");a[0]!==""&&(e[a[0]]=a[1])}}return e}function He(i){return!(!i||(i=i.toString().toLowerCase()).lastIndexOf("javascript:",0)!==0&&i.lastIndexOf("data:",0)!==0)}function We(i,t,e){if(!f.rr())return!1;if(!(i instanceof Dt))return c.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;let s=O.On;t!=null&&(s=O.Xn);const n=V.ra().wt(i,s,t,e);if(n.lt)for(let a=0;a<n.Ce.length;a++)X.o().Ee(J.rm,[i.triggerId,t],n.Ce[a]);return n.lt}const ds=(i,t,e,s)=>{const n=e.getAttribute("href"),a=e.onclick;return r=>{if(a!=null&&typeof a=="function"&&a.bind(e)(r)===!1)return;let o=zs(n).abButtonId;if(o!=null&&o!==""||(o=e.getAttribute("id")||void 0),n!=null&&n!==""&&n.indexOf("#")!==0){const l=(e.getAttribute("target")||"").toLowerCase().replace("_","")==="blank",u=s||i.openTarget===me.BLANK||l,h=()=>{We(i,o,n),Qt.openUri(n,u,r)};u?h():i.tl(t,h)}else We(i,o,n||void 0);return r.stopPropagation(),!1}},Bs=(i,t)=>{const e={display:{},web:{}},s=function(){return function(){const y=arguments;St(()=>Promise.resolve().then(()=>Js),void 0,import.meta.url).then(S=>{f.ao()?S.requestPushPermission(...Array.prototype.slice.call(y)):c.error(tt.ee)})}},n={requestImmediateDataFlush:function(){const y=arguments;St(async()=>{const{requestImmediateDataFlush:S}=await Promise.resolve().then(()=>Mn);return{requestImmediateDataFlush:S}},void 0,import.meta.url).then(({requestImmediateDataFlush:S})=>{f.ao()?S(...Array.prototype.slice.call(y)):c.error(tt.ee)})},logCustomEvent:function(){const y=arguments;St(async()=>{const{logCustomEvent:S}=await Promise.resolve().then(()=>Vs);return{logCustomEvent:S}},void 0,import.meta.url).then(({logCustomEvent:S})=>{if(!f.ao())return void c.error(tt.ee);S(...Array.prototype.slice.call(y))})},logPurchase:function(){const y=arguments;St(async()=>{const{logPurchase:S}=await Promise.resolve().then(()=>Rn);return{logPurchase:S}},void 0,import.meta.url).then(({logPurchase:S})=>{if(!f.ao())return void c.error(tt.ee);S(...Array.prototype.slice.call(y))})},unregisterPush:function(){const y=arguments;St(async()=>{const{unregisterPush:S}=await Promise.resolve().then(()=>Ln);return{unregisterPush:S}},void 0,import.meta.url).then(({unregisterPush:S})=>{f.ao()?S(...Array.prototype.slice.call(y)):c.error(tt.ee)})},requestPushPermission:s(),changeUser:function(){const y=arguments;St(async()=>{const{changeUser:S}=await Promise.resolve().then(()=>Nn);return{changeUser:S}},void 0,import.meta.url).then(({changeUser:S})=>{if(!f.ao())return void c.error(tt.ee);S(...Array.prototype.slice.call(y))})}},a=function(y){return function(){n[y](...Array.prototype.slice.call(arguments))}};for(const y of nt(n))e[y]=a(y);const r=["setFirstName","setLastName","setEmail","setGender","setDateOfBirth","setCountry","setHomeCity","setEmailNotificationSubscriptionType","setLanguage","addAlias","setPushNotificationSubscriptionType","setPhoneNumber","setCustomUserAttribute","addToCustomAttributeArray","removeFromCustomAttributeArray","incrementCustomUserAttribute","setCustomLocationAttribute","addToSubscriptionGroup","removeFromSubscriptionGroup","setLineId"],o=function(y){return function(){const S=Ps();S&&S[y](...Array.prototype.slice.call(arguments))}},l={};for(let y=0;y<r.length;
2y++)l[r[y]]=o(r[y]);e.getUser=function(){return l};const u={},h=function(y){return function(){const S=arguments;typeof t!="function"?u[y](...Array.prototype.slice.call(S)):t(i,function(){u[y](...Array.prototype.slice.call(S))})}},d=e.display;for(const y of nt(u))d[y]=h(y);const g={registerAppboyPushMessages:s()},b=function(y){return function(){g[y](...Array.prototype.slice.call(arguments))}},w=e.web;for(const y of nt(g))w[y]=b(y);return e.NotificationSubscriptionTypes=M.NotificationSubscriptionTypes,e},ps=(i,t,e)=>{const s=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${e}['"]\\)`,n=i.match(new RegExp(s));if(n){const a=`${n[1]}.setAttribute("nonce", "${t}")`;return`${i.slice(0,n.index+n[0].length)};${a};${i.slice(n.index+n[0].length)}`}return null},Ls=(i,t,e)=>{let s=null;if(e!=null){s=document.createElement("html"),s.innerHTML=t||"";const n=s.getElementsByTagName("style");for(let r=0;r<n.length;r++)n[r].setAttribute("nonce",e);const a=s.getElementsByTagName("script");for(let r=0;r<a.length;r++){a[r].setAttribute("nonce",e),a[r].innerHTML=a[r].innerHTML.replace(/<style>/g,`<style nonce='${e}'>`);const o=ps(a[r].innerHTML,e,"script");o&&(a[r].innerHTML=o);const l=ps(a[r].innerHTML,e,"style");l&&(a[r].innerHTML=l)}}i.srcdoc=s?s.innerHTML:t||""};function Ki(i,t,e,s,n){const a=document.createElement("iframe");if(a.setAttribute("title","Modal Message"),s&&(a.style.zIndex=(s+1).toString()),Ls(a,i.message,n),a.onload=()=>{const r=a.contentWindow;r.focus();const o=r.document.getElementsByTagName("head")[0];if(o!=null){if(i.Mo()){const g=document.createElement("style");g.innerHTML=i.css||"",g.id=i.Oo()||"",n!=null&&g.setAttribute("nonce",n),o.appendChild(g)}const d=r.document.createElement("base");d!=null&&(d.setAttribute("target","_parent"),o.appendChild(d))}const l=r.document.getElementsByTagName("title");l&&l.length>0&&a.setAttribute("title",l[0].textContent||"");const u=Object.assign(Object.assign({},Bs(a,(d,g)=>i.tl(d,g))),{closeMessage:function(){i.tl(a)},logClick:function(){We(i,...arguments)}});if(r.appboyBridge=u,r.brazeBridge=u,i.ko!==j.PE){const d=r.document.getElementsByTagName("a");for(let b=0;b<d.length;b++)d[b].onclick=ds(i,a,d[b],e);const g=r.document.getElementsByTagName("button");for(let b=0;b<g.length;b++)g[b].onclick=ds(i,a,g[b],e)}const h=r.document.body;if(h!=null){i.Bo()&&(h.id=i.htmlId||"");const d=document.createElement("hidden");d.onclick=u.closeMessage,d.className="ab-programmatic-close-button",h.appendChild(d)}r.dispatchEvent(new CustomEvent("ab.BridgeReady")),a.className.indexOf("ab-start-hidden")!==-1&&(a.className=a.className.replace("ab-start-hidden",""),t(a))},a.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",ot.OS===Ct.co){const r=document.createElement("div");return r.className="ab-ios-scroll-wrapper",r.appendChild(a),i.Eo=r,r}return i.Eo=a,a}function Xi(i,t){var e;if(!f.rr())return!1;if(!(i instanceof Bt))return c.error("button must be an InAppMessageButton object"),!1;if(!(t instanceof D))return c.error(kt.EE),!1;const s=V.ra().Jn(i,t);if(s.lt)for(let n=0;n<s.Ce.length;n++)X.o().Ee(J.rm,[t.triggerId,(e=i.id)===null||e===void 0?void 0:e.toString()],s.Ce[n]);return s.lt}const Ue={Po:i=>{const t=i.querySelectorAll(".ab-close-button, .ab-message-button");let e;for(let s=0;s<t.length;s++)e=t[s],e.tabIndex=0;if(t.length>0){const s=t[0],n=t[t.length-1];i.addEventListener("keydown",a=>{const r=document.activeElement;a.keyCode===Tt.Wo&&(a.shiftKey||r!==n&&r!==i?!a.shiftKey||r!==s&&r!==i||(a.preventDefault(),n.focus()):(a.preventDefault(),s.focus()))})}},Qo:(i,t)=>{t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),i?t.setAttribute("aria-labelledby",i):t.setAttribute("aria-label","Modal Message")},No:(i,t,e)=>{if(i.buttons&&i.buttons.length>0){const s=document.createElement("div");s.className="ab-message-buttons",t.appendChild(s);const n=t.getElementsByClassName("ab-message-text")[0];n!=null&&(n.className+=" ab-with-buttons");const a=r=>o=>(i.tl(t,()=>{Xi(r,i),r.clickAction===_t.URI&&Re(r.uri||"",e||i.openTarget===me.BLANK,o)}),o.stopPropagation(),!1);for(let r=0;r<i.buttons.length;r++){const o=i.buttons[r],l=document.createElement("button");l.className="ab-message-button",l.setAttribute("type","button"),Zt(l,"touchstart");let u=o.text;o.text===""&&(u="Â "),l.appendChild(document.createTextNode(u)),i.Mo()||(l.style.backgroundColor=yt(o.backgroundColor),l.style.color=yt(o.textColor),l.style.borderColor=yt(o.borderColor)),l.onclick=a(o),s.appendChild(l)}}}};function Vi(i,t,e,s,n,a,r=document.body,o="ltr"){if(i.$o=document.activeElement,i instanceof Dt)return Ki(i,t,s,n,a);const l=(function(u,h,d,g,b,w=document.body,y="ltr"){let S=null;const x=document.createElement("div");x.dir=y,x.className="ab-in-app-message ab-start-hidden ab-background",b&&(x.style.zIndex=(b+1).toString()),u.zo()&&(x.className+=" ab-modal-interactions",x.setAttribute("tabindex","-1")),u.Mo()||(x.style.color=yt(u.textColor),x.style.backgroundColor=yt(u.backgroundColor),$i(u.backgroundColor)&&(x.className+=" ab-no-shadow"));const E=()=>{x.className.indexOf("ab-start-hidden")!==-1&&(x.className=x.className.replace("ab-start-hidden",""),document.querySelectorAll(".ab-iam-img-loading").length>0?d(`Cannot show in-app message ${u.message} because another message is being shown.`,Ts.tE):h(x))},C=(k=!0)=>{let _=document.querySelectorAll(".ab-iam-root");_&&_.length!==0||(_=w.querySelectorAll(".ab-iam-root")),_&&_.length>0&&(_[0].classList.remove("ab-iam-img-loading"),S&&(clearTimeout(S),S=null),k?E():c.error(`Cannot show in-app message ${u.message} because the image failed to load.`))};if(u.imageStyle===ts.GRAPHIC&&(x.className+=" graphic"),u.orientation===qt.LANDSCAPE&&(x.className+=" landscape"),u.buttons!=null&&u.buttons.length===0){u.clickAction!==_t.NONE&&(x.className+=" ab-clickable");const k=_=>(u.tl(x,()=>{Gi(u),u.clickAction===_t.URI&&Re(u.uri||"",g||u.openTarget===me.BLANK,_)}),_.stopPropagation(),!1);x.onclick=k,x.addEventListener("keydown",_=>{if(_.keyCode===Tt.Lo||_.keyCode===Tt.Ao)return k(_)})}const P=Ms("Close Message",u.Mo()?void 0:yt(u.closeButtonColor),()=>{u.tl(x)},y);x.appendChild(P),b&&(P.style.zIndex=(b+2).toString());const R=document.createElement("div");R.className="ab-message-text",R.dir=y,R.setAttribute("role","article");const $=(u.messageAlignment||u.Go).toLowerCase();R.className+=" "+$+"-aligned";let B=!1;const z=document.createElement("div");if(z.className="ab-image-area",u.imageUrl){const k=document.createElement("img");if(k.setAttribute("src",u.imageUrl),u.Ho(k),document.querySelectorAll(".ab-iam-img-loading").length===0){B=!0;const _=document.querySelectorAll(".ab-iam-root");_&&_.length>0&&_[0].classList.add("ab-iam-img-loading"),S=window.setTimeout(()=>{C(!1)},6e4),k.onload=()=>{C()},k.onerror=()=>{C(!1)}}if(u.cropType===be.CENTER_CROP){const _=document.createElement("div");_.className="ab-center-cropped-img",_.appendChild(k),z.appendChild(_)}else z.appendChild(k);x.appendChild(z),R.className+=" ab-with-image"}else if(u.icon){z.className+=" ab-icon-area";
2const k=document.createElement("span");k.className="ab-icon",u.Mo()||(k.style.backgroundColor=yt(u.iconBackgroundColor),k.style.color=yt(u.iconColor));const _=document.createElement("i");_.className="fa",_.appendChild(document.createTextNode(u.icon)),_.setAttribute("aria-hidden","true"),k.appendChild(_),z.appendChild(k),x.appendChild(z),R.className+=" ab-with-icon"}if(Zt(R,"touchstart"),u.header&&u.header.length>0){const k=document.createElement("h1");k.className="ab-message-header",u.Jo=Lt.de(),k.id=u.Jo;const _=(u.headerAlignment||Rt.CENTER).toLowerCase();k.className+=" "+_+"-aligned",u.Mo()||(k.style.color=yt(u.headerTextColor)),k.appendChild(document.createTextNode(u.header)),R.appendChild(k)}const q=u.Ko();return R.appendChild(q),x.appendChild(R),B||E(),u.Eo=x,x})(i,t,e,s,n,r,o);if(i instanceof Ht||i instanceof ne){const u=i instanceof Ht?"ab-fullscreen":"ab-modal";l.className+=` ${u} ab-centered`,Ue.No(i,l,s),Ue.Po(l),Ue.Qo(i.Jo,l)}else if(i instanceof Kt){l.className+=" ab-slideup",l.setAttribute("tabindex","0"),l.setAttribute("role","alert");const u=l.getElementsByClassName("ab-close-button")[0];if(u!=null){const g=Is("0 0 11.38 19.44","M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",i.Mo()?void 0:yt(i.closeButtonColor));g.setAttribute("class",`ab-chevron ${o}`),u.appendChild(g)}let h,d;oe(l,At.ie,g=>{l.className+=" ab-swiped-left",u!=null&&u.onclick!=null&&u.onclick(g)}),oe(l,At.ne,g=>{l.className+=" ab-swiped-right",u!=null&&u.onclick!=null&&u.onclick(g)}),i.slideFrom===fe.TOP?(h=At.Uo,d=" ab-swiped-up"):(h=At.Vo,d=" ab-swiped-down"),oe(l,h,g=>{l.className+=d,u!=null&&u.onclick!=null&&u.onclick(g)})}return l}const Fe={en:{NO_CARDS_MESSAGE:"We have no updates for you at this time.<br/>Please check again later.",FEED_TIMEOUT_MESSAGE:"Sorry, this refresh timed out.<br/>Please try again later."},ar:{NO_CARDS_MESSAGE:"ÙÙØ³ ÙØ¯ÙÙØ§ Ø£Ù ØªØØ¯ÙØ«. ÙØ±Ø¬Ù Ø§ÙØªØÙÙ Ù
رة Ø£Ø®Ø±Ù ÙØ§ØÙاÙ",FEED_TIMEOUT_MESSAGE:"ÙØ±Ø¬Ù ØªÙØ±Ø§Ø± اÙÙ
ØØ§ÙÙØ© ÙØ§ØÙا"},cs:{NO_CARDS_MESSAGE:"V tuto chvÃli pro vás nemáme žádné aktualizace.<br/>Zkontrolujte prosÃm znovu pozdÄji.",FEED_TIMEOUT_MESSAGE:"ProsÃm zkuste to znovu pozdÄji."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Prøv venligst senere.",FEED_TIMEOUT_MESSAGE:"Prøv venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verfügbar.<br/>Bitte später noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte später noch einmal versuchen."},es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compruébelo más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor inténtelo más tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualización.<br/>Vuelva a verificar más tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo más tarde."},et:{NO_CARDS_MESSAGE:"Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.",FEED_TIMEOUT_MESSAGE:"Palun proovige hiljem uuesti."},fi:{NO_CARDS_MESSAGE:"Päivityksiä ei ole saatavilla.<br/>Tarkista myöhemmin uudelleen.",FEED_TIMEOUT_MESSAGE:"Yritä myöhemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise à jour disponible.<br/>Veuillez vérifier ultérieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez réessayer ultérieurement."},he:{NO_CARDS_MESSAGE:".××× ×× × ×¢×××× ××. ×××§×©× ××××§ ש×× ×קר××",FEED_TIMEOUT_MESSAGE:".×××§×©× × ×¡× ×©×× ×קר××"},hi:{NO_CARDS_MESSAGE:"हमारॠपास à¤à¥à¤ à¤
पडà¥à¤ नहà¥à¤ हà¥à¤à¥¤ à¤à¥à¤ªà¤¯à¤¾ बाद मà¥à¤ फिर सॠà¤à¤¾à¤à¤ à¤à¤°à¥à¤.।",FEED_TIMEOUT_MESSAGE:"à¤à¥à¤ªà¤¯à¤¾ बाद मà¥à¤ दà¥à¤¬à¤¾à¤°à¤¾ पà¥à¤°à¤¯à¤¾à¤¸ à¤à¤°à¥à¤à¥¤."},id:{NO_CARDS_MESSAGE:"Kami tidak memiliki pembaruan. Coba lagi nanti.",FEED_TIMEOUT_MESSAGE:"Coba lagi nanti."},it:{NO_CARDS_MESSAGE:"Non ci sono aggiornamenti.<br/>Ricontrollare più tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare più tardi."},ja:{NO_CARDS_MESSAGE:"ã¢ãããã¼ãã¯ããã¾ããã<br/>å¾ã§ããä¸åº¦ç¢ºèªãã¦ãã ããã",FEED_TIMEOUT_MESSAGE:"å¾ã§ããä¸åº¦è©¦ãã¦ãã ããã"},ko:{NO_CARDS_MESSAGE:"ì
ë°ì´í¸ê° ììµëë¤. ë¤ìì ë¤ì íì¸í´ 주ììì¤.",FEED_TIMEOUT_MESSAGE:"ëì¤ì ë¤ì ìëí´ ì£¼ììì¤."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cuba kemudian."},nl:{NO_CARDS_MESSAGE:"Er zijn geen updates.<br/>Probeer het later opnieuw.",FEED_TIMEOUT_MESSAGE:"Probeer het later opnieuw."},no:{NO_CARDS_MESSAGE:"Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.",FEED_TIMEOUT_MESSAGE:"Vennligst prøv igjen senere."},pl:{NO_CARDS_MESSAGE:"Brak aktualizacji.<br/>ProszÄ sprawdziÄ ponownie później.",FEED_TIMEOUT_MESSAGE:"ProszÄ spróbowaÄ ponownie później."},pt:{NO_CARDS_MESSAGE:"Não temos atualizações.<br/>Por favor, verifique mais tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, tente mais tarde."},"pt-br":{NO_CARDS_MESSAGE:"Não temos nenhuma atualização.<br/>Verifique novamente mais tarde.",FEED_TIMEOUT_MESSAGE:"Tente novamente mais tarde."},ru:{NO_CARDS_MESSAGE:"ÐÐ±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ´Ð¾ÑÑÑпнÑ.<br/>ÐожалÑйÑÑа, пÑовеÑÑÑе Ñнова позже.",FEED_TIMEOUT_MESSAGE:"ÐожалÑйÑÑа, повÑоÑиÑе попÑÑÐºÑ Ð¿Ð¾Ð·Ð¶Ðµ."},sv:{NO_CARDS_MESSAGE:"Det finns inga uppdateringar.<br/>
2Försök igen senare.",FEED_TIMEOUT_MESSAGE:"Försök igen senare."},th:{NO_CARDS_MESSAGE:"à¹à¸£à¸²à¹à¸¡à¹à¸¡à¸µà¸à¸²à¸£à¸à¸±à¸à¹à¸à¸ à¸à¸£à¸¸à¸à¸²à¸à¸£à¸§à¸à¸ªà¸à¸à¸ ายหลัà¸.",FEED_TIMEOUT_MESSAGE:"à¸à¸£à¸¸à¸à¸²à¸¥à¸à¸à¹à¸«à¸¡à¹à¸ ายหลัà¸."},uk:{NO_CARDS_MESSAGE:"ÐÐ½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½ÐµÐ´Ð¾ÑÑÑпнÑ.<br/>лаÑка, пеÑевÑÑÑе Ð·Ð½Ð¾Ð²Ñ Ð¿ÑзнÑÑе.",FEED_TIMEOUT_MESSAGE:"ÐÑÐ´Ñ Ð»Ð°Ñка, ÑпÑобÑйÑе Ñе Ñаз пÑзнÑÑе."},vi:{NO_CARDS_MESSAGE:"Chúng tôi không có cáºp nháºt nà o.<br/>Vui lòng kiá»m tra lại sau.",FEED_TIMEOUT_MESSAGE:"Vui lòng thá» lại sau."},"zh-hk":{NO_CARDS_MESSAGE:"æ«ææ²ææ´æ°.<br/>è«ç¨åå試.",FEED_TIMEOUT_MESSAGE:"è«ç¨åå試."},"zh-hans":{NO_CARDS_MESSAGE:"ææ¶æ²¡ææ´æ°.<br/>请ç¨ååè¯.",FEED_TIMEOUT_MESSAGE:"请ç¨ååè¯."},"zh-hant":{NO_CARDS_MESSAGE:"æ«ææ²ææ´æ°.<br/>è«ç¨åå試.",FEED_TIMEOUT_MESSAGE:"è«ç¨åå試."},"zh-tw":{NO_CARDS_MESSAGE:"æ«ææ²ææ´æ°.<br/>è«ç¨åå試.",FEED_TIMEOUT_MESSAGE:"è«ç¨åå試."},zh:{NO_CARDS_MESSAGE:"ææ¶æ²¡ææ´æ°.<br/>请ç¨ååè¯.",FEED_TIMEOUT_MESSAGE:"请ç¨ååè¯."}};class Ji{constructor(t,e=!1){if(this.language=t,t!=null&&(t=t.toLowerCase()),t!=null&&Fe[t]==null){const s=t.indexOf("-");s>0&&(t=t.substring(0,s))}if(Fe[t]==null){const s="Braze does not yet have a localization for language "+t+", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";e?c.error(s):c.info(s),t="en"}this.language=t}get(t){return Fe[this.language][t]}wa(){switch(this.language){case"ar":case"he":case"fa":return"rtl";default:return"ltr"}}}const pt={i:!1,na:null,ra:()=>{if(pt.t(),!pt.na){let i=ot.language,t=!1;f.er(I.qa)&&(i=f.er(I.qa),t=!0),pt.na=new Ji(i,t)}return pt.na},t:()=>{pt.i||(f.g(pt),pt.i=!0)},destroy:()=>{pt.na=null,pt.i=!1}};function Yi(i,t,e){if(!f.rr())return;if(Ds(),i==null)return!1;if(i instanceof Nt)return c.info("User received control for a multivariate test, logging to Braze servers."),je(i),!0;if(!(i instanceof D)||i.constructor===D)return!1;i.lh();const s=i instanceof Dt;if(s&&!i.trusted&&!f.ar())return c.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),!1;if(t==null&&(t=document.body),i.zo()&&t.querySelectorAll(".ab-modal-interactions").length>0)return c.info(`Cannot show in-app message ${i.message} because another message is being shown.`),!1;if(Qt.da()){const o=Qt.ga();if(o===Mt.PORTRAIT&&i.orientation===qt.LANDSCAPE||o===Mt.LANDSCAPE&&i.orientation===qt.PORTRAIT){const l=o===Mt.PORTRAIT?"portrait":"landscape",u=i.orientation===qt.PORTRAIT?"portrait":"landscape";return c.info(`Not showing ${u} in-app message ${i.message} because the screen is currently ${l}`),!1}}if(!f.ar()){let o=!1;if(i.buttons&&i.buttons.length>0){const l=i.buttons;for(let u=0;u<l.length;u++)if(l[u].clickAction===_t.URI){const h=l[u].uri;o=He(h)}}else i.clickAction===_t.URI&&(o=He(i.uri));if(o)return c.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),!1}const n=document.createElement("div");if(n.className="ab-iam-root v3",n.className+=Fi(i),i.language&&!s&&(n.lang=i.language),i.Bo()&&(n.id=i.htmlId),f.er(I.ja)&&(n.style.zIndex=(f.er(I.ja)+1).toString()),t.appendChild(n),i.Mo()){const o=document.createElement("style");o.innerHTML=i.css,o.id=i.Oo(),f.er(I.sr)!=null&&o.setAttribute("nonce",f.er(I.sr)),document.getElementsByTagName("head")[0].appendChild(o)}const a=i instanceof Kt,r=Vi(i,o=>{if(i.zo()&&i.od()){const l=document.createElement("div");if(l.className="ab-page-blocker",i.Mo()||(l.style.backgroundColor=yt(i.frameColor)),f.er(I.ja)&&(l.style.zIndex=f.er(I.ja).toString()),n.appendChild(l),!f.er(I.oh)){const u=new Date().valueOf();l.onclick=h=>{new Date().valueOf()-u>Se.pE&&(i.tl(o),h.stopPropagation())}}n.appendChild(o),o.focus(),i.eh(n)}else if(a){const l=document.querySelectorAll(".ab-slideup");let u=null;for(let h=l.length-1;h>=0;h--)if(l[h]!==o){u=l[h];break}if(i.slideFrom===fe.TOP){let h=0;u!=null&&(h=u.offsetTop+u.offsetHeight),o.style.top=Math.max(h,0)+"px"}else{let h=0;u!=null&&(h=(window.innerHeight||document.documentElement.clientHeight)-u.offsetTop),o.style.bottom=Math.max(h,0)+"px"}}else if(s&&!f.er(I.oh)){const l=i;Ns(o)&&o.contentWindow&&o.contentWindow.addEventListener("keydown",function(u){u.keyCode===Tt.rh&&l.closeMessage()})}
2je(i),i.dismissType===se.AUTO_DISMISS&&setTimeout(()=>{n.contains(o)&&i.tl(o)},i.duration),typeof e=="function"&&e()},o=>{c.info(o)},f.er(I.ba),f.er(I.ja),f.er(I.sr),t,pt.ra().wa());return(s||a)&&(n.appendChild(r),i.eh(n)),!0}function Zi(i){if(f.rr())return typeof i!="function"?null:V.ra().En(function(t){return i(t[0]),t.slice(1)})}function na(){if(!f.rr())return;Ds();const i=V.ra();if(i.Gn()==null){const t=Zi(e=>Yi(e));i.Nn(t)}return i.Gn()}function aa(i){if(f.rr())return i instanceof Nt?(c.info("Not deferring since this is a ControlMessage."),!1):i instanceof D?V.ra().jn(i):(c.info("Not an instance of InAppMessage, ignoring."),!1)}function ra(){if(f.rr())return V.ra().sa()}class Qi{constructor(t,e,s,n){this.B=t,this.j=e,this.C=s,this.Ss=n,this.B=t,this.j=e,this.C=s,this.Ss=n,this.In=new W,f.S(this.In),this.An=1e3,this.Dn=6e4,this.Bn=null,this._n=null,this.qn=null}Pn(){return this.In}En(t){return this.In.Kt(t)}Gn(){return this.Bn}Nn(t){this.Bn=t}wt(t,e,s,n){const a=new Pt;let r;if(e===O.Fn||t instanceof Nt){if(!t.gs())return c.info("This in-app message has already received an impression. Ignoring analytics event."),a}else if((e===O.On||t instanceof Dt&&e===O.Xn)&&!t.ss(n))return c.info("This in-app message has already received a click. Ignoring analytics event."),a;return r=t instanceof Nt?{trigger_ids:[t.triggerId]}:this.Hn(t),r==null?a:(t.messageExtras&&(r.message_extras=t.messageExtras),s!=null&&(r.bid=s),G.wt(e,r))}Jn(t,e){const s=new Pt;if(!t.ss())return c.info("This in-app message button has already received a click. Ignoring analytics event."),s;const n=this.Hn(e);return n==null?s:t.id===Bt.Kn?(c.info("This in-app message button does not have a tracking id. Not logging event to Braze servers."),s):(t.id!=null&&(n.bid=t.id),G.wt(O.Xn,n))}Ln(t){const e=t.messageFields;return e!=null&&e.is_push_primer||!1}Qn(t){if(!(t instanceof D))return;const e=a=>{if(!a)return;const r=Ve(a);if(Je(r))return ws(Xe.Un,"In-App Message");if(Ss(r)){const o=F.Vn();if(!o.Wn)return F.Yn(o.reason,"In-App Message")}};if(this.Ln(t)){const a=F.Vn();if(!a.Wn)return F.Yn(a.reason,"In-App Message")}const s=t.buttons||[];let n;for(const a of s)if(a.clickAction===_t.URI&&a.uri&&ue.test(a.uri)&&(n=e(a.uri),n))return n;return t.clickAction===_t.URI&&t.uri&&ue.test(t.uri)?e(t.uri):void 0}Zn(t,e){e!==this.qn&&this._o(),this._n=t,this.qn=e}_o(){this._n!=null&&(clearTimeout(this._n),this._n=null,this.qn=null)}Xo(t,e,s,n){const a=this.B;if(!a)return;this.qn&&t.triggerId!==this.qn&&(this._o(),T.Li(this.C,T.it.Yo));const r=a.Zo(!1),o=a.Z(r);o.template={trigger_id:t.triggerId,trigger_event_type:e},s!=null&&(o.template.data=s.ta());const l=a.tt(o,T.it.Yo);a.et(o,(u=-1)=>{const h=this.B;if(!h)return;const d=new Date().valueOf();T.nt(this.C,T.it.Yo,d),u!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",u.toString()]);let g,b,w=!1;ee.ot({url:`${h.ht()}/template/`,data:o,headers:l,lt:y=>{if(!h.ut(o,y,l))return void(typeof t.ia=="function"&&t.ia());if(h.ct(),y==null||y.templated_message==null)return;const S=y.templated_message;if(S.type!==lt.la.oa)return;const x=_s(S.data);if(x==null)return;const E=this.Qn(x);if(E)return c.error(E),void(typeof t.ia=="function"&&t.ia());typeof t.ua=="function"&&t.ua(x)},error:y=>{w=!0,g=y,b=`getting user personalization for message ${t.triggerId}.`},ft:(y,S)=>{if(new Date().valueOf()-t.ma<t.ca){let x=0;if(w){const E=Math.min(t.ca,this.Dn),C=this.An;n==null&&(n=C),x=Math.min(E,ie(C,3*n))}h.yt(S,()=>{this.Xo(t,e,s,x)},T.it.Yo,E=>this.Zn(E,t.triggerId),()=>this._o(),x)}w&&h.dt(g,b)}})},T.it.Yo)}Hn(t){if(t.triggerId==null)return c.info("The in-app message has no analytics id. Not logging event to Braze servers."),null;const e={};return t.triggerId!=null&&(e.trigger_ids=[t.triggerId]),e}jn(t){return!!this.C&&!(!(t&&t instanceof D&&t.constructor!==D)||t instanceof Nt)&&this.C.It(p.Tt.pa,t.qt())}sa(){if(!this.C)return null;const t=this.C.Rt(p.Tt.pa);if(!t)return null;let e;switch(t.type){case j.cE:e=Ht.ha(t);break;case j.iE:case j.PE:case j.nE:e=Dt.ha(t);break;case j.aE:case j.UE:e=ne.ha(t);break;case j.sE:e=Kt.ha(t)}return e&&this.fa(),e}fa(){this.C&&this.C.Qt(p.Tt.pa)}}const V={na:null,i:!1,ra:()=>
2(V.t(),V.na||(V.na=new Qi(f.m(),f.u(),f.p(),f.ir())),V.na),t:()=>{V.i||(f.g(V),V.i=!0)},destroy:()=>{V.na=null,V.i=!1}};class ss{constructor(t,e,s,n,a){this.triggerId=t,this.ua=e,this.ia=s,this.ma=n,this.ca=a,this.triggerId=t,this.ua=e,this.ia=s,this.ma=n,this.ca=a}static fromJson(t,e,s,n,a){return t==null||t.trigger_id==null?null:new ss(t.trigger_id,e,s,n,a)}}class tn extends te{constructor(t,e,s,n,a){super(),this.tg=t,this.Rs=e,this.C=s,this.Ru=n,this.ig=a,this.tg=t,this.Rs=e,this.C=s,this.Ru=n,this.ig=a,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.C){this.hg=this.C.Rt(p.Tt.oS)||this.hg,this.ng=this.C.Rt(p.Tt.nS)||this.ng,this.og=this.C.Rt(p.Tt.rS)||this.og;for(let t=0;t<this.triggers.length;t++){const e=this.triggers[t];e.id&&this.og[e.id]!=null&&e.md(this.og[e.id])}}}ag(){if(!this.C)return;this.lg=this.C.Rt(p.Tt.sS)||0;const t=this.C.Rt(p.Tt.eS)||[],e=[];for(let s=0;s<t.length;s++)e.push(lt._u(t[s]));this.triggers=e,this.fg()}gg(){const t=this,e=function(a,r,o,l,u){return function(){t.cg(a,r,o,l,u)}},s={};for(const a of this.triggers)a.id&&(s[a.id]=a);let n=!1;for(let a=0;a<this.triggers.length;a++){const r=this.triggers[a];if(r.id&&this.ng[r.id]!=null){const o=this.ng[r.id],l=[];for(let u=0;u<o.length;u++){const h=o[u],d=r.gd(h.ma||0);if(d>0){let g,b;l.push(h),h.ug!=null&&(g=h.ug),h.dg!=null&&ht.hS(h.dg)&&(b=ht._u(h.dg));const w=[];if(h.pg&&K(h.pg))for(let y=0;y<h.pg.length;y++){const S=s[h.pg[y]];S!=null&&w.push(S)}this.eg.push(window.setTimeout(e(r,h.ma||0,g,b,w),d))}}this.ng[r.id].length>l.length&&(this.ng[r.id]=l,n=!0,this.ng[r.id].length===0&&delete this.ng[r.id])}}n&&this.C&&this.C.It(p.Tt.nS,this.ng)}mg(){if(!this.C)return;const t=[];for(let e=0;e<this.triggers.length;e++)t.push(this.triggers[e].qt());this.lg=new Date().valueOf(),this.C.It(p.Tt.eS,t),this.C.It(p.Tt.sS,this.lg)}bg(){this.C&&((this.C.Rt(p.Tt.sS)||0)>this.lg?this.ag():this.fg())}I(t){let e=!1;if(t!=null&&t.triggers){this.ig.fa(),this.fg();const s={},n={};this.triggers=[];for(let o=0;o<t.triggers.length;o++){const l=lt.fromJson(t.triggers[o]);if(l){l.id&&this.og[l.id]!=null&&(l.md(this.og[l.id]),s[l.id]=this.og[l.id]),l.id&&this.ng[l.id]!=null&&(n[l.id]=this.ng[l.id]);for(let u=0;u<l.ed.length;u++)if(l.ed[u].Vc(J.Ls,null)){e=!0;break}this.triggers.push(l)}}jt(this.og,s)||(this.og=s,this.C&&this.C.It(p.Tt.rS,this.og)),jt(this.ng,n)||(this.ng=n,this.C&&this.C.It(p.Tt.nS,this.ng)),this.mg(),e&&(c.info("Trigger with test condition found, firing test."),this.Ee(J.Ls)),this.Ee(J.OPEN);const a=this.sg;let r;this.sg=[];for(let o=0;o<a.length;o++)r=Array.prototype.slice.call(a[o]),this.Ee(...r)}}cg(t,e,s,n,a){const r=d=>{this.fg();const g=new Date().valueOf();t.fd(e)||(navigator.onLine===!1&&t.type===lt.la.oa&&d.imageUrl?c.info(`Not showing ${t.type} trigger action ${t.id} due to offline state.`):t.dd(g)&&this.wg(t,g,s)?this.Rs.Le()===0?c.info(`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Rs.A([d]),this.yg(t,g)):c.info(`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`))},o=()=>{this.fg();const d=a.pop();if(d!=null)if(this.Tg(d,e,s,n,a),d.fd(e)){let g=`Server aborted in-app message display, but the timeout on fallback trigger ${d.id} has already elapsed.`;a.length>0&&(g+=" Continuing to fall back."),c.info(g),o()}else{c.info(`Server aborted in-app message display. Falling back to lower priority ${d.type} trigger action ${t.id}.`);const g=1e3*d.hd-(new Date().valueOf()-e);g>0?this.eg.push(window.setTimeout(()=>{this.cg(d,e,s,n,a)},g)):this.cg(d,e,s,n,a)}};let l,u,h;switch(t.type){case lt.la.oa:if(l=_s(t.data),l==null){c.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}if(u=this.ig.Qn(l),u){c.error(u),o();break}r(l);break;case lt.la.pd:if(h=ss.fromJson(t.data,r,o,e,t.ca||0),h==null){c.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}this.ig.Xo(h,s,n);break;default:c.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`)}}Ee(t,e=null,s){if(!It(J,t,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Ru&&this.Ru.Ic())return c.info("Trigger sync is currently in progress, awaiting sync completion before firing trigger event."),void this.sg.push(arguments);this.bg();const n=new Date().valueOf(),a=n-(this.hg||0);let r=!0,o=!0;const l=[];for(let h=0;h<this.triggers.length;h++){const d=this.triggers[h],g=n+1e3*d.hd;
2if(d.dd(g)&&(d.startTime==null||d.startTime.valueOf()<=n)&&(d.endTime==null||d.endTime.valueOf()>=n)){let b=!1;for(let w=0;w<d.ed.length;w++)if(d.ed[w].Vc(t,e)){b=!0;break}b&&(r=!1,this.wg(d,g,t)&&(o=!1,l.push(d)))}}if(r)return void c.info(`Trigger event ${t} did not match any trigger conditions.`);if(o)return void c.info(`Ignoring ${t} trigger event because a trigger was displayed ${a/1e3}s ago.`);l.sort((h,d)=>h.priority-d.priority);const u=l.pop();u!=null&&(c.info(`Firing ${u.type} trigger action ${u.id} from trigger event ${t}.`),this.Tg(u,n,t,s,l),u.hd===0?this.cg(u,n,t,s,l):this.eg.push(window.setTimeout(()=>{this.cg(u,n,t,s,l)},1e3*u.hd)))}changeUser(t=!1){if(this.triggers=[],this.C&&this.C.Qt(p.Tt.eS),!t){this.sg=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[],this.C&&(this.C.Qt(p.Tt.oS),this.C.Qt(p.Tt.rS),this.C.Qt(p.Tt.nS))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let t=0;t<this.eg.length;t++)clearTimeout(this.eg[t]);this.eg=[]}wg(t,e,s){if(this.hg==null)return!0;if(s===J.Ls)return c.info("Ignoring minimum interval between trigger because it is a test type."),!0;let n=t.ad;return n==null&&(n=this.tg),e-this.hg>=1e3*n}Tg(t,e,s,n,a){this.fg(),t.id&&(this.ng[t.id]=this.ng[t.id]||[]);const r={};let o;r.ma=e,r.ug=s,n!=null&&(o=n.qt()),r.dg=o;const l=[];for(const u of a)u.id&&l.push(u.id);r.pg=l,t.id&&this.ng[t.id].push(r),this.C&&this.C.It(p.Tt.nS,this.ng)}yg(t,e){this.fg(),t.md(e),this.hg=e,t.id&&(this.og[t.id]=e),this.C&&(this.C.It(p.Tt.oS,e),this.C.It(p.Tt.rS,this.og))}}const X={i:!1,provider:null,o:()=>(X.t(),X.provider||X.rg(),X.provider),rg:()=>{if(!X.provider){const i=f.er(I.Dh);X.provider=new tn(i??30,V.ra().Pn(),f.p(),f.nn(),V.ra()),f.v(X.provider)}},t:()=>{X.i||(X.rg(),f.g(X),X.i=!0)},destroy:()=>{X.provider=null,X.i=!1}},en=5;function sn(i,t,e,s,n){const a=/^https?:\/\//i.test(i)?i:`https://${i}`;let r=`mite=${encodeURIComponent(t)}&attempts=${e}`;return s&&(r+=`&auth=${encodeURIComponent(s)}`),n&&(r+=`&rcs=${encodeURIComponent(n)}`),`${a}/sse?${r}`}const nn=` 3"use strict"; 4const workerSelf = self; 5let eventSource = null; 6let currentConfig = null; 7let retryCount = 0; 8let retryTimeoutId = null; 9let connectionInProgress = false; 10const maxRetries = 5; 11const connectedPorts = new Map(); 12let lastSleepMs = null; 13let currentRcs = null; 14let ttlTimeoutId = null; 15let leaderPortId = null; 16let ddrTimeoutId = null; 17const fn = { 18 startConnection: null, 19 handleMessage: null, 20}; 21function broadcast(message) { 22 connectedPorts.forEach((portInfo, portId) => { 23 try { 24 portInfo.port.postMessage(message); 25 } 26 catch (_a) { 27 connectedPorts.delete(portId); 28 } 29 }); 30} 31function randomInclusive(min, max) { 32 return Math.floor(Math.random() * (max - min + 1)) + min; 33} 34function electLeader() { 35 if (leaderPortId && connectedPorts.has(leaderPortId)) { 36 return; 37 } 38 const firstPortId = connectedPorts.keys().next().value; 39 leaderPortId = firstPortId || null; 40 if (leaderPortId) { 41 console.log("[Braze Real-Time] Elected leader port:", leaderPortId); 42 } 43} 44function promoteToLeader(portId) { 45 if (connectedPorts.has(portId) && leaderPortId !== portId) { 46 leaderPortId = portId; 47 console.log("[Braze Real-Time] Promoted to leader (tab became active):", portId); 48 } 49} 50function sendToLeader(message) { 51 electLeader(); 52 if (!leaderPortId) { 53 console.warn("[Braze Real-Time] No leader to send message to"); 54 return; 55 } 56 const leader = connectedPorts.get(leaderPortId); 57 if (leader) { 58 try { 59 leader.port.postMessage(message); 60 } 61 catch (_a) { 62 connectedPorts.delete(leaderPortId); 63 leaderPortId = null; 64 sendToLeader(message); 65 } 66 } 67} 68function closeConnection() { 69 connectionInProgress = false; 70 if (retryTimeoutId !== null) { 71 clearTimeout(retryTimeoutId); 72 retryTimeoutId = null; 73 } 74 if (ttlTimeoutId !== null) { 75 clearTimeout(ttlTimeoutId); 76 ttlTimeoutId = null; 77 } 78 if (ddrTimeoutId !== null) { 79 clearTimeout(ddrTimeoutId); 80 ddrTimeoutId = null; 81 } 82 if (eventSource) { 83 eventSource.close(); 84 eventSource = null; 85 broadcast({ type: "disconnected" }); 86 } 87} 88function retryWithBackoff() { 89 if (!currentConfig) { 90 return; 91 } 92 retryCount++; 93 const { minSleepMs, maxSleepMs, scaleFactor } = currentConfig.backoff; 94 let previousSleepMs = lastSleepMs; 95 if (previousSleepMs == null || previousSleepMs < minSleepMs) { 96 previousSleepMs = minSleepMs; 97 } 98 const backoffMs = Math.min(maxSleepMs, randomInclusive(minSleepMs, previousSleepMs * scaleFactor)); 99 lastSleepMs = backoffMs; 100 console.log("[Braze Real-Time] Retrying in " + backoffMs + "ms (attempt " + retryCount + "/" + maxRetries + ")"); 101 retryTimeoutId = setTimeout(function () { 102 retryTimeoutId = null; 103 fn.startConnection(); 104 }, backoffMs); 105} 106function startConnection(oldEventSourceToClose) { 107 if (!currentConfig) { 108 return; 109 } 110 if (eventSource && !oldEventSourceToClose) { 111 console.warn("[Braze Real-Time] Connection already exists"); 112 return; 113 } 114 if (connectionInProgress && !oldEventSourceToClose) { 115 console.warn("[Braze Real-Time] Connection attempt already in progress"); 116 return; 117 } 118 connectionInProgress = true; 119 const { dustHost, mite, auth } = currentConfig; 120 const dustHostWithScheme = /^https?:\\/\\//i.test(dustHost) ? dustHost : "https://" + dustHost; 121 let queryString = "mite=" + encodeURIComponent(mite) + "&attempts=" + retryCount; 122 if (auth) { 123 queryString += "&auth=" + encodeURIComponent(auth); 124 } 125 if (currentRcs) { 126 queryString += "&rcs=" + encodeURIComponent(currentRcs); 127 } 128 const subscribeUrl = dustHostWithScheme + "/sse?" + queryString; 129 try { 130 const newEventSource = new EventSource(subscribeUrl); 131 newEventSource.onopen = function () { 132 if (oldEventSourceToClose) { 133 console.log("[Braze Real-Time] Gapless reconnection: new connection established, closing old connection"); 134 oldEventSourceToClose.close(); 135 } 136 else { 137 console.log("[Braze Real-Time] Connection established"); 138 } 139 eventSource = newEventSource; 140 connectionInProgress = false;
141 retryCount = 0; 142 lastSleepMs = null; 143 broadcast({ type: "connected" }); 144 }; 145 newEventSource.addEventListener("msg", function (event) { 146 fn.handleMessage(event.data); 147 }); 148 newEventSource.onerror = function () { 149 const readyState = newEventSource ? newEventSource.readyState : -1; 150 if (readyState === 0) { 151 console.log("[Braze Real-Time] Failed to connect"); 152 } 153 else { 154 console.log("[Braze Real-Time] Connection lost"); 155 } 156 if (oldEventSourceToClose && eventSource !== newEventSource) { 157 console.log("[Braze Real-Time] Gapless reconnection failed, keeping old connection"); 158 newEventSource.close(); 159 connectionInProgress = false; 160 if (retryCount < maxRetries) { 161 retryWithBackoff(); 162 } 163 return; 164 } 165 closeConnection(); 166 if (retryCount < maxRetries) { 167 retryWithBackoff(); 168 } 169 else { 170 console.error("[Braze Real-Time] Max retries reached"); 171 broadcast({ type: "error", error: "Max retry attempts reached" }); 172 } 173 }; 174 } 175 catch (error) { 176 connectionInProgress = false; 177 console.error("[Braze Real-Time] Failed to create EventSource:", error); 178 broadcast({ type: "error", error: String(error) }); 179 } 180} 181function handleTtlMessage(tMs, rcs) { 182 if (typeof tMs !== "number") { 183 return; 184 } 185 if (typeof rcs === "string") { 186 currentRcs = rcs; 187 } 188 console.log("[Braze Real-Time] TTL set to " + tMs + "ms, will perform gapless reconnection when expired"); 189 if (ttlTimeoutId !== null) { 190 clearTimeout(ttlTimeoutId); 191 } 192 ttlTimeoutId = setTimeout(function () { 193 ttlTimeoutId = null; 194 console.log("[Braze Real-Time] TTL expired, performing gapless reconnection"); 195 startConnection(eventSource || undefined); 196 }, tMs); 197} 198function handleDdrMessage(rMs, reason) { 199 if (typeof rMs !== "number") { 200 return; 201 } 202 const jitter = Math.random() * rMs * 0.3; 203 const waitMs = Math.round(rMs + jitter); 204 const reasonStr = reason ? " (" + reason + ")" : ""; 205 console.log("[Braze Real-Time] Admin requested disconnect" + reasonStr + ", reconnecting in " + waitMs + "ms"); 206 if (ddrTimeoutId !== null) { 207 clearTimeout(ddrTimeoutId); 208 } 209 closeConnection(); 210 ddrTimeoutId = setTimeout(function () { 211 ddrTimeoutId = null; 212 fn.startConnection(); 213 }, waitMs); 214} 215function handleMessage(data) { 216 try { 217 const message = JSON.parse(data); 218 if (!message.type) { 219 console.warn("[Braze Real-Time] Message without type:", message); 220 return; 221 } 222 if (message.type === "ttl" && message.body) { 223 handleTtlMessage(message.body.t_ms, message.body.rcs); 224 return; 225 } 226 if (message.type === "ddr" && message.body) { 227 handleDdrMessage(message.body.r_ms, message.body.e); 228 return; 229 } 230 console.log("[Braze Real-Time] Routing '" + message.type + "' message to leader"); 231 sendToLeader({ type: "message", data: message }); 232 } 233 catch (error) { 234 console.warn("[Braze Real-Time] Failed to parse message:", error); 235 } 236} 237fn.startConnection = startConnection; 238fn.handleMessage = handleMessage; 239function handlePortMessage(port, portId, message) { 240 switch (message.type) { 241 case "connect": 242 if (currentConfig && 243 (currentConfig.mite !== message.config.mite || currentConfig.dustHost !== message.config.dustHost)) { 244 console.log("[Braze Real-Time] Config changed, reconnecting"); 245 closeConnection(); 246 retryCount = 0; 247 lastSleepMs = null; 248 currentRcs = null; 249 } 250 currentConfig = message.config; 251 electLeader(); 252 if (!eventSource && !connectionInProgress) { 253 startConnection(); 254 } 255 else if (eventSource) { 256 port.postMessage({ type: "connected" }); 257 } 258 break; 259 case "disconnect": 260 connectedPorts.delete(portId); 261 if (portId === leaderPortId) { 262 leaderPortId = null; 263 electLeader(); 264 } 265 if (connectedPorts.size === 0) { 266 console.log("[Braze Real-Time] No more ports, closing connection"); 267 closeConnection(); 268 currentConfig = null; 269 currentRcs = null; 270 leaderPortId = null; 271 } 272 break; 273 case "tab_active": 274 promoteToLeader(portId); 275 break; 276 case "ping": 277 port.postMessage({ type: "pong" }); 278 break; 279 default: 280 console.warn("[Braze Real-Time] Unknown message type:", message.type); 281 } 282} 283workerSelf.onconnect = function (event) { 284 const port = event.ports[0]; 285 const portId = "port-" + Date.now() + "-" + Math.random().toString(36).substr(2, 9); 286 connectedPorts.set(portId, { port: port }); 287 port.onmessage = function (messageEvent) { 288 try { 289 handlePortMessage(port, portId, messageEvent.data); 290 } 291 catch (error) { 292 console.error("[Braze Real-Time] Error handling message:", error); 293 } 294 }; 295 port.onmessageerror = function () { 296 console.warn("[Braze Real-Time] Message error from port:", portId); 297 connectedPorts.delete(portId); 298 }; 299 port.start(); 300}; 301`;function Us(){return typeof SharedWorker<"u"}class an{constructor(t){this.Wr=null,this.Lr=null,this.isConnected=!1,this.Ir=null,this.Mr=null,this.Be=t.Be,this.Pe=t.Pe,this.He=t.He,this.Je=t.Je}initialize(){if(!Us())return c.info("SharedWorker not supported, will use direct connection"),!1;try{const t=new Blob([nn],{type:"application/javascript"});return this.Lr=URL.createObjectURL(t),this.Wr=new SharedWorker(this.Lr,{name:"braze-dust-worker"}),this.Wr.port.onmessage=e=>{this.Ur(e.data)},this.Wr.port.onmessageerror=()=>{c.warn("Message error from real-time messaging worker")},this.Wr.onerror=e=>{var s;c.error(`Real-time messaging worker error: ${e.message||"unknown error"}`),(s=this.Je)===null||s===void 0||s.call(this,"SharedWorker error")},this.Wr.port.start(),this.Vr(),this.Er(),c.info("Real-time messaging worker initialized"),!0}catch(t){return c.error(`Failed to create real-time messaging worker: ${t instanceof Error?t.message:String(t)}`),this._r(),!1}}Ur(t){var e,s,n;switch(t.type){case"connected":c.info("Real-time messaging connection established via SharedWorker"),this.isConnected=!0,(e=this.Pe)===null||e===void 0||e.call(this);break;case"disconnected":c.info("Real-time messaging connection closed via SharedWorker"),this.isConnected=!1,(s=this.He)===null||s===void 0||s.call(this);break;case"message":this.Be(t.data);break;case"error":c.error(`Real-time messaging error: ${t.error}`),(n=this.Je)===null||n===void 0||n.call(this,t.error)}}Vr(){this.Ir=window.setInterval(()=>{this.Wr&&this.Gr({type:"ping"})},3e4)}Jr(){this.Ir!==null&&(window.clearInterval(this.Ir),this.Ir=null)}Er(){this.Mr=()=>{document.visibilityState==="visible"&&this.Wr&&this.Gr({type:"tab_active"})},document.addEventListener("visibilitychange",this.Mr)}Kr(){this.Mr&&(document.removeEventListener("visibilitychange",this.Mr),this.Mr=null)}Gr(t){this.Wr&&this.Wr.port.postMessage(t)}connect(t){this.Wr?(this.Gr({type:"connect",zn:t}),c.info("Connecting to real-time messaging")):c.error("Cannot connect: real-time messaging worker not initialized")}disconnect(){this.Wr&&(this.Gr({type:"disconnect"}),this.isConnected=!1,c.info("Disconnecting from real-time messaging"))}cn(){return this.isConnected}isInitialized(){return this.Wr!==null}_r(){this.Jr(),this.Kr(),this.Wr&&(this.Wr.port.close(),this.Wr=null),this.Lr&&(URL.revokeObjectURL(this.Lr),this.Lr=null),this.isConnected=!1}destroy(){this.disconnect(),this._r(),c.info("Real-time messaging worker destroyed")}}class rn extends te{constructor(t,e,s,n,a=!0){super(),this.B=t,this.C=e,this.h=s,this.B=t,this.C=e,this.h=s,this.mite=null,this.Wi=null,this.Gi=null,this.Hi=null,this.Oi=n||null,this.Ki=null,this.Qi=null,this.T=null,this.Vi=0,this.Xi=en,this.Yi=null,this.Zi=null,this._i=!0,this.we=null,this.Se=null,this.ke=null,this.ye=null,this.Re=!1,this.Me=new Map,this.xe=null,this.De=null,this.We=null,this.Fe=this.Ue(a),this.Ne=!1,this.Te=0,this.ze()}Ue(t){return t?Us()?"sharedworker":(c.info("SharedWorker not supported, using direct EventSource (multi-tab will gracefully degrade)"),"direct"):(c.info("Shared connection disabled, using direct EventSource"),"direct")}Ae(){this.We=new an({Be:t=>{this.Ge(t)},Pe:()=>{this.qe()},He:()=>{},Je:t=>{c.error(`Real-time messaging SharedWorker error: ${t}`)}}),this.We.initialize()||(c.info("SharedWorker initialization failed, falling back to direct EventSource"),this.Fe="direct",this.We=null)}qe(){this.Vi=0,this.we=null,this._i=!0,this.Ne=!1,this.Te=0}Ge(t){if(!t.type)return void c.warn(`Received real-time message without type: ${JSON.stringify(t)}`);const e=this.Fe==="sharedworker"?"SharedWorker":"Direct";c.info(`Received real-time message of type '${t.type}' via ${e}`);const s=this.Me.get(t.type);if(s&&s.Le()>0)try{s.A(t)}catch(n){c.error(`Error invoking subscription for message type '${t.type}': ${n}`)}else c.info(`No subscribers for real-time message type '${t.type}'`)}Oe(){return this.Fe==="sharedworker"}Ie(){return this.Fe}ze(){if(this.C){const t=this.C.Rt(p.Tt.Ke),e=this.C.Rt(p.Tt.Qe),s=this.C.Rt(p.Tt.Ve),n=this.C.Rt(p.Tt.Xe);t&&e?(this.mite=t,this.Wi=e,this.Gi=s,this.Hi=n,c.info("Restored real-time messaging configuration from storage")):(t||e)&&(c.warn("Incomplete real-time messaging configuration in storage, clearing"),this.Ye())}}Hr(){this.xe||this.De||(this.xe=this.Ze("ddr",t=>{if(!t.body||typeof t.body._e!="number")return;const e=Math.random()*t.body._e*.3,s=Math.round(t.body._e+e),n=t.body.e?` (${t.body.e})`:"";c.info(`Admin requested disconnect${n}, reconnecting in ${s}ms`),this.sn(),setTimeout(()=>this.en(),s)}),this.De=this.Ze("ttl",t=>{if(!t.body||typeof t.body.on!="number")return;const e=t.body.on;c.info(`Time to live set to ${e}ms, will reconnect when expired`),this.Fe!=="sharedworker"&&(typeof t.body.hn=="string"&&(this.Ki=t.body.hn),this.Zi!==null&&window.clearTimeout(this.Zi),this.Zi=window.setTimeout(()=>{this.Zi=null,c.info("Time to live expired, performing gapless reconnection"),this.an()},e))}))}ln(){this.Se||this.ke||(this.ye=()=>{this.Re=!0,this._i=!1},window.addEventListener("beforeunload",this.ye),this.Se=()=>{var t;this.Re=!0,(this.Qi||!((t=this.We)===null||t===void 0)&&t.cn())&&(c.info("Page unloading, closing real-time connection gracefully"),this._i=!1,this.sn())},window.addEventListener("pagehide",this.Se),this.ke=t=>{var e;const s=this.Qi||((e=this.We)===null||e===void 0?void 0:e.cn());t.persisted&&this.un()&&!s&&(c.info("Page restored from bfcache, reconnecting"),this.Re=!1,this.qe(),this.en())},window.addEventListener("pageshow",this.ke))}Lt(){return this.T}$t(t){this.T=t}Ze(t,e){if(typeof e!="function")return null;let s=this.Me.get(t);return s||(s=new W,this.Me.set(t,s),f.S(s)),s.Kt(e)}dn(t,e){const s=this.Me.get(t);s&&s.removeSubscription(e)}un(){return!!(this.mite&&this.Wi)}gn(){return this.Hi?Math.floor(new Date().valueOf()/1e3)>=this.Hi:!1}
301Ye(){this.mite=null,this.Wi=null,this.Gi=null,this.Hi=null,this.Ki=null,this.C&&(this.C.Qt(p.Tt.Ke),this.C.Qt(p.Tt.Qe),this.C.Qt(p.Tt.Ve),this.C.Qt(p.Tt.Xe))}mn(t,e){const s=()=>{typeof e=="function"&&e()},n=this.B,a=this.C;if(!n||!a)return c.error("NetworkManager or StorageManager not available"),void s();if(!this.h||!this.h.fn())return c.info("Real-time messaging is not enabled, skipping refresh"),void s();this.un()?c.info("Refreshing real-time messaging configuration"):c.info("Fetching initial real-time messaging configuration");const r=n.Z({},!0),o=n.tt(r,T.it.pn,!1),l=new Date().valueOf();T.nt(a,T.it.pn,l),ee.ot({url:`${n.ht()}/dust/config`,headers:o,data:r,lt:u=>{if(!n.ut(r,u,o))return c.error("Failed to validate server response for real-time messaging configuration"),void s();n.ct(),u.mite&&u.host?(this.mite=u.mite,this.Wi=u.host,this.Gi=u.auth||null,this.Hi=u.expiration||null,c.info("Received real-time messaging configuration from server"),a.It(p.Tt.Ke,u.mite),a.It(p.Tt.Qe,u.host),u.auth?a.It(p.Tt.Ve,u.auth):a.Qt(p.Tt.Ve),u.expiration?a.It(p.Tt.Xe,u.expiration):a.Qt(p.Tt.Xe),this.en(),typeof t=="function"&&t()):(c.info("Real-time messaging configuration not available - this SDK version may not be supported"),this.Ye(),s())},error:u=>{n.dt(u,"retrieving DUST config"),s()}})}en(){if(!this.h||!this.h.fn())return;if(!this.un())return void c.error("Cannot start real-time subscription without configuration");if(this.gn())return c.info("Real-time messaging auth token has expired, refreshing configuration"),void this.mn(()=>{this.en()},()=>{c.error("Failed to refresh expired real-time messaging configuration")});const t=this.mite,e=this.Oi||this.Wi;if(t&&e)switch(this.Fe){case"sharedworker":this.vn(t,e);break;case"direct":this.Qi&&(c.info("Real-time connection already exists, closing before starting new subscription"),this.sn()),this.wn()}}bn(){const t=this.mite,e=this.Oi||this.Wi;return t&&e?sn(e,t,this.Vi,this.Gi||void 0,this.Ki||void 0):null}vn(t,e){var s,n,a;if(this.We||this.Ae(),!this.We)return c.info("SharedWorker initialization failed, falling back to direct EventSource"),this.Fe="direct",void this.Sn();this.Oi&&c.info(`Using custom real-time messaging host: ${this.Oi}`),c.info("Starting real-time subscription via SharedWorker");const r=((s=this.h)===null||s===void 0?void 0:s.vt())||Vt,o=((n=this.h)===null||n===void 0?void 0:n.bt())||Yt,l=((a=this.h)===null||a===void 0?void 0:a.gt())||Jt;this.We.connect({mite:t,Wi:e,auth:this.Gi||void 0,kn:{yn:r,$n:o,Rn:l}})}Sn(){this.Qi&&(c.info("Real-time connection already exists, closing before starting new subscription"),this.Cn()),this.wn()}wn(t){const e=this.bn();if(e){this.Oi&&c.info(`Using custom real-time messaging host: ${this.Oi}`);try{const s=new EventSource(e);s.onopen=()=>{t?(c.info("Gapless reconnection: new connection established, closing old connection"),t.close()):c.info("Real-time messaging connection established"),this.Qi=s,this.Vi=0,this.we=null,this._i=!0,this.Ne=!0},s.addEventListener("msg",n=>{this.Mn(n.data)}),s.onerror=()=>{const n=s.readyState;return this.Re||(n===0?c.info("Real-time messaging failed to connect"):c.info("Real-time messaging connection lost")),t&&this.Qi!==s?(c.info("Gapless reconnection failed, keeping old connection"),s.close(),void(this._i&&this.Vi<this.Xi&&this.xn())):(this.Cn(),this.Ne&&(this.Te++,this.Te>1)?(c.info("Real-time messaging connection lost twice after successful connect (likely multi-tab conflict), yielding to other tab"),void(this._i=!1)):void(this._i&&this.Vi<this.Xi?this.xn():(this.Vi>=this.Xi&&c.error(`Max retry attempts (${this.Xi}) reached for real-time messaging, giving up for current session`),this._i=!1)))}}catch(s){c.error(`Failed to create real-time messaging connection: ${s instanceof Error?s.message:String(s)}`)}}}xn(){var t,e,s;this.Vi++;const n=((t=this.h)===null||t===void 0?void 0:t.vt())||Vt,a=((e=this.h)===null||e===void 0?void 0:e.gt())||Jt,r=((s=this.h)===null||s===void 0?void 0:s.bt())||Yt;let o=this.we;(o==null||o<n)&&(o=n);const l=Math.min(r,ie(n,o*a));this.we=l,c.info(`Retrying real-time messaging connection in ${l}ms (attempt ${this.Vi}/${this.Xi})`),this.Yi=window.setTimeout(()=>{this.Yi=null,this.en()},l)}an(){if(this.un()){if(this.gn())return c.info("Auth token expired during gapless reconnection, falling back to regular reconnection"),this.sn(),void this.en();this.Zi!==null&&(window.clearTimeout(this.Zi),this.Zi=null),this.wn(this.Qi||void 0)}else c.error("Cannot perform gapless reconnection without configuration")}sn(){var t;switch(this.Fe){case"sharedworker":(t=this.We)===null||t===void 0||t.disconnect();break;case"direct":this.Cn()}}Cn(){this.Yi!==null&&(window.clearTimeout(this.Yi),this.Yi=null),this.Zi!==null&&(window.clearTimeout(this.Zi),this.Zi=null),this.Qi&&(this.Qi.close(),this.Qi=null,c.info("Real-time messaging connection closed"))}Mn(t){try{const e=JSON.parse(t);this.Ge(e)}catch(e){c.warn(`Failed to parse real-time message: ${e instanceof Error?e.message:String(e)}`)}}changeUser(t=!1){this.sn(),t||(this.un()&&c.info("Clearing cached real-time messaging configuration for user change"),this.Ye()),this.qe()}clearData(t=!1){this._i=!1,this.sn(),t&&(this.un()&&c.info("Clearing cached real-time messaging configuration (wipeData)"),this.Ye()),this.qe()}destroy(){this._i=!1,this.sn(),this.Ye(),this.We&&(this.We.destroy(),this.We=null),this.xe&&(this.dn("ddr",this.xe),this.xe=null),this.De&&(this.dn("ttl",this.De),this.De=null),this.ye&&(window.removeEventListener("beforeunload",this.ye),this.ye=null),this.Se&&(window.removeEventListener("pagehide",this.Se),this.Se=null),this.ke&&(window.removeEventListener("pageshow",this.ke),this.ke=null),this.T&&(f.removeSubscription(this.T),this.T=null)}}const it={i:!1,provider:null,o:()=>
301{if(it.t(),!it.provider){const i=f.er("dustHost");it.provider=new rn(f.m(),f.p(),f.l(),i),f.v(it.provider),it.provider.Hr()}return it.provider},t:()=>{it.i||(f.g(it),it.i=!0)},destroy:()=>{it.provider&&it.provider.destroy(),it.provider=null,it.i=!1}};function on(){const i=f.l(),t=f.nn();if(!i||!t)return null;const e=it.o(),s=()=>{if(!e.Lt()){e.ln();const n=t.rn(()=>{i.fn()&&e.mn()});return n&&e.$t(n),e.un()&&e.en(),n}return e.Lt()};return i.Tr(()=>{f.ao()&&(i.fn()?(e.mn(),s()):(e.sn(),e.un()&&e.Ye()))}),i.fn()?s():null}class De{constructor(t,e,s,n,a){this.endpoint=t,this.Wu=e,this.publicKey=s,this.zc=n,this.rc=a,this.endpoint=t||null,this.Wu=e||null,this.publicKey=s||null,this.zc=n||null,this.rc=a||null}qt(){return{e:this.endpoint,c:this.Wu,p:this.publicKey,u:this.zc,v:this.rc}}static _u(t){return new De(t.e,le(t.c),t.p,t.u,t.v)}}class ln{constructor(t,e){this.h=t,this.C=e,this.h=t,this.C=e}getUserId(){const t=this.C.$u(p.Ou.Cu);if(t==null)return null;let e=t.Tu,s=we(e);if(s>M.br){for(;s>M.br;)e=e.slice(0,e.length-1),s=we(e);t.Tu=e,this.C.Iu(p.Ou.Cu,t)}return e}Ju(t){const e=this.getUserId()==null;this.C.Iu(p.Ou.Cu,new Et(t)),e&&this.C.Lu(t)}setCustomUserAttribute(t,e){if(this.h.qu(t))return c.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;const s={};return s[t]=e,this.zu(M.Bu,s,!0)}zu(t,e,s=!1,n=!1){const a=this.C.Eu(this.getUserId(),t,e);let r="",o=t,l=e;return s&&(r=" custom",typeof e=="object"&&(o=Object.keys(e)[0],l=e[o],typeof l=="object"&&(l=JSON.stringify(l,null,2)))),!n&&a&&c.info(`Logged${r} attribute ${o} with value ${l}`),a}gu(t,e,s,n,a){this.zu("push_token",t,!1,!0),this.zu("custom_push_public_key",s,!1,!0),this.zu("custom_push_user_auth",n,!1,!0),this.zu("custom_push_vapid_public_key",a,!1,!0);const r=U.Ps.$s,o=new U(r,c),l=new De(t,e,s,n,a);this.C.It(p.Tt.Uu,l.qt()),o.setItem(r.Os.Fu,r.be,!0)}wu(t){if(this.zu("push_token",null,!1,!0),this.zu("custom_push_public_key",null,!1,!0),this.zu("custom_push_user_auth",null,!1,!0),this.zu("custom_push_vapid_public_key",null,!1,!0),t){const e=U.Ps.$s,s=new U(e,c);this.C.It(p.Tt.Uu,!1),s.setItem(e.Os.Fu,e.be,!1)}}}const I={_h:"allowCrawlerActivity",Nh:"baseUrl",se:"cookieExpiryInDays",Oh:"noCookies",ka:"disablePushTokenMaintenance",Rh:"enableLogging",Ph:"enableSdkAuthentication",_a:"manageServiceWorkerExternally",Dh:"minimumIntervalBetweenTriggerActionsInSeconds",Lh:"sessionTimeoutInSeconds",yh:"appVersion",Mh:"appVersionNumber",xa:"serviceWorkerLocation",Ma:"safariWebsitePushId",qa:"localization",sr:"contentSecurityNonce",nr:"allowUserSuppliedJavascript",ja:"inAppMessageZIndex",ba:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",oh:"requireExplicitInAppMessageDismissal",Uh:"doNotLoadFontAwesome",Wh:"deviceId",ya:"serviceWorkerScope",Bh:"sdkFlavor"};class un{constructor(){this.tu="",this.Vh="",this.Kh=void 0,this.Gh=null,this.eu=null,this.B=null,this.Ru=null,this.h=null,this.j=null,this.C=null,this.Ss=null,this.Yh="",this.isInitialized=!1,this.$h=!1,this.qh=new W,this.Hh=new W,this.options={},this.Jh=[],this.Xh=[],this.In=[],this.Vh="6.7.1"}Zh(t){this.qh.Kt(t)}uh(t){this.Hh.Kt(t)}initialize(t,e){var s,n,a;if(this.ao())return c.info("Braze has already been initialized with an API key."),!0;this.options=e||{};let r=this.er(I.Rh);const o=zs(Qt.Qh());if(o&&o.brazeLogging==="true"&&(r=!0),c.init(r),c.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),t==null||t===""||typeof t!="string")return c.error("Braze requires a valid API key to be initialized."),!1;this.tu=t;let l=this.er(I.Nh);if(l==null||l===""||typeof l!="string")return c.error("Braze requires a valid baseUrl to be initialized."),!1;/^https?:/.test(l)===!1&&(l=`https://${l}`);const u=l;if(l=document.createElement("a"),l.href=u,l.pathname==="/"&&(l=`${l}api/v3`),this.Yh=l.toString(),ot.il&&!this.er(I._h))return c.info("Ignoring activity from crawler bot "+navigator.userAgent),this.$h=!0,!1;const h=this.er(I.Oh)||!1,d=this.er(I.se),g=xe.sl();if(this.C=xe.rl(t,h,d),h&&this.C.hl(t),new Y.le(null,!0).wr(p.ce))return c.info("Ignoring all activity due to previous opt out"),this.$h=!0,!1;for(const E of nt(this.options))Ne(rs).indexOf(E)===-1&&c.warn(`Ignoring unknown initialization option '${E}'.`);const b=["mparticle","wordpress","tealium"];if(this.er(I.Bh)!=null){const E=this.er(I.Bh);b.indexOf(E)!==-1?this.Kh=E:c.error("Invalid sdk flavor passed: "+E)}let w=this.er(rs.Th);if(w!=null)if(K(w)){const E=[];for(let C=0;C<w.length;
301C++)It(Ot,w[C],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&E.push(w[C]);w=E}else c.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),w=null;const y=this.er(I.Wh);if(y){const E=new Et(y);this.C.Iu(p.Ou.Wh,E)}this.eu=new Ci(this.C,w),this.h=new Oi(this.C),this.Ss=new ln(this.h,this.C),this.j=new Di(this.C,this.Ss,this.h,this.er(I.Lh));const S=new W;this.Gh=new Ei(this.C,this.er(I.Ph),S),this.S(S),this.B=new Ai(this.eu,this.C,this.Gh,this.Ss,this.j,this.h,this.tu,this.Yh,this.Vh,this.Kh||"",this.er(I.yh),this.er(I.Mh)),this.Ru=new _i(this.tu,this.Yh,this.j,this.eu,this.Ss,this.h,this.C,E=>{if(this.ao())for(const C of this.vr())C.I(E)},this.Gh,this.B),this.Ru.initialize(),h||this.C.ll(),c.info(`Initialized for the Braze backend at "${this.er(I.Nh)}" with API key "${this.tu}".`),X.t(),on(),this.h.bo(()=>{var E;this.isInitialized&&(!((E=this.h)===null||E===void 0)&&E.lo())&&St(()=>Promise.resolve().then(()=>ms),void 0,import.meta.url).then(C=>{this.isInitialized&&(0,C.default)()})}),this.Ru.rn(()=>{var E;this.isInitialized&&(!((E=this.h)===null||E===void 0)&&E.lo())&&St(()=>Promise.resolve().then(()=>ms),void 0,import.meta.url).then(C=>{this.isInitialized&&(0,C.default)(void 0,void 0,!0)})}),this.qh.A(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized"));const x=(s=this.j)===null||s===void 0?void 0:s.al();return g||x==null||!((n=this.j)===null||n===void 0)&&n.ul(new Date().valueOf(),x)||(a=this.Ru)===null||a===void 0||a.Sr(),!0}destroy(t){if(c.destroy(),this.ao()){this.Hh.A(),this.Hh.removeAllSubscriptions();for(const e of this.Jh)e.destroy();this.Jh=[];for(const e of this.Xh)e.clearData(!1);this.B&&this.B.fo(),this.Xh=[],this.removeAllSubscriptions(),this.In=[],this.Ru!=null&&this.Ru.destroy(),this.Ru=null,this.Gh=null,this.eu=null,this.B=null,this.h=null,this.j=null,this.Ss=null,this.options={},this.Kh=void 0,this.isInitialized=!1,this.$h=!1,t&&(this.C=null)}}rr(){return!this.cl()&&(!!this.ao()||!1)}za(){return this.tu}Br(){return this.Gh}ht(){return this.Yh}ue(){return this.eu}m(){return this.B}er(t){return this.options[t]}vr(){return this.Xh}nn(){return this.Ru}l(){return this.h}u(){return this.j}p(){return this.C}zr(){if(this.Ss&&this.Ru)return new M(this.Ss,this.Ru)}ir(){return this.Ss}ar(){return this.er(I.nr)===!0}g(t){let e=!1;for(const s of this.Jh)s===t&&(e=!0);e||this.Jh.push(t)}v(t){let e=!1;for(const s of this.Xh)s.constructor===t.constructor&&(e=!0);t instanceof te&&!e&&this.Xh.push(t)}S(t){t instanceof W&&this.In.push(t)}removeAllSubscriptions(){if(this.rr())for(const t of this.In)t.removeAllSubscriptions()}removeSubscription(t){if(this.rr())for(const e of this.In)e.removeSubscription(t)}fe(t){this.$h=t}ao(){return this.isInitialized}cl(){return this.$h}dr(t,e){return this.rr()?it.o().Ze(t,e):null}zi(){return this.Vh}}const f=new un,G={wt:(i,t,e)=>{var s,n;const a=new Pt,r=f.u();if(!r)return c.info(`Not logging event with type "${i}" because the current session ID could not be found.`),a;const o=r.el();return a.Ce.push(new ht(e||((s=f.ir())===null||s===void 0?void 0:s.getUserId()),i,new Date().valueOf(),o,t)),a.lt=((n=f.p())===null||n===void 0?void 0:n.ol(a.Ce))||!1,a}};class cn{constructor(t){this.C=t,this.C=t}logClick(t){const e=new Pt;if(t.ss(),t.url==null||t.url==="")return c.info(`Card ${t.id} has no url. Not logging click to Braze servers.`),e;if(t.id&&this.C){const a=this.C.Rt(p.Tt.ns)||{};a[t.id]=!0,this.C.It(p.Tt.ns,a)}const s=this.rs([t]);if(s==null)return e;const n=O.os;return G.wt(n,s)}es(t){const e=new Pt;if(!t.ls())return c.info(`Card ${t.id} refused this dismissal. Ignoring analytics event.`),e;if(t.id&&this.C){const n=this.C.Rt(p.Tt.us)||{};n[t.id]=!0,this.C.It(p.Tt.us,n)}const s=this.rs([t]);return s==null?e:G.wt(O.cs,s)}fs(t){const e=new Pt(!0),s=[],n=[];let a={};this.C&&(a=this.C.Rt(p.Tt.hs)||{});for(const l of t)l.gs()?(l instanceof _e?n.push(l):s.push(l),l.id&&(a[l.id]=!0)):c.info(`Card ${l.id} logged an impression too recently. Ignoring analytics event.`);const r=this.rs(s),o=this.rs(n);if(r==null&&o==null)return e.lt=!1,e;if(this.C&&this.C.It(p.Tt.hs,a),r!=null){const l=O.ds,u=G.wt(l,r);e.ps(u)}if(o!=null){const l=G.wt(O.js,o);e.ps(l)}return e}rs(t){let e,s=null;for(let n=0;n<t.length;n++)e=t[n].id,e!=null&&e!==""&&(s=s||{},s.ids=s.ids||[],s.ids.push(e));return s}}const ft={i:!1,na:null,ra:()=>(ft.t(),ft.na||(ft.na=new cn(f.p())),ft.na),t:()=>{ft.i||(f.g(ft),ft.i=!0)},destroy:()=>{ft.na=null,ft.i=!1}},is={tr:"must be a Card object"};function hn(i){return!!f.rr()&&(i instanceof m?ft.ra().es(i).lt:(c.error("card "+is.tr),!1))}function dn(i){if(!f.rr())return!1;if(!K(i))return c.error("cards must be an array"),!1;for(const t of i)if(!(t instanceof m))return c.error(`Each card in cards ${is.tr}`),!1;return ft.ra().fs(i).lt}
301function pn(i){return!!f.rr()&&(i instanceof m?ft.ra().logClick(i).lt:(c.error("card "+is.tr),!1))}function Fs(i,t,e,s,n,a,r,o,l,u,h,d,g,b,w,y,S,x){let E;if(t===m.ks.oi||t===m.ks.ai)E=new hi(i,e,s,n,a,r,o,l,u,h,d,g,b,w,S,x);else if(t===m.ks.zs)E=new ci(i,e,s,n,a,r,o,l,u,h,d,g,b,w,S,x);else if(t===m.ks.Ii)E=new ui(i,e,n,r,o,l,h,d,g,b,w,S,x);else{if(t!==m.ks.Ni)return c.error("Ignoring card with unknown type "+t),null;E=new _e(i,e,r,o,d,g)}return y&&(E.test=y),E}function $e(i){if(i[m.ui.Ei])return null;const t=i[m.ui.qs],e=i[m.ui.xs],s=i[m.ui.vs],n=i[m.ui.ws],a=i[m.ui.ys],r=i[m.ui.As],o=zt(i[m.ui.Bs]);let l;return l=i[m.ui.Cs]===m.Ti?null:zt(i[m.ui.Cs]),Fs(t,e,s,n,a,r,o,l,i[m.ui.URL],i[m.ui.Ds],i[m.ui.Es],i[m.ui.Fs],i[m.ui.Gs],i[m.ui.Hs],i[m.ui.Is],i[m.ui.Ls]||!1,i[m.ui.Js],i[m.ui.Ks])}function fn(i){return Fs(i[m.bs.qs],i[m.bs.xs],i[m.bs.vs],i[m.bs.ws],i[m.bs.ys],i[m.bs.As],le(i[m.bs.Bs]),le(i[m.bs.Cs]),i[m.bs.URL],i[m.bs.Ds],i[m.bs.Es],i[m.bs.Fs],i[m.bs.Gs],i[m.bs.Hs],i[m.bs.Is],i[m.bs.Ls]||!1,i[m.bs.Js],i[m.bs.Ks])||void 0}class mn extends te{constructor(t,e,s,n,a){super(),this.Ss=t,this.C=e,this.h=s,this.Ts=n,this.B=a,this.Ss=t,this.C=e,this.h=s,this.Ts=n,this.B=a,this.Rs=new W,f.S(this.Rs),this.Us=0,this.Ns=0,this.cards=[],this.Ms();const r=U.Ps.$s;new U(r,c).Xs(r.Os._s,o=>{this.Qs(o)}),this.Vs=null,this.T=null,this.Ws=null,this.Ys=null,this.Zs=10}fi(){return this.Vs}vi(t){this.Vs=t}Lt(){return this.T}$t(t){this.T=t}Ms(){if(!this.C)return;const t=this.C.Rt(p.Tt.Ci)||[],e=[];for(let s=0;s<t.length;s++){const n=fn(t[s]);n!=null&&e.push(n)}this.cards=this.bi(this.wi(e,!1)),this.Us=this.C.Rt(p.Tt.gi)||this.Us,this.Ns=this.C.Rt(p.Tt.ji)||this.Ns}yi(t,e=!1,s=0,n=0){let a;if(e){a=[];for(const r of this.cards)r.test&&a.push(r)}else a=this.cards.slice();for(let r=0;r<t.length;r++){const o=t[r];let l=null;for(let u=0;u<this.cards.length;u++)if(o.id===this.cards[u].id){l=this.cards[u];break}if(e){const u=$e(o);l!=null&&l.viewed&&u&&(u.viewed=!0),u!=null&&a.push(u)}else if(l==null){const u=$e(o);u!=null&&a.push(u)}else if(!l.ri(o)){for(let u=0;u<a.length;u++)if(o.id===a[u].id){a.splice(u,1);break}}}this.cards=this.bi(this.wi(a,e)),this.Ri(),this.Us=s,this.Ns=n,this.C&&(this.C.It(p.Tt.gi,this.Us),this.C.It(p.Tt.ji,this.Ns))}I(t){if(this.Ui()&&t!=null&&t.cards){this.C&&this.C.It(p.Tt.ki,f.zi());const e=t.full_sync;e||this.Ms(),this.yi(t.cards,e,t.last_full_sync_at,t.last_card_updated_at),this.Rs.A(this.qi(!0))}}xi(t){this.Fi(),this.Ws=t}Qs(t){var e;if(!this.Ui())return;this.Ms();const s=this.cards.slice();let n=null;n=(e=this.Ss)===null||e===void 0?void 0:e.getUserId();for(let a=0;a<t.length;a++)if(n===t[a].userId||n==null&&t[a].userId==null){const r=t[a].card;let o=null;for(let l=0;l<this.cards.length;l++)if(r.id===this.cards[l].id){o=this.cards[l];break}if(o==null){const l=$e(r);l!=null&&s.push(l)}else if(!o.ri(r)){for(let l=0;l<s.length;l++)if(r.id===s[l].id){s.splice(l,1);break}}}this.cards=this.bi(this.wi(s,!1)),this.Ri(),this.Rs.A(this.qi(!0))}wi(t,e){let s={},n={},a={};this.C&&(s=this.C.Rt(p.Tt.ns)||{},n=this.C.Rt(p.Tt.hs)||{},a=this.C.Rt(p.Tt.us)||{});const r={},o={},l={};for(let u=0;u<t.length;u++){const h=t[u].id;h&&(s[h]&&(t[u].clicked=!0,r[h]=!0),n[h]&&(t[u].viewed=!0,o[h]=!0),a[h]&&(t[u].dismissed=!0,l[h]=!0))}return e&&this.C&&(this.C.It(p.Tt.ns,r),this.C.It(p.Tt.hs,o),this.C.It(p.Tt.us,l)),t}bi(t){const e=[],s=new Date;let n={};this.C&&(n=this.C.Rt(p.Tt.us)||{});let a=!1;for(let r=0;r<t.length;r++){const o=t[r].url;if(!this.Ts&&o&&He(o)){c.error(`Card with url ${o} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`);continue}const l=t[r].expiresAt;let u=!0;if(l!=null&&(u=l>=s),u=u&&!t[r].dismissed,u)e.push(t[r]);else{const h=t[r].id;h&&(n[h]=!0),a=!0}}return a&&this.C&&this.C.It(p.Tt.us,n),e}Ri(){var t;const e=[];for(let s=0;s<this.cards.length;s++)e.push(this.cards[s].qt());(t=this.C)===null||t===void 0||t.It(p.Tt.Ci,e)}Fi(){this.Ws&&(clearTimeout(this.Ws),this.Ws=null)}lr(t,e,s=!1){var n;const a=this.B,r=this.C;if(!a||!r)return void(typeof e=="function"&&e());if(s&&(T.Li(r,T.it.Ji),this.Fi()),!this.Ui())return void((n=this.h)===null||n===void 0||n.Mi(()=>{this.lr(t,e,!0)}));const o=a.Z({},!0);r.Rt(p.Tt.ki)!==f.zi()&&this.$i(),o.last_full_sync_at=this.Us,o.last_card_updated_at=this.Ns;const l=a.tt(o,T.it.Ji,s);let u=!1;a.et(o,(h=-1)=>
301{if(this.C){const d=new Date().valueOf();T.nt(this.C,T.it.Ji,d)}h!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",h.toString()]),ee.ot({url:`${a.ht()}/content_cards/sync`,data:o,headers:l,lt:d=>{if(!a.ut(o,d,l))return u=!0,void(typeof e=="function"&&e());a.ct(),this.I(d),u=!1,typeof t=="function"&&t()},error:d=>{a.dt(d,"retrieving content cards"),u=!0,typeof e=="function"&&e()},ft:(d,g)=>{var b,w,y;let S;if(u){const x=((b=this.h)===null||b===void 0?void 0:b.vt())||Vt,E=((w=this.h)===null||w===void 0?void 0:w.gt())||Jt,C=((y=this.h)===null||y===void 0?void 0:y.bt())||Yt;let P=this.Ys;(P==null||P<x)&&(P=x),S=Math.min(C,ie(x,P*E))}a.yt(g,()=>{this.lr(t,e,!1)},T.it.Ji,x=>this.xi(x),()=>this.Fi(),S)}})},T.it.Ji,e)}qi(t){t||this.Ms();const e=this.bi(this.cards);e.sort((n,a)=>n.pinned&&!a.pinned?-1:a.pinned&&!n.pinned?1:n.updated&&a.updated&&n.updated>a.updated?-1:n.updated&&a.updated&&a.updated>n.updated?1:0);let s=Math.max(this.Ns||0,this.Us||0);return s===0&&(s=void 0),this.C&&this.C.Rt(p.Tt.ji)===this.Ns&&s===void 0&&(s=this.Ns),new wt(e,zt(s))}zt(t){return this.Rs.Kt(t)}$i(){this.Us=0,this.Ns=0,this.C&&(this.C.Qt(p.Tt.gi),this.C.Qt(p.Tt.ji))}changeUser(t){t||(this.cards=[],this.Rs.A(new wt(this.cards.slice(),null)),this.C&&(this.C.Qt(p.Tt.Ci),this.C.Qt(p.Tt.ns),this.C.Qt(p.Tt.hs),this.C.Qt(p.Tt.us))),this.Fi(),this.$i()}clearData(t){this.Us=0,this.Ns=0,this.cards=[],this.Rs.A(new wt(this.cards.slice(),null)),t&&this.C&&(this.C.Qt(p.Tt.Ci),this.C.Qt(p.Tt.ns),this.C.Qt(p.Tt.hs),this.C.Qt(p.Tt.us),this.C.Qt(p.Tt.gi),this.C.Qt(p.Tt.ji)),this.Fi()}Ui(){return!!this.h&&(!!this.h.Bi()||(this.h.Ot()!==0&&this.Pi(),!1))}Pi(){this.Rs.A(new wt([],new Date)),this.C&&this.C.Qt(p.Tt.Ci)}}const st={i:!1,provider:null,o:()=>(st.t(),st.provider||(st.provider=new mn(f.ir(),f.p(),f.l(),f.ar(),f.m()),f.v(st.provider),f.dr("ccr",()=>{var i;(i=st.provider)===null||i===void 0||i.lr()})),st.provider),t:()=>{st.i||(f.g(st),st.i=!0)},destroy:()=>{st.provider=null,st.i=!1}};function bn(i,t){if(f.rr())return st.o().lr(i,t,!0)}class wt{constructor(t,e){this.cards=t,this.lastUpdated=e,this.cards=t,this.lastUpdated=e}getUnviewedCardCount(){let t=0;for(const e of this.cards)e.viewed||e instanceof _e||t++;return t}ur(t){dn(t)}cr(t){return pn(t)}Cr(){bn()}hr(){return!0}}wt.mr=6e4,wt.gr=500,wt.jr=1e4;function oa(){if(f.rr())return st.o().qi(!1)}function $s(i){if(i!=null){const t=i.querySelectorAll(".ab-unread-indicator")[0];t==null||t.classList.contains("read")||(t.className+=" read")}}function gn(i){return i.getAttribute("data-ab-card-id")}function vn(i,t){t.setAttribute("alt",i.altImageText||"")}function wn(i,t){const e=t.querySelectorAll(".ab-image-area");let s,n=0;e.length>0&&(n=e[0].offsetWidth);for(const a of i)if(s=a.te,s&&a.imageUrl&&typeof a.aspectRatio=="number"){const r=n/a.aspectRatio;r&&(s.style.height=`${r}px`)}}function yn(i,t,e,s="ltr"){const n=document.createElement("div");n.dir=s,i.language&&(n.lang=i.language),n.className="ab-card ab-effect-card "+i.ae,i.id&&(n.setAttribute("data-ab-card-id",i.id),n.setAttribute("id",i.id)),n.setAttribute("role","article");let a="",r=!1;i.url&&i.url!==""&&(a=i.url,r=!0);const o=b=>($s(n),r&&(t(i),Re(a,e,b)),!1);if(i.pinned){const b=document.createElement("div");b.className="ab-pinned-indicator";const w=document.createElement("i");w.className="fa fa-star",b.appendChild(w),n.appendChild(b)}if(i.imageUrl&&i.imageUrl!==""){const b=document.createElement("div");b.dir=s,b.className="ab-image-area";const w=document.createElement("img");if(w.setAttribute("src",i.imageUrl),w.onload=()=>{n.style.height="auto"},vn(i,w),b.appendChild(w),n.className+=" with-image",r&&!i.oe){const y=document.createElement("a");y.setAttribute("href",a),y.onclick=o,i.altImageText||(i.title?y.setAttribute("aria-label",i.title):y.setAttribute("aria-label","Feed Image")),y.appendChild(b),n.appendChild(y)}else n.appendChild(b)}const l=document.createElement("div");if(l.className="ab-card-body",l.dir=s,i.dismissible){i.logCardDismissal=()=>hn(i);const b=Ms("Dismiss Card",void 0,i.dismissCard.bind(i),s);n.appendChild(b),oe(l,At.ie,w=>
301{n.className+=" ab-swiped-left",b.onclick(w)}),oe(l,At.ne,w=>{n.className+=" ab-swiped-right",b.onclick(w)})}let u="",h=!1;if(i.title&&i.title!==""&&(u=i.title,h=!0),h){const b=document.createElement("h1");if(b.className="ab-title",b.id=Lt.de(),n.setAttribute("aria-labelledby",b.id),r){const w=document.createElement("a");w.setAttribute("href",a),w.onclick=o,w.appendChild(document.createTextNode(u)),b.appendChild(w)}else b.appendChild(document.createTextNode(u));l.appendChild(b)}const d=document.createElement("div");if(d.className=h?"ab-description":"ab-description ab-no-title",i.language&&(d.lang=i.language),i.description&&d.appendChild(document.createTextNode(i.description)),r){const b=document.createElement("div");b.className="ab-url-area";const w=document.createElement("a");w.setAttribute("href",a),i.linkText&&w.appendChild(document.createTextNode(i.linkText)),w.onclick=o,b.appendChild(w),d.appendChild(b)}l.appendChild(d),n.appendChild(l);const g=document.createElement("div");return g.className="ab-unread-indicator",i.viewed&&(g.className+=" read"),n.appendChild(g),i.te=n,n}function Gs(i){f.rr()&&f.removeSubscription(i)}function qs(i){return i!=null&&!!i.getAttribute("data-ab-had-top-impression")}function js(i){i?.setAttribute("data-ab-had-top-impression","true")}function Hs(i){return i!=null&&!!i.getAttribute("data-ab-had-bottom-impression")}function Ws(i){i?.setAttribute("data-ab-had-bottom-impression","true")}const ge={oo:qs,no:Hs},Xt={aa:"Banners are disabled. Make sure you have at least one campaign and relaunch the app.",ea:"data-update-subscription-id"},Sn="data-last-requested-refresh",Ke={};function Me(i){i&&(i.className=i.className.replace("ab-show","ab-hide"),setTimeout(()=>{i&&i.parentNode&&i.parentNode.removeChild(i)},wt.gr));const t=i.getAttribute(Xt.ea);t!=null&&Gs(t);const e=i.getAttribute("data-listener-id");e!=null&&(window.removeEventListener("scroll",Ke[e]),delete Ke[e])}function Ks(i,t){const e=pt.ra(),s=document.createElement("div");if(s.className="ab-feed-body",s.setAttribute("aria-label","Feed"),s.setAttribute("role","feed"),i.lastUpdated==null){const n=document.createElement("div");n.className="ab-no-cards-message";const a=document.createElement("i");a.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",n.appendChild(a),s.appendChild(n)}else{let n=!1;const a=r=>i.cr(r);for(const r of i.cards){const o=r instanceof _e;!o||i.hr()?(s.appendChild(yn(r,a,t,e.wa())),n=n||!o):c.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}if(!n){const r=document.createElement("div");r.className="ab-no-cards-message",r.innerHTML=e.get("NO_CARDS_MESSAGE")||"",r.setAttribute("role","article"),s.appendChild(r)}}return s}function ns(i,t){if(i!=null&&t!=null){const e=[],s=t.querySelectorAll(".ab-card");i.Ta||(i.Ta={});for(let n=0;n<s.length;n++){const a=gn(s[n]),r=ks(s[n]),o=As(s[n]);if(i.Ta[a]){r||o||$s(s[n]);continue}let l=qs(s[n]),u=Hs(s[n]);const h=l,d=u;if(!l&&r&&(l=!0,js(s[n])),!u&&o&&(u=!0,Ws(s[n])),l&&u){if(h&&d)continue;for(const g of i.cards)if(g.id===a){i.Ta[g.id]=!0,e.push(g);break}}}e.length>0&&i.ur(e)}}function Xs(i,t){if(i==null||t==null)return;t.setAttribute("aria-busy","true");const e=t.querySelectorAll(".ab-refresh-button")[0];e!=null&&(e.className+=" fa-spin");const s=new Date().valueOf().toString();t.setAttribute("data-last-requested-refresh",s),setTimeout(()=>{if(t.getAttribute("data-last-requested-refresh")===s){const n=t.querySelectorAll(".fa-spin");for(let r=0;r<n.length;r++)n[r].className=n[r].className.replace(/fa-spin/g,"");const a=t.querySelectorAll(".ab-initial-spinner")[0];if(a!=null){const r=document.createElement("span");r.innerHTML=pt.ra().get("FEED_TIMEOUT_MESSAGE")||"",a.parentNode!=null&&(a.parentNode.appendChild(r),a.parentNode.removeChild(a))}t.getAttribute("aria-busy")==="true"&&t.setAttribute("aria-busy","false")}},wt.jr),i.Cr()}function xn(i,t,e){const s=document.createElement("div");s.className="ab-feed ab-hide ab-effect-slide",s.setAttribute("role","dialog"),s.setAttribute("aria-label","Feed"),s.setAttribute("tabindex","-1");const n=document.createElement("div");n.className="ab-feed-buttons-wrapper",n.setAttribute("role","group"),s.appendChild(n);const a=document.createElement("i");a.className="fa fa-times ab-close-button",a.setAttribute("aria-label","Close Feed"),a.setAttribute("tabindex","0"),a.setAttribute("role","button");const r=h=>{Me(s),h.stopPropagation()};a.addEventListener("keydown",h=>{h.keyCode!==Tt.Ao&&h.keyCode!==Tt.Lo||r(h)}),a.onclick=r;const o=document.createElement("i");o.className="fa fa-refresh ab-refresh-button",i&&i.lastUpdated==null&&(o.className+=" fa-spin"),o.setAttribute("aria-label","Refresh Feed"),o.setAttribute("tabindex","0"),o.setAttribute("role","button");const l=h=>{Xs(i,s),h.stopPropagation()};o.addEventListener("keydown",h=>{h.keyCode!==Tt.Ao&&h.keyCode!==Tt.Lo||l(h)}),o.onclick=l,n.appendChild(o),n.appendChild(a),s.appendChild(Ks(i,t));const u=()=>ns(i,s);if(s.addEventListener("scroll",u),!e){window.addEventListener("scroll",u);const h=Lt.de();Ke[h]=u,s.setAttribute("data-listener-id",h)}return s}function fs(i,t,e,s,n){if(!K(t))return;const a=[];for(const r of t)if(r instanceof m){if(r.url&&ue.test(r.url)){const o=Ve(r.url);if(Je(o)){c.error(ws(Xe.Un,"Content Card"));continue}}a.push(r)}if(i.cards=a,i.lastUpdated=e,s!=null)if(s.setAttribute("aria-busy","false"),i.lastUpdated==null)Me(s);else{const r=s.querySelectorAll(".ab-feed-body")[0];if(r!=null){const o=Ks(i,n);r.parentNode&&r.parentNode.replaceChild(o,r),ns(i,o.parentNode)}}}function En(i,t){i&&t.setAttribute(Xt.ea,i)}function Tn(i){if(!f.rr())return;const t=document.querySelectorAll(".ab-feed");for(let e=0;e<t.length;e++)(i==null||i!=null&&t[e].parentNode===i)&&Me(t[e])}function Cn(i,t){if(!f.rr())return;zi();let e=!1;i==null&&(i=document.body,e=!0);const s=f.er(I.tn)||!1,n=st.o().qi(!1);typeof t=="function"&&fs(n,t(n.cards.slice()),n.lastUpdated,null,s);const a=xn(n,s,e),r=st.o(),o=r.fi();(n.lastUpdated==null||new Date().valueOf()-n.lastUpdated.valueOf()>wt.mr)&&(o==null||new Date().valueOf()-o>wt.mr)&&(c.info(`Cached content cards were older than max TTL of ${wt.mr} ms, requesting an update from the server.`),Xs(n,a),r.vi(new Date().valueOf()));const l=new Date().valueOf(),u=kn(function(g){const b=a.querySelectorAll(".ab-refresh-button")[0];if(b!=null){let y=500,S=y-=new Date().valueOf()-l;const x=a.getAttribute(Sn);x&&(S=parseInt(x),isNaN(S)||(y-=new Date().valueOf()-S)),setTimeout(function(){b.className=b.className.replace(/fa-spin/g,"")},Math.max(y,0))}let w=g.cards;typeof t=="function"&&(w=t(w.slice())),fs(n,w,g.lastUpdated,a,s)});En(u,a);const h=function(g){const b=g.querySelectorAll(".ab-feed");let w=null;for(let y=0;y<b.length;y++)b[y].parentNode===g&&(w=b[y]);w!=null?(Me(w),w.parentNode!=null&&w.parentNode.replaceChild(a,w)):g.appendChild(a),setTimeout(function(){a.className=a.className.replace("ab-hide","ab-show")},0),e&&a.focus(),ns(n,a),wn(n.cards,g)};var d;i!=null?h(i):window.onload=(d=window.onload,function(){typeof d=="function"&&d(new Event("oldLoad")),h(document.body)})}function kn(i){if(!f.rr())return;const t=st.o(),e=t.zt(i);if(!t.Lt()){const s=f.nn();if(s){const n=s.rn(()=>{t.lr(void 0,void 0,!0)});n&&t.$t(n)}}return e}function la(i,t){f.rr()&&(document.querySelectorAll(".ab-feed").length>0?Tn():Cn(i,t))}const An={GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};function ua(i){if(!f.rr())return;const t=f.m();if(t){if(!K(i))return c.error("Cannot set SDK metadata because metadata is not an array."),!1;
301for(const e of i)if(!It(An,e,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return!1;return t.addSdkMetadata(i),!0}}function In(i,t){if(!f.rr())return;if(i==null||i.length===0||i!=i)return void c.error("changeUser requires a non-empty userId.");if(we(i)>M.br)return void c.error(`Rejected user id "${i}" because it is longer than ${M.br} bytes.`);if(t!=null&&!ct(t,"set signature for new user","signature"))return;const e=f.nn();e&&e.changeUser(i.toString(),f.vr(),t)}const Nn=Object.freeze(Object.defineProperty({__proto__:null,changeUser:In},Symbol.toStringTag,{value:"Module"}));function ca(){c.info("Destroying Braze instance"),f.destroy(!0)}function ha(){const i=f.nn();i&&i.requestImmediateDataFlush();const t=f.er(I.se),e=new Y.le(null,!0,t),s="This-cookie-will-expire-in-"+e.me();e.store(p.ce,s);const n=U.Ps.$s;new U(n,c).setItem(n.Os.pe,n.be,!0),c.info("disableSDK was called"),f.destroy(!1),f.fe(!0)}function da(){new Y.le(null,!0).remove(p.ce);const i=U.Ps.$s;new U(i,c).ge(i.Os.pe,i.be),c.info("enableSDK was called"),f.destroy(!1),f.fe(!1)}function pa(i){if(!f.rr())return;const t=f.ue();if(!t)return;const e=t.ve().id;if(typeof i!="function")return e;c.warn("The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)"),i(e)}function fa(i,t){return f.initialize(i,t)}function ma(){return!!new Y.le(null,!0).wr(p.ce)}function ba(){return f.ao()}function _n(i,t){if(!f.rr())return!1;if(i==null||i.length<=0)return c.error(`logCustomEvent requires a non-empty eventName, got "${i}". Ignoring event.`),!1;if(!bt(i,"log custom event","the event name"))return!1;const[e,s]=Oe(t,tt.je,"eventProperties",`log custom event "${i}"`,"event");if(!e)return!1;const n=f.l();if(n&&n.$e(i))return c.info(`Custom Event "${i}" is blocklisted, ignoring.`),!1;const a=G.wt(O.CustomEvent,{n:i,p:s});if(a.lt){c.info(`Logged custom event "${i}".`);for(const r of a.Ce)X.o().Ee(J.he,[i,t],r)}return a.lt}const Vs=Object.freeze(Object.defineProperty({__proto__:null,logCustomEvent:_n},Symbol.toStringTag,{value:"Module"}));function On(i,t,e,s,n){if(!f.rr())return!1;if(e==null&&(e="USD"),s==null&&(s=1),i==null||i.length<=0)return c.error(`logPurchase requires a non-empty productId, got "${i}", ignoring.`),!1;if(!bt(i,"log purchase","the purchase name"))return!1;if(t==null||isNaN(parseFloat(t.toString())))return c.error(`logPurchase requires a numeric price, got ${t}, ignoring.`),!1;const a=parseFloat(t.toString()).toFixed(2);if(s==null||isNaN(parseInt(s.toString())))return c.error(`logPurchase requires an integer quantity, got ${s}, ignoring.`),!1;const r=parseInt(s.toString());if(r<1||r>us)return c.error(`logPurchase requires a quantity >1 and <${us}, got ${r}, ignoring.`),!1;if(e=e!=null?e.toUpperCase():e,["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTC","BTN","BWP","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MTL","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","STD","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMK","ZMW","ZWL"].indexOf(e)===-1)return c.error(`logPurchase requires a valid currencyCode, got ${e}, ignoring.`),!1;const[o,l]=Oe(n,"logPurchase","purchaseProperties",`log purchase "${i}"`,"purchase");if(!o)return!1;const u=f.l();if(u&&u.Dr(i))return c.info(`Purchase "${i}" is blocklisted, ignoring.`),!1;const h=G.wt(O.Pr,{pid:i,c:e,p:a,q:r,pr:l});if(h.lt){c.info(`Logged ${r} purchase${r>1?"s":""} of "${i}" for ${e} ${a}.`);for(const d of h.Ce)X.o().Ee(J.Rr,[i,n],d)}return h.lt}const Rn=Object.freeze(Object.defineProperty({__proto__:null,logPurchase:On},Symbol.toStringTag,{value:"Module"}));function ga(){if(!f.rr())return;const i=f.nn();if(!i)return;i.openSession();const t=U.Ps.$s,e=new U(t,c);e.kr(t.Os.$r,(s,n)=>{const a=n.lastClick,r=n.trackingString;c.info(`Firing push click trigger from ${r} push click at ${a}`);const o=i.yr(a,r),l=function(){X.o().Ee(J.Fr,[r],o)};i.Sr(l,l),e.ge(t.Os.$r,s)}),e.Xs(t.Os.qr,function(s){i.Ar(s)})}function va(){f.rr()&&f.removeAllSubscriptions()}function Dn(i){if(!f.rr())return;const t=f.nn();t&&t.requestImmediateDataFlush(i)}const Mn=Object.freeze(Object.defineProperty({__proto__:null,requestImmediateDataFlush:Dn},Symbol.toStringTag,{value:"Module"}));function wa(i){c.setLogger(i)}function ya(i){if(!f.rr()||i===""||!ct(i,"set signature","signature",!1))return!1;const t=f.Br();return!!t&&(t.setSdkAuthenticationSignature(i),!0)}function Sa(i){var t;
301if(f.rr())return(t=f.Br())===null||t===void 0?void 0:t.subscribeToSdkAuthenticationFailures(i)}function xa(){c.toggleLogging()}function Ea(){const i=f.p();if(i==null)return void c.warn(tt.ee);i.clearData();const t=nt(U.Ps);for(let s=0;s<t.length;s++){const n=t[s],a=U.Ps[n];new U(a,c).clearData()}if(f.rr())for(const s of f.vr())s.clearData(!0);const e=f.m();e&&e.fo()}function Ta(){if(f.rr())return F.isPushBlocked()}function Ca(){if(f.rr())return F.isPushPermissionGranted()}function ka(){if(f.rr())return F.isPushSupported()}class he{constructor(t,e,s,n,a,r,o,l,u,h,d){this.iu=t,this.tu=e,this.eu=s,this.su=a,this.ru=r,this.nu=o,this.h=l,this.ou=u,this.uu=h,this.C=d,this.iu=t,this.tu=e,this.eu=s,this.au=n+"/safari/"+e,this.su=a||"/service-worker.js",this.nu=o,this.h=l,this.ou=u||!1,this.uu=h||!1,this.C=d,this.hu=F.cu(),this.fu=F.lu()}du(){return this.uu}pu(t,e,s,n,a){t.unsubscribe().then(r=>{r?this.bu(e,s,n,a):(c.error("Failed to unsubscribe device from push."),typeof a=="function"&&a(!1))}).catch(r=>{c.error("Push unsubscription error: "+r),typeof a=="function"&&a(!1)})}yu(t,e,s){var n;const a=(h=>{if(typeof h=="string")return h;if(h.endpoint.indexOf("https://android.googleapis.com/gcm/send")!==0)return h.endpoint;let d=h.endpoint;const g=h;return g.mu&&h.endpoint.indexOf(g.mu)===-1&&(d=h.endpoint+"/"+g.mu),d})(t);let r=null,o=null;const l=t;if(l.getKey!=null)try{const h=Array.from(new Uint8Array(l.getKey("p256dh"))),d=Array.from(new Uint8Array(l.getKey("auth")));r=btoa(String.fromCharCode.apply(null,h)),o=btoa(String.fromCharCode.apply(null,d))}catch(h){c.error(vt(h))}const u=(h=>{let d;return h.options&&(d=h.options.applicationServerKey)&&d.byteLength&&d.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(d)))).replace(/\+/g,"-").replace(/\//g,"_"):null})(l);(n=this.iu)===null||n===void 0||n.gu(a,e,r,o,u),a&&typeof s=="function"&&s(a,r,o)}
301vu(){var t;(t=this.iu)===null||t===void 0||t.wu(!0)}ku(t,e){var s;(s=this.iu)===null||s===void 0||s.wu(!1),c.info(t),typeof e=="function"&&e(!1)}Pu(t,e,s,n){var a;if(e.permission==="default")try{window.safari.pushNotification.requestPermission(this.au,t,{api_key:this.tu,device_id:((a=this.eu)===null||a===void 0?void 0:a.ve().id)||""},r=>{r.permission==="granted"&&this.iu&&this.iu.setPushNotificationSubscriptionType(M.NotificationSubscriptionTypes.OPTED_IN),this.Pu(t,r,s,n)})}catch(r){this.ku("Could not request permission for push: "+r,n)}else e.permission==="denied"?this.ku("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",n):e.permission==="granted"&&(c.info("Device successfully subscribed to push."),this.yu(e.deviceToken,new Date,s))}requestPermission(t,e,s){const n=r=>{switch(r){case"granted":return void(typeof t=="function"&&t());case"default":return void(typeof e=="function"&&e());case"denied":return void(typeof s=="function"&&s());default:c.error("Received unexpected permission result "+r)}};let a=!1;if(window.Notification.permission!=="default")n(Notification.permission);else{const r=window.Notification.requestPermission(o=>{a&&n(o)});r?r.then(o=>{n(o)}):a=!0}}bu(t,e,s,n){const a={userVisibleOnly:!0};e!=null&&(a.applicationServerKey=e),t.pushManager.subscribe(a).then(r=>{c.info("Device successfully subscribed to push."),this.yu(r,new Date,s)}).catch(r=>{F.isPushBlocked()?(c.info("Permission for push notifications was denied."),typeof n=="function"&&n(!1)):(c.error("Push subscription failed: "+r),typeof n=="function"&&n(!0))})}Du(){if(this.ou)return navigator.serviceWorker.getRegistration(this.su);const t=this.ru?{scope:this.ru}:void 0;return navigator.serviceWorker.register(this.su,t).then(()=>navigator.serviceWorker.ready.then(e=>(e&&typeof e.update=="function"&&e.update().catch(s=>{c.info("ServiceWorker update failed: "+s)}),e)))}Su(t){this.ou||(t.unregister(),c.info("Service worker successfully unregistered."))}subscribe(t,e){if(!F.isPushSupported())return c.info(he.Au),void(typeof e=="function"&&e(!1));if(this.hu){if(!this.ou&&window.location!=null){let o=this.su;o.indexOf(window.location.host)===-1&&(o=window.location.host+o),o.indexOf(window.location.protocol)===-1&&(o=window.location.protocol+"//"+o)}if(F.isPushBlocked())return void this.ku("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",e);if(this.h&&!this.h.ju()&&this.h.Ot()===0)return c.info("Waiting for VAPID key from server config before subscribing to push."),void this.h.xu(()=>{this.subscribe(t,e)});const s=()=>{c.info("Permission for push notifications was denied."),typeof e=="function"&&e(!1)},n=()=>{let o="Permission for push notifications was ignored.";F.isPushBlocked()&&(o+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),c.info(o),typeof e=="function"&&e(!0)},a=F.isPushPermissionGranted(),r=()=>{!a&&this.iu&&this.iu.setPushNotificationSubscriptionType(M.NotificationSubscriptionTypes.OPTED_IN),this.Du().then(o=>{if(o==null)return c.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void(typeof e=="function"&&e(!0));o.pushManager.getSubscription().then(l=>{var u;let h=null;if(((u=this.h)===null||u===void 0?void 0:u.ju())!=null&&(h=ei.Nu(this.h.ju())),l){let d,g=null,b=null;if(this.C&&(d=this.C.Rt(p.Tt.Uu)),d&&!K(d)){let w;try{w=De._u(d).Wu}catch{w=null}w==null||isNaN(w.getTime())||w.getTime()===0||(g=w,b=new Date(g),b.setMonth(g.getMonth()+6))}h!=null&&l.options&&l.options.applicationServerKey&&l.options.applicationServerKey.byteLength&&l.options.applicationServerKey.byteLength>0&&!jt(h,new Uint8Array(l.options.applicationServerKey))?(l.options.applicationServerKey.byteLength>12?c.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):c.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depen
301ding on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.pu(l,o,h,t,e)):l.expirationTime&&new Date(l.expirationTime).valueOf()<=new Date().valueOf()?(c.info("Push subscription is expired, creating new subscription."),this.pu(l,o,h,t,e)):d&&K(d)?this.pu(l,o,h,t,e):b==null?(c.info("No push subscription creation date found, creating new subscription."),this.pu(l,o,h,t,e)):b.valueOf()<=new Date().valueOf()?(c.info("Push subscription older than 6 months, creating new subscription."),this.pu(l,o,h,t,e)):(c.info("Device already subscribed to push, sending existing subscription to backend."),this.yu(l,g,t))}else this.bu(o,h,t,e)}).catch(l=>{c.error("Error checking current push subscriptions: "+l)})}).catch(o=>{c.error("ServiceWorker registration failed: "+o)})};this.requestPermission(r,n,s)}else if(this.fu){if(this.nu==null||this.nu==="")return c.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari"),void(typeof e=="function"&&e(!0));const s=window.safari.pushNotification.permission(this.nu);this.Pu(this.nu,s,t,e)}}unsubscribe(t,e){if(!F.isPushSupported())return c.info(he.Au),void(typeof e=="function"&&e());this.hu?navigator.serviceWorker.getRegistration(this.su).then(s=>{s?s.pushManager.getSubscription().then(n=>{n?(this.vu(),n.unsubscribe().then(a=>{a?(c.info("Device successfully unsubscribed from push."),typeof t=="function"&&t()):(c.error("Failed to unsubscribe device from push."),typeof e=="function"&&e()),this.Su(s)}).catch(a=>{c.error("Push unsubscription error: "+a),typeof e=="function"&&e()})):(c.info("Device already unsubscribed from push."),typeof t=="function"&&t())}).catch(n=>{c.error("Error unsubscribing from push: "+n),typeof e=="function"&&e()}):(c.info("Device already unsubscribed from push."),typeof t=="function"&&t())}):this.fu&&(this.vu(),c.info("Device unsubscribed from push."),typeof t=="function"&&t())}}he.Au="Push notifications are not supported in this browser.";const mt={i:!1,na:null,ra:()=>(mt.t(),mt.na||(mt.na=new he(f.zr(),f.za(),f.ue(),f.ht(),f.er(I.xa),f.er(I.ya),f.er(I.Ma),f.l(),f.er(I._a),f.er(I.ka),f.p())),mt.na),t:()=>{mt.i||(f.g(mt),mt.i=!0)},destroy:()=>{mt.na=null,mt.i=!1}},Pn=Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"}));function zn(i,t){if(f.rr())return mt.ra().subscribe((e,s,n)=>{const a=f.nn();a&&a.requestImmediateDataFlush(),typeof i=="function"&&i(e,s,n)},t)}const Js=Object.freeze(Object.defineProperty({__proto__:null,requestPushPermission:zn},Symbol.toStringTag,{value:"Module"}));function Bn(i,t){if(f.rr())return mt.ra().unsubscribe(i,t)}const Ln=Object.freeze(Object.defineProperty({__proto__:null,unregisterPush:Bn},Symbol.toStringTag,{value:"Module"}));class Ys{constructor(t){this.properties=t,this.properties=t||{}}tp(t,e,s){const n=this.properties[t];return n==null?(this.rp(t),null):e(n)?n.value:(this.ep(s),null)}getStringProperty(t){return this.tp(t,this.op,"string")}getNumberProperty(t){return this.tp(t,this.sp,"number")}getBooleanProperty(t){return this.tp(t,this.ip,"boolean")}getImageProperty(t){return this.tp(t,this.np,"image")}getJsonProperty(t){return this.tp(t,this.pp,"jsonobject")}getTimestampProperty(t){return this.tp(t,this.up,"datetime")}ep(t){c.info(`Property is not of type ${t}.`)}rp(t){c.info(`${t} not found in properties.`)}op(t){return t.type==="string"&&typeof t.value=="string"}sp(t){return t.type==="number"&&typeof t.value=="number"}ip(t){return t.type==="boolean"&&typeof t.value=="boolean"}np(t){return t.type==="image"&&typeof t.value=="string"}pp(t){return t.type==="jsonobject"&&typeof t.value=="object"&&t.value.constructor==Object}up(t){return t.type==="datetime"&&typeof t.value=="number"}}class H extends Ys{constructor(t,e=!1,s={},n){super(s),this.id=t,this.enabled=e,this.trackingString=n,this.id=t,this.enabled=e,this.trackingString=n}qt(){const t={};return t[H.bs.qs]=this.id,t[H.bs.Nr]=this.enabled,t[H.bs.Or]=this.properties,t[H.bs.Qr]=this.trackingString,t}}H.bs={qs:"id",Nr:"e",Or:"pr",Qr:"fts"},H.ui={qs:"id",Nr:"enabled",Or:"properties",Qr:"fts"};function Un(i){if(i[H.ui.qs]&&typeof i[H.ui.Nr]=="boolean")return new H(i[H.ui.qs],i[H.ui.Nr],i[H.ui.Or],i[H.ui.Qr]);c.info(`Unable to create feature flag from ${JSON.stringify(i,null,2)}`)}function Fn(i){if(i[H.bs.qs]&&typeof i[H.bs.Nr]=="boolean")return new H(i[H.bs.qs],i[H.bs.Nr],i[H.bs.Or],i[H.bs.Qr]);
301c.info(`Unable to deserialize feature flag from ${JSON.stringify(i,null,2)}`)}class $n extends te{constructor(t,e,s,n){super(),this.h=t,this.B=e,this.C=s,this.j=n,this.Xr=[],this.Yr=0,this.h=t,this.B=e,this.C=s,this.j=n,this.Zr=null,this.ho=new W,this.D=10,this.N=null,this.F=null,f.S(this.ho)}I(t){var e;if(!((e=this.h)===null||e===void 0)&&e.lo()&&t!=null&&t.feature_flags){this.Xr=[];for(const s of t.feature_flags){const n=Un(s);n&&this.Xr.push(n)}this.Yr=new Date().getTime(),this.do(),this.ho.A(this.Xr)}}vo(){let t={};this.C&&(t=this.C.Rt(p.Tt.Fo));const e={};for(const s in t){const n=Fn(t[s]);n&&(e[n.id]=n)}return e}po(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.jo))||{}}wo(t){this.C&&this.C.It(p.Tt.jo,t)}zt(t){return this.ho.Kt(t)}refreshFeatureFlags(t,e,s=!1,n=!0){const a=()=>{typeof e=="function"&&e(),this.ho.A(this.Xr)};if(!this.yo(s))return!this.Zr&&this.h&&(this.Zr=this.h.bo(()=>{this.refreshFeatureFlags(t,e)})),void a();const r=this.B;if(!r)return void a();n&&this.Y();const o=r.Z({},!0),l=r.tt(o,T.it.Co);let u=!1;r.et(o,(h=-1)=>{const d=this.B;if(!d)return void a();const g=new Date().valueOf();T.nt(this.C,T.it.Co,g),h!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",h.toString()]),ee.ot({url:`${d.ht()}/feature_flags/sync`,headers:l,data:o,lt:b=>{if(!d.ut(o,b,l))return u=!0,void a();d.ct(),this.I(b),u=!1,typeof t=="function"&&t()},error:b=>{d.dt(b,"retrieving feature flags"),u=!0,a()},ft:(b,w)=>{var y,S,x;let E;if(u){const C=((y=this.h)===null||y===void 0?void 0:y.vt())||Vt,P=((S=this.h)===null||S===void 0?void 0:S.gt())||Jt,R=((x=this.h)===null||x===void 0?void 0:x.bt())||Yt;let $=this.N;($==null||$<C)&&($=C),E=Math.min(R,ie(C,$*P))}d.yt(w,()=>{this.refreshFeatureFlags(t,e,s,!0)},T.it.Co,C=>this.Bt(C),()=>this.Y(),E)}})},T.it.Co,e)}Y(){this.F!=null&&(clearTimeout(this.F),this.F=null)}Bt(t){this.Y(),this.F=t}yo(t){if(!this.h)return!1;if(!t){const e=this.h.Ro();if(e==null)return!1;let s=!1;if(!isNaN(e)){if(e===-1)return c.info("Feature flag refreshes not allowed"),!1;s=new Date().getTime()>=(this.Yr||0)+1e3*e}if(!s)return c.info(`Feature flag refreshes were rate limited to ${e} seconds`),!1}return this.h.lo()}To(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Do))||null}Io(){var t,e;(t=this.C)===null||t===void 0||t.It(p.Tt.Do,(e=this.j)===null||e===void 0?void 0:e.kt())}So(){var t;const e=(t=this.j)===null||t===void 0?void 0:t.kt(),s=this.To();return s==null||e===s}do(){if(!this.C)return;const t={};for(const e of this.Xr){const s=e.qt();t[e.id]=s}this.C.It(p.Tt.Fo,t),this.C.It(p.Tt.qo,this.Yr),this.Io()}changeUser(){this.Y()}clearData(){this.Y()}}const Z={i:!1,provider:null,o:()=>(Z.t(),Z.provider||(Z.provider=new $n(f.l(),f.m(),f.p(),f.u()),f.v(Z.provider)),Z.provider),t:()=>{Z.i||(f.g(Z),Z.i=!0)},destroy:()=>{Z.provider=null,Z.i=!1}};function Zs(i,t,e=!1){if(f.rr())return Z.o().refreshFeatureFlags(i,t,e)}function Gn(i,t){Zs(i,t)}const ms=Object.freeze(Object.defineProperty({__proto__:null,default:Zs,refreshFeatureFlags:Gn},Symbol.toStringTag,{value:"Module"}));function Aa(i){if(!f.rr())return;const t=f.l();if(t&&!t.lo())return null;const e=Z.o().vo();return e[i]?e[i]:null}function qn(){if(!f.rr())return;const i=[],t=f.l();if(t&&!t.lo())return i;const e=Z.o().vo();for(const s in e)i.push(e[s]);return i}function Ia(i){if(!f.rr())return;const t=Z.o();if(t.So()){const e=qn();e&&typeof i=="function"&&i(e)}return t.zt(i)}function Na(i){if(!f.rr())return;if(!i)return!1;const t="Not logging a feature flag impression. The feature flag was not part of any matching experiment.",e=Z.o().vo();if(!e[i])return c.info(t),!1;const s=e[i].trackingString;if(!s)return c.info(t),!1;const n=Z.o().po();if(n[s])return c.info("Not logging another feature flag impression. This ID was already logged this session."),!1;n[s]=!0,Z.o().wo(n);const a={fid:i,fts:s};return G.wt(O.xo,a).lt}class Pe extends Ys{constructor(t,e,s,n=!1,a=!1,r=-1,o={},l=null){super(o),this.id=t,this.placementId=e,this.html=s,this.Vt=n,this.isControl=a,this.Yt=r,this.G=l,this.id=t,this.placementId=e,this.html=s,this.Vt=n,this.isControl=a,this.Yt=r,this.Zt=!1}ts(){return this.isControl}qt(){return{id:this.id,pid:this.placementId,html:this.html,its:this.Vt,ic:this.isControl,eat:this.Yt,pr:this.properties,sk:this.G}}}function jn(i){return new Pe(i.id,i.pid,i.html,i.its,i.ic,i.eat,i.pr,i.sk||null)}function Hn(i){return new Pe(i.id,i.placement_id,i.html,i.is_test_send,i.is_control,i.expires_at,i.properties,i.stable_key||null)}
301class Wn extends te{constructor(t,e,s,n){super(),this.h=t,this.B=e,this.C=s,this.j=n,this.banners={},this.h=t,this.B=e,this.C=s,this.j=n,this.D=10,this.N=null,this.F=null,this.R=new W,f.S(this.R),this.T=null,this.q=null}I(t){if(this.P()&&(this._(t),t!=null&&t.banners)){const e=t.request_time,s=typeof e!="number"||isNaN(e)?null:e,n=this.k(),a=this.L(),r=this.$();this.banners={};const o=t.banners;for(const l in o){const u=this.K(l,s,r),h=o[l];let d=null;if(h!=null&&h.banner!=null&&(d=h.banner),this.U(l,d,s,u,n,a)){if(u){const b=n[l];b&&(this.banners[l]=b)}continue}let g=null;d!=null&&(g=Hn(d)),g&&(this.banners[l]=g)}this.W(),this.R.A(this.banners)}}U(t,e,s,n,a,r){return!this.M(t,e,a)&&s!=null&&(!!n||this.X(e,r,s))}K(t,e,s){if(e==null)return!1;const n=s[t];return typeof n=="number"&&!isNaN(n)&&e<n}M(t,e,s){if(!e)return!1;const n=e.stable_key;if(typeof n!="string"||n.length===0)return!1;const a=s[t],r=a?.G;return typeof r=="string"&&r.length!==0&&r!==n}X(t,e,s){if(!t)return!1;const n=t.stable_key;if(typeof n!="string"||n.length===0)return!1;for(const a of e){if(a.stable_key!==n)continue;const r=a.dismissal_time;if(typeof r=="number"&&!isNaN(r)&&r>=s)return!0}return!1}_(t){var e;const s=(e=t?.dismissals)===null||e===void 0?void 0:e.acknowledged;if(!s||!K(s)||s.length===0)return;const n=this.L();if(n.length===0)return;const a={};for(const o of s)o.banner_id&&o.dismissal_time&&(a[this.H(o.banner_id,o.dismissal_time)]=!0);const r=n.filter(o=>!a[this.H(o.banner_id,o.dismissal_time)]);r.length!==n.length&&this.J(r)}H(t,e){return`${t}:${e}`}O(t,e,s,n=!0){var a;const r=()=>{typeof s=="function"&&s()};if(!this.P())return void((a=this.h)===null||a===void 0||a.V(()=>{this.O(t,e,s)}));const o=this.B;if(!o)return void r();n&&this.Y();const l=o.Z({},!0);l.time_ms=new Date().valueOf();const u=[];for(const b of t)u.push({id:b});l.placements=u;const h=this.L().map(b=>({banner_id:b.banner_id,dismissal_time:b.dismissal_time}));l.pending_dismissals=h;const d=o.tt(l,T.it.st);let g=!1;o.et(l,(b=-1)=>{const w=this.B;if(!w)return void r();const y=new Date().valueOf();T.nt(this.C,T.it.st,y),b!==-1&&d.push(["X-Braze-Req-Tokens-Remaining",b.toString()]);const S=l.time_ms;S==null||typeof S!="number"||isNaN(S)||this.rt(t,S),ee.ot({url:`${w.ht()}/banners/sync`,headers:d,data:l,lt:x=>{if(!w.ut(l,x,d))return g=!0,void r();w.ct(),this.I(x),g=!1,typeof e=="function"&&e()},error:x=>{w.dt(x,"retrieving banners"),g=!0,r()},ft:(x,E)=>{var C,P,R;let $;if(this.q=t,g){const B=((C=this.h)===null||C===void 0?void 0:C.vt())||Vt,z=((P=this.h)===null||P===void 0?void 0:P.gt())||Jt,q=((R=this.h)===null||R===void 0?void 0:R.bt())||Yt;let k=this.N;(k==null||k<B)&&(k=B),$=Math.min(q,ie(B,k*z))}w.yt(E,()=>{this.O(t,e,s,!1)},T.it.st,B=>this.Bt(B),()=>this.Y(),$)}})},T.it.st,s)}Ct(){return this.q}jt(t,e){const s={id:t.id};return e&&(s.bid=e),G.wt(O.Dt,s).lt}Nt(t){if(!t.G)return!1;const e=this.L();if(e.some(r=>r.banner_id===t.id&&r.stable_key===t.G))return!1;const s={id:t.id},n=this.k(),a=n[t.placementId];return a&&a.G===t.G&&(delete n[t.placementId],this.banners=n,this.W(),this.R.A(this.banners)),e.push({banner_id:t.id,dismissal_time:new Date().valueOf(),stable_key:t.G}),this.J(e),G.wt(O.Ft,s).lt}Y(){this.F!=null&&(clearTimeout(this.F),this.F=null)}Bt(t){this.Y(),this.F=t}k(){let t={};this.C&&(t=this.C.Rt(p.Tt.St));const e={};for(const s in t){let n=null;t[s]!=null&&(n=jn(t[s])),n&&(e[n.placementId]=n)}return e}W(){var t;if(!this.C)return;const e={};for(const s in this.banners){const n=((t=this.banners[s])===null||t===void 0?void 0:t.qt())||null;e[s]=n}this.C.It(p.Tt.St,e),this.Pt()}Pt(){var t,e;(t=this.C)===null||t===void 0||t.It(p.Tt._t,(e=this.j)===null||e===void 0?void 0:e.kt())}Et(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt._t))||null}Lt(){return this.T}$t(t){this.T=t}xt(){var t;const e=(t=this.j)===null||t===void 0?void 0:t.kt(),s=this.Et();return s==null||e===s}zt(t){return this.R.Kt(t)}Ut(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Wt))||{}}At(t){this.C&&this.C.It(p.Tt.Wt,t)}L(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Mt))||[]}J(t){var e;if(!this.C)return;const s=(e=this.h)===null||e===void 0?void 0:e.Xt(),n=s??vs,a=t.length<=n?t:t.slice(-n);this.C.It(p.Tt.Mt,a)}$(){var t;return((t=this.C)===null||t===void 0?void 0:t.Rt(p.Tt.Gt))||{}}rt(t,e){if(!this.C)return;const s=this.$();for(const n of t)s[n]=e;this.C.It(p.Tt.Gt,s)}changeUser(){this.Ht(),this.Y()}clearData(){this.Y()}P(){return!!this.h&&(!!this.h.Jt()||(this.h.Ot()!==0&&this.Ht(),!1))}Ht(){this.banners={},this.C&&(this.C.Qt(p.Tt.St),this.C.Qt(p.Tt.Wt),this.C.Qt(p.Tt.Mt),this.C.Qt(p.Tt.Gt)),this.R.A({})}}const Q={i:!1,provider:null,o:()=>(Q.t(),Q.provider||(Q.provider=new Wn(f.l(),f.m(),f.p(),f.u()),f.v(Q.provider)),Q.provider),t:()=>{Q.i||(f.g(Q),Q.i=!0)},destroy:()=>{Q.provider=null,Q.i=!1}};function Qs(i,t){const e=i[t];if(!e)return null;const s=e.Yt,n=new Date().valueOf();return s!==-1&&1e3*s<n?(c.info(`Banner with ID: ${e.id} and placement ID: ${t} has expired.`),null):e}function _a(i){var t;if(!f.rr())return;((t=f.l())===null||t===void 0?void 0:t.Jt())===!1&&c.error(Xt.aa);const e=Q.o();return e.P()?Qs(e.k(),i):null}function Kn(i,t){if(!f.rr())return;if(!(i instanceof Pe))return c.error("Banner argument to logBannerClick must be an Banner object."),!1;const e=Q.o(),s=e.k();return nt(s).length===0?(c.info("Not logging banner click. No banners exist."),!1):s[i.placementId]?e.jt(i,t):(c.info(`Not logging banner click for ID ${i.placementId}. The placement ID did not correspond to any banner.`),!1)}function Xn(i){if(!f.rr())return;if(!(i instanceof Pe))return c.error("Banner argument to logBannerDismissal must be a Banner object."),!1;const t=Q.o(),e=t.k();return nt(e).length===0?(c.info("Not logging banner dismissal. No banners exist."),!1):e[i.placementId]?t.Nt(i):(c.info(`Not logging banner dismissal for ID ${i.placementId}. The placement ID did not correspond to any banner.`),!1)}function ti(i){const t=i.getAttribute(Xt.ea);t!=null&&Gs(t),i&&i.parentNode&&i.parentNode.removeChild(i)}const as="data-ab-banner-placement-id",Vn="ab-html-banner",Jn="ab-html-control-banner";function Yn(i){const t=document.createElement("div");return t.id=i.id,t.className="ab-html-control-banner",t.setAttribute(as,i.placementId),t}function bs(i,t){if(i.ts())return Yn(i);const e=document.createElement("iframe");return e.id=i.id,t&&e.setAttribute("nonce",t),e.className="ab-html-banner",e.setAttribute(as,i.placementId),e.setAttribute("title","Banner"),Ls(e,i.html,t),e.onload=()=>{const s=e.contentWindow,n=s.document.getElementsByTagName("title");n&&n.length>0&&e.setAttribute("title",n[0].textContent||"");const a=Object.assign(Object.assign({},Bs(e)),{logClick:function(){Kn(i,...arguments)},closeMessage:function(){(function(r){const o=document.getElementById(r.id);o&&ti(o),Xn(r)})(i)},setBannerHeight:r=>{isNaN(r)||!isFinite(r)||r<0?c.warn(`Invalid banner height: ${r}`):e.style.height=`${r}px`}});s.brazeBridge=a,s.appboyBridge=a,s.dispatchEvent(new CustomEvent("ab.BridgeReady"))},e}function Zn(i){if(!f.rr())return;if(!i||i.length<=0)return!1;const t=Q.o(),e=t.k();if(nt(e).length===0)return c.info("Not logging banners impression. No banners exist."),!1;const s=t.Ut(),n=[];for(const r of i){const o=e[r];o?s[o.placementId]?c.info(`Not logging banners impression for ID ${r}. This ID was already logged this session.`):(s[o.placementId]=!0,n.push(o.id)):c.info(`Not logging banners impression for ID ${r}. The placement ID did not correspond to any banner.`)}if(n.length===0)return!1;t.At(s);const a={ids:n};return G.wt(O.ro,a).lt}function gs(){const i=document.querySelectorAll(`.${Vn}, .${Jn}`),t=[];for(let e=0;e<i.length;e++){const s=i[e],n=s.getAttribute(as);if(!n)continue;const a=ge.oo(s),r=ge.no(s);if(a&&r)continue;const o=ks(s),l=As(s);o&&!a&&js(s),l&&!r&&Ws(s),ge.oo(s)&&ge.no(s)&&t.push(n)}t.length>0&&Zn(t)}function Qn(){if(!f.rr())return;const i={},t=f.l();if(t?.Jt()===!1&&c.error(Xt.aa),!t?.Jt())return i;const e=Q.o().k();for(const s in e)i[s]=Qs(e,s);return i}function ta(i){var t;if(!f.rr())return;const e=Q.o();if(e.xt()){const n=Qn();n&&typeof i=="function"&&i(n)}const s=e.zt(i);if(!e.Lt()){const n=(t=f.nn())===null||t===void 0?void 0:t.rn(()=>{const a=e.Ct();a&&a.length>0&&e.O(a)});n&&e.$t(n)}return s}function Oa(i,t){if(!f.rr())return;if(!i)return void c.error("Not inserting banner: banner was not provided.");if(!t)return void c.error("Not inserting banner: parentNode was not provided.");if(!f.er(I.nr))return void c.error("Banners are disabled. Use the 'allowUserSuppliedJavascript' option for braze.initialize to enable these messages.");Ui();const e=bs(i,f.er(I.sr)),s=ta(n=>{const a=n[i.placementId];a?t.replaceChildren(bs(a,f.er(I.sr))):ti(e)});s&&e.setAttribute(Xt.ea,s),t.replaceChildren(e),Zt(window,"scroll",gs),gs()}function ea(i,t,e){if(!f.rr())return void c.warn(tt.ee);const s=f.l();if(!s)return;if(!K(i)||i.length===0)return void c.warn("placementIds should be a non-empty array.");const n=Q.o();if(s.Jt()===!1&&c.error(Xt.aa),!n.P())return void s.V(()=>{ea(i,t,e)});const a=s.re();i.length>a&&(c.warn(`Number of placement IDs requested exceeds the max allowed. Trimming placementIds array from length ${i.length} to ${a} (max allowed).`),i=i.slice(0,a)),(i=i.filter(r=>!!xi(r)||(c.warn(`Placement ID should be a valid utf8 string with no whitespace
301s, filtering out: ${r}`),!1))).length!==0&&(c.info(`Requesting banners for placement IDs: ${JSON.stringify(i)}`),n.O(i,t,e))}export{Pe as Banner,An as BrazeSdkMetadata,ci as CaptionedImage,m as Card,hi as ClassicCard,wt as ContentCards,_e as ControlCard,Nt as ControlMessage,Ot as DeviceProperties,H as FeatureFlag,Ht as FullScreenMessage,Dt as HtmlMessage,ui as ImageOnly,D as InAppMessage,Bt as InAppMessageButton,ne as ModalMessage,Kt as SlideUpMessage,M as User,Qt as WindowUtils,ua as addSdkMetadata,na as automaticallyShowInAppMessages,In as changeUser,aa as deferInAppMessage,ca as destroy,ha as disableSDK,da as enableSDK,Qn as getAllBanners,qn as getAllFeatureFlags,_a as getBanner,oa as getCachedContentCards,ra as getDeferredInAppMessage,pa as getDeviceId,Aa as getFeatureFlag,Ps as getUser,ia as handleBrazeAction,Tn as hideContentCards,fa as initialize,Oa as insertBanner,ma as isDisabled,ba as isInitialized,Ta as isPushBlocked,Ca as isPushPermissionGranted,ka as isPushSupported,Kn as logBannerClick,Zn as logBannerImpressions,hn as logCardDismissal,pn as logContentCardClick,dn as logContentCardImpressions,_n as logCustomEvent,Na as logFeatureFlagImpression,Xi as logInAppMessageButtonClick,Gi as logInAppMessageClick,We as logInAppMessageHtmlClick,je as logInAppMessageImpression,On as logPurchase,ga as openSession,Gn as refreshFeatureFlags,va as removeAllSubscriptions,Gs as removeSubscription,ea as requestBannersRefresh,bn as requestContentCardsRefresh,Dn as requestImmediateDataFlush,zn as requestPushPermission,wa as setLogger,ya as setSdkAuthenticationSignature,Cn as showContentCards,Yi as showInAppMessage,ta as subscribeToBannersUpdates,kn as subscribeToContentCardsUpdates,Ia as subscribeToFeatureFlagsUpdates,Zi as subscribeToInAppMessage,Sa as subscribeToSdkAuthenticationFailures,la as toggleContentCards,xa as toggleLogging,Bn as unregisterPush,Ea as wipeData};
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.