1import{b3 as xt}from"./main-DO3vLohi.js";const u={init:function(i){i===void 0&&u.zg!==void 0||(u.zg=!!i),u.i||(u.i=!0)},destroy:function(){u.i=!1,u.zg=void 0,u.Bd=void 0},setLogger:function(i){typeof i=="function"?(u.init(),u.Bd=i):u.info("Ignoring setLogger call since logger is not a function")},toggleLogging:function(){u.init(),u.zg?(console.log("Disabling Braze logging"),u.zg=!1):(console.log("Enabled Braze logging"),u.zg=!0)},info:function(i){if(u.zg){const t="Braze: "+i;u.Bd!=null?u.Bd(t):console.log(t)}},warn:function(i){if(u.zg){const t="Braze SDK Warning: "+i+" (v6.12.1)";u.Bd!=null?u.Bd(t):console.warn(t)}},error:function(i){if(u.zg){const t="Braze SDK Error: "+i+" (v6.12.1)";u.Bd!=null?u.Bd(t):console.error(t)}}},Si={Tu: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}},N={CustomEvent:"ce",Pr:"p",$c:"pc",vl:"i",_a:"ie",vs:"cci",ws:"ccic",us:"ccc",gs:"ccd",wm:"ss",hm:"se",On:"si",Hn:"sc",Jn:"sbc",om:"iec",Dc:"lr",Ac:"uae",Mc:"lcaa",Cc:"lcar",Na:"inc",Xu:"add",Zu:"rem",Vu:"set",Qu:"ncam",Tc:"sgu",xo:"ffi",ro:"bi",Nt:"bc",Rt:"bd"},Dt={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 L{constructor(t,e){this.database=t,this.Bd=e,this.parent=typeof window>"u"?self:window,this.database=t,this.Bd=e}Ud(){if("indexedDB"in this.parent)return this.parent.indexedDB}isSupported(){var t;try{if(this.Ud()==null)return!1;{const e=(t=this.Ud())===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.Od;if(n&&n.runtime&&n.runtime.id)return this.Bd.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}}catch(e){return this.Bd.info("Not using IndexedDB for storage due to following error: "+e),!1}}kd(t,e){var s;const n=(s=this.Ud())===null||s===void 0?void 0:s.open(this.database.Kd,this.database.VERSION);if(n==null)return typeof e=="function"&&e(),!1;const r=this;return n.onupgradeneeded=a=>{var o;r.Bd.info("Upgrading indexedDB "+r.database.Kd+" to v"+r.database.VERSION+"...");const l=(o=a.target)===null||o===void 0?void 0:o.result;for(const c in r.database.Ws){const h=c;r.database.Ws.hasOwnProperty(c)&&!l.objectStoreNames.contains(r.database.Ws[h])&&l.createObjectStore(r.database.Ws[h])}},n.onsuccess=a=>{var o;const l=(o=a.target)===null||o===void 0?void 0:o.result;l.onversionchange=()=>{l.close(),typeof e=="function"&&e(),r.Bd.error("Needed to close the database unexpectedly because of an upgrade in another tab")},t(l)},n.onerror=a=>{var o;const l=a;return r.Bd.info("Could not open indexedDB "+r.database.Kd+" v"+r.database.VERSION+": "+((o=l.target)===null||o===void 0?void 0:o.errorCode)),typeof e=="function"&&e(),!0},!0}setItem(t,e,s,n,r){if(!this.isSupported())return typeof r=="function"&&r(),!1;const a=this;return this.kd(o=>{if(!o.objectStoreNames.contains(t))return a.Bd.error("Could not store object "+e+" in "+t+" on indexedDB "+a.database.Kd+" - "+t+" is not a valid objectStore"),typeof r=="function"&&r(),void o.close();const l=o.transaction([t],"readwrite");l.oncomplete=()=>o.close();const c=l.objectStore(t).put(s,e);c.onerror=()=>{a.Bd.error("Could not store object "+e+" in "+t+" on indexedDB "+a.database.Kd),typeof r=="function"&&r()},c.onsuccess=()=>{typeof n=="function"&&n()}},r)}getItem(t,e,s){if(!this.isSupported())return!1;const n=this;return this.kd(r=>{if(!r.objectStoreNames.contains(t))return n.Bd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.Kd+" - "+t+" is not a valid objectStore"),void r.close();const a=r.transaction([t],"readonly");a.oncomplete=()=>r.close();const o=a.objectStore(t).get(e);o.onerror=()=>{n.Bd.error("Could not retrieve object "+e+" in "+t+" on indexedDB "+n.database.Kd)},o.onsuccess=l=>{var c;const h=(c=l.target)===null||c===void 0?void 0:c.result;h!=null&&s(h)}})}kr(t,e,s){if(!this.isSupported())return typeof s=="function"&&s(),!1;const n=this;return this.kd(r=>{if(!r.objectStoreNames.contains(t))return n.Bd.error("Could not retrieve last record from "+t+" on indexedDB "+n.database.Kd+" - "+t+" is not a valid objectStore"),typeof s=="function"&&s(),void r.close();const a=r.transaction([t],"readonly");a.oncomplete=()=>r.close();const o=a.objectStore(t).openCursor(null,"prev");o.onerror=()=>{n.Bd.error("Could not open cursor for "+t+" on indexedDB "+n.database.Kd),typeof s=="function"&&s()},o.onsuccess=l=>{var c;const h=(c=l.target)===null||c===void 0?void 0:c.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.kd(n=>{if(!n.objectStoreNames.contains(t))return s.Bd.error("Could not delete record "+e+" from "+t+" on indexedDB "+s.database.Kd+" - "+t+" is not a valid objectStore"),void n.close();const r=n.transaction([t],"readwrite");r.oncomplete=()=>n.close(),r.objectStore(t).delete(e).onerror=()=>{s.Bd.error("Could not delete record "+e+" from "+t+" on indexedDB "+s.database.Kd)}})}Qs(t,e){if(!this.isSupported())return!1;const s=this;return this.kd(n=>{if(!n.objectStoreNames.contains(t))return s.Bd.error("Could not retrieve objects from "+t+" on indexedDB "+s.database.Kd+" - "+t+" is not a valid objectStore"),void n.close();const r=n.transaction([t],"readwrite");r.oncomplete=()=>n.close();const a=r.objectStore(t),o=a.openCursor(),l=[];o.onerror=()=>{l.length>0?(s.Bd.info("Cursor closed midway through for "+t+" on indexedDB "+s.database.Kd),e(l)):s.Bd.error("Could not open cursor for "+t+" on indexedDB "+s.database.Kd)},o.onsuccess=c=>{var h;const d=(h=c.target)===null||h===void 0?void 0:h.result;
1d!=null?(d.value!=null&&d.key!=null&&(a.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.Ws){const n=s;this.database.Ws.hasOwnProperty(s)&&this.database.Ws[n]!==this.database.Ws.pe&&t.push(this.database.Ws[n])}const e=this;return this.kd(function(s){const n=s.transaction(t,"readwrite");n.oncomplete=()=>s.close();for(let r=0;r<t.length;r++){const a=t[r];n.objectStore(a).clear().onerror=function(){e.Bd.error("Could not clear "+this.source.name+" on indexedDB "+e.database.Kd)}}n.onerror=function(){e.Bd.error("Could not clear object stores on indexedDB "+e.database.Kd)}})}}L._s={Xs:{Kd:"AppboyServiceWorkerAsyncStorage",VERSION:6,Ws:{Cn:"data",yr:"pushClicks",Gu:"pushSubscribed",Gd:"fallbackDevice",Vs:"cardUpdates",pe:"optOut",Br:"pendingData",wh:"sdkAuthenticationSignature"},be:1}};const vs={_h:"allowCrawlerActivity",Nh:"baseUrl",se:"cookieExpiryInDays",Oh:"noCookies",Th:"devicePropertyAllowlist",xa:"disablePushTokenMaintenance",Rh:"enableLogging",Ph:"enableSdkAuthentication",wa:"manageServiceWorkerExternally",Dh:"minimumIntervalBetweenTriggerActionsInSeconds",Lh:"sessionTimeoutInSeconds",yh:"appVersion",Mh:"appVersionNumber",za:"serviceWorkerLocation",ha:"safariWebsitePushId",Ma:"localization",sr:"contentSecurityNonce",nr:"allowUserSuppliedJavascript",ca:"inAppMessageZIndex",da:"openInAppMessagesInNewTab",lh:"requireExplicitInAppMessageDismissal",Uh:"doNotLoadFontAwesome",Wh:"deviceId",ba:"serviceWorkerScope",Oi:"dustHost",Bh:"sdkFlavor",tn:"openCardsInNewTab"};function Be(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 _t(i,t,e,s){const n=Be(i);return n.indexOf(t)!==-1||(u.error(`${e} Valid values from ${s} are "${n.join('"/"')}".`),!1)}function B(i){return Array.isArray?Array.isArray(i):Object.prototype.toString.call(i)==="[object Array]"}function It(i){return Object.prototype.toString.call(i)==="[object Date]"}function ae(i){return Object.prototype.toString.call(i)==="[object Object]"}function lt(i){const t=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&t.push(e);return t}function Yt(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=[],r=[];let a=n.length;for(;a--;)if(n[a]===i)return r[a]===t;if(n.push(i),r.push(t),s){if(a=i.length,a!==t.length)return!1;for(;a--;)if(!Yt(i[a],t[a]))return!1}else{const o=lt(i);let l;if(a=o.length,lt(t).length!==a)return!1;for(;a--;)if(l=o[a],!Object.prototype.hasOwnProperty.call(t,l)||!Yt(i[l],t[l]))return!1}return n.pop(),r.pop(),!0}function ve(i,t=!1){let e=i/1e3;return t&&(e=Math.floor(e)),e}function Ei(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 ke(i){return i!=null&&It(i)?i.toISOString().replace(/\.[0-9]{3}Z$/,""):i}function pe(i){return i==null||i===""?null:new Date(i)}function xi(i){return i==null||i===""?new Date().valueOf():i}function ys(i){return(new Date().valueOf()-i.valueOf())/1e3}function ws(i){return(i.valueOf()-new Date().valueOf())/1e3}const Ss=100,Ii=500,Ai=30,ki=30,_i=72e5,Ti=15,Ge=1,js=200,ee=1e4,se=3,ie=3e5,G={ee:"Braze must be initialized before calling methods.",je:"logCustomEvent",QE:"logEcommerceEvent",Mu:"setCustomUserAttribute"};class q{constructor(){this.In={}}Ut(t){if(typeof t!="function")return null;const e=Dt.de();return this.In[e]=t,e}removeSubscription(t){delete this.In[t]}removeAllSubscriptions(){this.In={}}an(){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,r,a,o,l,c,h,d,b,g,w,y,S){this.id=t,this.viewed=e,this.title=s,this.imageUrl=n,this.description=r,this.updated=a,this.expiresAt=o,this.url=l,this.linkText=c,this.aspectRatio=h,this.extras=d,this.pinned=b,this.dismissible=g,this.clicked=w,this.language=y,this.altImageText=S,this.id=t,this.viewed=e||!1,this.title=s||"",this.imageUrl=n,this.description=r||"",this.updated=a||null,this.expiresAt=o||null,this.url=l,this.linkText=c,h==null?this.aspectRatio=null:(h=parseFloat(h.toString()),this.aspectRatio=isNaN(h)?null:h),this.extras=d||{},this.pinned=b||!1,this.dismissible=g||!1,this.dismissed=!1,this.clicked=w||!1,this.isControl
1=!1,this.language=y||null,this.altImageText=S||null,this.test=!1,this.ti=null,this.es=null,this.ii=null}subscribeToClickedEvent(t){return this.si().Ut(t)}subscribeToDismissedEvent(t){return this.ns().Ut(t)}removeSubscription(t){this.si().removeSubscription(t),this.ns().removeSubscription(t)}removeAllSubscriptions(){this.si().removeAllSubscriptions(),this.ns().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.hi))},Ii))}si(){return this.ti==null&&(this.ti=new q),this.ti}ns(){return this.es==null&&(this.es=new q),this.es}js(){const t=new Date().valueOf();return!(this.ii!=null&&t-this.ii<m.li)&&(this.ii=t,this.viewed=!0,!0)}Yt(){this.viewed=!0,this.clicked=!0,this.si().A()}Ft(){return!(!this.dismissible||this.dismissed)&&(this.dismissed=!0,this.ns().A(),!0)}ni(t){if(t==null||t[m.ei.qs]!==this.id)return!0;if(t[m.ei.ri])return!1;if(t[m.ei.Es]!=null&&this.updated!=null&&parseInt(t[m.ei.Es])<ve(this.updated.valueOf()))return!0;if(t[m.ei.ys]&&!this.viewed&&(this.viewed=!0),t[m.ei.Ls]&&!this.clicked&&(this.clicked=t[m.ei.Ls]),t[m.ei.As]!=null&&(this.title=t[m.ei.As]),t[m.ei.Bs]!=null&&(this.imageUrl=t[m.ei.Bs]),t[m.ei.Ds]!=null&&(this.description=t[m.ei.Ds]),t[m.ei.Es]!=null){const e=zt(t[m.ei.Es]);e!=null&&(this.updated=e)}if(t[m.ei.Fs]!=null){let e;e=t[m.ei.Fs]===m.ui?null:zt(t[m.ei.Fs]),this.expiresAt=e}if(t[m.ei.URL]!=null&&(this.url=t[m.ei.URL]),t[m.ei.Gs]!=null&&(this.linkText=t[m.ei.Gs]),t[m.ei.Hs]!=null){const e=parseFloat(t[m.ei.Hs].toString());this.aspectRatio=isNaN(e)?null:e}return t[m.ei.Is]!=null&&(this.extras=t[m.ei.Is]),t[m.ei.Js]!=null&&(this.pinned=t[m.ei.Js]),t[m.ei.Ks]!=null&&(this.dismissible=t[m.ei.Ks]),t[m.ei.Ms]!=null&&(this.language=t[m.ei.Ms]),t[m.ei.Ns]!=null&&(this.altImageText=t[m.ei.Ns]),t[m.ei.Os]!=null&&(this.test=t[m.ei.Os]),!0}qt(){u.error("Must be implemented in a subclass")}}m.ui=-1,m.ei={qs:"id",ys:"v",Ks:"db",ri:"r",Es:"ca",Js:"p",Fs:"ea",Is:"e",xs:"tp",Bs:"i",As:"tt",Ds:"ds",URL:"u",Gs:"dm",Hs:"ar",Ls:"cl",Os:"t",Ms:"language",Ns:"image_alt"},m.ks={zs:"captioned_image",Ei:"text_announcement",Ti:"short_news",oi:"banner_image",ai:"control"},m.bs={qs:"id",ys:"v",Ks:"db",Ii:"cr",Es:"ca",Js:"p",Ni:"t",Fs:"ea",Is:"e",xs:"tp",Bs:"i",As:"tt",Ds:"ds",URL:"u",Gs:"dm",Hs:"ar",Ls:"cl",Os:"s",Ms:"l",Ns:"ia"},m.Ai={ci:"ADVERTISING",mi:"ANNOUNCEMENTS",Si:"NEWS",Di:"SOCIAL"},m.hi=400,m.li=1e4;class Ci extends m{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g){super(t,e,null,s,null,n,r,a,null,o,l,c,h,d,b,g),this.ae="ab-image-only",this.oe=!1,this.test=!1}qt(){const t={};return t[m.bs.xs]=m.ks.oi,t[m.bs.qs]=this.id,t[m.bs.ys]=this.viewed,t[m.bs.Bs]=this.imageUrl,t[m.bs.Es]=this.updated,t[m.bs.Fs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Hs]=this.aspectRatio,t[m.bs.Is]=this.extras,t[m.bs.Js]=this.pinned,t[m.bs.Ks]=this.dismissible,t[m.bs.Ls]=this.clicked,t[m.bs.Ms]=this.language,t[m.bs.Ns]=this.altImageText,t[m.bs.Os]=this.test,t}}class Ni extends m{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S){super(t,e,s,n,r,a,o,l,c,h,d,b,g,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.ys]=this.viewed,t[m.bs.As]=this.title,t[m.bs.Bs]=this.imageUrl,t[m.bs.Ds]=this.description,t[m.bs.Es]=this.updated,t[m.bs.Fs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Gs]=this.linkText,t[m.bs.Hs]=this.aspectRatio,t[m.bs.Is]=this.extras,t[m.bs.Js]=this.pinned,t[m.bs.Ks]=this.dismissible,t[m.bs.Ls]=this.clicked,t[m.bs.Ms]=this.language,t[m.bs.Ns]=this.altImageText,t[m.bs.Os]=this.test,t}}class Oi extends m{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S){super(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S),this.ae="ab-classic-card",this.oe=!0}qt(){const t={};return t[m.bs.xs]=m.ks.Ti,t[m.bs.qs]=this.id,t[m.bs.ys]=this.viewed,t[m.bs.As]=this.title,t[m.b
1s.Bs]=this.imageUrl,t[m.bs.Ds]=this.description,t[m.bs.Es]=this.updated,t[m.bs.Fs]=this.expiresAt,t[m.bs.URL]=this.url,t[m.bs.Gs]=this.linkText,t[m.bs.Hs]=this.aspectRatio,t[m.bs.Is]=this.extras,t[m.bs.Js]=this.pinned,t[m.bs.Ks]=this.dismissible,t[m.bs.Ls]=this.clicked,t[m.bs.Ms]=this.language,t[m.bs.Ns]=this.altImageText,t[m.bs.Os]=this.test,t}}class Me extends m{constructor(t,e,s,n,r,a){super(t,e,null,null,null,s,n,null,null,null,r,a),this.isControl=!0,this.ae="ab-control-card",this.oe=!1}qt(){const t={};return t[m.bs.xs]=m.ks.ai,t[m.bs.qs]=this.id,t[m.bs.ys]=this.viewed,t[m.bs.Es]=this.updated,t[m.bs.Fs]=this.expiresAt,t[m.bs.Is]=this.extras,t[m.bs.Js]=this.pinned,t[m.bs.Os]=this.test,t}}function Je(i){const t=i?.St(f.It.uS);let e;return t&&(e={label:t.l,name:t.a}),e}class bt{constructor(t,e,s,n,r){this.userId=t,this.type=e,this.time=s,this.sessionId=n,this.data=r,this.userId=t,this.type=e,this.time=xi(s),this.sessionId=n,this.data=r}Uo(){var t;const e={name:this.type,time:ve(this.time),data:this.data||{},session_id:this.sessionId};this.userId!=null&&(e.user_id=this.userId);const s=((t=p.Er())===null||t===void 0?void 0:t.Fh())||!1;if(!e.user_id&&!s){const n=Je(p.p());n&&(e.alias=n)}return e}qt(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(t){return new bt(t.user_id,t.name,t.time,t.session_id,t.data)}static RS(t){return t!=null&&ae(t)&&t.t!=null&&t.t!==""}static _u(t){return new bt(t.u,t.t,t.ts,t.s,t.d)}}const wt=i=>i instanceof Error?i.message:String(i);class At{constructor(t,e,s){this.Iu=t,t==null&&(t=Dt.de()),!s||isNaN(s)?this.lm=new Date().valueOf():this.lm=s,this.Iu=t,this.pm=new Date().valueOf(),this.fm=e}qt(){return`g:${encodeURIComponent(this.Iu)}|e:${this.fm}|c:${this.lm}|l:${this.pm}`}static AS(t){if(typeof t!="string")return null;const e=t.lastIndexOf("|e:"),s=t.substring(0,e),n=s.split("g:")[1];let r;return r=/[|:]/.test(n)?encodeURIComponent(n):n,t=t.replace(s,`g:${r}`)}static _u(t){let e;if(typeof t=="string")try{const s=t.split("|");if(!B(s)||s.length!==4)return null;const n=a=>a.split(":")[1],r=a=>{const o=parseInt(n(a));if(!isNaN(o))return o};e=new At(decodeURIComponent(n(s[0])),r(s[1]),r(s[2])),e.pm=r(s[3])}catch(s){u.info(`Unable to parse cookie string ${t}, failed with error: ${wt(s)}`)}else{if(t==null||t.g==null)return null;e=new At(t.g,t.e,t.c),e.pm=t.l}return e}}function Di(i){return i>="a"&&i<="z"||i>="A"&&i<="Z"||i>="0"&&i<="9"}function _e(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 Pi(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 u.error("Unable to decode Base64: "+t),null}}const C={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"}},rs={Wn:"unknownBrazeAction"},Bs=(i,t)=>i===rs.Wn?`${t} contains an unknown braze action type and will not be displayed.`:"";function as(i){try{const t=i.match(be),e=t?t[0].length:null,s=e?i.substring(e):null;if(e==null||e>i.length-1||!s)return void u.error(`Did not find base64 encoded brazeAction in url to process : ${i}`);const n=Pi(s);return n?JSON.parse(n):void u.error(`Failed to decode base64 encoded brazeAction: ${s}`)}catch(t){return void u.error(`Failed to process brazeAction URL ${i} : ${wt(t)}`)}}function Ms(i,t){let e=!1;if(t){for(const s of t)if(e=e||i(s),e)return!0}return!1}function os(i){const t=C.properties.type,e=C.properties.eo;try{if(i==null)return!0;const s=i[t];return s===C.types.io?Ms(os,i[e]):!Fi(s)}catch{return!0}}function Us(i){if(!i||!zs(i))return!1;const t=C.properties.type,e=C.properties.eo,s=i[t];return s===C.types.io?Ms(Us,i[e]):s===C.types.requestPushPermission}const Ri=/^[^\x00-\x1F\x22]+$/,ji=/[$.]/,Bi=["$add","$update","$remove","$identifier_key","$identifier_value","$new_object","$time","$google_ad_personalization","$google_ad_user_data"],Mi=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,be=/^brazeActions:\/\/v\d+\//,Ui=/^[^\s]+$/;function pt(i,t,e){const s=i!=null&&typeof i=="string"&&(i===""||i.match(Ri)!=null);return s||u.error(`Cannot ${t} because ${e} "${i}
1" is invalid.`),s}function ls(i){return i!=null&&i.match(ji)&&Bi.indexOf(i)===-1&&u.warn("Custom attribute keys cannot contain '$' or '.'"),pt(i,"set custom user attribute","the given key")}function us(i){const t=typeof i;return i==null||t==="number"||t==="boolean"||It(i)||t==="string"}function We(i,t,e){const s=e!==-1;if(s&&e>50)return u.error("Nested attributes cannot be more than 50 levels deep."),!1;const n=s?e+1:-1;if(B(i)&&B(t)){for(let r=0;r<i.length&&r<t.length;r++)if(It(i[r])&&(t[r]=ke(i[r])),!We(i[r],t[r],n))return!1}else{if(!ae(i))return us(i);for(const r of lt(i)){const a=i[r];if(s&&!ls(r)||(It(a)&&(t[r]=ke(a)),!We(a,t[r],n)))return!1}}return!0}function zi(i,t,e,s,n){let r;return r=ae(i)||B(i)?We(i,t,n?1:-1):us(i),r||u.error(`Cannot ${e} because ${s} "${i}" is invalid.`),r}function dt(i,t,e,s=!1){const n=typeof i=="string"||i===null&&s;return n||u.error(`Cannot ${t} because ${e} "${i}" is invalid.`),n}function oe(i,t,e,s,n){if(i==null&&(i={}),typeof i!="object"||B(i))return u.error(`${t} requires that ${e} be an object. Ignoring ${n}.`),[!1,null];let r,a;t===G.Mu?(r=76800,a="75KB"):(r=51200,a="50KB");const o=JSON.stringify(i);if(_e(o)>r)return u.error(`Could not ${s} because ${e} was greater than the max size of ${a}.`),[!1,null];let l;try{l=JSON.parse(o)}catch{return u.error(`Could not ${s} because ${e} did not contain valid JSON.`),[!1,null]}for(const c in i){if(t===G.Mu&&!ls(c))return[!1,null];if(!pt(c,s,`the ${n} property name`))return[!1,null];const h=i[c];if(t!==G.Mu&&h==null){delete i[c],delete l[c];continue}if(It(h)&&(l[c]=ke(h)),!zi(h,l[c],s,`the ${n} property "${c}"`,t===G.Mu))return[!1,null]}return[!0,l]}function $i(i,t){let e=!1,s=!1;const n=()=>{u.error("Custom attribute arrays must be either string arrays or object arrays.")};for(const r of t)if(typeof r=="string"){if(s)return n(),[!1,!1];if(!pt(r,`set custom user attribute "${i}"`,"the element in the given array"))return[!1,!1];e=!0}else{if(!ae(r))return n(),[!1,!1];if(e)return n(),[!1,!1];if(!oe(r,G.Mu,"attribute value",`set custom user attribute "${i}"`,"custom user attribute"))return[!1,!1];s=!0}return[e,s]}function Li(i){if(typeof i!="string")return!1;const t=i.length;return!(t===0||t>256)&&Mi.test(i.toLowerCase())}function zs(i){if(!(C.properties.type in i))return!1;switch(i[C.properties.type]){case C.types.io:if(C.properties.eo in i)return!0;break;case C.types.logCustomEvent:case C.types.setEmailNotificationSubscriptionType:case C.types.setPushNotificationSubscriptionType:case C.types.setCustomUserAttribute:case C.types.addToSubscriptionGroup:case C.types.removeFromSubscriptionGroup:case C.types.addToCustomAttributeArray:case C.types.removeFromCustomAttributeArray:case C.types.mo:case C.types.uo:if(C.properties.so in i)return!0;break;case C.types.requestPushPermission:return!0;default:return!1}return!1}function Fi(i){let t=!1;return Object.keys(C.types).forEach(e=>{C.types[e]!==i.toString()||(t=!0)}),t}function Gi(i){return Ui.test(i)}class P{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;u.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!dt(t,"add alias","the alias",!1)||t.length<=0?(u.error("addAlias requires a non-empty alias"),!1):!dt(e,"add alias","the label",!1)||e.length<=0?(u.error("addAlias requires a non-empty label"),!1):this.Ru.Hu(t,e).lt}setFirstName(t){return!!dt(t,"set first name","the firstName",!0)&&this.Ss.Bu("first_name",t)}setLastName(t){return!!dt(t,"set last name","the lastName",!0)&&this.Ss.Bu("last_name",t)}setEmail(t){return t===null||Li(t)?this.Ss.Bu("email",t):(u.error(`Cannot set email address - "${t}" did not pass RFC-5322 validation.`),!1)}setGender(t){return typeof t=="string"&&(t=t.toLowerCase()),!(t!==null&&!_t(P.Genders,t,`Gender "${t}" is not a valid gender.`,"User.Genders"))&&this.Ss.Bu("gender",t)}setDateOfBirth(t,e,s){return t===null&&e===null&&s===null?this.Ss.Bu("dob",null):(t=t!=null?parseInt(t.toString()):null,e=e!=null?parseInt(e.toString()):null,
1s=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?(u.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):this.Ss.Bu("dob",`${t}-${e}-${s}`))}setCountry(t){return!!dt(t,"set country","the country",!0)&&this.Ss.Bu("country",t)}setHomeCity(t){return!!dt(t,"set home city","the homeCity",!0)&&this.Ss.Bu("home_city",t)}setLanguage(t){return!!dt(t,"set language","the language",!0)&&this.Ss.Bu("language",t)}setEmailNotificationSubscriptionType(t){return!!_t(P.NotificationSubscriptionTypes,t,`Email notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Ss.Bu("email_subscribe",t)}setPushNotificationSubscriptionType(t){return!!_t(P.NotificationSubscriptionTypes,t,`Push notification setting "${t}" is not a valid subscription type.`,"User.NotificationSubscriptionTypes")&&this.Ss.Bu("push_subscribe",t)}setPhoneNumber(t){return!!dt(t,"set phone number","the phoneNumber",!0)&&(t===null||t.match(P.Ku)?this.Ss.Bu("phone",t):(u.error(`Cannot set phone number - "${t}" did not pass validation.`),!1))}setLastKnownLocation(t,e,s,n,r){return t==null||e==null?(u.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())),r!=null&&(r=parseFloat(r.toString())),isNaN(t)||isNaN(e)||s!=null&&isNaN(s)||n!=null&&isNaN(n)||r!=null&&isNaN(r)?(u.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):t>90||t<-90||e>180||e<-180?(u.error("Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively."),!1):s!=null&&s<0||r!=null&&r<0?(u.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.Ru.setLastKnownLocation(this.Ss.getUserId(),t,e,n,s,r).lt)}setCustomUserAttribute(t,e,s){if(!ls(t))return!1;const n=r=>{const[a]=oe(r,G.Mu,"attribute value",`set custom user attribute "${t}"`,"custom user attribute");return a};if(B(e)){const[r,a]=$i(t,e);if(!r&&!a&&e.length!==0)return!1;if(r||e.length===0)return this.Ru.Yu(N.Vu,t,e).lt;for(const o of e)if(!n(o))return!1}else if(ae(e)){if(!n(e))return!1;if(s)return this.Ru.Yu(N.Qu,t,e).lt}else if(!(e!==void 0&&us(e))||(It(e)&&(e=ke(e)),typeof e=="string"&&!pt(e,`set custom user attribute "${t}"`,"the element in the given array")))return!1;return this.Ss.setCustomUserAttribute(t,e)}addToCustomAttributeArray(t,e){return!!pt(t,"add to custom user attribute array","the given key")&&!(e!=null&&!pt(e,"add to custom user attribute array","the given value"))&&this.Ru.Yu(N.Xu,t,e).lt}removeFromCustomAttributeArray(t,e){return!!pt(t,"remove from custom user attribute array","the given key")&&!(e!=null&&!pt(e,"remove from custom user attribute array","the given value"))&&this.Ru.Yu(N.Zu,t,e).lt}incrementCustomUserAttribute(t,e){if(!pt(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())?(u.error(`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`),!1):this.Ru.Yu(N.Na,t,s).lt}setCustomLocationAttribute(t,e,s){return!!pt(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))?(u.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.ya(t,e,s).lt)}
1addToSubscriptionGroup(t){return!dt(t,"add user to subscription group","subscription group ID",!1)||t.length<=0?(u.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ru.va(t,P.Ia.SUBSCRIBED).lt}removeFromSubscriptionGroup(t){return!dt(t,"remove user from subscription group","subscription group ID",!1)||t.length<=0?(u.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):this.Ru.va(t,P.Ia.UNSUBSCRIBED).lt}setLineId(t){return dt(t,"set LINE user ID","the ID",!0)&&t?.length!==0?t&&t.length>P.Ca?(u.error(`Rejected LINE user ID ${t} because it is longer than ${P.Ca} characters.`),!1):this.Ss.Bu("native_line_id",t):(u.error("setLineId requires a non-empty ID"),!1)}yu(t,e,s,n,r){this.Ss.yu(t,e,s,n,r),this.Ru.Ea()}wu(t){this.Ss.wu(t)}}P.Genders={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},P.NotificationSubscriptionTypes={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},P.Ku=/^[0-9 .\\(\\)\\+\\-]+$/,P.Ia={SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},P.Sa="user_id",P.Eu="custom",P.br=997,P.Ca=33;class $s{constructor(){}ef(){}ff(){}Fa(t){}static nf(t,e){if(t&&e){if(t=t.toLowerCase(),B(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 ut={rO:"Chrome",eO:"Edge",oO:"Opera",Bg:"Safari",OO:"Firefox",Sg:"ChatGPTBrowser"},Tt={Dg:"Android",co:"iOS",Pg:"Mac",kg:"Windows"};class cs extends $s{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){const t=this.Bc();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 r=cs.nf(s,t[n]);if(r)return this.OS=r,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)}Bc(){const t={},e=this.userAgentData.brands;if(e&&e.length)for(const s of e){const n=this.Vc(ut),r=s.brand.match(n);if(r&&r.length>0){t.browser=r[0],t.version=s.version;break}}return t}Vc(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 Te extends $s{constructor(){super(),this.Sd=Te.Bc(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=Te.nf(s,t[e]);if(n)return n===Tt.Pg&&navigator.maxTouchPoints>1&&(n=Tt.co),Promise.resolve(n)}return Promise.resolve(navigator.platform)}static Bc(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]===ut.rO){if(t.includes(ut.Sg))return[ut.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",ut.oO),e[0]=e[0].replace("EdgA",ut.eO),e[0]==="Edg"&&(e[0]=ut.eO),[e[0],e[1]]}if(s[1]===ut.Bg&&(e=t.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),e!=null))return e=e.slice(1),e[0]=e[0].replace("EdgiOS",ut.eO),[e[0],e[1]];if(s=s[2]?[s[1],s[2]]:[null,null],s[0]===ut.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]===ut.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]=ut.rO),n==="tizen"&&(s[0]="Samsung Smart TV",s[1]=null),n==="samsungbrowser"&&(s[0]="Samsung Browser")}return s}}class me{constructor(){let t;t=navigator.userAgent.toLowerCase().includes(ut.Sg.toLowerCase())||!navigator.userAgentData?Te:cs,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=me.xg(this.userAgent)}mS(){return this.browser===ut.Bg}qa(){return this.OS||null}Fa(){return this.OS?Promise.resolve(this.OS):this.vg.Fa(me.Og).then(t=>(this.OS=t,t))}static xg(t){t=t.toLowerCase();const e=["bot","spider","slurp","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}}me.Og=[{string:navigator.platform,cf:"Win",identity:Tt.kg},{string:navigator.platform,cf:"Mac",identity:Tt.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:Tt.co},{string:navigator.platform,cf:"Pike v",identity:Tt.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:Tt.Dg},{string:navigator.userAgent,cf:["Android"],identity:Tt.Dg},{string:navigator.platform,cf:"Linux",identity:"Linux"}];const ct=new me,f={Ou:{Cu:"ab.storage.userId",Wh:"ab.storage.deviceId",um:"ab.storage.sessionId"},It:{ac:"ab.test",tS:"ab.storage.events",eS:"ab.storage.attributes",sS:"ab.storage.attributes.anonymous_user",Aa:"ab.storage.device",Ka:"ab.storage.sdk_metadata",Pa:"ab.storage.session_id_for_cached_metadata",xu:"ab.storage.pushToken",rS:"ab.storage.cardImpressions",Zl:"ab.storage.serverConfig",oS:"ab.storage.triggers",nS:"ab.storage.triggers.ts",dm:"ab.storage.messagingSessionStart",bi:"ab.storage.cc",ji:"ab.storage.ccLastFullSync",yi:"ab.storage.ccLastCardUpdated",zl:"ab.storage.globalRateLimitCurrentTokenCount",Xl:"ab.storage.dynamicRateLimitCurrentTokenCount",Zt:"ab.storage.ccClicks",ps:"ab.storage.ccImpressions",fs:"ab.storage.ccDismissals",aS:"ab.storage.lastDisplayedTriggerTimesById",iS:"ab.storage.lastDisplayedTriggerTime",SS:"ab.storage.triggerFireInstancesById",fh:"ab.storage.signature",ES:"ab.storage.brazeSyncRetryCount",zi:"ab.storage.sdkVersion",Vr:"ab.storage.ff",Zr:"ab.storage.ffImpressions",bo:"ab.storage.ff
1LastRefreshAt",jo:"ab.storage.ff.sessionId",lS:"ab.storage.lastReqToEndpoint",_S:"ab.storage.requestAttempts",la:"ab.storage.deferredIam",wl:"ab.storage.lastSdkReq",uS:"ab.storage.alias",Tt:"ab.storage.banners",At:"ab.storage.banners.impressions",Xt:"ab.storage.banners.dismissals",kt:"ab.storage.banners.sessionId",Ht:"ab.storage.banners.lastRequestedTime",_i:"ab.storage.dust.mite",Oi:"ab.storage.dust.host",Gi:"ab.storage.dust.auth",Hi:"ab.storage.dust.expiration",Zi:"ab.storage.dust.refreshLock",_r:"ab.storage.dust.msgClaims"},ce:"ab.optOut"};class et{constructor(t,e){this.cS=t,this.TS=e,this.cS=t,this.TS=e}hl(t){const e=lt(f.Ou),s=new et.le(t);for(const n of e)s.remove(f.Ou[n])}Ju(t,e){let s=null;e!=null&&e instanceof At&&(s=e.qt()),this.cS.store(t,s)}hS(t){const e=this.$u(t);e!=null&&(e.pm=new Date().valueOf(),this.Ju(t,e))}$u(t){const e=this.cS.wr(t),s=(r=>{let a;try{a=JSON.parse(r)}catch{a=null}return a})(e);let n;if(s)n=At._u(s)||null,n&&this.Ju(t,n);else{const r=At.AS(e);n=At._u(r)||null,r!==e&&n&&this.Ju(t,n)}return n}jm(t){this.cS.remove(t)}ll(){const t=lt(f.Ou);let e;for(const s of t)e=this.$u(f.Ou[s]),e!=null&&this.Ju(f.Ou[s],e)}ol(t){let e;if(t==null||t.length===0)return!1;e=B(t)?t:[t];let s=this.TS.wr(f.It.tS);s!=null&&B(s)||(s=[]);for(let n=0;n<e.length;n++)s.push(e[n].qt());return this.TS.store(f.It.tS,s)}gm(t){return t!=null&&this.ol([t])}gS(){let t=this.TS.wr(f.It.tS);this.TS.remove(f.It.tS),t==null&&(t=[]);const e=[];let s=!1,n=null;if(B(t))for(let r=0;r<t.length;r++)bt.RS(t[r])?e.push(bt._u(t[r])):n=r;else s=!0;if(s||n!=null){let r="Stored events could not be deserialized as Events";s&&(r+=", was "+Object.prototype.toString.call(t)+" not an array"),n!=null&&(r+=", value at index "+n+" does not look like an event"),r+=", serialized values were of type "+typeof t+": "+JSON.stringify(t),e.push(new bt(null,N._a,new Date().valueOf(),null,{e:r}))}return e}Pt(t,e){return!!_t(f.It,t,"StorageManager cannot store object.","STORAGE_KEYS.OBJECTS")&&this.TS.store(t,e)}St(t){return!!_t(f.It,t,"StorageManager cannot retrieve object.","STORAGE_KEYS.OBJECTS")&&this.TS.wr(t)}Vt(t){return!!_t(f.It,t,"StorageManager cannot remove object.","STORAGE_KEYS.OBJECTS")&&(this.TS.remove(t),!0)}clearData(){const t=lt(f.Ou),e=lt(f.It);for(let s=0;s<t.length;s++){const n=t[s];this.cS.remove(f.Ou[n])}for(let s=0;s<e.length;s++){const n=e[s];this.TS.remove(f.It[n])}}dS(t){return t||f.It.sS}fl(t){let e=this.TS.wr(f.It.eS);e==null&&(e={});const s=this.dS(t[P.Sa]),n=e[s];for(const r in t)r!==P.Sa&&(e[s]==null||n&&n[r]==null)&&this.Fu(t[P.Sa],r,t[r])}Fu(t,e,s){let n=this.TS.wr(f.It.eS);n==null&&(n={});const r=this.dS(t);let a=n[r];if(a==null&&(a={},t!=null&&(a[P.Sa]=t)),e===P.Eu){a[e]==null&&(a[e]={});for(const o in s)a[e][o]=s[o]}else a[e]=s;return n[r]=a,this.TS.store(f.It.eS,n)}IS(){const t=this.TS.wr(f.It.eS);this.TS.remove(f.It.eS);const e=[];for(const s in t)t[s]!=null&&e.push(t[s]);return e}qu(t){const e=this.TS.wr(f.It.eS);if(e!=null){const a=this.dS(null),o=e[a];o!=null&&(e[a]=void 0,this.TS.store(f.It.eS,e),o[P.Sa]=t,this.fl(o))}const s=this.$u(f.Ou.um);let n=null;s!=null&&(n=s.Iu);const r=this.gS();if(r!=null)for(let a=0;a<r.length;a++){const o=r[a];o.userId==null&&o.sessionId==n&&(o.userId=t),this.gm(o)}}bS(){return this.TS.fS}}et.ec=class{constructor(i){this.eu=i,this.eu=i,this.fS=ct.mS()?3:10}KS(i){return i+"."+this.eu}store(i,t){const e={v:t};try{return localStorage.setItem(this.KS(i),JSON.stringify(e)),!0}catch(s){return u.info("Storage failure: "+wt(s)),!1}}wr(i){try{let t=null;const e=localStorage.getItem(this.KS(i));return e!=null&&(t=JSON.parse(e)),t==null?null:t.v}catch(t){return u.info("Storage retrieval failure: "+wt(t)),null}}remove(i){try{localStorage.removeItem(this.KS(i))}catch(t){return u.info("Storage removal failure: "+wt(t)),!1}}},et.rc=class{constructor(){this.NS={},this.YS=5242880,this.fS=3}store(i,t){const e={value:t},s=this.DS(t);return s>this.YS?(u.info("Storage failure: object is â"+s+" bytes which is greater than the max of "+this.YS),!1):(this.NS[i]=e,!0)}DS(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 r,a;t.push(n);for(const o in n)a=n,r=o,e.push(a[r])}}return s}wr(i){const t=this.NS[i];return t==null?null:t.value}remove(i){this.NS[i]=null}},et.le=class{constructor(i,t,e){this.eu=i,this.CS=t,this.eu=i,this.GS=this.MS();const s=typeof e=="number"&&e>0?e:400;this.US=24*s*60,this.pS={},this.CS=!!t}KS(i){return this.eu!=null?i+"."+this.eu:i}MS(){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.US*1e3),i.getFullYear()}vS(){const i=Be(f.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 r=0;r<i.length;r++)if(s.indexOf(i[r])===0){n=!0;break}if(n){const r=s.split("=")[0];r.indexOf("."+this.eu)===-1&&this.yS(r)}}}store(i,t){this.vS();const e=this.KS(i),s=new Date;s.setTime(s.getTime()+60*this.US*1e3);const n="expires="+s.toUTCString(),r="domain="+this.GS;let a;a=this.CS?t:encodeURIComponent(t);const o=e+"="+a+";"+n+";"+r+";path=/";if(o.length>=4093)return u.info("Storage failure: string is "+o.length+" chars which is too large to store as a cookie."),this.pS[e]=!0,this.yS(e),!1;try{document.cookie=o}catch(c){return u.info("Storage failure: "+wt(c)),this.pS[e]=!0,!1}const l=this.CS?String(a):decodeURIComponent(a);return this.LS(e)!==l?(u.info(`Storage failure: unable to verify cookie write for "${e}". Falling back to other storage.`),this.pS[e]=!0,this.yS(e),!1):(delete this.pS[e],!0)}wr(i){const t=this.KS(i);return this.pS[t]?null:this.LS(t)}LS(i){const t=[],e=i+"=",s=document.cookie.split(";");for(let n=0;n<s.length;n++){let r=s[n];for(;r.charAt(0)===" ";)r=r.substring(1);if(r.indexOf(e)===0)try{let a;a=this.CS?r.substring(e.length,r.length):decodeURIComponent(r.substring(e.length,r.length)),t.push(a)}catch(a){return u.info("Storage retrieval failure: "+wt(a)),this.yS(i),null}}return t.length>0?t[t.length-1]:null}remove(i){this.yS(this.KS(i))}yS(i){const t=i+"=;expires="+new Date(0).toUTCString();document.cookie=t,document.cookie=t+";path=/";const e=t+";domain="+this.GS;document.cookie=e,document.cookie=e+";path=/"}},et.tc=class{constructor(i,t,e,s){this.eu=i,this.BS=[],t&&this.BS.push(new et.le(i,void 0,s)),e&&this.BS.push(new et.ec(i)),this.BS.push(new et.rc)}store(i,t){let e=!0;for(let s=0;s<this.BS.length;s++)e=this.BS[s].store(i,t)&&e;return e}wr(i){for(let t=0;t<this.BS.length;t++){const e=this.BS[t].wr(i);if(e!=null)return e}return null}remove(i){new et.le(this.eu).remove(i);for(let t=0;t<this.BS.length;t++)this.BS[t].remove(i)}};class qi{constructor(t,e,s){this.j=t,this.gh=e,this.bh=s,this.j=t,this.gh=e||!1,this.bh=s,this.Sh=new q,this.Ah=0,this.ph=1}Fh(){return this.gh}kh(){return this.j.St(f.It.fh)}setSdkAuthenticationSignature(t){const e=this.kh();this.j.Pt(f.It.fh,t);const s=L._s.Xs;new L(s,u).setItem(s.Ws.wh,this.ph,t),e!==t&&this.ct()}jh(){this.j.Vt(f.It.fh);const t=L._s.Xs;new L(t,u).ge(t.Ws.wh,this.ph)}subscribeToSdkAuthenticationFailures(t){return this.bh.Ut(t)}Ch(t){this.bh.A(t)}xh(){this.Sh.removeAllSubscriptions()}Eh(){this.Ah+=1}Ih(){return this.Ah}ct(){this.Ah=0}}class le{constructor(){}q(t){}changeUser(t=!1){}clearData(t=!1){}}class Vi{constructor(t){this.id=t,this.id=t}Uo(){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 Rt={BROWSER:"browser",BROWSER_VERSION:"browserVersion",OS:"os",RESOLUTION:"resolution",LANGUAGE:"language",TIME_ZONE:"timeZone",USER_AGENT:"userAgent"};class Ki{constructor(t,e){this.j=t,this.Da=e,this.j=t,e==null&&(e=Be(Rt)),this.Da=e}ve(t=!0){let e=this.j.$u(f.Ou.Wh);e==null&&(e=new At(Dt.de()),t&&this.j.Ju(f.Ou.Wh,e));const s=new Vi(e.Iu);for(let n=0;n<this.Da.length;n++)switch(this.Da[n]){case Rt.BROWSER:s.browser=ct.browser;break;case Rt.BROWSER_VERSION:s.Oa=ct.version;break;case Rt.OS:s.os=this.Fa();break;case Rt.RESOLUTION:s.Ga=screen.width+"x"+screen.height;break;case Rt.LANGUAGE:s.language=ct.language;break;case Rt.TIME_ZONE:s.timeZone=this.Ja(new Date);break;case Rt.USER_AGENT:s.userAgent=ct.userAgent}return s}Fa(){if(ct.qa())return ct.qa();const t=this.j.St(f.It.Aa);return t&&t.os_version?t.os_version:ct.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){u.info("Intl.DateTimeFormat threw an error, cannot detect user's time zone:"+wt(n)),e=!0}if(e)return"";const s=t.getTimezoneOffset();return this.Ba(s)}Ba(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 Gt={Ya:"invalid_api_key",Qa:"blacklisted",Va:"no_device_identifier",Wa:"invalid_json_response",Ha:"empty_response",__:"sdk_auth_error"},I={it:{Cn:"data",Mi:"content_cards/sync",vo:"feature_flags/sync",Xo:"template",st:"banners/sync",ka:"push/unregister"},Il:i=>i?.St(f.It.lS),Rm:i=>i?.St(f.It._S),Am:(i,t)=>{i?.Pt(f.It.lS,t)},qm:(i,t)=>{i?.Pt(f.It._S,t)},gl:(i,t)=>{if(!i||!t)return-1;const e=I.Il(i);if(e==null)return-1;const s=e[t];return s==null||isNaN(s)?-1:s},bl:(i,t)=>{let e=Ge;if(!i||!t)return e;const s=I.Rm(i);return s==null?e:(e=s[t],e==null||isNaN(e)?Ge:e)},nt:(i,t,e)=>{if(!i||!t)return;let s=I.Il(i);s==null&&(s={}),s[t]=e,I.Am(i,s)},ql:(i,t,e)=>{if(!i||!t)return;let s=I.Rm(i);s==null&&(s={}),s[t]=e,I.qm(i,s)},Ji:(i,t)=>{i&&t&&I.ql(i,t,Ge)},Sl:(i,t)=>{if(!i||!t)return;const e=I.bl(i,t);I.ql(i,t,e+1)}},Wt={ot:i=>{let t,e;try{const s=()=>
1{u.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 r=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 c;try{c=JSON.parse(t.responseText)}catch{const d={error:t.responseText===""?Gt.Ha:Gt.Wa,response:t.responseText};(0,i.lt)(d,l)}c&&i.lt(c,l)}typeof i.ft=="function"&&i.ft(!0,l)}else r(l)},t.onerror=()=>{r(t.getAllResponseHeaders())},t.ontimeout=()=>{r()},e=JSON.stringify(i.data),t.open("POST",i.url,!0),t.setRequestHeader("Content-type","application/json"),t.setRequestHeader("X-Requested-With","XMLHttpRequest");const a=i.headers||[];for(const o of a)t.setRequestHeader(o[0],o[1]);t.send(e)}catch(s){u.error(`Network request error: ${wt(s)}`)}}},Yi=i=>{const t={},e=i.toString().split(`\r 2`);if(!e)return t;let s,n;for(const r of e)r&&(s=r.slice(0,r.indexOf(":")).toLowerCase().trim(),n=r.slice(r.indexOf(":")+1).trim(),t[s]=n);return t};class Hi{constructor(t,e,s,n,r,a,o,l,c,h,d,b){this.tu=t,this.j=e,this.Gh=s,this.Ss=n,this.C=r,this.h=a,this.eu=o,this.Yh=l,this.Vh=c,this.Kh=h,this.appVersion=d,this.Ra=b,this.Xa=g=>g==null?"":`${g} `,this.tu=t,this.j=e,this.Gh=s,this.Ss=n,this.C=r,this.h=a,this.eu=o,this.Yh=l,this.Vh=c,this.Kh=h,this.appVersion=d,this.Ra=b,this.$a=["npm"],this.La={}}Z(t,e=!1,s=!1){const n=this.tu.ve(!s),r=n.Uo(),a=this.j.St(f.It.Aa);Yt(a,r)||(t.device=r),t.api_key=this.eu,t.time=ve(new Date().valueOf(),!0);const o=this.j.St(f.It.Ka)||[],l=this.j.St(f.It.Pa)||"";this.$a.length>0&&(!Yt(o,this.$a)||l!==this.C.$t())&&(t.sdk_metadata=this.$a),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 c=this.Ss.getUserId();if(e&&c!==null&&(t.user_id=c),!c&&!this.Gh.Fh()){const h=Je(this.j);h&&(t.alias=h)}return t}ut(t,e,s){const n=e.auth_error,r=e.error;if(!n&&!r)return!0;if(n){let a;this.Gh.Eh();const o={errorCode:n.error_code};for(const c of s)B(c)&&c[0]==="X-Braze-Auth-Signature"&&(o.signature=c[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,a=`due to ${l}`):a=`with error code ${n.error_code}.`,this.Gh.Fh()||(a+=' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),u.error(`SDK Authentication failed ${a}`),this.Ua(t.events||[],t.attributes||[]),this.Gh.Ch(o),!1}if(r){let a,o=r;switch(o){case Gt.Ha:return a="Received successful response with empty body.",V.Dt(N._a,{e:a}),u.info(a),!1;case Gt.Wa:return a="Received successful response with invalid JSON",V.Dt(N._a,{e:a+": "+e.response}),u.info(a),!1;case Gt.Ya:o=`The API key "${t.api_key}" is invalid for the baseUrl ${this.Yh}`;break;case Gt.Qa:o="Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";break;case Gt.Va:o="No device identifier. Please contact Braze Technical Support for assistance."}u.error("Backend error: "+o)}return!1}Za(t,e,s){return!!(t&&t.length!==0||e&&e.length!==0||s)}dl(t,e,s,n=!1,r="sdk"){const a=[],o=y=>y||"",l=o(this.Ss.getUserId());let c=this.Qo(t);const h=[],d=[];let b,g=null;if(e.length>0){const y=[];for(const S of e){if(b=S.Uo(),this.Gh.Fh()){if(l&&!b.user_id){g||(g={}),g.events||(g.events=[]),g.events.push(b);continue}if(o(b.user_id)!==l){d.push(b);continue}}y.push(b)}y.length>0&&(c.events=y)}if(s.length>0){const y=[];for(const S of s)S&&(this.Gh.Fh()&&o(S.user_id)!==l?h.push(S):y.push(S));y.length>0&&(c.attributes=y)}if(this.Ua(d,h),c=this.Z(c,!1,n),g){g=this.Z(g,!1,n);const y={requestData:g,headers:this.tt(g,I.it.Cn,r)};a.push(y)}if(c&&!this.Za(c.events,c.attributes,t))return g?a:null;const w={requestData:c,headers:this.tt(c,I.it.Cn,r)};return a.push(w),a}Ua(t,e){if(t){const s=[];for(const n of t){const r=bt.fromJson(n);r.time=Ei(r.time),s.push(r)}this.j.ol(s)}if(e)for(const s of e)this.j.fl(s)}dt(t,e){let s="HTTP error ";t!=null&&(s+=t+" "),s+=e,u.error(s)}ml(t){return V.Dt(N.vl,{n:t})}Qo(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 r=Je(this.j);r&&(s.alias=r)}return s.config={config_time:this.h.Qt()},{respond_with:s}}Rl(t){const e=new Date().valueOf();let s=_i.toString();const n=I.gl(this.j,t);return n!==-1&&(s=(e-n).toString()),s}tt(t,e,s="sdk"){const n=[["X-Braze-Api-Key",this.eu]],r=this.Rl(e);n.push(["X-Braze-Last-Req-Ms-Ago",r]);const a=I.bl(this.j,e).toString();n.push(["X-Braze-Req-Attempt",a]);let o=!1;if(t.respond_with!=null&&t.respond_with.triggers&&(n.push(["X-Braze-TriggersRequest","true"]),o=!0),e===I.it.Mi){n.push(["X-Braze-ContentCardsRequest","true"]);let l=I.bl(this.j,I.it.Mi);l&&s!=="client"||(l=1,I.ql(this.j,I.it.Mi,l));const c=Math.max(0,l-1);n.push(["BRAZE-SYNC-RETRY-COUNT",c.toString()]),o=!0}if(e===I.it.vo&&(n.push(["X-Braze-FeatureFlagsRequest","true"]),o=!0),o&&n.push(["X-Braze-DataRequest","true"]),s==="dust"&&n.push(["X-Braze-Request-Initiated-By","di"]),this.Gh.Fh()){const l=this.Gh.kh();l!=null&&n.push(["X-Braze-Auth-Signature",l])}return n}Al(t,e,s,n){if(this.La[n])return;const r=window.setTimeout(()=>{u.info(`Retrying rate limited ${this.Xa(n)}SDK request.`),this.et(e,s,n)},t);this.La[n]=r}fo(){for(const t in this.La){const e=this.La[t];window.clearTimeout(e)}this.La={}}et(t,e,s,n){if(!this.Dl(s))return u.info(`${this.Xa(s)}SDK request being rate limited.`),void(typeof n=="function"&&n());const r=this.kl();if(!r.Tl)return this.Al(r.yl,t,e,s),void u.info(`${this.Xa(s)}SDK request being rate limited. Request will be retried in ${Math.trunc(r.yl/1e3)} seconds.`);this.j.Pt(f.It.wl,new Date().valueOf());const a=t.device;a&&a.os_version instanceof Promise?a.os_version.then(o=>{t.device.os_version=o,e(r.Nl)}):e(r.Nl)}Bl(t){const e=t?Yi(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()))?(V.Dt(N._a,{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,r,a){if(I.bl(this.j,s)>=Ti)return;let o;a=a||0;const l=this.Bl(t);r();const c=h=>{const d=window.setTimeout(()=>{e()},h);n(d),I.Sl(this.j,s)};if(l&&!isNaN(l.value)){switch(l.type){case"date":o=l.value-new Date().getTime()+a,o<0&&e();break;case"timestamp":o=l.value+a}c(o)}else a?c(a):I.Ji(this.j,s)}Cl(t){var e;(e=this.j)===null||e===void 0||e.Pt(f.It.zl,t)}jl(t,e){let s=this.Ml();s==null&&(s={}),s[t]=e,this.j.Pt(f.It.Xl,s)}$l(){var t;return(t=this.j)===null||t===void 0?void 0:t.St(f.It.zl)}Ml(){var t;return(t=this.j)===null||t===void 0?void 0:t.St(f.It.Xl)}Ll(t,e,s,n,r=""){let a;if(r){const l=this.Ml();a=l==null||isNaN(l[r])?e:l[r]}else a=this.$l(),(a==null||isNaN(a))&&(a=e);const o=(t-n)/1e3;return a=Math.min(a+o/s,e),a}El(t,e){return Math.max(0,(1-t)*e*1e3)}Fl(t,e=""){var s,n,r,a,o;const l={Tl:!0,Nl:-1,yl:0};if(t==null&&(t=!0),!t&&!e)return l;let c,h,d=null;if(t)d=(s=this.j)===null||s===void 0?void 0:s.St(f.It.wl);else{const w=I.Il(this.j);if(w==null||w[e]==null)return l;d=w[e]}if(d==null||isNaN(d)||(t?(c=((n=this.h)===null||n===void 0?void 0:n.Kl())||-1,h=((r=this.h)===null||r===void 0?void 0:r.Pl())||-1):(c=((a=this.h)===null||a===void 0?void 0:a.Ul(e))||-1,h=((o=this.h)===null||o===void 0?void 0:o.xl(e))||-1),c===-1||h===-1))return l;const b=new Date().valueOf();let g=this.Ll(b,c,h,d,e);return g<1?(l.Tl=!1,l.yl=this.El(g,h),l):(g=Math.trunc(g)-1,l.Nl=g,t?this.Cl(g):this.jl(e,g),l)}kl(){return this.Fl(!0)}Dl(t){const e=this.Fl(!1,t);return!(e&&!e.Tl)}ct(){this.Gh.ct()}ht(){return this.Yh}addSdkMetadata(t){for(const e of t)this.$a.indexOf(e)===-1&&this.$a.push(e)}}const Ct={EE:"inAppMessage must be an InAppMessage object",TE:"ab-pause-scrolling"},yt={IE:4281545523,AE:4294967295,_E:4278219733,SE:4293914607,OE:4283782485,LE:3224580915,NE:4288387995},ye={TOP:"TOP",BOTTOM:"BOTTOM"},Pt={URI:"URI",NONE:"NONE"}
2,ue={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},we={NONE:"NONE",BLANK:"BLANK"},hs={TOP:"TOP",GRAPHIC:"GRAPHIC"},Kt={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},jt={START:"START",CENTER:"CENTER",END:"END"},Se={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},X={RE:"SLIDEUP",tE:"MODAL",eE:"MODAL_STYLED",oE:"FULL",ME:"WEB_HTML",CE:"HTML",DE:"HTML_FULL"},ge={gr:500,sE:200,aE:2e3},Es="ab-show",Xi="ab-hide",xs="ab-iam-showing",v={UE:"m",cE:"ma",nE:"sf",Is:"e",PE:"ti",iE:"ca",URI:"u",pE:"oa",rE:"dt",mE:"d",GE:"i",Bs:"iu",xE:"is",HE:"ic",FE:"ibc",BE:"bc",bE:"tc",gE:"cbc",lE:"ai",YE:"ao",hE:"h",KE:"ha",WE:"htc",XE:"fc",yE:"b",dE:"ct",uE:"o",fE:"hi",CSS:"css",xs:"type",wE:"messageFields",jE:"me",LANGUAGE:"l",Ns:"ia"};function Ji(){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",r=document.getElementById(n);r&&r.parentNode&&r.parentNode.removeChild(r)}s.parentNode&&s.parentNode.removeChild(s)}const t=document.getElementsByClassName(Ct.TE);for(let e=0;e<t.length;e++){const s=t[e].classList;s.contains(Ct.TE)&&s.remove(Ct.TE)}}class Ut{constructor(t=!1,e=[]){this.lt=t,this.Ce=e,this.lt=t,this.Ce=e}Cs(t){this.lt=this.lt&&t.lt,this.Ce.push(...t.Ce)}}const U={cu:()=>"serviceWorker"in navigator&&typeof ServiceWorkerRegistration<"u"&&"showNotification"in ServiceWorkerRegistration.prototype&&"PushManager"in window,du:()=>"safari"in window&&"pushNotification"in window.safari&&typeof window.safari.pushNotification.permission=="function"&&typeof window.safari.pushNotification.requestPermission=="function",isPushSupported:()=>U.cu()||U.du(),isPushBlocked:()=>{const i=U.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="denied",t=U.isPushSupported()&&(!("Notification"in window)||window.Notification==null);return i||t},isPushPermissionGranted:()=>U.isPushSupported()&&"Notification"in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission==="granted",Yn:()=>U.isPushBlocked()?{Zn:!1,reason:"blocked"}:U.isPushSupported()?U.isPushPermissionGranted()?{Zn:!1,reason:"permissionGranted"}:{Zn:!0}:{Zn:!1,reason:"unsupported"},So:(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.`},Ht=(i,t)=>(i=Math.ceil(i),t=Math.floor(t),Math.floor(Math.random()*(t-i+1))+i);class Wi{constructor(t,e,s,n,r,a,o,l,c,h){this.eu=t,this.baseUrl=e,this.C=s,this.tu=n,this.Ss=r,this.h=a,this.j=o,this.hc=l,this.Gh=c,this.B=h,this.eu=t,this.baseUrl=e,this.nc=0,this.fS=o.bS()||0,this.lc=null,this.C=s,this.tu=n,this.Ss=r,this.h=a,this.j=o,this.Gh=c,this.B=h,this.hc=l,this.uc=new q,this.cc=null,this.dc=50,this.mc=!1,this.fc=!1}gc(t,e){return!t&&!e&&this.Gh.Ih()>=this.dc}vc(t){let e=this.C.am();if(t.length>0){const s=this.Ss.getUserId();for(const n of t){const r=!n.userId&&!s||n.userId===s;n.type===N.wm&&r&&(e=!0)}}return e}bc(t=!1,e=!0,s,n,r,a=!1,o=!1,l="sdk"){e&&this.wc();const c=this.j.gS(),h=this.j.IS();let d=!1;const b=(E,x,k=-1)=>{const R=new Date().valueOf();I.nt(this.j,I.it.Cn,R),k!==-1&&x.push(["X-Braze-Req-Tokens-Remaining",k.toString()]);let D=!1;Wt.ot({url:this.baseUrl+"/data/",data:E,headers:x,lt:F=>{E.respond_with!=null&&E.respond_with.triggers&&(this.nc=Math.max(this.nc-1,0)),this.B.ut(E,F,x)?(this.Gh.ct(),this.h.sd(F),E.respond_with!=null&&E.respond_with.user_id!=this.Ss.getUserId()||(E.device!=null&&this.j.Pt(f.It.Aa,E.device),E.sdk_metadata!=null&&(this.j.Pt(f.It.Ka,E.sdk_metadata),this.j.Pt(f.It.Pa,this.C.$t())),this.hc(F),I.ql(this.j,I.it.Cn,1),typeof s=="function"&&s())):F.auth_error&&(D=!0)},error:()=>{D=!0,E.respond_with!=null&&E.respond_with.triggers&&(this.nc=Math.max(this.nc-1,0)),this.B.Ua(E.events,E.attributes),typeof n=="function"&&n()},ft:(F,M)=>{typeof r=="function"&&r(!D);const z=this.B.Bl(M);let Y=0;
2if(z)switch(z.type){case"date":Y=Math.max(z.value-new Date().valueOf(),0);break;case"timestamp":Y=z.value}if(e&&!d){if(D){I.Sl(this.j,I.it.Cn);const A=this.h.vt(),O=this.h.gt(),at=this.h.bt();let it=this.lc;(it==null||it<A)&&(it=A);const nt=Math.min(at,Ht(A,it*O))+Y;this.kc(nt)}else this.kc(Math.max(1e3*this.fS,Y));d=!0}}})},g=this.vc(c),w=t||g;if(this.gc(a,g))return void u.info("Declining to flush data due to 50 consecutive authentication failures");if(e&&!this.B.Za(c,h,w))return this.kc(),void(typeof r=="function"&&r(!0));const y=this.B.dl(w,c,h,o,l);w&&this.nc++;let S=!1;if(y)for(const E of y)this.B.et(E.requestData,x=>b(E.requestData,E.headers,x),I.it.Cn,n),S=!0;this.Gh.Fh()&&e&&!S?this.kc():g&&(u.info("Invoking new session subscriptions"),this.uc.A(),this.fc=!0)}yc(){return this.nc>0}kc(t=1e3*this.fS){this.mc||(this.wc(),this.cc=window.setTimeout(()=>{if(document.hidden){const e="visibilitychange",s=()=>{document.hidden||(document.removeEventListener(e,s,!1),this.bc())};document.addEventListener(e,s,!1)}else this.bc()},t),this.lc=t)}wc(){this.cc!=null&&(clearTimeout(this.cc),this.cc=null)}initialize(){this.mc=!1,this.kc()}destroy(){this.uc.removeAllSubscriptions(),this.Gh.xh(),this.wc(),this.mc=!0,this.bc(void 0,!1,void 0,void 0,void 0,void 0,!0),this.cc=null,this.fc=!1}rn(t){const e=this.uc.Ut(t);return this.fc&&t(),e}openSession(){const t=this.C.$t()!==this.C.el();t&&(this.j.hS(f.Ou.Wh),this.j.hS(f.Ou.Cu)),this.bc(!1,void 0,()=>{t&&(this.j.Vt(f.It.Zr),this.j.Vt(f.It.At))}),this.Ea(),t&&xt(()=>Promise.resolve().then(()=>ir),void 0).then(e=>{if(this.mc)return;const s=e.default.ra();if(s!=null&&(U.isPushPermissionGranted()||U.isPushBlocked())){const n=()=>{s.lu()?u.info("Push token maintenance is disabled, not refreshing token for backend."):s.subscribe()},r=(l,c)=>{c&&n()},a=()=>{const l=this.j.St(f.It.xu);(l==null||l)&&n()},o=L._s.Xs;new L(o,u).kr(o.Ws.Gu,r,a)}})}jc(){this.j.Vt(f.It.Vr),this.j.Vt(f.It.bi),this.j.Vt(f.It.la)}Sc(){this.j.Vt(f.It.wl),this.j.Vt(f.It.lS),this.j.Vt(f.It.zl),this.j.Vt(f.It.Xl)}changeUser(t,e,s){const n=this.Ss.getUserId();if(n!==t){this.C.Sm(),this.jc(),Ji(),n!=null&&this.bc(void 0,!1,void 0,void 0,void 0),this.Ss.Lu(t),s?this.Gh.setSdkAuthenticationSignature(s):this.Gh.jh();for(let r=0;r<e.length;r++)e[r].changeUser(n==null);this.B.fo(),n!=null&&this.j.Vt(f.It.rS),this.j.Vt(f.It.Aa),this.j.Vt(f.It.uS),this.Sc(),this.openSession(),u.info('Changed user to "'+t+'".')}else{let r="Doing nothing.";s&&this.Gh.kh()!==s&&(this.Gh.setSdkAuthenticationSignature(s),r="Updated SDK authentication signature"),u.info(`Current user is already ${t}. ${r}`)}}requestImmediateDataFlush(t){this.wc(),this.C.el(),this.bc(void 0,void 0,void 0,()=>{u.error("Failed to flush data, request will be retried automatically.")},t,!0)}Ar(t,e,s="sdk"){this.C.el(),u.info("Requesting explicit trigger refresh."),this.bc(!0,void 0,t,e,void 0,void 0,void 0,s)}Hu(t,e){const s=N.Ac,n={a:t,l:e},r=V.Dt(s,n);return r&&(u.info(`Logged alias ${t} with label ${e}`),this.j.Pt(f.It.uS,n)),r}Yu(t,e,s){if(this.h.zu(e))return u.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new Ut;const n={key:e,value:s},r=V.Dt(t,n);if(r){const a=typeof s=="object"?JSON.stringify(s,null,2):s;u.info(`Logged custom attribute: ${e} with value: ${a}`)}return r}setLastKnownLocation(t,e,s,n,r,a){const o={latitude:e,longitude:s};n!=null&&(o.altitude=n),r!=null&&(o.ll_accuracy=r),a!=null&&(o.alt_accuracy=a);const l=V.Dt(N.Dc,o,t||void 0);return l&&u.info(`Set user last known location as ${JSON.stringify(o,null,2)}`),l}Fr(t,e){const s=this.C.el();return new bt(this.Ss.getUserId(),N.$c,t,s,{cid:e})}qc(t,e){return new L(t,e)}Ea(){const t=L._s.Xs;this.qc(t,u).setItem(t.Ws.Cn,1,{baseUrl:this.baseUrl,data:{api_key:this.eu,device_id:this.tu.ve().id},userId:this.Ss.getUserId(),sdkAuthEnabled:this.Gh.Fh()})}Dr(t){for(const e of t)if(e.api_key===this.eu)this.B.Ua(e.events,e.attributes);else{const s=L._s.Xs;new L(s,u).setItem(s.Ws.Br,Dt.de(),e)}}ya(t,e,s){if(this.h.zu(t))return u.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new Ut;let n,r;return e===null&&s===null?(n=N.Cc,r={key:t}):(n=N.Mc,r={key:t,latitude:e,longitude:s}),V.Dt(n,r)}va(t,e){const s={group_id:t,status:e};return V.Dt(N.Tc,s)}}class de{constructor(t=0,e=[],s=[],n=[],r=null,a=null,o={enabled:!1},l={enabled:!1,refresh_rate_limit:void 0},c={enabled:!0,capacity:Ai,refill_rate:ki,endpoint_overrides:{}},h=null,d=null,b=null,g=null,w=null){this.ed=t,this.vd=e,this.md=s,this.gd=n,this.fd=r,this.ld=a,this.ud=o,this.Rr=l,this.nd=c,this.banners=h,this.dust=d,this.Cd=b,this.wd=g,this.ad=w}qt(){return{s:"6.12.1",l:this.ed,e:this.vd,a:this.md,p:this.gd,m:this.fd,v:this.ld,c:this.ud,f:this.Rr,grl:this.nd,b:this.banners,d:this.dust,rb:this.Cd,mst:this.wd,ch:this.ad}}static _u(t){let e=t.l;return t.s!=="6.12.1"&&(e=0),new de(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,t.ch)}}class Zi{constructor(t){this.j=t,this.j=t,this.Gl=new q,this._l=new q,this.Ol=new q,this.Vl=new q,this.Hl=new q,this.Jl=new q,this.Ql=null,this.Wl=null}Yl(){if(this.Wl==null){const t=this.j.St(f.It.Zl);this.Wl=t!=null?de._u(t):new de}return this.Wl}Qt(){return this.Yl().ed}sd(t){var e,s,n,r,a,o;if(t!=null&&t.config!=null){const l=t.config;if(l.time>this.Yl().ed){const c=E=>E??this.Yl().nd,h=new de(l.time,l.events_blacklist,l.attributes_blacklist,l.purchases_blacklist,l.messaging_session_timeout,l.vapid_public_key,l.content_cards,l.feature_flags,c(l.global_request_rate_limit),l.banners,l.dust,l.request_backoff,l.minimum_session_timeout,l.conversational_chat);let d=!1;h.ld!=null&&this.Wu()!==h.ld&&(d=!0);let b=!1;
2h.ud.enabled!=null&&this.Pi()!==h.ud.enabled&&(b=!0);let g=!1;h.Rr.enabled!=null&&this.Kr()!==h.Rr.enabled&&(g=!0);let w=!1;((e=h.banners)===null||e===void 0?void 0:e.enabled)!=null&&this.Ot()!==((s=h.banners)===null||s===void 0?void 0:s.enabled)&&(w=!0);let y=!1;((n=h.dust)===null||n===void 0?void 0:n.enabled)!=null&&this.$n()!==((r=h.dust)===null||r===void 0?void 0:r.enabled)&&(y=!0);let S=!1;((a=h.ad)===null||a===void 0?void 0:a.enabled)!=null&&this.hd()!==((o=h.ad)===null||o===void 0?void 0:o.enabled)&&(S=!0),this.Wl=h,this.j.Pt(f.It.Zl,h.qt()),d&&this.Gl.A(),b&&this._l.A(),g&&this.Ol.A(),w&&this.Vl.A(),y&&this.Hl.A(),S&&this.Jl.A()}}}ju(t){const e=this.Gl.Ut(t);return this.Ql&&this.Gl.removeSubscription(this.Ql),this.Ql=e,e}$i(t){return this._l.Ut(t)}do(t){return this.Ol.Ut(t)}V(t){return this.Vl.Ut(t)}Tr(t){return this.Hl.Ut(t)}dd(t){return this.Jl.Ut(t)}$e(t){return this.Yl().vd.indexOf(t)!==-1}zu(t){return this.Yl().md.indexOf(t)!==-1}$r(t){return this.Yl().gd.indexOf(t)!==-1}bd(){return this.Yl().fd}Wu(){return this.Yl().ld}Pi(){return this.Yl().ud.enabled||!1}pd(){const t=this.Yl().nd;return!(!t||t.enabled==null)&&t.enabled}Kl(){if(!this.pd())return-1;const t=this.Yl().nd;return t.capacity==null||t.capacity<10?-1:t.capacity}Pl(){if(!this.pd())return-1;const t=this.Yl().nd;return t.refill_rate==null||t.refill_rate<=0?-1:t.refill_rate}Rd(t){const e=this.Yl().nd.endpoint_overrides;return e==null?null:e[t]}Ul(t){const e=this.Rd(t);return e==null||isNaN(e.capacity)||e.capacity<=0?-1:e.capacity}xl(t){const e=this.Rd(t);return e==null||isNaN(e.refill_rate)||e.refill_rate<=0?-1:e.refill_rate}Kr(){return this.Yl().Rr.enabled&&this.Fo()==null?(V.Dt(N._a,{e:"Missing feature flag refresh_rate_limit."}),!1):this.Yl().Rr.enabled||!1}Fo(){return this.Yl().Rr.refresh_rate_limit}Ot(){var t;return((t=this.Yl().banners)===null||t===void 0?void 0:t.enabled)||null}re(){var t;return((t=this.Yl().banners)===null||t===void 0?void 0:t.max_placements)||0}Gt(){var t;const e=(t=this.Yl().banners)===null||t===void 0?void 0:t.dismissals_cache_size;return e!=null&&typeof e=="number"&&e>0?e:js}$n(){var t;return((t=this.Yl().dust)===null||t===void 0?void 0:t.enabled)||!1}hd(){var t;return((t=this.Yl().ad)===null||t===void 0?void 0:t.enabled)||!1}vt(){var t;const e=(t=this.Yl().Cd)===null||t===void 0?void 0:t.min_sleep_duration_ms;return e??ee}gt(){var t;const e=(t=this.Yl().Cd)===null||t===void 0?void 0:t.scale_factor;return e??se}bt(){var t;const e=(t=this.Yl().Cd)===null||t===void 0?void 0:t.max_sleep_duration_ms;return e??ie}Ed(){return this.Yl().wd}}const Qi=1e4;class tn{constructor(t,e,s,n){this.j=t,this.Ss=e,this.h=s,this.tm=n,this.j=t,this.Ss=e,this.h=s;const r=this.h.Ed();this.im=r?1e3*r:Qi,(n==null||isNaN(n))&&(n=1800),n<this.im/1e3&&u.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 bt(this.Ss.getUserId(),N.hm,t,e.Iu,{d:ve(t-e.lm)})}al(){return this.j.$u(f.Ou.um)}$t(){const t=this.j.$u(f.Ou.um);return t==null?null:t.Iu}am(){const t=new Date().valueOf(),e=this.h.bd();if(e==null)return!1;const s=this.j.St(f.It.dm),n=s==null||t-s>1e3*e;return n&&this.j.Pt(f.It.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.j.$u(f.Ou.um);if(this.ul(t,s)){let n="Generating session start event with time "+t;if(s!=null){let a=s.pm;a-s.lm<this.im&&(a=s.lm+this.im),this.j.gm(this.nm(a,s)),n+=" (old session ended "+a+")"}n+=". Will expire "+e.valueOf(),u.info(n);const r=new At(Dt.de(),e);return this.j.gm(new bt(this.Ss.getUserId(),N.wm,t,r.Iu)),this.j.Ju(f.Ou.um,r),this.j.St(f.It.dm)==null&&this.j.Pt(f.It.dm,t),r.Iu}if(s!=null)return s.pm=t,s.fm=e,this.j.Ju(f.Ou.um,s),s.Iu}Sm(){const t=this.j.$u(f.Ou.um);t!=null&&(this.j.jm(f.Ou.um),this.j.gm(this.nm(new Date().valueOf(),t)))}}const Ce={rl:function(i,t=!1,e){const s=Ce.oc(),n=Ce.sl(),r=new et.tc(i,s&&!t,n,e);let a;return a=n?new et.ec(i):new et.rc,new et(r,a)},oc: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(f.It.ac,"true"),localStorage.getItem(f.It.ac)?(localStorage.removeItem(f.It.ac),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{u.info("Local Storage not supported!")}return i}};class Ot{constructor(t,e){this.triggerId=t,this.messageExtras=e,this.triggerId=t,this.messageExtras=e,this.extras={}
2,this.isControl=!0,this.hs=!1}static fromJson(t){return new Ot(t.trigger_id,t.message_extras)}js(){return!this.hs&&(this.hs=!0,!0)}sm(){return this.hs}}function en(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 qt={Ic:null,td:en},Nt={Jo:"up",Ko:"down",ie:"left",ne:"right"};function Ls(){if(qt.Ic==null){qt.Ic=!1;try{const i=Object.defineProperty({},"passive",{get:()=>{qt.Ic=!0}});window.addEventListener("testPassive",()=>{},i),window.removeEventListener("testPassive",()=>{},i)}catch(i){u.error(wt(i))}}return qt.Ic}function ne(i,t,e=()=>{}){i.addEventListener(t,e,!!Ls()&&{passive:!0})}function Fs(i){return qt.td(i,!0,!1,!1)}function Gs(i){return qt.td(i,!1,!0,!1)}function Is(i){if(i.onclick){const t=document.createEvent("MouseEvents");t.initEvent("click",!0,!0),i.onclick.apply(i,[t])}}function fe(i,t,e){let s=null,n=null;ne(i,"touchstart",r=>{s=r.touches[0].clientX,n=r.touches[0].clientY}),ne(i,"touchmove",r=>{if(s==null||n==null)return;const a=s-r.touches[0].clientX,o=n-r.touches[0].clientY;Math.abs(a)>Math.abs(o)&&Math.abs(a)>=25?((a>0&&t===Nt.ie||a<0&&t===Nt.ne)&&e(r),s=null,n=null):Math.abs(o)>=25&&((o>0&&t===Nt.Jo&&i.scrollTop===i.scrollHeight-i.offsetHeight||o<0&&t===Nt.Ko&&i.scrollTop===0)&&e(r),s=null,n=null)})}function qs(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 r=document.createElementNS(s,"path");return r.setAttribute("d",t),e!=null&&r.setAttribute("fill",e),n.appendChild(r),n}const kt={To:32,No:9,Lo:13,oh:27},Vs=i=>i!==null&&i.tagName==="IFRAME";class j{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z,Y,A,O,at,it,nt,mt,Lt){this.message=t,this.messageAlignment=e,this.slideFrom=s,this.extras=n,this.triggerId=r,this.clickAction=a,this.uri=o,this.openTarget=l,this.dismissType=c,this.duration=h,this.icon=d,this.imageUrl=b,this.imageStyle=g,this.iconColor=w,this.iconBackgroundColor=y,this.backgroundColor=S,this.textColor=E,this.closeButtonColor=x,this.animateIn=k,this.animateOut=R,this.header=D,this.headerAlignment=F,this.headerTextColor=M,this.frameColor=z,this.buttons=Y,this.cropType=A,this.orientation=O,this.htmlId=at,this.css=it,this.messageExtras=nt,this.language=mt,this.altImageText=Lt,this.message=t,this.messageAlignment=e||jt.CENTER,this.duration=h||5e3,this.slideFrom=s||ye.BOTTOM,this.extras=n||{},this.triggerId=r,this.clickAction=a||Pt.NONE,this.uri=o,this.openTarget=l||we.NONE,this.dismissType=c||ue.AUTO_DISMISS,this.icon=d,this.imageUrl=b,this.imageStyle=g||hs.TOP,this.iconColor=w||yt.AE,this.iconBackgroundColor=y||yt._E,this.backgroundColor=S||yt.AE,this.textColor=E||yt.IE,this.closeButtonColor=x||yt.NE,this.animateIn=k,this.animateIn==null&&(this.animateIn=!0),this.animateOut=R,this.animateOut==null&&(this.animateOut=!0),this.header=D,this.headerAlignment=F||jt.CENTER,this.headerTextColor=M||yt.IE,this.frameColor=z||yt.LE,this.buttons=Y||[],this.cropType=A||Se.FIT_CENTER,this.orientation=O,this.htmlId=at,this.css=it,this.isControl=!1,this.messageExtras=nt,this.language=mt,this.altImageText=Lt,this.th=!1,this.hs=!1,this.rd=!1,this.sh=!1,this.ih=!1,this.Bo=null,this.$o=null,this.ti=new q,this.hh=new q,this.qo=jt.CENTER}subscribeToClickedEvent(t){return this.ti.Ut(t)}subscribeToDismissedEvent(t){return this.hh.Ut(t)}removeSubscription(t){this.ti.removeSubscription(t),this.hh.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions(),this.hh.removeAllSubscriptions()}closeMessage(){this.tl(this.Bo)}zo(){return!0}od(){return this.zo()}ko(){return this.htmlId!=null&&this.htmlId.length>4}Mo(){return this.ko()&&this.css!=null&&this.css.length>0}Co(){if(this.ko()&&this.Mo())return this.htmlId+"-css"}js(){return!this.hs&&(this.hs=!0,!0)}sm(){return this.hs}Yt(t){return!this.rd&&(this.rd=!0,this.ti.A(),!0)}Ft(){return!this.sh&&(this.sh=!0,this.hh.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(Ct.TE)&&s.remove(Ct.TE),document.body.removeEventListener("touchmove",j.eh)}e.className=e.className.replace(Es,Xi)}return this.animateOut||!1}tl(t,e){if(t==null||this.ih)return;let s;this.ih=!0,this.Bo=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 r=document.body;let a;r!=null&&(a=r.scrollTop);const o=()=>{if(t&&t.parentNode){let c=t.closest(".ab-iam-root");c==null&&(c=t),c.parentNode&&c.parentNode.removeChild(c)}const l=this.Co();if(l!=null){const c=document.getElementById(l);c&&c.parentNode&&c.parentNode.removeChild(c)}r!=null&&ct.browser==="Safari"&&(r.scrollTop=a),e?e():this.Ft()};n?setTimeout(o,ge.gr):o(),this.$o&&this.$o.focus()}Eo(){return document.createTextNode(this.message||"")}Ao(t){t.setAttribute("alt",this.altImageText||"")}static eh(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(`.${Ct.TE}`)&&t.cancelable&&t.preventDefault()}nh(t){this.ih=!1;const e=t.parentNode;this.zo()&&e!=null&&this.orientation!==Kt.LANDSCAPE&&(e.classList!=null&&e.classList.add(Ct.TE),document.body.addEventListener("touchmove",j.eh,!!Ls()&&{passive:!1})),t.className+=" "+Es}static rh(t){if(t.keyCode===kt.oh&&!p.er(T.lh)&&document.querySelectorAll(".ab-modal-interactions").length>0){const e=document.getElementsByClassName("ab-html-message");let s=!1;for(const n of e){let r=null;Vs(n)&&n.contentWindow&&(r=n.contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0]),r!=null&&(Is(r),s=!0)}if(!s){const n=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];n!=null&&Is(n)}}}uh(){this.th||p.er(T.lh)||(document.addEventListener("keydown",j.rh,!1),p.ah(()=>{document.removeEventListener("keydown",j.rh)}),this.th=!0)}qt(t){const e={};return t&&(e[v.UE]=this.message,e[v.cE]=this.messageAlignment,e[v.nE]=this.slideFrom,e[v.Is]=this.extras,e[v.PE]=this.triggerId,e[v.iE]=this.clickAction,e[v.URI]=this.uri,e[v.pE]=this.openTarget,e[v.rE]=this.dismissType,e[v.mE]=this.duration,e[v.GE]=this.icon,e[v.Bs]=this.imageUrl,e[v.xE]=this.imageStyle,e[v.HE]=this.iconColor,e[v.FE]=this.iconBackgroundColor,e[v.BE]=this.backgroundColor,e[v.bE]=this.textColor,e[v.gE]=this.closeButtonColor,e[v.lE]=this.animateIn,e[v.YE]=this.animateOut,e[v.hE]=this.header,e[v.KE]=this.headerAlignment,e[v.WE]=this.headerTextColor,e[v.XE]=this.frameColor,e[v.yE]=this.buttons,e[v.dE]=this.cropType,e[v.uE]=this.orientation,e[v.fE]=this.htmlId,e[v.CSS]=this.css,e[v.xs]=t,e[v.jE]=this.messageExtras,e[v.LANGUAGE]=this.language,e[v.Ns]=this.altImageText),e}}j.mh=yt,j.SlideFrom=ye,j.ClickAction=Pt,j.DismissType=ue,j.OpenTarget=we,j.ImageStyle=hs,j.Orientation=Kt,j.TextAlignment=jt,j.CropType=Se,j.dh=X,j.gr=ge.gr,j.sE=ge.sE,j.bs=v;class Bt extends j{constructor(t,e,s,n,r,a,o,l,c,h,d,b){super(t,void 0,void 0,e,s,void 0,void 0,void 0,n=n||ue.MANUAL,r,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,a,o,void 0,void 0,void 0,l,void 0,void 0,void 0,c,h,b,void 0,void 0),this.messageFields=d,this.messageFields=d}od(){return!1}Yt(t){if(this.Oo===X.ME){if(this.rd)return!1;this.rd=!0}return this.ti.A(t),!0}qt(){const t=super.qt(X.ME);return t[v.wE]=this.messageFields,t}static ua(t){return new Bt(t[v.UE],t[v.Is],t[v.PE],t[v.rE],t[v.mE],t[v.lE],t[v.YE],t[v.XE],t[v.fE],t[v.CSS],t[v.wE],t[v.jE])}}class $t{constructor(t,e,s,n,r,a,o){this.text=t,this.backgroundColor=e,this.textColor=s,this.borderColor=n,this.clickAction=r,this.uri=a,this.id=o,this.text=t||"",this.backgroundColor=e||yt._E,this.textColor=s||yt.AE,this.borderColor=n||this.backgroundColor,this.clickAction=r||Pt.NONE,this.uri=a,o==null&&(o=$t.Qn),this.id=o,this.rd=!1,this.ti=new q}subscribeToClickedEvent(t){return this.ti.Ut(t)}removeSubscription(t){this.ti.removeSubscription(t)}removeAllSubscriptions(){this.ti.removeAllSubscriptions()}Yt(){return!this.rd&&(this.rd=!0,this.ti.A(),!0)}static fromJson(t){return new $t(t.text,t.bg_color,t.text_color,t.border_color,t.click_action,t.uri,t.id)}}$t.Qn=-1;class Xt extends j{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z,Y,A,O,at,it,nt,mt){l=l||ue.MANUAL,A=A||Kt.PORTRAIT,super(t,e,void 0,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z,Y=Y||Se.CENTER_CROP,A,O,at,it,nt,mt),this.qo=jt.CENTER}qt(){return super.qt(X.oE)}static ua(t){return new Xt(t[v.UE],t[v.cE],t[v.Is],t[v.PE],t[v.iE],t[v.URI],t[v.pE],t[v.rE],t[v.mE],t[v.GE],t[v.Bs],t[v.xE],t[v.HE],t[v.FE],t[v.BE],t[v.bE],t[v.gE],t[v.lE],t[v.YE],t[v.hE],t[v.KE],t[v.WE],t[v.XE],Ys(t[v.yE]),t[v.dE],t[v.uE],t[v.fE],t[v.CSS],t[v.jE],t[v.LANGUAGE],t[v.Ns])}}class ce extends j{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z,Y,A,O,at,it,nt){super(t,e,void 0,s,n,r,a,o,l=l||ue.MANUAL,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z,Y=Y||Se.FIT_CENTER,void 0,A,O,at,it,nt),this.qo=jt.CENTER}qt(){return super.qt(X.tE)}static ua(t){return new ce(t[v.UE],t[v.cE],t[v.Is],t[v.PE],t[v.iE],t[v.URI],t[v.pE],t[v.rE],t[v.mE],t[v.GE],t[v.Bs],t[v.xE],t[v.HE],t[v.FE],t[v.BE],t[v.bE],t[v.gE],t[v.lE],t[v.YE],t[v.hE],t[v.KE],t[v.WE],t[v.XE],Ys(t[v.yE]),t[v.dE],t[v.fE],t[v.CSS],t[v.jE],t[v.LANGUAGE],t[v.Ns])}}class Zt extends j{constructor(t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,R,D,F,M,z){S=S||yt.OE,y=y||yt.SE,super(t,e=e||jt.START,s,n,r,a,o,l,c,h,d,b,void 0,g,w,y,S,E,x,k,void 0,void 0,void 0,void 0,void 0,void 0,void 0,R,D,F,M,z),this.qo=jt.START}zo(){return!1}Eo(){const t=document.createElement("span");return t.appendChild(document.createTextNode(this.message||"")),t}nh(t){const e=t.getElementsByClassName("ab-in-app-message")[0];qt.td(e,!0,!0)||(this.slideFrom===ye.TOP?e.style.top="0px":e.style.bottom="0px"),super.nh(t)}qt(){return super.qt(X.RE)}static ua(t){return new Zt(t[v.UE],t[v.cE],t[v.nE],t[v.Is],t[v.PE],t[v.iE],t[v.URI],t[v.pE],t[v.rE],t[v.mE],t[v.GE],t[v.Bs],t[v.HE],t[v.FE],t[v.BE],t[v.bE],t[v.gE],t[v.lE],t[v.YE],t[v.fE],t[v.CSS],t[v.jE],t[v.LANGUAGE],t[v.Ns])}}function Ks(i){if(!i)return null;if(i.is_control)return Ot.fromJson(i);let t=i.type;t!=null&&(t=t.toUpperCase());const e=i.message,s=i.text_align_message,n=i.slide_from,r=i.extras,a=i.trigger_id,o=i.click_action,l=i.uri,c=i.open_target,h=i.message_close,d=i.duration,b=i.icon,g=i.image_url,w=i.image_style,y=i.icon_color,S=i.icon_bg_color,E=i.bg_color,x=i.text_color,k=i.close_btn_color,R=i.header,D=i.text_align_header,F=i.header_text_color,M=i.frame_color,z=[];let Y=i.btns;Y==null&&(Y=[]);for(let he=0;he<Y.length;he++)z.push($t.fromJson(Y[he]));const A=i.crop_type,O=i.orientation,at=i.animate_in,it=i.animate_out;let nt=i.html_id,mt=i.css;nt!=null&&nt!==""&&mt!=null&&mt!==""||(nt=void 0,mt=void 0);const Lt=i.message_extras,Le=i.language,Fe=i.image_alt;let Ft;if(t===X.tE||t===X.eE)Ft=new ce(e,s,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,at,it,R,D,F,M,z,A,nt,mt,Lt,Le,Fe);
2else if(t===X.oE)Ft=new Xt(e,s,r,a,o,l,c,h,d,b,g,w,y,S,E,x,k,at,it,R,D,F,M,z,A,O,nt,mt,Lt,Le,Fe);else if(t===X.RE)Ft=new Zt(e,s,n,r,a,o,l,c,h,d,b,g,y,S,E,x,k,at,it,nt,mt,Lt,Le,Fe);else{if(t!==X.ME&&t!==X.CE&&t!==X.DE)return void u.error("Ignoring message with unknown type "+t);{const he=i.message_fields;Ft=new Bt(e,r,a,h,d,at,it,M,nt,mt,he,Lt),Ft.trusted=i.trusted||!1}}return Ft.Oo=t,Ft}function Ys(i){const t=[];for(const e of i)t.push(new $t(e.text,e.backgroundColor,e.textColor,e.borderColor,e.clickAction,e.uri,e.id));return t}class Ne{constructor(t){this.xc=t,this.xc=t}zc(t){return this.xc==null||this.xc===t[0]}static fromJson(t){return new Ne(t?t.event_name:null)}qt(){return this.xc}}class ${constructor(t,e,s,n){this.zE=t,this.kE=e,this.comparator=s,this.vE=n,this.zE=t,this.kE=e,this.comparator=s,this.vE=n,this.kE===$.VE.JE&&this.comparator!==$.ZE.qE&&this.comparator!==$.ZE.$E&&this.comparator!==$.ZE.tT&&this.comparator!==$.ZE.sT&&(this.vE=zt(this.vE))}zc(t){let e=null;switch(t!=null&&(e=t[this.zE]),this.comparator){case $.ZE.eT:return e!=null&&e.valueOf()===this.vE.valueOf();case $.ZE.iT:return e==null||e.valueOf()!==this.vE.valueOf();case $.ZE.lT:return e!=null&&typeof e==typeof this.vE&&e>this.vE;case $.ZE.qE:return this.kE===$.VE.JE?e!=null&&It(e)&&ys(e)<=this.vE.valueOf():e!=null&&typeof e==typeof this.vE&&e>=this.vE;case $.ZE.rT:return e!=null&&typeof e==typeof this.vE&&e<this.vE;case $.ZE.$E:return this.kE===$.VE.JE?e!=null&&It(e)&&ys(e)>=this.vE.valueOf():e!=null&&typeof e==typeof this.vE&&e<=this.vE;case $.ZE.hT:return e!=null&&typeof e=="string"&&typeof e==typeof this.vE&&e.match(this.vE)!=null;case $.ZE.nT:return e!=null;case $.ZE.uT:return e==null;case $.ZE.tT:return e!=null&&It(e)&&ws(e)<this.vE;case $.ZE.sT:return e!=null&&It(e)&&ws(e)>this.vE;case $.ZE.oT:return e==null||typeof e!=typeof this.vE||typeof e!="string"||e.match(this.vE)==null}return!1}static fromJson(t){return new $(t.property_key,t.property_type,t.comparator,t.property_value)}qt(){let t=this.vE;return It(this.vE)&&(t=ve(t.valueOf())),{k:this.zE,t:this.kE,c:this.comparator,v:t}}static _u(t){return new $(t.k,t.t,t.c,t.v)}}$.VE={ET:"boolean",aT:"number",TT:"string",JE:"date"},$.ZE={eT:1,iT:2,lT:3,qE:4,rT:5,$E:6,hT:10,nT:11,uT:12,tT:15,sT:16,oT:17};class Jt{constructor(t){this.filters=t,this.filters=t}zc(t){let e=!0;for(let s=0;s<this.filters.length;s++){const n=this.filters[s];let r=!1;for(let a=0;a<n.length;a++)if(n[a].zc(t)){r=!0;break}if(!r){e=!1;break}}return e}static fromJson(t){if(t==null||!B(t))return null;const e=[];for(let s=0;s<t.length;s++){const n=[],r=t[s];for(let a=0;a<r.length;a++)n.push($.fromJson(r[a]));e.push(n)}return new Jt(e)}qt(){const t=[];for(let e=0;e<this.filters.length;e++){const s=this.filters[e],n=[];for(let r=0;r<s.length;r++)n.push(s[r].qt());t.push(n)}return t}static _u(t){const e=[];for(let s=0;s<t.length;s++){const n=[],r=t[s];for(let a=0;a<r.length;a++)n.push($._u(r[a]));e.push(n)}return new Jt(e)}}class Oe{constructor(t,e){this.xc=t,this.tf=e,this.xc=t,this.tf=e}zc(t){if(this.xc==null||this.tf==null)return!1;const e=t[0],s=t[1];return e===this.xc&&this.tf.zc(s)}static fromJson(t){return new Oe(t?t.event_name:null,t?Jt.fromJson(t.property_filters):null)}qt(){return{e:this.xc,pf:this.tf?this.tf.qt():null}}}class De{constructor(t,e){this.if=t,this.rf=e,this.if=t,this.rf=e}zc(t){if(this.if==null)return!1;const e=_.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 De(t?t.id:null,t?t.buttons:null)}qt(){return this.if}}class Pe{constructor(t){this.productId=t,this.productId=t}zc(t){return this.productId==null||t[0]===this.productId}static fromJson(t){return new Pe(t?t.product_id:null)}qt(){return this.productId}}class Re{constructor(t,e){this.productId=t,this.tf=e,this.productId=t,this.tf=e}zc(t){if(this.productId==null||this.tf==null)return!1;const e=t[0],s=t[1];return e===this.productId&&this.tf.zc(s)}static fromJson(t){return new Re(t?t.product_id:null,t?Jt.fromJson(t.property_filters):null)}qt(){return{id:this.productId,pf:this.tf?this.tf.qt():null}}}class je{constructor(t){this.if=t,this.if=t}zc(t){return this.if==null||_.sf(t[0],this.if)}static fromJson(t){return new je(t?t.campaign_id:null)}qt(){return this.if}}const W={OPEN:"open",qr:"purchase",Sr:"push_click",he:"custom_event",rm:"iam_click",Os:"test"};class _{constructor(t,e){this.type=t,this.data=e,this.type=t,this.data=e}_c(t,e){return _.Ec[this.type]===t&&(this.data==null||this.data.zc(e))}static sf(t,e){let s=null;try{s=window.atob(t)}catch(n){return u.info("Failed to unencode analytics id "+t+": "+wt(n)),!1}return e===s.split("_")[0]}static fromJson(t){const e=t.type;let s=null;switch(e){case _.Yo.OPEN:case _.Yo.Os:break;case _.Yo.qr:s=Pe.fromJson(t.data);break;case _.Yo.Pc:s=Re.fromJson(t.data);break;case _.Yo.Sr:s=je.fromJson(t.data);break;case _.Yo.he:s=Ne.fromJson(t.data);break;case _.Yo.Rc:s=Oe.fromJson(t.data);break;case _.Yo.rm:s=De.fromJson(t.data)}return new _(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 _.Yo.OPEN:case _.Yo.Os:break;case _.Yo.qr:s=new Pe(t.d);break;case _.Yo.Pc:e=t.d||{},s=new Re(e.id,Jt._u(e.pf||[]));break;case _.Yo.Sr:s=new je(t.d);break;case _.Yo.he:s=new Ne(t.d);break;case _.Yo.Rc:e=t.d||{},s=new Oe(e.e,Jt._u(e.pf||[]));break;case _.Yo.rm:s=new De(t.d)}return new _(t.t,s)}}_.Yo={OPEN:"open",qr:"purchase",Pc:"purchase_property",Sr:"push_click",he:"custom_event",Rc:"custom_event_property",rm:"iam_click",Os:"test"},_.Ec={},_.Ec[_.Yo.OPEN]=W.OPEN,_.Ec[_.Yo.qr]=W.qr,_.Ec[_.Yo.Pc]=W.qr,_.Ec[_.Yo.Sr]=W.Sr,_.Ec[_.Yo.he]=W.he,_.Ec[_.Yo.Rc]=W.he,_.Ec[_.Yo.rm]=W.rm,_.Ec[_.Yo.Os]=W.Os;class ht{constructor(t,e=[],s,n,r=0,a,o,l=0,c=ht.Td,h,d,b){this.id=t,this.Dd=e,this.startTime=s,this.endTime=n,this.priority=r,this.type=a,this.data=o,this.Pd=l,this.yd=c,this.ia=h,this.jd=d,this.Nd=b,this.id=t,this.Dd=e||[],s===void 0&&(s=null),this.startTime=s,n===void 0&&(n=null),this.endTime=n,this.priority=r||0,this.type=a,this.Pd=l||0,h==null&&(h=1e3*(this.Pd+30)),this.ia=h,this.data=o,c!=null&&(this.yd=c),this.jd=d,this.Nd=b||null}_d(t){return this.Nd==null||this.yd!==ht.Td&&t-this.Nd>=1e3*this.yd}Ad(t){this.Nd=t}Id(t){const e=t+1e3*this.Pd;return Math.max(e-new Date().valueOf(),0)}$d(t){const e=new Date().valueOf()-t,s=t==null||isNaN(e)||this.ia==null||e<this.ia;return s||u.info(`Trigger action ${this.type} is no longer eligible for display - fired ${e}ms ago and has a timeout of ${this.ia}ms.`),!s}static fromJson(t){const e=t.id,s=[];for(let g=0;g<t.trigger_condition.length;g++)s.push(_.fromJson(t.trigger_condition[g]));const n=zt(t.start_time),r=zt(t.end_time),a=t.priority,o=t.type,l=t.delay,c=t.re_eligibility,h=t.timeout,d=t.data,b=t.min_seconds_since_last_trigger;return _t(ht.Yo,o,"Could not construct Trigger from server data","Trigger.Types")?new ht(e,s,n,r,a,o,d,l,c,h,b):null}qt(){const t=[];for(let e=0;e<this.Dd.length;e++)t.push(this.Dd[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.Pd,r:this.yd,tm:this.ia,ss:this.jd,ld:this.Nd}}static _u(t){const e=[],s=t.c||[];for(let n=0;n<s.length;n++)e.push(_._u(s[n]));return new ht(t.i,e,pe(t.s),pe(t.e),t.p,t.t,t.da,t.d,t.r,t.tm,t.ss,t.ld)}}ht.Yo={Wo:"inapp",xd:"templated_iam"},ht.Td=-1;function ds(i,t,e){const s=document.querySelector("head"),n=`ab-${t}-css-definitions-${"6.12.1".replace(/\./g,"-")}`;if(!s)return;const r=s.ownerDocument||document;if(r.getElementById(n)==null){const a=r.createElement("style");a.innerHTML=e||"",a.id=n;const o=p.er(T.sr);o!=null&&a.setAttribute("nonce",o),s.appendChild(a)}}function Hs(){if(p.er(T.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 sn(i){ds(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 nn(){sn(),Hs()}function rn(i){ds(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 Xs(){rn(),Hs()}function an(i){ds(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 on(){an()}function ln(i){let t="";return i.animateIn&&(t+=" ab-animate-in"),i.animateOut&&(t+=" ab-animate-out"),i instanceof Xt?t+=" ab-effect-fullscreen":i instanceof Bt?t+=" ab-effect-html":i instanceof ce?t+=" ab-effect-modal":i instanceof Zt&&(t+=" ab-effect-slide"),t}function Js(i,t,e,s="ltr"){const n=document.createElement("button");n.setAttribute("aria-label",i),n.setAttribute("role","button"),n.dir=s,ne(n,"touchstart"),n.className="ab-close-button";const r=qs("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(r),r.setAttribute("aria-hidden","true"),n.addEventListener("keydown",a=>{a.keyCode!==kt.To&&a.keyCode!==kt.Lo||(e(),a.stopPropagation())}),n.onclick=a=>{e(),a.stopPropagation()},n}function un(i){return i!=null&&(i=parseInt(i.toString()),!isNaN(i)&&(4278190080&i)>>>24==0)}function Et(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 Ze(i){if(!p.rr())return!1;if(!(i instanceof j||i instanceof Ot))return u.error(Ct.EE),!1;const t=i instanceof Ot?N.om:N.On;return Z.ra().Dt(i,t).lt}function cn(i){if(!p.rr())return!1;if(!(i instanceof j))return u.error(Ct.EE),!1;const t=Z.ra().Dt(i,N.Hn);if(t){i.sm()||Ze(i);for(let e=0;e<t.Ce.length;e++)H.o().Ee(W.rm,[i.triggerId],t.Ce[e])}return t.lt}const Mt={PORTRAIT:0,LANDSCAPE:1};function hn(){return screen.width<=600}function dn(){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 fn(i,t,e){i&&(t||e!=null&&e.metaKey?window.open(i):window.location=i)}function pn(){return window.location.href}const re={openUri:fn,pa:hn,fa:dn,Qh:pn};function Ws(){if(p.rr())return p.zr()}function Ue(i,t,e){if(p.rr())if(be.test(i)){const s=as(i);if(!s)return;const n=r=>{if(!zs(r))return void u.error(`Decoded Braze Action json is invalid: ${JSON.stringify(r,null,2)}`);const a=C.properties.type,o=C.properties.eo,l=C.properties.so,c=r[a];if(c===C.types.io){const h=r[o];for(const d of h)n(d)}else{const h=r[l];let d,b;switch(c){case C.types.logCustomEvent:xt(async()=>{const{logCustomEvent:g}=await Promise.resolve().then(()=>hi);return{logCustomEvent:g}},void 0).then(({logCustomEvent:g})=>{p.ao()?(b=Array.prototype.slice.call(h),g(...b)):u.error(G.ee)});break;case C.types.requestPushPermission:xt(async()=>{const{requestPushPermission:g}=await Promise.resolve().then(()=>bi);return{requestPushPermission:g}},void 0).then(({requestPushPermission:g})=>{p.ao()?ct.browser==="Safari"&&ct.OS===Tt.co?window.navigator.standalone&&g():g():u.error(G.ee)});break;case C.types.setEmailNotificationSubscriptionType:case C.types.setPushNotificationSubscriptionType:case C.types.setCustomUserAttribute:case C.types.addToSubscriptionGroup:case C.types.removeFromSubscriptionGroup:case C.types.addToCustomAttributeArray:case C.types.removeFromCustomAttributeArray:d=Ws(),d&&d[c](...Array.prototype.slice.call(h));break;case C.types.mo:case C.types.uo:b=Array.prototype.slice.call(h),re.openUri(...b);break;default:u.info(`Ignoring unknown Braze Action: ${c}`)}}};n(s)}else re.openUri(i,t,e)}function Br(i,t){Ue(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 r=s[n].split("=");r[0]!==""&&(e[r[0]]=r[1])}}return e}function Qe(i){return!(!i||(i=i.toString().toLowerCase()).lastIndexOf("javascript:",0)!==0&&i.lastIndexOf("data:",0)!==0)}function ts(i,t,e){if(!p.rr())return!1;if(!(i instanceof Bt))return u.error("inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object."),!1;let s=N.Hn;t!=null&&(s=N.Jn);const n=Z.ra().Dt(i,s,t,e);if(n.lt)for(let r=0;r<n.Ce.length;r++)H.o().Ee(W.rm,[i.triggerId,t],n.Ce[r]);return n.lt}const As=(i,t,e,s)=>{const n=e.getAttribute("href"),r=e.onclick;return a=>{if(r!=null&&typeof r=="function"&&r.bind(e)(a)===!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",c=s||i.openTarget===we.BLANK||l,h=()=>{ts(i,o,n),re.openUri(n,c,a)};c?h():i.tl(t,h)}else ts(i,o,n||void 0);return a.stopPropagation(),!1}},Qs=(i,t)=>{const e={display:{},web:{}},s=function(){return function(){const y=arguments;xt(()=>Promise.resolve().then(()=>bi),void 0).then(S=>{p.ao()?S.requestPushPermission(...Array.prototype.slice.call(y)):u.error(G.ee)})}},n={requestImmediateDataFlush:function(){const y=arguments;xt(async()=>{const{requestImmediateDataFlush:S}=await Promise.resolve().then(()=>gr);return{requestImmediateDataFlush:S}},void 0).then(({requestImmediateDataFlush:S})=>{p.ao()?S(...Array.prototype.slice.call(y)):u.error(G.ee)})},logCustomEvent:function(){const y=arguments;xt(async()=>{const{logCustomEvent:S}=await Promise.resolve().then(()=>hi);return{logCustomEvent:S}},void 0).then(({logCustomEvent:S})=>{if(!p.ao())return void u.error(G.ee);S(...Array.prototype.slice.call(y))})},logPurchase:function(){const y=arguments;xt(async()=>{const{logPurchase:S}=await Promise.resolve().then(()=>br);return{logPurchase:S}},void 0).then(({logPurchase:S})=>{if(!p.ao())return void u.error(G.ee);S(...Array.prototype.slice.call(y))})},unregisterPush:function(){const y=arguments;xt(async()=>{const{unregisterPush:S}=await Promise.resolve().then(()=>rr);return{unregisterPush:S}},void 0).then(({unregisterPush:S})=>{p.ao()?S(...Array.prototype.slice.call(y)):u.error(G.ee)})},requestPushPermission:s(),changeUser:function(){const y=arguments;xt(async()=>{const{changeUser:S}=await Promise.resolve().then(()=>tr);return{changeUser:S}},void 0).then(({changeUser:S})=>{if(!p.ao())return void u.error(G.ee);S(...Array.prototype.slice.call(y))})}},r=function(y){return function(){n[y](...Array.prototype.slice.call(arguments))}};for(const y of lt(n))e[y]=r(y);const a=["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=Ws();S&&S[y](...Array.prototype.slice.call(arguments))}},l={};for(let y=0;y<a.length;y++)l[a[y]]=o(a[y]);e.getUser=function(){return l};const c={},h=function(y){return function(){const S=arguments;typeof t!="function"?c[y](...Array.prototype.slice.call(S)):t(i,function(){c[y](...Array.prototype.slice.call(S))})}},d=e.display;for(const y of lt(c))d[y]=h(y);const b={registerAppboyPushMessages:s()},g=function(y){return function(){b[y](...Array.prototype.slice.call(arguments))}},w=e.web;for(const y of lt(b))w[y]=g(y);
2return e.NotificationSubscriptionTypes=P.NotificationSubscriptionTypes,e},ks=(i,t,e)=>{const s=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${e}['"]\\)`,n=i.match(new RegExp(s));if(n){const r=`${n[1]}.setAttribute("nonce", "${t}")`;return`${i.slice(0,n.index+n[0].length)};${r};${i.slice(n.index+n[0].length)}`}return null},ti=(i,t,e)=>{let s=null;if(e!=null){s=document.createElement("html"),s.innerHTML=t||"";const n=s.getElementsByTagName("style");for(let a=0;a<n.length;a++)n[a].setAttribute("nonce",e);const r=s.getElementsByTagName("script");for(let a=0;a<r.length;a++){r[a].setAttribute("nonce",e),r[a].innerHTML=r[a].innerHTML.replace(/<style>/g,`<style nonce='${e}'>`);const o=ks(r[a].innerHTML,e,"script");o&&(r[a].innerHTML=o);const l=ks(r[a].innerHTML,e,"style");l&&(r[a].innerHTML=l)}}i.srcdoc=s?s.innerHTML:t||""};function bn(i,t,e,s,n){const r=document.createElement("iframe");if(r.setAttribute("title","Modal Message"),s&&(r.style.zIndex=(s+1).toString()),ti(r,i.message,n),r.onload=()=>{const a=r.contentWindow;a.focus();const o=a.document.getElementsByTagName("head")[0];if(o!=null){if(i.Mo()){const b=document.createElement("style");b.innerHTML=i.css||"",b.id=i.Co()||"",n!=null&&b.setAttribute("nonce",n),o.appendChild(b)}const d=a.document.createElement("base");d!=null&&(d.setAttribute("target","_parent"),o.appendChild(d))}const l=a.document.getElementsByTagName("title");l&&l.length>0&&r.setAttribute("title",l[0].textContent||"");const c=Object.assign(Object.assign({},Qs(r,(d,b)=>i.tl(d,b))),{closeMessage:function(){i.tl(r)},logClick:function(){ts(i,...arguments)}});if(a.appboyBridge=c,a.brazeBridge=c,i.Oo!==X.CE){const d=a.document.getElementsByTagName("a");for(let g=0;g<d.length;g++)d[g].onclick=As(i,r,d[g],e);const b=a.document.getElementsByTagName("button");for(let g=0;g<b.length;g++)b[g].onclick=As(i,r,b[g],e)}const h=a.document.body;if(h!=null){i.ko()&&(h.id=i.htmlId||"");const d=document.createElement("hidden");d.onclick=c.closeMessage,d.className="ab-programmatic-close-button",h.appendChild(d)}a.dispatchEvent(new CustomEvent("ab.BridgeReady")),r.className.indexOf("ab-start-hidden")!==-1&&(r.className=r.className.replace("ab-start-hidden",""),t(r))},r.className="ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions",ct.OS===Tt.co){const a=document.createElement("div");return a.className="ab-ios-scroll-wrapper",a.appendChild(r),i.Bo=a,a}return i.Bo=r,r}function mn(i,t){var e;if(!p.rr())return!1;if(!(i instanceof $t))return u.error("button must be an InAppMessageButton object"),!1;if(!(t instanceof j))return u.error(Ct.EE),!1;const s=Z.ra().Ln(i,t);if(s.lt)for(let n=0;n<s.Ce.length;n++)H.o().Ee(W.rm,[t.triggerId,(e=i.id)===null||e===void 0?void 0:e.toString()],s.Ce[n]);return s.lt}const qe={Ho: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",r=>{const a=document.activeElement;r.keyCode===kt.No&&(r.shiftKey||a!==n&&a!==i?!r.shiftKey||a!==s&&a!==i||(r.preventDefault(),n.focus()):(r.preventDefault(),s.focus()))})}},Io:(i,t)=>{t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),i?t.setAttribute("aria-labelledby",i):t.setAttribute("aria-label","Modal Message")},Go:(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 r=a=>o=>(i.tl(t,()=>{mn(a,i),a.clickAction===Pt.URI&&Ue(a.uri||"",e||i.openTarget===we.BLANK,o)}),o.stopPropagation(),!1);for(let a=0;a<i.buttons.length;a++){const o=i.buttons[a],l=document.createElement("button");l.className="ab-message-button",l.setAttribute("type","button"),ne(l,"touchstart");let c=o.text;o.text===""&&(c="Â "),l.appendChild(document.createTextNode(c)),i.Mo()||(l.style.backgroundColor=Et(o.backgroundColor),l.style.color=Et(o.textColor),l.style.borderColor=Et(o.borderColor)),l.onclick=r(o),s.appendChild(l)}}}};function gn(i,t,e,s,n,r,a=document.body,o="ltr"){if(i.$o=document.activeElement,i instanceof Bt)return bn(i,t,s,n,r);const l=(function(c,h,d,b,g,w=document.body,y="ltr"){let S=null;const E=document.createElement("div");E.dir=y,E.className="ab-in-app-message ab-start-hidden ab-background",g&&(E.style.zIndex=(g+1).toString()),c.zo()&&(E.className+=" ab-modal-interactions",E.setAttribute("tabindex","-1")),c.Mo()||(E.style.color=Et(c.textColor),E.style.backgroundColor=Et(c.backgroundColor),un(c.backgroundColor)&&(E.className+=" ab-no-shadow"));const x=()=>{E.className.indexOf("ab-start-hidden")!==-1&&(E.className=E.className.replace("ab-start-hidden",""),document.querySelectorAll(".ab-iam-img-loading").length>0?d(`Cannot show in-app message ${c.message} because another message is being shown.`):h(E))},k=(A=!0)=>{let O=document.querySelectorAll(".ab-iam-root");
2if(O&&O.length!==0||(O=w.querySelectorAll(".ab-iam-root")),O&&O.length>0)if(O[0].classList.remove("ab-iam-img-loading"),S&&(clearTimeout(S),S=null),A)x();else{const at=`Cannot show in-app message ${c.message} because the image failed to load.`;d(at)}};if(c.imageStyle===hs.GRAPHIC&&(E.className+=" graphic"),c.orientation===Kt.LANDSCAPE&&(E.className+=" landscape"),c.buttons!=null&&c.buttons.length===0){c.clickAction!==Pt.NONE&&(E.className+=" ab-clickable");const A=O=>(c.tl(E,()=>{cn(c),c.clickAction===Pt.URI&&Ue(c.uri||"",b||c.openTarget===we.BLANK,O)}),O.stopPropagation(),!1);E.onclick=A,E.addEventListener("keydown",O=>{if(O.keyCode===kt.Lo||O.keyCode===kt.To)return A(O)})}const R=Js("Close Message",c.Mo()?void 0:Et(c.closeButtonColor),()=>{c.tl(E)},y);E.appendChild(R),g&&(R.style.zIndex=(g+2).toString());const D=document.createElement("div");D.className="ab-message-text",D.dir=y,D.setAttribute("role","article");const F=(c.messageAlignment||c.qo).toLowerCase();D.className+=" "+F+"-aligned";let M=!1;const z=document.createElement("div");if(z.className="ab-image-area",c.imageUrl){const A=document.createElement("img");if(A.setAttribute("src",c.imageUrl),c.Ao(A),document.querySelectorAll(".ab-iam-img-loading").length===0){M=!0;const O=document.querySelectorAll(".ab-iam-root");O&&O.length>0&&O[0].classList.add("ab-iam-img-loading"),S=window.setTimeout(()=>{k(!1)},6e4),A.onload=()=>{k()},A.onerror=()=>{k(!1)}}if(c.cropType===Se.CENTER_CROP){const O=document.createElement("div");O.className="ab-center-cropped-img",O.appendChild(A),z.appendChild(O)}else z.appendChild(A);E.appendChild(z),D.className+=" ab-with-image"}else if(c.icon){z.className+=" ab-icon-area";const A=document.createElement("span");A.className="ab-icon",c.Mo()||(A.style.backgroundColor=Et(c.iconBackgroundColor),A.style.color=Et(c.iconColor));const O=document.createElement("i");O.className="fa",O.appendChild(document.createTextNode(c.icon)),O.setAttribute("aria-hidden","true"),A.appendChild(O),z.appendChild(A),E.appendChild(z),D.className+=" ab-with-icon"}if(ne(D,"touchstart"),c.header&&c.header.length>0){const A=document.createElement("h1");A.className="ab-message-header",c.Do=Dt.de(),A.id=c.Do;const O=(c.headerAlignment||jt.CENTER).toLowerCase();A.className+=" "+O+"-aligned",c.Mo()||(A.style.color=Et(c.headerTextColor)),A.appendChild(document.createTextNode(c.header)),D.appendChild(A)}const Y=c.Eo();return D.appendChild(Y),E.appendChild(D),M||x(),c.Bo=E,E})(i,t,e,s,n,a,o);if(i instanceof Xt||i instanceof ce){const c=i instanceof Xt?"ab-fullscreen":"ab-modal";l.className+=` ${c} ab-centered`,qe.Go(i,l,s),qe.Ho(l),qe.Io(i.Do,l)}else if(i instanceof Zt){l.className+=" ab-slideup",l.setAttribute("tabindex","0"),l.setAttribute("role","alert");const c=l.getElementsByClassName("ab-close-button")[0];if(c!=null){const b=qs("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:Et(i.closeButtonColor));b.setAttribute("class",`ab-chevron ${o}`),c.appendChild(b)}let h,d;fe(l,Nt.ie,b=>{l.className+=" ab-swiped-left",c!=null&&c.onclick!=null&&c.onclick(b)}),fe(l,Nt.ne,b=>{l.className+=" ab-swiped-right",c!=null&&c.onclick!=null&&c.onclick(b)}),i.slideFrom===ye.TOP?(h=Nt.Jo,d=" ab-swiped-up"):(h=Nt.Ko,d=" ab-swiped-down"),fe(l,h,b=>{l.className+=d,c!=null&&c.onclick!=null&&c.onclick(b)})}return l}const Ve={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 noc
2h 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/>Fö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 vn{constructor(t,e=!1){if(this.language=t,t!=null&&(t=t.toLowerCase()),t!=null&&Ve[t]==null){const s=t.indexOf("-");s>
20&&(t=t.substring(0,s))}if(Ve[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?u.error(s):u.info(s),t="en"}this.language=t}get(t){return Ve[this.language][t]}ga(){switch(this.language){case"ar":case"he":case"fa":return"rtl";default:return"ltr"}}}const gt={i:!1,na:null,ra:()=>{if(gt.t(),!gt.na){let i=ct.language,t=!1;p.er(T.Ma)&&(i=p.er(T.Ma),t=!0),gt.na=new vn(i,t)}return gt.na},t:()=>{gt.i||(p.g(gt),gt.i=!0)},destroy:()=>{gt.na=null,gt.i=!1}};function yn(i,t,e){if(!p.rr())return;if(Xs(),i==null)return!1;if(i instanceof Ot)return u.info("User received control for a multivariate test, logging to Braze servers."),Ze(i),!0;if(!(i instanceof j)||i.constructor===j)return!1;i.uh();const s=i instanceof Bt;if(s&&!i.trusted&&!p.dr())return u.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, .${xs}`).length>0)return u.info(`Cannot show in-app message ${i.message} because another message is being shown.`),!1;if(re.pa()){const o=re.fa();if(o===Mt.PORTRAIT&&i.orientation===Kt.LANDSCAPE||o===Mt.LANDSCAPE&&i.orientation===Kt.PORTRAIT){const l=o===Mt.PORTRAIT?"portrait":"landscape",c=i.orientation===Kt.PORTRAIT?"portrait":"landscape";return u.info(`Not showing ${c} in-app message ${i.message} because the screen is currently ${l}`),!1}}if(!p.dr()){let o=!1;if(i.buttons&&i.buttons.length>0){const l=i.buttons;for(let c=0;c<l.length;c++)if(l[c].clickAction===Pt.URI){const h=l[c].uri;if(Qe(h)){o=!0;break}}}else i.clickAction===Pt.URI&&(o=Qe(i.uri));if(o)return u.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",i.zo()&&(n.className+=` ${xs}`),n.className+=ln(i),i.language&&!s&&(n.lang=i.language),i.ko()&&(n.id=i.htmlId),p.er(T.ca)&&(n.style.zIndex=(p.er(T.ca)+1).toString()),t.appendChild(n),i.Mo()){const o=document.createElement("style");o.innerHTML=i.css,o.id=i.Co(),p.er(T.sr)!=null&&o.setAttribute("nonce",p.er(T.sr)),document.getElementsByTagName("head")[0].appendChild(o)}const r=i instanceof Zt,a=gn(i,o=>{if(i.zo()&&i.od()){const l=document.createElement("div");if(l.className="ab-page-blocker",i.Mo()||(l.style.backgroundColor=Et(i.frameColor)),p.er(T.ca)&&(l.style.zIndex=p.er(T.ca).toString()),n.appendChild(l),!p.er(T.lh)){const c=new Date().valueOf();l.onclick=h=>{new Date().valueOf()-c>ge.sE&&(i.tl(o),h.stopPropagation())}}n.appendChild(o),o.focus(),i.nh(n)}else if(r){const l=document.querySelectorAll(".ab-slideup");let c=null;for(let h=l.length-1;h>=0;h--)if(l[h]!==o){c=l[h];break}if(i.slideFrom===ye.TOP){let h=0;c!=null&&(h=c.offsetTop+c.offsetHeight),o.style.top=Math.max(h,0)+"px"}else{let h=0;c!=null&&(h=(window.innerHeight||document.documentElement.clientHeight)-c.offsetTop),o.style.bottom=Math.max(h,0)+"px"}}else if(s&&!p.er(T.lh)){const l=i;Vs(o)&&o.contentWindow&&o.contentWindow.addEventListener("keydown",function(c){c.keyCode===kt.oh&&l.closeMessage()})}Ze(i),i.dismissType===ue.AUTO_DISMISS&&setTimeout(()=>{n.contains(o)&&i.tl(o)},i.duration),typeof e=="function"&&e()},o=>{u.info(o),n.parentNode&&n.parentNode.removeChild(n)},p.er(T.da),p.er(T.ca),p.er(T.sr),t,gt.ra().ga());return(s||r)&&(n.appendChild(a),i.nh(n)),!0}function wn(i){if(p.rr())return typeof i!="function"?null:Z.ra().En(function(t){return i(t[0]),t.slice(1)})}function Mr(){if(!p.rr())return;Xs();const i=Z.ra();if(i.Gn()==null){const t=wn(e=>yn(e));i.Nn(t)}return i.Gn()}function Ur(i){if(p.rr())return i instanceof Ot?(u.info("Not deferring since this is a ControlMessage."),!1):i instanceof j?Z.ra().An(i):(u.info("Not an instance of InAppMessage, ignoring."),!1)}function zr(){if(p.rr())return Z.ra().sa()}class Sn{constructor(t,e,s,n){this.B=t,this.C=e,this.j=s,this.Ss=n,this.B=t,this.C=e,this.j=s,this.Ss=n,this.In=new q,p.S(this.In),this.Tn=1e3,this.Dn=6e4,this.zn=null,this.Bn=null,this._n=null,this.qn={}}
2Pn(){return this.In}En(t){return this.In.Ut(t)}Gn(){return this.zn}Nn(t){this.zn=t}Dt(t,e,s,n){const r=new Ut;let a;if(e===N.On||t instanceof Ot){if(!t.js())return u.info("This in-app message has already received an impression. Ignoring analytics event."),r;if(this.Xn(t.triggerId))return u.info("An impression for this in-app message trigger has already been logged. Ignoring analytics event."),r}else if((e===N.Hn||t instanceof Bt&&e===N.Jn)&&!t.Yt(n))return u.info("This in-app message has already received a click. Ignoring analytics event."),r;return a=t instanceof Ot?{trigger_ids:[t.triggerId]}:this.Kn(t),a==null?r:(t.messageExtras&&(a.message_extras=t.messageExtras),s!=null&&(a.bid=s),V.Dt(e,a))}Ln(t,e){const s=new Ut;if(!t.Yt())return u.info("This in-app message button has already received a click. Ignoring analytics event."),s;const n=this.Kn(e);return n==null?s:t.id===$t.Qn?(u.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),V.Dt(N.Jn,n))}Un(t){const e=t.messageFields;return e!=null&&e.is_push_primer||!1}Vn(t){if(!(t instanceof j))return;const e=r=>{if(!r)return;const a=as(r);if(os(a))return Bs(rs.Wn,"In-App Message");if(Us(a)){const o=U.Yn();if(!o.Zn)return U.So(o.reason,"In-App Message")}};if(this.Un(t)){const r=U.Yn();if(!r.Zn)return U.So(r.reason,"In-App Message")}const s=t.buttons||[];let n;for(const r of s)if(r.clickAction===Pt.URI&&r.uri&&be.test(r.uri)&&(n=e(r.uri),n))return n;return t.clickAction===Pt.URI&&t.uri&&be.test(t.uri)?e(t.uri):void 0}Ro(t,e){e!==this._n&&this._o(),this.Bn=t,this._n=e}_o(){this.Bn!=null&&(clearTimeout(this.Bn),this.Bn=null,this._n=null)}Po(t,e,s,n){const r=this.B;if(!r)return;this._n&&t.triggerId!==this._n&&(this._o(),I.Ji(this.j,I.it.Xo));const a=r.Qo(!1),o=r.Z(a);o.template={trigger_id:t.triggerId,trigger_event_type:e},s!=null&&(o.template.data=s.Uo());const l=r.tt(o,I.it.Xo);r.et(o,(c=-1)=>{const h=this.B;if(!h)return;const d=new Date().valueOf();I.nt(this.j,I.it.Xo,d),c!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",c.toString()]);let b,g,w=!1;Wt.ot({url:`${h.ht()}/template/`,data:o,headers:l,lt:y=>{if(!h.ut(o,y,l))return void(typeof t.Vo=="function"&&t.Vo());if(h.ct(),y==null||y.templated_message==null)return;const S=y.templated_message;if(S.type!==ht.Yo.Wo)return;const E=Ks(S.data);if(E==null)return;const x=this.Vn(E);if(x)return u.error(x),void(typeof t.Vo=="function"&&t.Vo());typeof t.Zo=="function"&&t.Zo(E)},error:y=>{w=!0,b=y,g=`getting user personalization for message ${t.triggerId}.`},ft:(y,S)=>{if(new Date().valueOf()-t.ta<t.ia){let E=0;if(w){const x=Math.min(t.ia,this.Dn),k=this.Tn;n==null&&(n=k),E=Math.min(x,Ht(k,3*n))}h.yt(S,()=>{this.Po(t,e,s,E)},I.it.Xo,x=>this.Ro(x,t.triggerId),()=>this._o(),E)}w&&h.dt(b,g)}})},I.it.Xo)}Xn(t){if(t==null||t==="")return!1;const e=new Date().valueOf(),s=this.qn[t];return s!=null&&e-s<ge.aE||(this.qn[t]=e,!1)}oa(){this.qn={}}
2Kn(t){if(t.triggerId==null)return u.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}An(t){return!!this.j&&!(!(t&&t instanceof j&&t.constructor!==j)||t instanceof Ot)&&this.j.Pt(f.It.la,t.qt())}sa(){if(!this.j)return null;const t=this.j.St(f.It.la);if(!t)return null;let e;switch(t.type){case X.oE:e=Xt.ua(t);break;case X.ME:case X.CE:case X.DE:e=Bt.ua(t);break;case X.tE:case X.eE:e=ce.ua(t);break;case X.RE:e=Zt.ua(t)}return e&&this.ma(),e}ma(){this.j&&this.j.Vt(f.It.la)}}const Z={na:null,i:!1,ra:()=>(Z.t(),Z.na||(Z.na=new Sn(p.m(),p.u(),p.p(),p.ir())),Z.na),t:()=>{Z.i||(p.g(Z),Z.i=!0)},destroy:()=>{Z.na=null,Z.i=!1}};class fs{constructor(t,e,s,n,r){this.triggerId=t,this.Zo=e,this.Vo=s,this.ta=n,this.ia=r,this.triggerId=t,this.Zo=e,this.Vo=s,this.ta=n,this.ia=r}static fromJson(t,e,s,n,r){return t==null||t.trigger_id==null?null:new fs(t.trigger_id,e,s,n,r)}}class En extends le{constructor(t,e,s,n,r){super(),this.tg=t,this.Rs=e,this.j=s,this.Ru=n,this.ig=r,this.tg=t,this.Rs=e,this.j=s,this.Ru=n,this.ig=r,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.j){this.hg=this.j.St(f.It.iS)||this.hg,this.ng=this.j.St(f.It.SS)||this.ng,this.og=this.j.St(f.It.aS)||this.og;for(let t=0;t<this.triggers.length;t++){const e=this.triggers[t];e.id&&this.og[e.id]!=null&&e.Ad(this.og[e.id])}}}ag(){if(!this.j)return;this.lg=this.j.St(f.It.nS)||0;const t=this.j.St(f.It.oS)||[],e=[];for(let s=0;s<t.length;s++)e.push(ht._u(t[s]));this.triggers=e,this.fg()}gg(){const t=this,e=function(r,a,o,l,c){return function(){t.cg(r,a,o,l,c)}},s={};for(const r of this.triggers)r.id&&(s[r.id]=r);let n=!1;for(let r=0;r<this.triggers.length;r++){const a=this.triggers[r];if(a.id&&this.ng[a.id]!=null){const o=this.ng[a.id],l=[];for(let c=0;c<o.length;c++){const h=o[c],d=a.Id(h.ta||0);if(d>0){let b,g;l.push(h),h.ug!=null&&(b=h.ug),h.dg!=null&&bt.RS(h.dg)&&(g=bt._u(h.dg));const w=[];if(h.pg&&B(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(a,h.ta||0,b,g,w),d))}}this.ng[a.id].length>l.length&&(this.ng[a.id]=l,n=!0,this.ng[a.id].length===0&&delete this.ng[a.id])}}n&&this.j&&this.j.Pt(f.It.SS,this.ng)}mg(){if(!this.j)return;const t=[];for(let e=0;e<this.triggers.length;e++)t.push(this.triggers[e].qt());this.lg=new Date().valueOf(),this.j.Pt(f.It.oS,t),this.j.Pt(f.It.nS,this.lg)}bg(){this.j&&((this.j.St(f.It.nS)||0)>this.lg?this.ag():this.fg())}q(t){let e=!1;if(t!=null&&t.triggers){this.ig.ma(),this.fg();const s={},n={};this.triggers=[];for(let o=0;o<t.triggers.length;o++){const l=ht.fromJson(t.triggers[o]);if(l){l.id&&this.og[l.id]!=null&&(l.Ad(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 c=0;c<l.Dd.length;c++)if(l.Dd[c]._c(W.Os,null)){e=!0;break}this.triggers.push(l)}}
2Yt(this.og,s)||(this.og=s,this.j&&this.j.Pt(f.It.aS,this.og)),Yt(this.ng,n)||(this.ng=n,this.j&&this.j.Pt(f.It.SS,this.ng)),this.mg(),e&&(u.info("Trigger with test condition found, firing test."),this.Ee(W.Os)),this.Ee(W.OPEN);const r=this.sg;let a;this.sg=[];for(let o=0;o<r.length;o++)a=Array.prototype.slice.call(r[o]),this.Ee(...a)}}cg(t,e,s,n,r){const a=d=>{this.fg();const b=new Date().valueOf();t.$d(e)||(navigator.onLine===!1&&t.type===ht.Yo.Wo&&d.imageUrl?u.info(`Not showing ${t.type} trigger action ${t.id} due to offline state.`):t._d(b)&&this.wg(t,b,s)?this.Rs.an()===0?u.info(`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Rs.A([d]),this.yg(t,b)):u.info(`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`))},o=()=>{this.fg();const d=r.pop();if(d!=null)if(this.Tg(d,e,s,n,r),d.$d(e)){let b=`Server aborted in-app message display, but the timeout on fallback trigger ${d.id} has already elapsed.`;r.length>0&&(b+=" Continuing to fall back."),u.info(b),o()}else{u.info(`Server aborted in-app message display. Falling back to lower priority ${d.type} trigger action ${t.id}.`);const b=1e3*d.Pd-(new Date().valueOf()-e);b>0?this.eg.push(window.setTimeout(()=>{this.cg(d,e,s,n,r)},b)):this.cg(d,e,s,n,r)}};let l,c,h;switch(t.type){case ht.Yo.Wo:if(l=Ks(t.data),l==null){u.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}if(c=this.ig.Vn(l),c){u.error(c),o();break}a(l);break;case ht.Yo.xd:if(h=fs.fromJson(t.data,a,o,e,t.ia||0),h==null){u.error(`Could not parse trigger data for trigger ${t.id}, ignoring.`);break}this.ig.Po(h,s,n);break;default:u.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`)}}Ee(t,e=null,s){if(!_t(W,t,"Cannot fire trigger action.","TriggerEvents"))return;if(this.Ru&&this.Ru.yc())return u.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(),r=n-(this.hg||0);let a=!0,o=!0;const l=[];for(let h=0;h<this.triggers.length;h++){const d=this.triggers[h],b=n+1e3*d.Pd;if(d._d(b)&&(d.startTime==null||d.startTime.valueOf()<=n)&&(d.endTime==null||d.endTime.valueOf()>=n)){let g=!1;for(let w=0;w<d.Dd.length;w++)if(d.Dd[w]._c(t,e)){g=!0;break}g&&(a=!1,this.wg(d,b,t)&&(o=!1,l.push(d)))}}if(a)return void u.info(`Trigger event ${t} did not match any trigger conditions.`);if(o)return void u.info(`Ignoring ${t} trigger event because a trigger was displayed ${r/1e3}s ago.`);l.sort((h,d)=>h.priority-d.priority);const c=l.pop();c!=null&&(u.info(`Firing ${c.type} trigger action ${c.id} from trigger event ${t}.`),this.Tg(c,n,t,s,l),c.Pd===0?this.cg(c,n,t,s,l):this.eg.push(window.setTimeout(()=>{this.cg(c,n,t,s,l)},1e3*c.Pd)))}changeUser(t=!1){if(this.triggers=[],this.j&&this.j.Vt(f.It.oS),!t){this.sg=[],this.hg=null,this.og={},this.ng={},this.ig&&this.ig.oa();for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[],this.j&&(this.j.Vt(f.It.iS),this.j.Vt(f.It.aS),this.j.Vt(f.It.SS))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={},this.ig&&this.ig.oa();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===W.Os)return u.info("Ignoring minimum interval between trigger because it is a test type."),!0;let n=t.jd;return n==null&&(n=this.tg),e-this.hg>=1e3*n}Tg(t,e,s,n,r){this.fg(),t.id&&(this.ng[t.id]=this.ng[t.id]||[]);const a={};let o;a.ta=e,a.ug=s,n!=null&&(o=n.qt()),a.dg=o;const l=[];for(const c of r)c.id&&l.push(c.id);a.pg=l,t.id&&this.ng[t.id].push(a),this.j&&this.j.Pt(f.It.SS,this.ng)}yg(t,e){this.fg(),t.Ad(e),this.hg=e,t.id&&(this.og[t.id]=e),this.j&&(this.j.Pt(f.It.iS,e),this.j.Pt(f.It.aS,this.og))}}const H={i:!1,provider:null,o:()=>(H.t(),H.provider||H.rg(),H.provider),rg:()=>{if(!H.provider){const i=p.er(T.Dh);H.provider=new En(i??30,Z.ra().Pn(),p.p(),p.nn(),Z.ra()),p.v(H.provider)}},t:()=>{H.i||(H.rg(),p.g(H),H.i=!0)},destroy:()=>{H.provider=null,H.i=!1}},xn=15;function In(i,t,e,s,n){const r=/^https?:\/\//i.test(i)?i:`https://${i}`;let a=`mite=${encodeURIComponent(t)}&attempts=${e}`;return s&&(a+=`&auth=${encodeURIComponent(s)}`),n&&(a+=`&rcs=${encodeURIComponent(n)}`),`${r}/sse?${a}`}const _s=[f.It._i,f.It.Oi,f.It.Gi,f.It.Hi];function ei(i){return!!i&&Math.floor(new Date().valueOf()/1e3)>=i}function Ts(i){return!!(i.Ki&&i.host)&&!ei(i.expiration)}class An{constructor(t){this.j=t,this.j=t,this.Vi=null,this.Wi=null}read(){return this.j?{Ki:this.j.St(f.It._i),host:this.j.St(f.It.Oi),Qi:this.j.St(f.It.Gi),expiration:this.j.St(f.It.Hi)}:{Ki:null,host:null,Qi:null,expiration:null}}write(t){const e=this.j;e&&(e.Pt(f.It._i,t.Ki),e.Pt(f.It.Oi,t.host),t.Qi?e.Pt(f.It.Gi,t.Qi):e.Vt(f.It.Gi),t.expiration?e.Pt(f.It.Hi,t.expiration):e.Vt(f.It.Hi))}clear(){const t=this.j;t&&(t.Vt(f.It._i),t.Vt(f.It.Oi),t.Vt(f.It.Gi),t.Vt(f.It.Hi))}Yi(){const t=this.j;if(!t)return Dt.de();const e=t.St(f.It.Zi),s=new Date().valueOf();if(e&&typeof e.e=="number"&&e.e>s)return null;const n=Dt.de();t.Pt(f.It.Zi,{t:n,e:s+2e3});const r=t.St(f.It.Zi);
2return r&&r.t===n?n:null}we(t){const e=this.j;if(!e)return;const s=e.St(f.It.Zi);s&&s.t!==t||e.Vt(f.It.Zi)}xe(t,e){if(this.Vi||this.Wi!==null)return!1;const s=this.read();if(Ts(s))return t(s),!0;const n=new Date().valueOf()+2e3,r=()=>{const a=this.read();if(Ts(a))return this.Le(),void t(a);new Date().valueOf()>=n&&(this.Le(),u.info("Timed out waiting for another tab to refresh real-time messaging configuration"),e())};return this.Vi=a=>{if(a.key){for(let o=0;o<_s.length;o++)if(a.key.indexOf(_s[o])===0)return void r()}},window.addEventListener("storage",this.Vi),this.Wi=window.setInterval(r,100),!0}Le(){this.Vi&&(window.removeEventListener("storage",this.Vi),this.Vi=null),this.Wi!==null&&(window.clearInterval(this.Wi),this.Wi=null)}destroy(){this.Le()}}const kn=["ccr","ffr","tgr"];class _n{constructor(t){this.j=t,this.j=t}Mr(t){const e=this.j;if(!e||!(function(o){for(const l of kn)if(l===o)return!0;return!1})(t))return!0;const s=new Date().valueOf(),n=e.St(f.It._r);if(n&&this.Ir(n[t],s))return!1;const r={};if(n)for(const o in n)this.Ir(n[o],s)&&(r[o]=n[o]);r[t]=s,e.Pt(f.It._r,r);const a=e.St(f.It._r);return!a||a[t]===s}Wr(){this.j&&this.j.Vt(f.It._r)}Ir(t,e){return typeof t=="number"&&Math.abs(e-t)<500}}const Cs="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Tn(i){if(!i)return!1;for(let t=0;t<i.length;t++)if(!Di(i.charAt(t)))return!1;return!0}function Cn(){let i="";for(let t=0;t<10;t++)i+=Cs.charAt(Math.floor(Math.random()*Cs.length));return i}function Nn(i,t){if(!i)return i;const e=i.split(":");return e.length<3?(u.warn("Real-time messaging identifier is not a full identifier, using it as-is"),i):Tn(t)?e[0]+":"+e[1]+":"+t:(u.warn("Generated per-tab real-time messaging identifier is invalid, using the shared identifier"),i)}class On extends le{constructor(t,e,s,n){super(),this.B=t,this.j=e,this.h=s,this.B=t,this.j=e,this.h=s,this.mite=null,this.ye=null,this.Se=null,this.Re=null,this.ke=n||null,this.Me=null,this.Fe=null,this.Ne=null,this.T=null,this.Te=0,this.De=xn,this.Ue=null,this.Ae=null,this.Ge=null,this.Ie=!0,this.Je=null,this.Oe=null,this.Pe=null,this.qe=null,this.Be=!1,this.ze=new Map,this.He=null,this.Ke=null,this.Ve=null,this.We=null,this._e=new An(e),this.Qe=null,this.Xe=new _n(e),this.Ye=!1,this.Ze()}sn(){return this.We||(this.We=Cn()),this.We}en(){this.Te=0,this.Je=null,this.Ie=!0}hn(){return this.Fe!==null&&this.Fe===this.Ve}on(t,e){const s=t.type;if(!s)return void u.warn(`Received real-time message without type: ${JSON.stringify(t)}`);if(u.info(`Received real-time message of type '${s}'`),s==="cir")return void this.ln(e||this.Fe);if(!this.Xe.Mr(s))return void u.info(`Another tab is handling the real-time message of type '${s}', skipping it`);const n=this.ze.get(s);if(n&&n.an()>0)try{n.A(t)}catch(r){u.error(`Error invoking subscription for message type '${s}': ${r}`)}else u.info(`No subscribers for real-time message type '${s}'`)}ln(t){t&&this.cn(t)&&(u.info("Real-time messaging connection is ready"),this.Ve=t)}un(t){this.Ve===t&&(this.Ve=null)}Ze(){if(!this.j)return;const t=this._e.read();t.mite&&t.host?(this.mite=t.mite,this.ye=t.host,this.Se=t.auth,this.Re=t.expiration,u.info("Restored real-time messaging configuration from storage")):(t.mite||t.host)&&(u.warn("Incomplete real-time messaging configuration in storage, clearing"),this.gn())}dn(){const t=this._e.read();t.mite&&t.host&&(t.auth!==this.Se&&u.info("Using real-time messaging configuration refreshed by another tab"),this.mite=t.mite,this.ye=t.host,this.Se=t.auth,this.Re=t.expiration)}Hr(){this.He||this.Ke||(this.He=this.mn("ddr",t=>{var e,s,n;const r=t.body;if(!r)return;const a=r.r_ms;if(typeof a!="number")return;const o=r.e,l=((e=this.h)===null||e===void 0?void 0:e.vt())||ee,c=((s=this.h)===null||s===void 0?void 0:s.gt())||se,h=((n=this.h)===null||n===void 0?void 0:n.bt())||ie,d=Math.min(h,Ht(l,l*c)),b=Math.round(a+d),g=o?` (${o})`:"";u.info(`Admin requested disconnect${g}, reconnecting in ${b}ms (r_ms=${a} + backoff=${d})`),this.fn(),this.Ge=window.setTimeout(()=>{this.Ge=null,this.pn()},b)}
2),this.Ke=this.mn("ttl",t=>{const e=t.body;if(!e)return;u.info(`ttl message: ${JSON.stringify(e)}`);const s=e.t_ms;if(typeof s!="number")return;const n=s;u.info(`Time to live set to ${n}ms, will reconnect when expired`);const r=e.rcs;typeof r=="string"&&(this.Me=r),this.Ae!==null&&window.clearTimeout(this.Ae),this.Ae=window.setTimeout(()=>{this.Ae=null,u.info("Time to live expired, performing gapless reconnection"),this.vn()},n)}))}wn(){this.Oe||this.Pe||(this.qe=()=>{this.Be=!0,this.Ie=!1},window.addEventListener("beforeunload",this.qe),this.Oe=()=>{this.Be=!0,this.we(),(this.Fe||this.Ne)&&(u.info("Page unloading, closing real-time connection gracefully"),this.Ie=!1,this.fn())},window.addEventListener("pagehide",this.Oe),this.Pe=t=>{t.persisted&&this.bn()&&!this.Fe&&!this.Ne&&(u.info("Page restored from bfcache, reconnecting"),this.Be=!1,this.en(),this.pn())},window.addEventListener("pageshow",this.Pe))}Et(){return this.T}Lt(t){this.T=t}mn(t,e){if(typeof e!="function")return null;let s=this.ze.get(t);return s||(s=new q,this.ze.set(t,s),p.S(s)),s.Ut(e)}yn(t,e){const s=this.ze.get(t);s&&s.removeSubscription(e)}bn(){return!!(this.mite&&this.ye)}Sn(){return ei(this.Re)}gn(){this.mite=null,this.ye=null,this.Se=null,this.Re=null,this.Me=null,this._e.clear()}Rn(t,e,s=!1){const n=()=>{typeof e=="function"&&e()},r=()=>{this.pn(),typeof t=="function"&&t()};if(this.Ye)return void n();const a=this.B,o=this.j;if(!a||!o)return u.error("NetworkManager or StorageManager not available"),void n();if(!this.h||!this.h.$n())return u.info("Real-time messaging is not enabled, skipping refresh"),void n();const l=this.Qe||this._e.Yi();if(!l&&!s)return u.info("Another tab is refreshing real-time messaging configuration, waiting for the result"),void this._e.xe(()=>{this.dn(),r()},()=>this.Rn(t,e,!0));this.Qe=l,this.bn()?u.info("Refreshing real-time messaging configuration"):u.info("Fetching initial real-time messaging configuration");const c=a.Z({},!0),h=a.tt(c,I.it.Cn),d=new Date().valueOf();I.nt(o,I.it.Cn,d),Wt.ot({url:`${a.ht()}/dust/config`,headers:h,data:c,lt:b=>{if(!this.Ye){if(this.we(),!a.ut(c,b,h))return u.error("Failed to validate server response for real-time messaging configuration"),void n();a.ct(),b.mite&&b.host?(this.mite=b.mite,this.ye=b.host,this.Se=b.auth||null,this.Re=b.expiration||null,u.info("Received real-time messaging configuration from server"),this._e.write({mite:this.mite,host:this.ye,auth:this.Se,expiration:this.Re}),r()):(u.info("Real-time messaging configuration not available - this SDK version may not be supported"),this.gn(),n())}},error:b=>{this.Ye||(this.we(),a.dt(b,"retrieving DUST config"),n())}})}we(){this.Qe&&(this._e.we(this.Qe),this.Qe=null)}pn(){if(!this.Ye&&this.h&&this.h.$n())if(this.Ne)u.info("Real-time messaging connection attempt already in progress");else{if(this.dn(),this.bn())return this.Sn()?(u.info("Real-time messaging auth token has expired, refreshing configuration"),void this.Rn(void 0,()=>{u.error("Failed to refresh expired real-time messaging configuration")})):void(this.kn()&&(this.ke||this.ye)&&(this.Fe&&(u.info("Real-time connection already exists, closing before starting new subscription"),this.fn()),this.jn()));u.error("Cannot start real-time subscription without configuration")}}kn(){return this.mite?Nn(this.mite,this.sn()):null}xn(){const t=this.kn(),e=this.ke||this.ye;return t&&e?In(e,t,this.Te,this.Se||void 0,this.Me||void 0):null}cn(t){return this.Fe===t||this.Ne===t}jn(t){if(this.Ye)return;const e=this.xn();if(e){this.ke&&u.info(`Using custom real-time messaging host: ${this.ke}`);try{const s=new EventSource(e);this.Ne=s,u.info(`createConnection: ${e}`),s.onopen=()=>{this.cn(s)?(this.Ne===s&&(this.Ne=null),t?(u.info("Gapless reconnection: new connection established, closing old connection"),t.close()):u.info("Real-time messaging connection established"),this.Fe=s,this.Ve!==s&&(this.Ve=null),this.Te=0,this.Je=null,this.Ie=!0):s.close()},s.addEventListener("msg",n=>{if(!this.cn(s))return u.info("Ignoring real-time message from superseded connection"),void s.close();this.Mn(n.data,s)}),s.onerror=()=>{const n=s.readyState;if(this.cn(s)){if(this.Be||(n===0?u.info("Real-time messaging failed to connect"):u.info("Real-time messaging connection lost")),t&&this.Fe!==s)return u.info("Gapless reconnection failed, keeping old connection"),s.close(),this.Ne===s&&(this.Ne=null),void(this.Ie&&this.Te<this.De&&this.Fn());if(this.Ne&&this.Fe===s)return s.close(),this.Fe=null,void this.un(s);this.fn(),this.Ie&&this.Te<this.De?this.Fn():(this.Te>=this.De&&u.error(`Max retry attempts (${this.De}) reached for real-time messaging, giving up for current session`),this.Ie=!1)}else s.close()}}catch(s){u.error(`Failed to create real-time messaging connection: ${s instanceof Error?s.message:String(s)}`)}}}Fn(){var t,e,s;this.Te++;const n=((t=this.h)===null||t===void 0?void 0:t.vt())||ee,r=((e=this.h)===null||e===void 0?void 0:e.gt())||se,a=((s=this.h)===null||s===void 0?void 0:s.bt())||ie;let o=this.Je;(o==null||o<n)&&(o=n);const l=Math.min(a,Ht(n,o*r));this.Je=l,u.info(`Retrying real-time messaging connection in ${l}ms (attempt ${this.Te}/${this.De})`),this.Ue=window.setTimeout(()=>{this.Ue=null,this.pn()},l)}vn(){if(this.Ne)u.info("Real-time messaging connection attempt already in progress");else{if(this.dn(),this.bn())return this.Sn()?(u.info("Auth token expired during gapless reconnection, falling back to regular reconnection"),this.fn(),void this.pn()):void(this.Ne?u.info("Real-time connection attempt already in progress, skipping gapless reconnection"):(this.Ae!==null&&(window.clearTimeout(this.Ae),this.Ae=null),this.jn(this.Fe||void 0)));u.error("Cannot perform gapless reconnection without configuration")}}fn(){this.Ue!==null&&(window.clearTimeout(this.Ue),this.Ue=null),this.Ae!==null&&(window.clearTimeout(this.Ae),this.Ae=null),this.Ge!==null&&(window.clearTimeout(this.Ge),this.Ge=null),this.Ve=null,this.Ne&&(this.Ne.close(),this.Ne=null),this.Fe&&(this.Fe.close(),this.Fe=null,u.info("Real-time messaging connection closed"))}Mn(t,e){try{const s=JSON.parse(t);this.on(s,e)}catch(s){u.warn(`Failed to parse real-time message: ${s instanceof Error?s.message:String(s)}`)}}
2changeUser(t=!1){this.fn(),t||(this.bn()&&u.info("Clearing cached real-time messaging configuration for user change"),this.gn()),this.en()}clearData(t=!1){this.Ie=!1,this.fn(),t&&(this.bn()&&u.info("Clearing cached real-time messaging configuration (wipeData)"),this.gn(),this.Xe.Wr()),this.en()}destroy(){this.Ye=!0,this.Ie=!1,this.fn(),this.we(),this._e.destroy(),this.gn(),this.He&&(this.yn("ddr",this.He),this.He=null),this.Ke&&(this.yn("ttl",this.Ke),this.Ke=null),this.qe&&(window.removeEventListener("beforeunload",this.qe),this.qe=null),this.Oe&&(window.removeEventListener("pagehide",this.Oe),this.Oe=null),this.Pe&&(window.removeEventListener("pageshow",this.Pe),this.Pe=null),this.T&&(p.removeSubscription(this.T),this.T=null)}}const ot={i:!1,provider:null,o:()=>{if(ot.t(),!ot.provider){const i=p.er("dustHost");ot.provider=new On(p.m(),p.p(),p.l(),i),p.v(ot.provider),ot.provider.Hr()}return ot.provider},t:()=>{ot.i||(p.g(ot),ot.i=!0)},destroy:()=>{ot.provider&&ot.provider.destroy(),ot.provider=null,ot.i=!1}};function Dn(){const i=p.l(),t=p.nn();if(!i||!t)return null;const e=ot.o(),s=()=>
2{if(!e.Et()){e.wn();const n=t.rn(()=>{i.$n()&&e.Rn()});return n&&e.Lt(n),e.bn()&&e.pn(),n}return e.Et()};return i.Tr(()=>{p.ao()&&(i.$n()?(e.Rn(),s()):(e.fn(),e.bn()&&e.gn()))}),i.$n()?s():null}class Ee{constructor(t,e,s,n,r){this.endpoint=t,this.Uu=e,this.publicKey=s,this.sc=n,this.ld=r,this.endpoint=t||null,this.Uu=e||null,this.publicKey=s||null,this.sc=n||null,this.ld=r||null}qt(){return{e:this.endpoint,c:this.Uu,p:this.publicKey,u:this.sc,v:this.ld}}static _u(t){return new Ee(t.e,pe(t.c),t.p,t.u,t.v)}}class Pn{constructor(t,e){this.h=t,this.j=e,this.h=t,this.j=e}getUserId(){const t=this.j.$u(f.Ou.Cu);if(t==null)return null;let e=t.Iu,s=_e(e);if(s>P.br){for(;s>P.br;)e=e.slice(0,e.length-1),s=_e(e);t.Iu=e,this.j.Ju(f.Ou.Cu,t)}return e}Lu(t){const e=this.getUserId()==null;this.j.Ju(f.Ou.Cu,new At(t)),e&&this.j.qu(t)}setCustomUserAttribute(t,e){if(this.h.zu(t))return u.info('Custom Attribute "'+t+'" is blocklisted, ignoring.'),!1;const s={};return s[t]=e,this.Bu(P.Eu,s,!0)}Bu(t,e,s=!1,n=!1){const r=this.j.Fu(this.getUserId(),t,e);let a="",o=t,l=e;return s&&(a=" custom",typeof e=="object"&&(o=Object.keys(e)[0],l=e[o],typeof l=="object"&&(l=JSON.stringify(l,null,2)))),!n&&r&&u.info(`Logged${a} attribute ${o} with value ${l}`),r}yu(t,e,s,n,r){this.Bu("push_token",t,!1,!0),this.Bu("custom_push_public_key",s,!1,!0),this.Bu("custom_push_user_auth",n,!1,!0),this.Bu("custom_push_vapid_public_key",r,!1,!0);const a=L._s.Xs,o=new L(a,u),l=new Ee(t,e,s,n,r);this.j.Pt(f.It.xu,l.qt()),o.setItem(a.Ws.Gu,a.be,!0)}wu(t){if(this.Bu("push_token",null,!1,!0),this.Bu("custom_push_public_key",null,!1,!0),this.Bu("custom_push_user_auth",null,!1,!0),this.Bu("custom_push_vapid_public_key",null,!1,!0),t){const e=L._s.Xs,s=new L(e,u);this.j.Pt(f.It.xu,!1),s.setItem(e.Ws.Gu,e.be,!1)}}}const T={_h:"allowCrawlerActivity",Nh:"baseUrl",se:"cookieExpiryInDays",Oh:"noCookies",xa:"disablePushTokenMaintenance",Rh:"enableLogging",Ph:"enableSdkAuthentication",wa:"manageServiceWorkerExternally",Dh:"minimumIntervalBetweenTriggerActionsInSeconds",Lh:"sessionTimeoutInSeconds",yh:"appVersion",Mh:"appVersionNumber",za:"serviceWorkerLocation",ha:"safariWebsitePushId",Ma:"localization",sr:"contentSecurityNonce",nr:"allowUserSuppliedJavascript",ca:"inAppMessageZIndex",da:"openInAppMessagesInNewTab",tn:"openCardsInNewTab",lh:"requireExplicitInAppMessageDismissal",Uh:"doNotLoadFontAwesome",Wh:"deviceId",ba:"serviceWorkerScope",Bh:"sdkFlavor"};class Rn{constructor(){this.eu="",this.Vh="",this.Kh=void 0,this.Gh=null,this.tu=null,this.B=null,this.Ru=null,this.h=null,this.C=null,this.j=null,this.Ss=null,this.Yh="",this.isInitialized=!1,this.$h=!1,this.qh=new q,this.Hh=new q,this.options={},this.Jh=[],this.Xh=[],this.In=[],this.Vh="6.12.1"}Zh(t){this.qh.Ut(t)}ah(t){this.Hh.Ut(t)}initialize(t,e){var s,n,r;if(this.ao())return u.info("Braze has already been initialized with an API key."),!0;this.options=e||{};let a=this.er(T.Rh);const o=Zs(re.Qh());if(o&&o.brazeLogging==="true"&&(a=!0),u.init(a),u.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),t==null||t===""||typeof t!="string")return u.error("Braze requires a valid API key to be initialized."),!1;this.eu=t;let l=this.er(T.Nh);if(l==null||l===""||typeof l!="string")return u.error("Braze requires a valid baseUrl to be initialized."),!1;/^https?:/.test(l)===!1&&(l=`https://${l}`);const c=l;if(l=document.createElement("a"),l.href=c,l.pathname==="/"&&(l=`${l}api/v3`),this.Yh=l.toString(),ct.il&&!this.er(T._h))return u.info("Ignoring activity from crawler bot "+navigator.userAgent),this.$h=!0,!1;const h=this.er(T.Oh)||!1,d=this.er(T.se),b=Ce.sl();if(this.j=Ce.rl(t,h,d),h&&this.j.hl(t),new et.le(null,!0).wr(f.ce))return u.info("Ignoring all activity due to previous opt out"),this.$h=!0,!1;for(const x of lt(this.options))Be(vs).indexOf(x)===-1&&u.warn(`Ignoring unknown initialization option '${x}'.`);const g=["mparticle","wordpress","tealium"];if(this.er(T.Bh)!=null){const x=this.er(T.Bh);g.indexOf(x)!==-1?this.Kh=x:u.error("Invalid sdk flavor passed: "+x)}let w=this.er(vs.Th);if(w!=null)if(B(w)){const x=[];for(let k=0;k<w.length;
2k++)_t(Rt,w[k],"devicePropertyAllowlist contained an invalid value.","DeviceProperties")&&x.push(w[k]);w=x}else u.error("devicePropertyAllowlist must be an array. Defaulting to all properties."),w=null;const y=this.er(T.Wh);if(y){const x=new At(y);this.j.Ju(f.Ou.Wh,x)}this.tu=new Ki(this.j,w),this.h=new Zi(this.j),this.Ss=new Pn(this.h,this.j),this.C=new tn(this.j,this.Ss,this.h,this.er(T.Lh));const S=new q;this.Gh=new qi(this.j,this.er(T.Ph),S),this.S(S),this.B=new Hi(this.tu,this.j,this.Gh,this.Ss,this.C,this.h,this.eu,this.Yh,this.Vh,this.Kh||"",this.er(T.yh),this.er(T.Mh)),this.Ru=new Wi(this.eu,this.Yh,this.C,this.tu,this.Ss,this.h,this.j,x=>{if(this.ao())for(const k of this.vr())k.q(x)},this.Gh,this.B),this.Ru.initialize(),h||this.j.ll(),u.info(`Initialized for the Braze backend at "${this.er(T.Nh)}" with API key "${this.eu}".`),H.t(),Dn(),this.h.do(()=>{var x;this.isInitialized&&(!((x=this.h)===null||x===void 0)&&x.Kr())&&xt(()=>Promise.resolve().then(()=>Ds),void 0).then(k=>{this.isInitialized&&(0,k.default)()})}),this.Ru.rn(()=>{var x;this.isInitialized&&(!((x=this.h)===null||x===void 0)&&x.Kr())&&xt(()=>Promise.resolve().then(()=>Ds),void 0).then(k=>{this.isInitialized&&(0,k.default)(void 0,void 0,!0)})}),this.qh.A(this.options),this.isInitialized=!0,window.dispatchEvent(new CustomEvent("braze.initialized")),this.ar("tgr",()=>{var x;(x=this.Ru)===null||x===void 0||x.Ar(void 0,void 0,"dust")});const E=(s=this.C)===null||s===void 0?void 0:s.al();return b||E==null||!((n=this.C)===null||n===void 0)&&n.ul(new Date().valueOf(),E)||(r=this.Ru)===null||r===void 0||r.Ar(),!0}destroy(t){if(u.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.tu=null,this.B=null,this.h=null,this.C=null,this.Ss=null,this.options={},this.Kh=void 0,this.isInitialized=!1,this.$h=!1,t&&(this.j=null)}}rr(){return!this.cl()&&(!!this.ao()||(console.warn(G.ee),!1))}ja(){return this.eu}Er(){return this.Gh}ht(){return this.Yh}ue(){return this.tu}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.C}p(){return this.j}zr(){if(this.Ss&&this.Ru)return new P(this.Ss,this.Ru)}ir(){return this.Ss}dr(){return this.er(T.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 le&&!e&&this.Xh.push(t)}S(t){t instanceof q&&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}ar(t,e){return this.rr()?ot.o().mn(t,e):null}qi(){return this.Vh}}const p=new Rn,V={Dt:(i,t,e)=>{var s,n;const r=new Ut,a=p.u();if(!a)return u.info(`Not logging event with type "${i}" because the current session ID could not be found.`),r;const o=a.el();return r.Ce.push(new bt(e||((s=p.ir())===null||s===void 0?void 0:s.getUserId()),i,new Date().valueOf(),o,t)),r.lt=((n=p.p())===null||n===void 0?void 0:n.ol(r.Ce))||!1,r}};class jn{constructor(t){this.j=t,this.j=t}logClick(t){const e=new Ut;if(t.Yt(),t.url==null||t.url==="")return u.info(`Card ${t.id} has no url. Not logging click to Braze servers.`),e;if(t.id&&this.j){const r=this.j.St(f.It.Zt)||{};r[t.id]=!0,this.j.Pt(f.It.Zt,r)}const s=this.ls([t]);if(s==null)return e;const n=N.us;return V.Dt(n,s)}cs(t){const e=new Ut;if(!t.Ft())return u.info(`Card ${t.id} refused this dismissal. Ignoring analytics event.`),e;if(t.id&&this.j){const n=this.j.St(f.It.fs)||{};n[t.id]=!0,this.j.Pt(f.It.fs,n)}const s=this.ls([t]);return s==null?e:V.Dt(N.gs,s)}ds(t){const e=new Ut(!0),s=[],n=[];let r={};this.j&&(r=this.j.St(f.It.ps)||{});for(const l of t)l.js()?(l instanceof Me?n.push(l):s.push(l),l.id&&(r[l.id]=!0)):u.info(`Card ${l.id} logged an impression too recently. Ignoring analytics event.`);const a=this.ls(s),o=this.ls(n);if(a==null&&o==null)return e.lt=!1,e;if(this.j&&this.j.Pt(f.It.ps,r),a!=null){const l=N.vs,c=V.Dt(l,a);e.Cs(c)}if(o!=null){const l=V.Dt(N.ws,o);e.Cs(l)}return e}ls(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 vt={i:!1,na:null,ra:()=>(vt.t(),vt.na||(vt.na=new jn(p.p())),vt.na),t:()=>{vt.i||(p.g(vt),vt.i=!0)},destroy:()=>{vt.na=null,vt.i=!1}},ps={tr:"must be a Card object"};function Bn(i){return!!p.rr()&&(i instanceof m?vt.ra().cs(i).lt:(u.error("card "+ps.tr),!1))}function Mn(i){if(!p.rr())return!1;if(!B(i))return u.error("cards must be an array"),!1;for(const t of i)if(!(t instanceof m))return u.error(`Each card in cards ${ps.tr}`),!1;return vt.ra().ds(i).lt}
2function Un(i){return!!p.rr()&&(i instanceof m?vt.ra().logClick(i).lt:(u.error("card "+ps.tr),!1))}function si(i,t,e,s,n,r,a,o,l,c,h,d,b,g,w,y,S,E){let x;if(t===m.ks.Ei||t===m.ks.Ti)x=new Oi(i,e,s,n,r,a,o,l,c,h,d,b,g,w,S,E);else if(t===m.ks.zs)x=new Ni(i,e,s,n,r,a,o,l,c,h,d,b,g,w,S,E);else if(t===m.ks.oi)x=new Ci(i,e,n,a,o,l,h,d,b,g,w,S,E);else{if(t!==m.ks.ai)return u.error("Ignoring card with unknown type "+t),null;x=new Me(i,e,a,o,d,b)}return y&&(x.test=y),x}function Ke(i){if(i[m.ei.ri])return null;const t=i[m.ei.qs],e=i[m.ei.xs],s=i[m.ei.ys],n=i[m.ei.As],r=i[m.ei.Bs],a=i[m.ei.Ds],o=zt(i[m.ei.Es]);let l;return l=i[m.ei.Fs]===m.ui?null:zt(i[m.ei.Fs]),si(t,e,s,n,r,a,o,l,i[m.ei.URL],i[m.ei.Gs],i[m.ei.Hs],i[m.ei.Is],i[m.ei.Js],i[m.ei.Ks],i[m.ei.Ls],i[m.ei.Os]||!1,i[m.ei.Ms],i[m.ei.Ns])}function zn(i){return si(i[m.bs.qs],i[m.bs.xs],i[m.bs.ys],i[m.bs.As],i[m.bs.Bs],i[m.bs.Ds],pe(i[m.bs.Es]),pe(i[m.bs.Fs]),i[m.bs.URL],i[m.bs.Gs],i[m.bs.Hs],i[m.bs.Is],i[m.bs.Js],i[m.bs.Ks],i[m.bs.Ls],i[m.bs.Os]||!1,i[m.bs.Ms],i[m.bs.Ns])||void 0}class $n extends le{constructor(t,e,s,n,r){super(),this.Ss=t,this.j=e,this.h=s,this.Ts=n,this.B=r,this.Ss=t,this.j=e,this.h=s,this.Ts=n,this.B=r,this.Rs=new q,p.S(this.Rs),this.Us=0,this.$s=0,this.cards=[],this.Ps();const a=L._s.Xs;new L(a,u).Qs(a.Ws.Vs,o=>{this.Ys(o)}),this.Zs=null,this.T=null,this.fi=null,this.di=null,this.pi=10}vi(){return this.Zs}Ci(t){this.Zs=t}Et(){return this.T}Lt(t){this.T=t}Ps(){if(!this.j)return;const t=this.j.St(f.It.bi)||[],e=[];for(let s=0;s<t.length;s++){const n=zn(t[s]);n!=null&&e.push(n)}this.cards=this.wi(this.gi(e,!1)),this.Us=this.j.St(f.It.ji)||this.Us,this.$s=this.j.St(f.It.yi)||this.$s}Ri(t,e=!1,s=0,n=0){let r;if(e){r=[];for(const a of this.cards)a.test&&r.push(a)}else r=this.cards.slice();for(let a=0;a<t.length;a++){const o=t[a];let l=null;for(let c=0;c<this.cards.length;c++)if(o.id===this.cards[c].id){l=this.cards[c];break}if(e){const c=Ke(o);l!=null&&l.viewed&&c&&(c.viewed=!0),c!=null&&r.push(c)}else if(l==null){const c=Ke(o);c!=null&&r.push(c)}else if(!l.ni(o)){for(let c=0;c<r.length;c++)if(o.id===r[c].id){r.splice(c,1);break}}}this.cards=this.wi(this.gi(r,e)),this.Ui(),this.Us=s,this.$s=n,this.j&&(this.j.Pt(f.It.ji,this.Us),this.j.Pt(f.It.yi,this.$s))}q(t){if(this.ki()&&t!=null&&t.cards){this.j&&this.j.Pt(f.It.zi,p.qi());const e=t.full_sync;e||this.Ps(),this.Ri(t.cards,e,t.last_full_sync_at,t.last_card_updated_at),this.Rs.A(this.xi(!0))}}Fi(t){this.Li(),this.fi=t}Ys(t){var e;if(!this.ki())return;this.Ps();const s=this.cards.slice();let n=null;n=(e=this.Ss)===null||e===void 0?void 0:e.getUserId();for(let r=0;r<t.length;r++)if(n===t[r].userId||n==null&&t[r].userId==null){const a=t[r].card;let o=null;for(let l=0;l<this.cards.length;l++)if(a.id===this.cards[l].id){o=this.cards[l];break}if(o==null){const l=Ke(a);l!=null&&s.push(l)}else if(!o.ni(a)){for(let l=0;l<s.length;l++)if(a.id===s[l].id){s.splice(l,1);break}}}this.cards=this.wi(this.gi(s,!1)),this.Ui(),this.Rs.A(this.xi(!0))}gi(t,e){let s={},n={},r={};this.j&&(s=this.j.St(f.It.Zt)||{},n=this.j.St(f.It.ps)||{},r=this.j.St(f.It.fs)||{});const a={},o={},l={};for(let c=0;c<t.length;c++){const h=t[c].id;h&&(s[h]&&(t[c].clicked=!0,a[h]=!0),n[h]&&(t[c].viewed=!0,o[h]=!0),r[h]&&(t[c].dismissed=!0,l[h]=!0))}return e&&this.j&&(this.j.Pt(f.It.Zt,a),this.j.Pt(f.It.ps,o),this.j.Pt(f.It.fs,l)),t}wi(t){const e=[],s=new Date;let n={};this.j&&(n=this.j.St(f.It.fs)||{});let r=!1;for(let a=0;a<t.length;a++){const o=t[a].url;if(!this.Ts&&o&&Qe(o)){u.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[a].expiresAt;let c=!0;if(l!=null&&(c=l>=s),c=c&&!t[a].dismissed,c)e.push(t[a]);else{const h=t[a].id;h&&(n[h]=!0),r=!0}}return r&&this.j&&this.j.Pt(f.It.fs,n),e}Ui(){var t;const e=[];for(let s=0;s<this.cards.length;s++)e.push(this.cards[s].qt());(t=this.j)===null||t===void 0||t.Pt(f.It.bi,e)}Li(){this.fi&&(clearTimeout(this.fi),this.fi=null)}lr(t,e,s="sdk"){var n;const r=this.B,a=this.j;if(!r||!a)return void(typeof e=="function"&&e());if(s==="client"&&(I.Ji(a,I.it.Mi),this.Li()),!this.ki())return void((n=this.h)===null||n===void 0||n.$i(()=>{this.lr(t,e,"client")}
2));const o=r.Z({},!0);a.St(f.It.zi)!==p.qi()&&this.Bi(),o.last_full_sync_at=this.Us,o.last_card_updated_at=this.$s;const l=r.tt(o,I.it.Mi,s);let c=!1;r.et(o,(h=-1)=>{if(this.j){const d=new Date().valueOf();I.nt(this.j,I.it.Mi,d)}h!==-1&&l.push(["X-Braze-Req-Tokens-Remaining",h.toString()]),Wt.ot({url:`${r.ht()}/content_cards/sync`,data:o,headers:l,lt:d=>{if(!r.ut(o,d,l))return c=!0,void(typeof e=="function"&&e());r.ct(),this.q(d),c=!1,typeof t=="function"&&t()},error:d=>{r.dt(d,"retrieving content cards"),c=!0,typeof e=="function"&&e()},ft:(d,b)=>{var g,w,y;let S;if(c){const E=((g=this.h)===null||g===void 0?void 0:g.vt())||ee,x=((w=this.h)===null||w===void 0?void 0:w.gt())||se,k=((y=this.h)===null||y===void 0?void 0:y.bt())||ie;let R=this.di;(R==null||R<E)&&(R=E),S=Math.min(k,Ht(E,R*x))}r.yt(b,()=>{this.lr(t,e)},I.it.Mi,E=>this.Fi(E),()=>this.Li(),S)}})},I.it.Mi,e)}xi(t){t||this.Ps();const e=this.wi(this.cards);e.sort((n,r)=>n.pinned&&!r.pinned?-1:r.pinned&&!n.pinned?1:n.updated&&r.updated&&n.updated>r.updated?-1:n.updated&&r.updated&&r.updated>n.updated?1:0);let s=Math.max(this.$s||0,this.Us||0);return s===0&&(s=void 0),this.j&&this.j.St(f.It.yi)===this.$s&&s===void 0&&(s=this.$s),new St(e,zt(s))}Kt(t){return this.Rs.Ut(t)}Bi(){this.Us=0,this.$s=0,this.j&&(this.j.Vt(f.It.ji),this.j.Vt(f.It.yi))}changeUser(t){t||(this.cards=[],this.Rs.A(new St(this.cards.slice(),null)),this.j&&(this.j.Vt(f.It.bi),this.j.Vt(f.It.Zt),this.j.Vt(f.It.ps),this.j.Vt(f.It.fs))),this.Li(),this.Bi()}clearData(t){this.Us=0,this.$s=0,this.cards=[],this.Rs.A(new St(this.cards.slice(),null)),t&&this.j&&(this.j.Vt(f.It.bi),this.j.Vt(f.It.Zt),this.j.Vt(f.It.ps),this.j.Vt(f.It.fs),this.j.Vt(f.It.ji),this.j.Vt(f.It.yi)),this.Li()}ki(){return!!this.h&&(!!this.h.Pi()||(this.h.Qt()!==0&&this.Xi(),!1))}Xi(){this.Rs.A(new St([],new Date)),this.j&&this.j.Vt(f.It.bi)}}const rt={i:!1,provider:null,o:()=>(rt.t(),rt.provider||(rt.provider=new $n(p.ir(),p.p(),p.l(),p.dr(),p.m()),p.v(rt.provider),p.ar("ccr",()=>{var i;(i=rt.provider)===null||i===void 0||i.lr(void 0,void 0,"dust")})),rt.provider),t:()=>{rt.i||(p.g(rt),rt.i=!0)},destroy:()=>{rt.provider=null,rt.i=!1}};function Ln(i,t){if(p.rr())return rt.o().lr(i,t,"client")}class St{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 Me||t++;return t}ur(t){Mn(t)}cr(t){return Un(t)}Cr(){Ln()}hr(){return!0}}St.mr=6e4,St.gr=500,St.jr=1e4;function $r(){if(p.rr())return rt.o().xi(!1)}function ii(i){if(i!=null){const t=i.querySelectorAll(".ab-unread-indicator")[0];t==null||t.classList.contains("read")||(t.className+=" read")}}function Fn(i){return i.getAttribute("data-ab-card-id")}function Gn(i,t){t.setAttribute("alt",i.altImageText||"")}function qn(i,t){const e=t.querySelectorAll(".ab-image-area");let s,n=0;e.length>0&&(n=e[0].offsetWidth);for(const r of i)if(s=r.te,s&&r.imageUrl&&typeof r.aspectRatio=="number"){const a=n/r.aspectRatio;a&&(s.style.height=`${a}px`)}}function Vn(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 r="",a=!1;i.url&&i.url!==""&&(r=i.url,a=!0);const o=g=>(ii(n),a&&(t(i),Ue(r,e,g)),!1);if(i.pinned){const g=document.createElement("div");g.className="ab-pinned-indicator";const w=document.createElement("i");w.className="fa fa-star",g.appendChild(w),n.appendChild(g)}if(i.imageUrl&&i.imageUrl!==""){const g=document.createElement("div");g.dir=s,g.className="ab-image-area";const w=document.createElement("img");if(w.setAttribute("src",i.imageUrl),w.onload=()=>{n.style.height="auto"},Gn(i,w),g.appendChild(w),n.className+=" with-image",a&&!i.oe){const y=document.createElement("a");y.setAttribute("href",r),y.onclick=o,i.altImageText||(i.title?y.setAttribute("aria-label",i.title):y.setAttribute("aria-label","Feed Image")),y.appendChild(g),n.appendChild(y)}else n.appendChild(g)}const l=document.createElement("div");if(l.className="ab-card-body",l.dir=s,i.dismissible){i.logCardDismissal=()=>Bn(i);const g=Js("Dismiss Card",void 0,i.dismissCard.bind(i),s);n.appendChild(g),fe(l,Nt.ie,w=>
2{n.className+=" ab-swiped-left",g.onclick(w)}),fe(l,Nt.ne,w=>{n.className+=" ab-swiped-right",g.onclick(w)})}let c="",h=!1;if(i.title&&i.title!==""&&(c=i.title,h=!0),h){const g=document.createElement("h1");if(g.className="ab-title",g.id=Dt.de(),n.setAttribute("aria-labelledby",g.id),a){const w=document.createElement("a");w.setAttribute("href",r),w.onclick=o,w.appendChild(document.createTextNode(c)),g.appendChild(w)}else g.appendChild(document.createTextNode(c));l.appendChild(g)}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)),a){const g=document.createElement("div");g.className="ab-url-area";const w=document.createElement("a");w.setAttribute("href",r),i.linkText&&w.appendChild(document.createTextNode(i.linkText)),w.onclick=o,g.appendChild(w),d.appendChild(g)}l.appendChild(d),n.appendChild(l);const b=document.createElement("div");return b.className="ab-unread-indicator",i.viewed&&(b.className+=" read"),n.appendChild(b),i.te=n,n}function ni(i){p.rr()&&p.removeSubscription(i)}function ri(i){return i!=null&&!!i.getAttribute("data-ab-had-top-impression")}function ai(i){i?.setAttribute("data-ab-had-top-impression","true")}function oi(i){return i!=null&&!!i.getAttribute("data-ab-had-bottom-impression")}function li(i){i?.setAttribute("data-ab-had-bottom-impression","true")}const xe={oo:ri,no:oi},Qt={aa:"Banners are disabled. Make sure you have at least one campaign and relaunch the app.",ea:"data-update-subscription-id"},Kn="data-last-requested-refresh",es={};function ze(i){i&&(i.className=i.className.replace("ab-show","ab-hide"),setTimeout(()=>{i&&i.parentNode&&i.parentNode.removeChild(i)},St.gr));const t=i.getAttribute(Qt.ea);t!=null&&ni(t);const e=i.getAttribute("data-listener-id");e!=null&&(window.removeEventListener("scroll",es[e]),delete es[e])}function ui(i,t){const e=gt.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 r=document.createElement("i");r.className="fa fa-spinner fa-spin fa-4x ab-initial-spinner",n.appendChild(r),s.appendChild(n)}else{let n=!1;const r=a=>i.cr(a);for(const a of i.cards){const o=a instanceof Me;!o||i.hr()?(s.appendChild(Vn(a,r,t,e.ga())),n=n||!o):u.error("Received a control card for a legacy news feed. Control cards are only supported with content cards.")}if(!n){const a=document.createElement("div");a.className="ab-no-cards-message",a.innerHTML=e.get("NO_CARDS_MESSAGE")||"",a.setAttribute("role","article"),s.appendChild(a)}}return s}function bs(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 r=Fn(s[n]),a=Fs(s[n]),o=Gs(s[n]);if(i.Ta[r]){a||o||ii(s[n]);continue}let l=ri(s[n]),c=oi(s[n]);const h=l,d=c;if(!l&&a&&(l=!0,ai(s[n])),!c&&o&&(c=!0,li(s[n])),l&&c){if(h&&d)continue;for(const b of i.cards)if(b.id===r){i.Ta[b.id]=!0,e.push(b);break}}}e.length>0&&i.ur(e)}}function ci(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 a=0;a<n.length;a++)n[a].className=n[a].className.replace(/fa-spin/g,"");const r=t.querySelectorAll(".ab-initial-spinner")[0];if(r!=null){const a=document.createElement("span");a.innerHTML=gt.ra().get("FEED_TIMEOUT_MESSAGE")||"",r.parentNode!=null&&(r.parentNode.appendChild(a),r.parentNode.removeChild(r))}t.getAttribute("aria-busy")==="true"&&t.setAttribute("aria-busy","false")}},St.jr),i.Cr()}function Yn(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 r=document.createElement("i");r.className="fa fa-times ab-close-button",r.setAttribute("aria-label","Close Feed"),r.setAttribute("tabindex","0"),r.setAttribute("role","button");const a=h=>{ze(s),h.stopPropagation()};r.addEventListener("keydown",h=>{h.keyCode!==kt.To&&h.keyCode!==kt.Lo||a(h)}),r.onclick=a;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=>{ci(i,s),h.stopPropagation()};o.addEventListener("keydown",h=>{h.keyCode!==kt.To&&h.keyCode!==kt.Lo||l(h)}),o.onclick=l,n.appendChild(o),n.appendChild(r),s.appendChild(ui(i,t));const c=()=>bs(i,s);if(s.addEventListener("scroll",c),!e){window.addEventListener("scroll",c);const h=Dt.de();es[h]=c,s.setAttribute("data-listener-id",h)}return s}function Ns(i,t,e,s,n){if(!B(t))return;const r=[];for(const a of t)if(a instanceof m){if(a.url&&be.test(a.url)){const o=as(a.url);if(os(o)){u.error(Bs(rs.Wn,"Content Card"));continue}}r.push(a)}if(i.cards=r,i.lastUpdated=e,s!=null)if(s.setAttribute("aria-busy","false"),i.lastUpdated==null)ze(s);else{const a=s.querySelectorAll(".ab-feed-body")[0];if(a!=null){const o=ui(i,n);a.parentNode&&a.parentNode.replaceChild(o,a),bs(i,o.parentNode)}}}function Hn(i,t){i&&t.setAttribute(Qt.ea,i)}function Xn(i){if(!p.rr())return;const t=document.querySelectorAll(".ab-feed");for(let e=0;e<t.length;e++)(i==null||i!=null&&t[e].parentNode===i)&&ze(t[e])}function Jn(i,t){if(!p.rr())return;nn();let e=!1;i==null&&(i=document.body,e=!0);const s=p.er(T.tn)||!1,n=rt.o().xi(!1);typeof t=="function"&&Ns(n,t(n.cards.slice()),n.lastUpdated,null,s);const r=Yn(n,s,e),a=rt.o(),o=a.vi();(n.lastUpdated==null||new Date().valueOf()-n.lastUpdated.valueOf()>St.mr)&&(o==null||new Date().valueOf()-o>St.mr)&&(u.info(`Cached content cards were older than max TTL of ${St.mr} ms, requesting an update from the server.`),ci(n,r),a.Ci(new Date().valueOf()));const l=new Date().valueOf(),c=Wn(function(b){const g=r.querySelectorAll(".ab-refresh-button")[0];if(g!=null){let y=500,S=y-=new Date().valueOf()-l;const E=r.getAttribute(Kn);E&&(S=parseInt(E),isNaN(S)||(y-=new Date().valueOf()-S)),setTimeout(function(){g.className=g.className.replace(/fa-spin/g,"")},Math.max(y,0))}let w=b.cards;typeof t=="function"&&(w=t(w.slice())),Ns(n,w,b.lastUpdated,r,s)});Hn(c,r);const h=function(b){const g=b.querySelectorAll(".ab-feed");let w=null;for(let y=0;y<g.length;y++)g[y].parentNode===b&&(w=g[y]);w!=null?(ze(w),w.parentNode!=null&&w.parentNode.replaceChild(r,w)):b.appendChild(r),setTimeout(function(){r.className=r.className.replace("ab-hide","ab-show")},0),e&&r.focus(),bs(n,r),qn(n.cards,b)};var d;i!=null?h(i):window.onload=(d=window.onload,function(){typeof d=="function"&&d(new Event("oldLoad")),h(document.body)})}function Wn(i){if(!p.rr())return;const t=rt.o(),e=t.Kt(i);if(!t.Et()){const s=p.nn();if(s){const n=s.rn(()=>{t.lr(void 0,void 0,"client")}
2);n&&t.Lt(n)}}return e}function Lr(i,t){p.rr()&&(document.querySelectorAll(".ab-feed").length>0?Xn():Jn(i,t))}const Zn={GOOGLE_TAG_MANAGER:"gg",MPARTICLE:"mp",SEGMENT:"sg",TEALIUM:"tl",MANUAL:"manu",NPM:"npm",CDN:"wcd",SHOPIFY:"shp"};function Fr(i){if(!p.rr())return;const t=p.m();if(t){if(!B(i))return u.error("Cannot set SDK metadata because metadata is not an array."),!1;for(const e of i)if(!_t(Zn,e,"sdkMetadata contained an invalid value.","BrazeSdkMetadata"))return!1;return t.addSdkMetadata(i),!0}}function Qn(i,t){if(!p.rr())return;if(i==null||i.length===0||i!=i)return void u.error("changeUser requires a non-empty userId.");if(_e(i)>P.br)return void u.error(`Rejected user id "${i}" because it is longer than ${P.br} bytes.`);if(t!=null&&!dt(t,"set signature for new user","signature"))return;const e=p.nn();e&&e.changeUser(i.toString(),p.vr(),t)}const tr=Object.freeze(Object.defineProperty({__proto__:null,changeUser:Qn},Symbol.toStringTag,{value:"Module"}));function Gr(){u.info("Destroying Braze instance"),p.destroy(!0)}function er(){const i=p.nn();i&&i.requestImmediateDataFlush();const t=p.er(T.se),e=new et.le(null,!0,t),s="This-cookie-will-expire-in-"+e.me();e.store(f.ce,s);const n=L._s.Xs;new L(n,u).setItem(n.Ws.pe,n.be,!0),u.info("disableSDK was called"),p.destroy(!1),p.fe(!0)}function qr(){new et.le(null,!0).remove(f.ce);const i=L._s.Xs;new L(i,u).ge(i.Ws.pe,i.be),u.info("enableSDK was called"),p.destroy(!1),p.fe(!1)}function Vr(i){if(!p.rr())return;const t=p.ue();if(!t)return;const e=t.ve().id;if(typeof i!="function")return e;u.warn("The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)"),i(e)}function Kr(i,t){return p.initialize(i,t)}function Yr(){return!!new et.le(null,!0).wr(f.ce)}function Hr(){return p.ao()}function sr(i,t){if(!p.rr())return!1;if(i==null||i.length<=0)return u.error(`logCustomEvent requires a non-empty eventName, got "${i}". Ignoring event.`),!1;if(!pt(i,"log custom event","the event name"))return!1;const[e,s]=oe(t,G.je,"eventProperties",`log custom event "${i}"`,"event");if(!e)return!1;const n=p.l();if(n&&n.$e(i))return u.info(`Custom Event "${i}" is blocklisted, ignoring.`),!1;const r=V.Dt(N.CustomEvent,{n:i,p:s});if(r.lt){u.info(`Logged custom event "${i}".`);for(const a of r.Ce)H.o().Ee(W.he,[i,t],a)}return r.lt}const hi=Object.freeze(Object.defineProperty({__proto__:null,logCustomEvent:sr},Symbol.toStringTag,{value:"Module"}));class te{constructor(t,e,s,n,r,a,o,l,c,h,d){this.iu=t,this.eu=e,this.tu=s,this.su=r,this.ru=a,this.ou=o,this.h=l,this.nu=c,this.uu=h,this.j=d,this.iu=t,this.eu=e,this.tu=s,this.hu=n+"/safari/"+e,this.su=r||"/service-worker.js",this.ou=o,this.h=l,this.nu=c||!1,this.uu=h||!1,this.j=d,this.au=U.cu(),this.fu=U.du()}lu(){return this.uu}pu(t,e,s,n,r){t.unsubscribe().then(a=>{a?this.bu(e,s,n,r):(u.error("Failed to unsubscribe device from push."),typeof r=="function"&&r(!1))}).catch(a=>{u.error("Push unsubscription error: "+a),typeof r=="function"&&r(!1)})}mu(t,e,s){var n;const r=(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 b=h;return b.gu&&h.endpoint.indexOf(b.gu)===-1&&(d=h.endpoint+"/"+b.gu),d})(t);let a=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")));a=btoa(String.fromCharCode.apply(null,h)),o=btoa(String.fromCharCode.apply(null,d))}catch(h){u.error(wt(h))}const c=(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.yu(r,e,a,o,c),r&&typeof s=="function"&&s(r,a,o)}vu(){var t;(t=this.iu)===null||t===void 0||t.wu(!0)}Pu(t,e){var s;(s=this.iu)===null||s===void 0||s.wu(!1),u.info(t),typeof e=="function"&&e(!1)}ku(t,e,s,n){var r;if(e.permission==="default")try{window.safari.pushNotification.requestPermission(this.hu,t,{api_key:this.eu,device_id:((r=this.tu)===null||r===void 0?void 0:r.ve().id)||""},a=>{a.permission==="granted"&&this.iu&&this.iu.setPushNotificationSubscriptionType(P.NotificationSubscriptionTypes.OPTED_IN),this.ku(t,a,s,n)})}catch(a){this.Pu("Could not request permission for push: "+a,n)}
2else e.permission==="denied"?this.Pu("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",n):e.permission==="granted"&&(u.info("Device successfully subscribed to push."),this.mu(e.deviceToken,new Date,s))}requestPermission(t,e,s){const n=a=>{switch(a){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:u.error("Received unexpected permission result "+a)}};let r=!1;if(window.Notification.permission!=="default")n(Notification.permission);else{const a=window.Notification.requestPermission(o=>{r&&n(o)});a?a.then(o=>{n(o)}):r=!0}}bu(t,e,s,n){const r={userVisibleOnly:!0};e!=null&&(r.applicationServerKey=e),t.pushManager.subscribe(r).then(a=>{u.info("Device successfully subscribed to push."),this.mu(a,new Date,s)}).catch(a=>{U.isPushBlocked()?(u.info("Permission for push notifications was denied."),typeof n=="function"&&n(!1)):(u.error("Push subscription failed: "+a),typeof n=="function"&&n(!0))})}Du(){if(this.nu)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=>{u.info("ServiceWorker update failed: "+s)}),e)))}Su(t){this.nu||(t.unregister(),u.info("Service worker successfully unregistered."))}subscribe(t,e){if(!U.isPushSupported())return u.info(te.Au),void(typeof e=="function"&&e(!1));if(this.au){if(!this.nu&&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(U.isPushBlocked())return void this.Pu("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",e);if(this.h&&!this.h.Wu()&&this.h.Qt()===0)return u.info("Waiting for VAPID key from server config before subscribing to push."),void this.h.ju(()=>{this.subscribe(t,e)});const s=()=>{u.info("Permission for push notifications was denied."),typeof e=="function"&&e(!1)},n=()=>{let o="Permission for push notifications was ignored.";U.isPushBlocked()&&(o+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),u.info(o),typeof e=="function"&&e(!0)},r=U.isPushPermissionGranted(),a=()=>{!r&&this.iu&&this.iu.setPushNotificationSubscriptionType(P.NotificationSubscriptionTypes.OPTED_IN),this.Nu(t,e)};this.requestPermission(a,n,s)}else if(this.fu){if(this.ou==null||this.ou==="")return u.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.ou);this.ku(this.ou,s,t,e)}}registerPush(t,e){if(!U.isPushSupported())return u.info(te.Au),void(typeof e=="function"&&e(!1));if(this.au){if(U.isPushBlocked())return void this.Pu("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",e);if(this.h&&!this.h.Wu()&&this.h.Qt()===0)return u.info("Waiting for VAPID key from server config before registering push."),void this.h.ju(()=>{this.registerPush(t,e)});if(!U.isPushPermissionGranted())return void u.info("Push permission has not been granted, so registerPush is a no-op. Call requestPushPermission to prompt the user for permission.");this.Nu(t,e)}else if(this.fu){if(this.ou==null||this.ou==="")return u.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.ou);s.permission==="granted"?this.ku(this.ou,s,t,e):s.permission==="denied"?this.Pu("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",e):u.info("Push permission has not been granted, so registerPush is a no-op. Call requestPushPermission to prompt the user for permission.")}}Nu(t,e){this.Du().then(s=>{if(s==null)return u.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to fal
2se or ensure that your service worker is registered before calling registerPush."),void(typeof e=="function"&&e(!0));s.pushManager.getSubscription().then(n=>{var r;let a=null;if(((r=this.h)===null||r===void 0?void 0:r.Wu())!=null&&(a=Si.Tu(this.h.Wu())),n){let o,l=null,c=null;if(this.j&&(o=this.j.St(f.It.xu)),o&&!B(o)){let h;try{h=Ee._u(o).Uu}catch{h=null}h==null||isNaN(h.getTime())||h.getTime()===0||(l=h,c=new Date(l),c.setMonth(l.getMonth()+6))}a!=null&&n.options&&n.options.applicationServerKey&&n.options.applicationServerKey.byteLength&&n.options.applicationServerKey.byteLength>0&&!Yt(a,new Uint8Array(n.options.applicationServerKey))?(n.options.applicationServerKey.byteLength>12?u.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):u.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.pu(n,s,a,t,e)):n.expirationTime&&new Date(n.expirationTime).valueOf()<=new Date().valueOf()?(u.info("Push subscription is expired, creating new subscription."),this.pu(n,s,a,t,e)):o&&B(o)?this.pu(n,s,a,t,e):c==null?(u.info("No push subscription creation date found, creating new subscription."),this.pu(n,s,a,t,e)):c.valueOf()<=new Date().valueOf()?(u.info("Push subscription older than 6 months, creating new subscription."),this.pu(n,s,a,t,e)):(u.info("Device already subscribed to push, sending existing subscription to backend."),this.mu(n,l,t))}else this.bu(s,a,t,e)}).catch(n=>{u.error("Error checking current push subscriptions: "+n)})}).catch(s=>{u.error("ServiceWorker registration failed: "+s)})}unsubscribe(t,e){if(!U.isPushSupported())return u.info(te.Au),void(typeof t=="function"&&t());this.au?navigator.serviceWorker.getRegistration(this.su).then(s=>{s?s.pushManager.getSubscription().then(n=>{n?(this.vu(),n.unsubscribe().then(r=>{r?(u.info("Device successfully unsubscribed from push."),typeof t=="function"&&t()):(u.error("Failed to unsubscribe device from push."),typeof e=="function"&&e()),this.Su(s)}).catch(r=>{u.error("Push unsubscription error: "+r),typeof e=="function"&&e()})):(u.info("Device already unsubscribed from push."),typeof t=="function"&&t())}).catch(n=>{u.error("Error unsubscribing from push: "+n),typeof e=="function"&&e()}):(u.info("Device already unsubscribed from push."),typeof t=="function"&&t())}):this.fu&&(this.vu(),u.info("Device unsubscribed from push."),typeof t=="function"&&t())}}te.Au="Push notifications are not supported in this browser.";const ft={i:!1,na:null,ra:()=>(ft.t(),ft.na||(ft.na=new te(p.zr(),p.ja(),p.ue(),p.ht(),p.er(T.za),p.er(T.ba),p.er(T.ha),p.l(),p.er(T.wa),p.er(T.xa),p.p())),ft.na),t:()=>{ft.i||(p.g(ft),ft.i=!0)},destroy:()=>{ft.na=null,ft.i=!1}},ir=Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"}));function nr(){if(!p.rr())return;const i=p.m();if(!i)return;const t=p.p(),e=t?.St(f.It.xu);if(!e||typeof e!="object"||Array.isArray(e))return;const s=Ee._u(e);if(!s.endpoint)return;const n=i.Z({},!0);n.push_token=s.endpoint;const r=i.tt(n,I.it.ka);i.et(n,(a=-1)=>{p.rr()&&(I.nt(t,I.it.ka,new Date().valueOf()),a!==-1&&r.push(["X-Braze-Req-Tokens-Remaining",a.toString()]),Wt.ot({url:`${i.ht()}/push/unregister`,data:n,headers:r,lt:o=>{i.ut(n,o,r)&&i.ct()}}))},I.it.ka)}function di(i,t){if(p.rr())return nr(),ft.ra().unsubscribe(i,t)}const rr=Object.freeze(Object.defineProperty({__proto__:null,unregisterPush:di},Symbol.toStringTag,{value:"Module"}));function ar(){const i=p.p();if(i==null)return void u.warn(G.ee);i.clearData();const t=lt(L._s);for(let s=0;s<t.length;s++){const n=t[s],r=L._s[n];new L(r,u).clearData()}if(p.rr())for(const s of p.vr())s.clearData(!0);const e=p.m();e&&e.fo()}const Ye={unregisterPush:di,disableSDK:er,wipeData:ar};function Xr(i,t){p.rr()&&Ye.unregisterPush(()=>{Ye.disableSDK(),Ye.wipeData(),typeof i=="function"&&i()},()=>{typeof t=="function"&&t()})}const or=["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"];function ms(i){return or.indexOf(i)!==-1}const Ie={REPLACE:"replace",Ld:"add",Md:"remove"},K="log eCommerce event";function Q(i,t,e){return i==null?e?(u.error(`Cannot ${K} because ${t}
2 must be a non-empty string.`),!1):void 0:typeof i!="string"||e&&i.length<=0?(u.error(`Cannot ${K} because ${t} must be a string${e?"":" when provided"}.`),!1):i.length>255?(u.error(`Cannot ${K} because ${t} must be at most 255 characters.`),!1):!!pt(i,K,t)&&i}function fi(i,t){return typeof i!="number"||isNaN(i)||!isFinite(i)?(u.error(`Cannot ${K} because ${t} must be a finite number.`),!1):i}function Vt(i,t){const e=fi(i,t);return e!==!1&&(e<0?(u.error(`Cannot ${K} because ${t} must be at least 0.`),!1):e)}const lr=/^[A-Za-z0-9\-_.,:;!?@#%&*()+={}[\]|\\/'`~^<>]+$/;function ur(i,t){return i.length===0||i.length>255?(u.error(`Cannot ${K} because each ${t} key must be between 1 and 255 characters.`),!1):i.charAt(0)==="$"?(u.error(`Cannot ${K} because ${t} keys cannot begin with "$".`),!1):!!lr.test(i)||(u.error(`Cannot ${K} because ${t} key "${i}" contains invalid characters.`),!1)}function ss(i,t,e){if(e>50)return u.error(`Cannot ${K} because ${t} is nested too deeply.`),!1;if(i==null||typeof i!="object")return!0;if(B(i)){const n=i;for(let r=0;r<n.length;r++){const a=n[r];if(typeof a=="string"){if(a.length>255)return u.error(`Cannot ${K} because a ${t} string value exceeds 255 characters.`),!1}else if(!ss(a,t,e+1))return!1}return!0}if(!ae(i))return!0;const s=i;for(const n in s){if(!Object.prototype.hasOwnProperty.call(s,n))continue;if(!ur(n,t))return!1;const r=s[n];if(typeof r=="string"){if(r.length>255)return u.error(`Cannot ${K} because a ${t} string value exceeds 255 characters.`),!1}else if(r!=null&&typeof r=="object"&&!ss(r,t,e+1))return!1}return!0}function He(i,t){if(!B(i))return u.error(`Cannot ${K} because ${t} must be an array of strings.`),!1;for(const e of i)if(Q(e,t,!0)===!1)return!1;return!0}function pi(i,t){if(i==null)return;const[e,s]=oe(i,G.QE,"metadata",K,t);return!!e&&!(s!=null&&!ss(s,t,0))&&s}function cr(i){if(i==null||typeof i!="object"||B(i))return u.error(`Cannot ${K} because each product must be an object.`),null;const t=i,e=Q(t.product_id,"product_id",!0),s=Q(t.product_name,"product_name",!0),n=Q(t.variant_id,"variant_id",!0),r=(function(d){if(fi(d,"product quantity")===!1)return!1;const b=parseInt(d.toString(),10);return b!==d?(u.error(`Cannot ${K} because product quantity must be an integer.`),!1):d<0||d>Number.MAX_SAFE_INTEGER?(u.error(`Cannot ${K} because product quantity must be between 0 and Number.MAX_SAFE_INTEGER.`),!1):b})(t.quantity),a=Vt(t.price,"product price");if(e===!1||s===!1||n===!1||r===!1||a===!1)return null;const o=Q(t.image_url,"image_url",!1),l=Q(t.product_url,"product_url",!1);if(o===!1||l===!1)return null;const c=pi(t.metadata,"eCommerce product metadata");if(c===!1)return null;const h={product_id:e,product_name:s,variant_id:n,quantity:r,price:a};return o!=null&&(h.image_url=o),l!=null&&(h.product_url=l),c!=null&&(h.metadata=c),h}function is(i){if(i==null||!B(i))return u.error(`Cannot ${K} because products must be an array.`),null;const t=[],e=i;for(const s of e){const n=cr(s);if(n==null)return null;t.push(n)}return t}function hr(i){const t=(function(s){if(s==null||typeof s!="string"||s.length<=0)return u.error(`Cannot ${K} because currency must be a non-empty string.`),!1;const n=s.toUpperCase();return ms(n)?n:(u.error(`${G.QE} requires a valid ISO 4217 currency code, got "${s}". Ignoring event.`),!1)})(i.currency),e=Q(i.source,"source",!0);return t===!1||e===!1?null:{currency:t,source:e}}function ns(i,t){const e=["subtotal_value","tax","shipping"];for(const s of e)if(t[s]!=null){const n=Vt(t[s],s);if(n===!1)return!1;i[s]=n}return!0}function Ae(i,t){const e=pi(t,"eCommerce event metadata");return e!==!1&&(e!=null&&(i.metadata=e),!0)}function Xe(i,t){return i==null||Q(i,t,!1)!==!1}function Os(i){if(i==null||typeof i!="object"||B(i))return!0;const t=i;if(!Xe(t.country,"metadata.country")||!Xe(t.market_handle,"metadata.market_handle"))return!1;if(t.presentment_currency==null)return!0;if(typeof t.presentment_currency!="object"||B(t.presentment_currency))return u.error(`Cannot ${K} because metadata.presentment_currency must be an object.`),!1;const e=t.presentment_currency;
2if(!Xe(e.price,"metadata.presentment_currency.price"))return!1;if(e.code==null)return!0;const s=Q(e.code,"metadata.presentment_currency.code",!1);if(typeof s!="string")return!1;const n=s.toUpperCase();return ms(n)?(e.code=n,!0):(u.error(`${G.QE} requires a valid ISO 4217 currency code, got "${s}". Ignoring event.`),!1)}function dr(i,t){const e=Q(i.cart_id,"cart_id",!0),s=i.action==null?Ie.REPLACE:(n=i.action,!!_t(Ie,n,`Cannot ${K} because action is invalid.`,"CartUpdatedActions")&&n);var n;const r=is(i.products);if(e===!1||s===!1||r==null)return null;const a=s===Ie.Ld||s===Ie.Md,o=i.total_value==null&&a?void 0:Vt(i.total_value,"total_value");if(o===!1)return null;const l={cart_id:e,action:s,currency:t.currency,products:r,source:t.source};return o!==void 0&&(l.total_value=o),ns(l,i)&&Ae(l,i.metadata)?l:null}function fr(i){const t=i.properties;if(t==null||typeof t!="object"||B(t))return u.error(`${G.QE} requires a properties object.`),null;const e=t,s=hr(e);if(s==null)return null;switch(i.name){case"ecommerce.product_viewed":return(function(n,r){const a=n.metadata;if(n.type!=null&&!He(n.type,"type"))return null;const o=Q(n.product_id,"product_id",!0),l=Q(n.product_name,"product_name",!0),c=Q(n.variant_id,"variant_id",!0),h=Vt(n.price,"price"),d=Q(n.image_url,"image_url",!1),b=Q(n.product_url,"product_url",!1);if(o===!1||l===!1||c===!1||h===!1||d===!1||b===!1)return null;const g={product_id:o,product_name:l,variant_id:c,price:h,currency:r.currency,source:r.source};return d!=null&&(g.image_url=d),b!=null&&(g.product_url=b),n.type!=null&&(g.type=n.type),Ae(g,a)?g:null})(e,s);case"ecommerce.cart_updated":return dr(e,s);case"ecommerce.checkout_started":return(function(n,r){const a=Q(n.checkout_id,"checkout_id",!0),o=Vt(n.total_value,"total_value"),l=is(n.products),c=Q(n.cart_id,"cart_id",!1);if(a===!1||o===!1||l==null||c===!1)return null;const h={checkout_id:a,total_value:o,currency:r.currency,products:l,source:r.source};return c!=null&&(h.cart_id=c),ns(h,n)&&Os(n.metadata)&&Ae(h,n.metadata)?h:null})(e,s);case"ecommerce.order_placed":return(function(n,r){const a=n.metadata;if(a!=null&&typeof a=="object"&&!B(a)){const b=a;if(b.tags!=null&&!He(b.tags,"metadata.tags")||b.payment_gateway_names!=null&&!He(b.payment_gateway_names,"metadata.payment_gateway_names"))return null}const o=Q(n.order_id,"order_id",!0),l=Vt(n.total_value,"total_value"),c=is(n.products),h=Q(n.cart_id,"cart_id",!1);if(o===!1||l===!1||c==null||h===!1)return null;const d={order_id:o,total_value:l,currency:r.currency,products:c,source:r.source};if(h!=null&&(d.cart_id=h),n.total_discounts!=null){const b=Vt(n.total_discounts,"total_discounts");if(b===!1)return null;d.total_discounts=b}if(n.discounts!=null){if(!B(n.discounts))return u.error(`Cannot ${K} because discounts must be an array.`),null;const[b,g]=oe({discounts:n.discounts},G.QE,"discounts",K,"eCommerce order discounts");if(!b||g==null)return null;d.discounts=g.discounts}return ns(d,n)&&Os(n.metadata)&&Ae(d,n.metadata)?d:null})(e,s);default:return u.error("logEcommerceEvent received an unknown event name. Ignoring event."),null}}function Jr(i){if(!p.rr())return!1;if(i==null||typeof i!="object"||i.name==null)return u.error('logEcommerceEvent requires an event object with a "name" field.'),!1;const t=fr(i);if(t==null)return!1;const e=p.l();if(e&&e.$e(i.name))return u.info(`The eCommerce event "${i.name}" is blocklisted, ignoring.`),!1;const s=V.Dt(N.CustomEvent,{n:i.name,p:t});if(s.lt){u.info(`Logged eCommerce event "${i.name}".`);for(const n of s.Ce)H.o().Ee(W.he,[i.name,i.properties],n)}return s.lt}function pr(i,t,e,s,n){if(!p.rr())return!1;if(e==null&&(e="USD"),s==null&&(s=1),i==null||i.length<=0)return u.error(`logPurchase requires a non-empty productId, got "${i}", ignoring.`),!1;if(!pt(i,"log purchase","the purchase name"))return!1;if(t==null||isNaN(parseFloat(t.toString())))return u.error(`logPurchase requires a numeric price, got ${t}, ignoring.`),!1;const r=parseFloat(t.toString()).toFixed(2);if(s==null||isNaN(parseInt(s.toString())))return u.error(`logPurchase requires an integer quantity, got ${s}, ignoring.`),!1;const a=parseInt(s.toString());if(a<1||a>Ss)return u.error(`logPurchase requires a quantity >1 and <${Ss}, got ${a}, ignoring.`),!1;if(e=e!=null?e.toUpperCase():e,!ms(e))return u.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 c=p.l();if(c&&c.$r(i))return u.info(`Purchase "${i}" is blocklisted, ignoring.`),!1;const h=V.Dt(N.Pr,{pid:i,c:e,p:r,q:a,pr:l});if(h.lt){u.info(`Logged ${a} purchase${a>1?"s":""} of "${i}" for ${e} ${r}.`);for(const d of h.Ce)H.o().Ee(W.qr,[i,n],d)}return h.lt}const br=Object.freeze(Object.defineProperty({__proto__:null,logPurchase:pr},Symbol.toStringTag,{value:"Module"}));function Wr(){if(!p.rr())return;const i=p.nn();if(!i)return;i.openSession();const t=L._s.Xs,e=new L(t,u);e.kr(t.Ws.yr,(s,n)=>{const r=n.lastClick,a=n.trackingString;u.info(`Firing push click trigger from ${a} push click at ${r}`);const o=i.Fr(r,a),l=function(){H.o().Ee(W.Sr,[a],o)};
2i.Ar(l,l),e.ge(t.Ws.yr,s)}),e.Qs(t.Ws.Br,function(s){i.Dr(s)})}function Zr(){p.rr()&&p.removeAllSubscriptions()}function mr(i){if(!p.rr())return;const t=p.nn();t&&t.requestImmediateDataFlush(i)}const gr=Object.freeze(Object.defineProperty({__proto__:null,requestImmediateDataFlush:mr},Symbol.toStringTag,{value:"Module"}));function Qr(i){u.setLogger(i)}function ta(i){if(!p.rr()||i===""||!dt(i,"set signature","signature",!1))return!1;const t=p.Er();return!!t&&(t.setSdkAuthenticationSignature(i),!0)}function ea(i){var t;if(p.rr())return(t=p.Er())===null||t===void 0?void 0:t.subscribeToSdkAuthenticationFailures(i)}function sa(){u.toggleLogging()}function ia(){if(p.rr())return U.isPushBlocked()}function na(){if(p.rr())return U.isPushPermissionGranted()}function ra(){if(p.rr())return U.isPushSupported()}function aa(i,t){if(p.rr())return ft.ra().registerPush((e,s,n)=>{const r=p.nn();r&&r.requestImmediateDataFlush(),typeof i=="function"&&i(e,s,n)},t)}function vr(i,t){if(p.rr())return ft.ra().subscribe((e,s,n)=>{const r=p.nn();r&&r.requestImmediateDataFlush(),typeof i=="function"&&i(e,s,n)},t)}const bi=Object.freeze(Object.defineProperty({__proto__:null,requestPushPermission:vr},Symbol.toStringTag,{value:"Module"}));class mi{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){u.info(`Property is not of type ${t}.`)}rp(t){u.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 J extends mi{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[J.bs.qs]=this.id,t[J.bs.Jr]=this.enabled,t[J.bs.Nr]=this.properties,t[J.bs.Or]=this.trackingString,t}}J.bs={qs:"id",Jr:"e",Nr:"pr",Or:"fts"},J.ei={qs:"id",Jr:"enabled",Nr:"properties",Or:"fts"};function yr(i){if(i[J.ei.qs]&&typeof i[J.ei.Jr]=="boolean")return new J(i[J.ei.qs],i[J.ei.Jr],i[J.ei.Nr],i[J.ei.Or]);u.info(`Unable to create feature flag from ${JSON.stringify(i,null,2)}`)}function wr(i){if(i[J.bs.qs]&&typeof i[J.bs.Jr]=="boolean")return new J(i[J.bs.qs],i[J.bs.Jr],i[J.bs.Nr],i[J.bs.Or]);u.info(`Unable to deserialize feature flag from ${JSON.stringify(i,null,2)}`)}class Sr extends le{constructor(t,e,s,n){super(),this.h=t,this.B=e,this.j=s,this.C=n,this.Rr=[],this.Ur=0,this.h=t,this.B=e,this.j=s,this.C=n,this.Xr=null,this.Gr=new q,this.D=10,this.N=null,this.F=null,p.S(this.Gr)}q(t){var e;if(!((e=this.h)===null||e===void 0)&&e.Kr()&&t!=null&&t.feature_flags){this.Rr=[];for(const s of t.feature_flags){const n=yr(s);n&&this.Rr.push(n)}this.Ur=new Date().getTime(),this.Lr(),this.Gr.A(this.Rr)}}Qr(){let t={};this.j&&(t=this.j.St(f.It.Vr));const e={};for(const s in t){const n=wr(t[s]);n&&(e[n.id]=n)}return e}Yr(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.Zr))||{}}ho(t){this.j&&this.j.Pt(f.It.Zr,t)}Kt(t){return this.Gr.Ut(t)}refreshFeatureFlags(t,e,s=!1,n=!0,r="sdk"){const a=()=>{typeof e=="function"&&e(),this.Gr.A(this.Rr)};if(!this.lo(s,r))return!this.Xr&&this.h&&(this.Xr=this.h.do(()=>{this.refreshFeatureFlags(t,e,!1,!0,r)})),void a();const o=this.B;if(!o)return void a();n&&this.Y();const l=o.Z({},!0),c=o.tt(l,I.it.vo,r);let h=!1;o.et(l,(d=-1)=>{const b=this.B;if(!b)return void a();const g=new Date().valueOf();I.nt(this.j,I.it.vo,g),d!==-1&&c.push(["X-Braze-Req-Tokens-Remaining",d.toString()]),Wt.ot({url:`${b.ht()}/feature_flags/sync`,headers:c,data:l,lt:w=>{if(!b.ut(l,w,c))return h=!0,void a();b.ct(),this.q(w),h=!1,typeof t=="function"&&t()},error:w=>{b.dt(w,"retrieving feature flags"),h=!0,a()},ft:(w,y)=>{var S,E,x;let k;if(h){const R=((S=this.h)===null||S===void 0?void 0:S.vt())||ee,D=((E=this.h)===null||E===void 0?void 0:E.gt()
2)||se,F=((x=this.h)===null||x===void 0?void 0:x.bt())||ie;let M=this.N;(M==null||M<R)&&(M=R),k=Math.min(F,Ht(R,M*D))}b.yt(y,()=>{this.refreshFeatureFlags(t,e,s,!0,r)},I.it.vo,R=>this.Bt(R),()=>this.Y(),k)}})},I.it.vo,e)}Y(){this.F!=null&&(clearTimeout(this.F),this.F=null)}Bt(t){this.Y(),this.F=t}lo(t,e="sdk"){if(!this.h)return!1;if(!t&&e!=="dust"){const s=this.h.Fo();if(s==null)return!1;let n=!1;if(!isNaN(s)){if(s===-1)return u.info("Feature flag refreshes not allowed"),!1;n=new Date().getTime()>=(this.Ur||0)+1e3*s}if(!n)return u.info(`Feature flag refreshes were rate limited to ${s} seconds`),!1}return this.h.Kr()}po(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.jo))||null}wo(){var t,e;(t=this.j)===null||t===void 0||t.Pt(f.It.jo,(e=this.C)===null||e===void 0?void 0:e.$t())}yo(){var t;const e=(t=this.C)===null||t===void 0?void 0:t.$t(),s=this.po();return s==null||e===s}Lr(){if(!this.j)return;const t={};for(const e of this.Rr){const s=e.qt();t[e.id]=s}this.j.Pt(f.It.Vr,t),this.j.Pt(f.It.bo,this.Ur),this.wo()}changeUser(){this.Y()}clearData(){this.Y()}}const tt={i:!1,provider:null,o:()=>(tt.t(),tt.provider||(tt.provider=new Sr(p.l(),p.m(),p.p(),p.u()),p.v(tt.provider),p.ar("ffr",()=>{var i;(i=tt.provider)===null||i===void 0||i.refreshFeatureFlags(void 0,void 0,!1,!0,"dust")})),tt.provider),t:()=>{tt.i||(p.g(tt),tt.i=!0)},destroy:()=>{tt.provider=null,tt.i=!1}};function gi(i,t,e=!1){if(p.rr())return tt.o().refreshFeatureFlags(i,t,e)}function Er(i,t){gi(i,t)}const Ds=Object.freeze(Object.defineProperty({__proto__:null,default:gi,refreshFeatureFlags:Er},Symbol.toStringTag,{value:"Module"}));function oa(i){if(!p.rr())return;const t=p.l();if(t&&!t.Kr())return null;const e=tt.o().Qr();return e[i]?e[i]:null}function xr(){if(!p.rr())return;const i=[],t=p.l();if(t&&!t.Kr())return i;const e=tt.o().Qr();for(const s in e)i.push(e[s]);return i}function la(i){if(!p.rr())return;const t=tt.o();if(t.yo()){const e=xr();e&&typeof i=="function"&&i(e)}return t.Kt(i)}function ua(i){if(!p.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=tt.o().Qr();if(!e[i])return u.info(t),!1;const s=e[i].trackingString;if(!s)return u.info(t),!1;const n=tt.o().Yr();if(n[s])return u.info("Not logging another feature flag impression. This ID was already logged this session."),!1;n[s]=!0,tt.o().ho(n);const r={fid:i,fts:s};return V.Dt(N.xo,r).lt}class $e extends mi{constructor(t,e,s,n=!1,r=!1,a=-1,o={},l=null){super(o),this.id=t,this.placementId=e,this.html=s,this.ss=n,this.isControl=r,this.ts=a,this.G=l,this.id=t,this.placementId=e,this.html=s,this.ss=n,this.isControl=r,this.ts=a,this.hs=!1,this.rs=!1,this.es=null}subscribeToDismissedEvent(t){return this.ns().Ut(t)}removeSubscription(t){this.es!=null&&this.es.removeSubscription(t)}removeAllSubscriptions(){this.es!=null&&this.es.removeAllSubscriptions()}os(){return this.isControl}ns(){return this.es==null&&(this.es=new q),this.es}Ft(){return!this.rs&&(this.rs=!0,this.ns().A(),this.removeAllSubscriptions(),!0)}qt(){return{id:this.id,pid:this.placementId,html:this.html,its:this.ss,ic:this.isControl,eat:this.ts,pr:this.properties,sk:this.G}}}function Ir(i){return new $e(i.id,i.pid,i.html,i.its,i.ic,i.eat,i.pr,i.sk||null)}function Ar(i){return new $e(i.id,i.placement_id,i.html,i.is_test_send,i.is_control,i.expires_at,i.properties,i.stable_key||null)}class kr extends le{constructor(t,e,s,n){super(),this.h=t,this.B=e,this.j=s,this.C=n,this.banners={},this.h=t,this.B=e,this.j=s,this.C=n,this.D=10,this.N=null,this.F=null,this.R=new q,p.S(this.R),this.T=null,this.I=null}q(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(),r=this.$(),a=this.L();this.banners={};const o=t.banners;for(const l in o){const c=this.K(l,s,a),h=o[l];let d=null;if(h!=null&&h.banner!=null&&(d=h.banner),this.U(l,d,s,c,n,r)){if(c){const g=n[l];g&&(this.banners[l]=g)}continue}let b=null;d!=null&&(b=Ar(d)),b&&(this.banners[l]=b)}this.W(),this.R.A(this.banners)}}U(t,e,s,n,r,a){return!this.M(t,e,r)&&s!=null&&(!!n||this.X(e,a,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;
2if(typeof n!="string"||n.length===0)return!1;const r=s[t],a=r?.G;return typeof a=="string"&&a.length!==0&&a!==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 r of e){if(r.stable_key!==n)continue;const a=r.dismissal_time;if(typeof a=="number"&&!isNaN(a)&&a>=s)return!0}return!1}_(t){var e;const s=(e=t?.dismissals)===null||e===void 0?void 0:e.acknowledged;if(!s||!B(s)||s.length===0)return;const n=this.$();if(n.length===0)return;const r={};for(const o of s)o.banner_id&&o.dismissal_time&&(r[this.H(o.banner_id,o.dismissal_time)]=!0);const a=n.filter(o=>!r[this.H(o.banner_id,o.dismissal_time)]);a.length!==n.length&&this.J(a)}H(t,e){return`${t}:${e}`}O(t,e,s,n=!0){var r;const a=()=>{typeof s=="function"&&s()};if(!this.P())return void((r=this.h)===null||r===void 0||r.V(()=>{this.O(t,e,s)}));const o=this.B;if(!o)return void a();n&&this.Y();const l=o.Z({},!0);l.time_ms=new Date().valueOf();const c=[];for(const g of t)c.push({id:g});l.placements=c;const h=this.$().map(g=>({banner_id:g.banner_id,dismissal_time:g.dismissal_time}));l.pending_dismissals=h;const d=o.tt(l,I.it.st);let b=!1;o.et(l,(g=-1)=>{const w=this.B;if(!w)return void a();const y=new Date().valueOf();I.nt(this.j,I.it.st,y),g!==-1&&d.push(["X-Braze-Req-Tokens-Remaining",g.toString()]);const S=l.time_ms;S==null||typeof S!="number"||isNaN(S)||this.rt(t,S),Wt.ot({url:`${w.ht()}/banners/sync`,headers:d,data:l,lt:E=>{if(!w.ut(l,E,d))return b=!0,void a();w.ct(),this.q(E),b=!1,typeof e=="function"&&e()},error:E=>{w.dt(E,"retrieving banners"),b=!0,a()},ft:(E,x)=>{var k,R,D;let F;if(this.I=t,b){const M=((k=this.h)===null||k===void 0?void 0:k.vt())||ee,z=((R=this.h)===null||R===void 0?void 0:R.gt())||se,Y=((D=this.h)===null||D===void 0?void 0:D.bt())||ie;let A=this.N;(A==null||A<M)&&(A=M),F=Math.min(Y,Ht(M,A*z))}w.yt(x,()=>{this.O(t,e,s,!1)}
2,I.it.st,M=>this.Bt(M),()=>this.Y(),F)}})},I.it.st,s)}jt(){return this.I}Ct(t,e){const s={id:t.id};return e&&(s.bid=e),V.Dt(N.Nt,s).lt}wt(t){if(!t.G)return!1;const e=this.$();if(e.some(a=>a.banner_id===t.id&&a.stable_key===t.G))return u.info(`Not dismissing banner ID ${t.id}. The banner has already been dismissed.`),!1;const s={id:t.id},n=this.k(),r=n[t.placementId];return r&&r.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),t.Ft(),V.Dt(N.Rt,s).lt}Y(){this.F!=null&&(clearTimeout(this.F),this.F=null)}Bt(t){this.Y(),this.F=t}k(){let t={};this.j&&(t=this.j.St(f.It.Tt));const e={};for(const s in t){let n=null;t[s]!=null&&(n=Ir(t[s])),n&&(e[n.placementId]=n)}return e}W(){var t;if(!this.j)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.j.Pt(f.It.Tt,e),this._t()}_t(){var t,e;(t=this.j)===null||t===void 0||t.Pt(f.It.kt,(e=this.C)===null||e===void 0?void 0:e.$t())}xt(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.kt))||null}Et(){return this.T}Lt(t){this.T=t}zt(){var t;const e=(t=this.C)===null||t===void 0?void 0:t.$t(),s=this.xt();return s==null||e===s}Kt(t){return this.R.Ut(t)}Wt(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.At))||{}}Mt(t){this.j&&this.j.Pt(f.It.At,t)}$(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.Xt))||[]}J(t){var e;if(!this.j)return;const s=(e=this.h)===null||e===void 0?void 0:e.Gt(),n=s??js,r=t.length<=n?t:t.slice(-n);this.j.Pt(f.It.Xt,r)}L(){var t;return((t=this.j)===null||t===void 0?void 0:t.St(f.It.Ht))||{}}rt(t,e){if(!this.j)return;const s=this.L();for(const n of t)s[n]=e;this.j.Pt(f.It.Ht,s)}changeUser(){this.Jt(),this.Y()}clearData(){this.Y()}P(){return!!this.h&&(!!this.h.Ot()||(this.h.Qt()!==0&&this.Jt(),!1))}Jt(){this.banners={},this.j&&(this.j.Vt(f.It.Tt),this.j.Vt(f.It.At),this.j.Vt(f.It.Xt),this.j.Vt(f.It.Ht)),this.R.A({})}}const st={i:!1,provider:null,o:()=>(st.t(),st.provider||(st.provider=new kr(p.l(),p.m(),p.p(),p.u()),p.v(st.provider)),st.provider),t:()=>{st.i||(p.g(st),st.i=!0)},destroy:()=>{st.provider=null,st.i=!1}};function vi(i,t){const e=i[t];if(!e)return null;const s=e.ts,n=new Date().valueOf();return s!==-1&&1e3*s<n?(u.info(`Banner with ID: ${e.id} and placement ID: ${t} has expired.`),null):e}function ca(i){var t;if(!p.rr())return;((t=p.l())===null||t===void 0?void 0:t.Ot())===!1&&u.error(Qt.aa);const e=st.o();return e.P()?vi(e.k(),i):null}function _r(i,t){if(!p.rr())return;if(!(i instanceof $e))return u.error("Banner argument to logBannerClick must be an Banner object."),!1;const e=st.o(),s=e.k();return lt(s).length===0?(u.info("Not logging banner click. No banners exist."),!1):s[i.placementId]?e.Ct(i,t):(u.info(`Not logging banner click for ID ${i.placementId}. The placement ID did not correspond to any banner.`),!1)}function yi(i){if(!p.rr())return;if(!(i instanceof $e))return u.error("Banner argument to logBannerDismissal must be a Banner object."),!1;const t=st.o(),e=t.k();return lt(e).length===0?(u.info("Not logging banner dismissal. No banners exist."),!1):e[i.placementId]?t.wt(i):(u.info(`Not logging banner dismissal for ID ${i.placementId}. The placement ID did not correspond to any banner.`),!1)}function wi(i){const t=i.getAttribute(Qt.ea);t!=null&&ni(t),i&&i.parentNode&&i.parentNode.removeChild(i)}const gs="data-ab-banner-placement-id",Tr="ab-html-banner",Cr="ab-html-control-banner";function Nr(i){const t=document.createElement("div");return t.id=i.id,t.className="ab-html-control-banner",t.setAttribute(gs,i.placementId),t}function Ps(i,t){if(i.os())return Nr(i);const e=document.createElement("iframe");return e.id=i.id,t&&e.setAttribute("nonce",t),e.className="ab-html-banner",e.setAttribute(gs,i.placementId),e.setAttribute("title","Banner"),ti(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 r=Object.assign(Object.assign({},Qs(e)),{logClick:function(){_r(i,...arguments)},closeMessage:function(){(function(a){const o=document.getElementById(a.id);o&&wi(o),yi(a)})(i)},setBannerHeight:a=>{isNaN(a)||!isFinite(a)||a<0?u.warn(`Invalid banner height: ${a}`):e.style.height=`${a}px`}});s.brazeBridge=r,s.appboyBridge=r,s.dispatchEvent(new CustomEvent("ab.BridgeReady"))},e}function Or(i){if(!p.rr())return;if(!i||i.length<=0)return!1;const t=st.o(),e=t.k();if(lt(e).length===0)return u.info("Not logging banners impression. No banners exist."),!1;let s=t.Wt(),n=!1;if(Object.keys(s).some(o=>e[o]!==void 0)){const o={};for(const l of Object.keys(s)){const c=e[l];c&&s[l]&&(o[c.id]=!0)}s=o,n=!0}const r=[];for(const o of i){const l=e[o];l?s[l.id]?u.info(`Not logging banners impression for ID ${o}. This ID was already logged this session.`):(s[l.id]=!0,r.push(l.id)):u.info(`Not logging banners impression for ID ${o}. The placement ID did not correspond to any banner.`)}if(r.length===0)return n&&t.Mt(s),!1;t.Mt(s);const a={ids:r};return V.Dt(N.ro,a).lt}function Rs(){const i=document.querySelectorAll(`.${Tr}, .${Cr}`),t=[];for(let e=0;e<i.length;e++){const s=i[e],n=s.getAttribute(gs);if(!n)continue;const r=xe.oo(s),a=xe.no(s);if(r&&a)continue;const o=Fs(s),l=Gs(s);o&&!r&&ai(s),l&&!a&&li(s),xe.oo(s)&&xe.no(s)&&t.push(n)}t.length>0&&Or(t)}function Dr(){if(!p.rr())return;const i={},t=p.l();
2if(t?.Ot()===!1&&u.error(Qt.aa),!t?.Ot())return i;const e=st.o().k();for(const s in e)i[s]=vi(e,s);return i}function Pr(i){var t;if(!p.rr())return;const e=st.o();if(e.zt()){const n=Dr();n&&typeof i=="function"&&i(n)}const s=e.Kt(i);if(!e.Et()){const n=(t=p.nn())===null||t===void 0?void 0:t.rn(()=>{const r=e.jt();r&&r.length>0&&e.O(r)});n&&e.Lt(n)}return s}function ha(i,t){if(!p.rr())return;if(!i)return void u.error("Not inserting banner: banner was not provided.");if(!t)return void u.error("Not inserting banner: parentNode was not provided.");if(!p.er(T.nr))return void u.error("Banners are disabled. Use the 'allowUserSuppliedJavascript' option for braze.initialize to enable these messages.");on();const e=Ps(i,p.er(T.sr)),s=Pr(n=>{const r=n[i.placementId];r?t.replaceChildren(Ps(r,p.er(T.sr))):wi(e)});s&&e.setAttribute(Qt.ea,s),t.replaceChildren(e),ne(window,"scroll",Rs),Rs()}function Rr(i,t,e){if(!p.rr())return void u.warn(G.ee);const s=p.l();if(!s)return;if(!B(i)||i.length===0)return void u.warn("placementIds should be a non-empty array.");const n=st.o();if(s.Ot()===!1&&u.error(Qt.aa),!n.P())return void s.V(()=>{Rr(i,t,e)});const r=s.re();i.length>r&&(u.warn(`Number of placement IDs requested exceeds the max allowed. Trimming placementIds array from length ${i.length} to ${r} (max allowed).`),i=i.slice(0,r)),(i=i.filter(a=>!!Gi(a)||(u.warn(`Placement ID should be a valid utf8 string with no whitespaces, filtering out: ${a}`),!1))).length!==0&&(u.info(`Requesting banners for placement IDs: ${JSON.stringify(i)}`),n.O(i,t,e))}function da(i){return yi(i)}export{$e as Banner,Zn as BrazeSdkMetadata,Ni as CaptionedImage,m as Card,Oi as ClassicCard,St as ContentCards,Me as ControlCard,Ot as ControlMessage,Rt as DeviceProperties,J as FeatureFlag,Xt as FullScreenMessage,Bt as HtmlMessage,Ci as ImageOnly,j as InAppMessage,$t as InAppMessageButton,ce as ModalMessage,Zt as SlideUpMessage,P as User,re as WindowUtils,Fr as addSdkMetadata,Mr as automaticallyShowInAppMessages,Qn as changeUser,Ur as deferInAppMessage,Gr as destroy,er as disableSDK,da as dismissBanner,qr as enableSDK,Dr as getAllBanners,xr as getAllFeatureFlags,ca as getBanner,$r as getCachedContentCards,zr as getDeferredInAppMessage,Vr as getDeviceId,oa as getFeatureFlag,Ws as getUser,Br as handleBrazeAction,Xn as hideContentCards,Kr as initialize,ha as insertBanner,Yr as isDisabled,Hr as isInitialized,ia as isPushBlocked,na as isPushPermissionGranted,ra as isPushSupported,_r as logBannerClick,Or as logBannerImpressions,Bn as logCardDismissal,Un as logContentCardClick,Mn as logContentCardImpressions,sr as logCustomEvent,Jr as logEcommerceEvent,ua as logFeatureFlagImpression,mn as logInAppMessageButtonClick,cn as logInAppMessageClick,ts as logInAppMessageHtmlClick,Ze as logInAppMessageImpression,pr as logPurchase,Xr as logout,Wr as openSession,Er as refreshFeatureFlags,aa as registerPush,Zr as removeAllSubscriptions,ni as removeSubscription,Rr as requestBannersRefresh,Ln as requestContentCardsRefresh,mr as requestImmediateDataFlush,vr as requestPushPermission,Qr as setLogger,ta as setSdkAuthenticationSignature,Jn as showContentCards,yn as showInAppMessage,Pr as subscribeToBannersUpdates,Wn as subscribeToContentCardsUpdates,la as subscribeToFeatureFlagsUpdates,wn as subscribeToInAppMessage,ea as subscribeToSdkAuthenticationFailures,Lr as toggleContentCards,sa as toggleLogging,di as unregisterPush,ar 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.