@braze/web-sdk-no-amd
Version:
Braze SDK without AMD for web sites and other JS platforms.
101 lines • 112 kB
JavaScript
/*
* Braze Web SDK v3.5.1
* (c) Braze, Inc. 2022 - http://braze.com
* License available at https://github.com/Appboy/appboy-web-sdk/blob/master/LICENSE
* Compiled on 2022-03-24
*/
(function(){(function(b,a){if("object"===typeof module&&module.exports) {var e = a();module.exports=e;module.exports.default=e;}else if(b.appboy){var d=a(),c;for(c in d)b.appboy[c]=d[c]}else b.appboy=a()})("undefined"!==typeof self?self:this,function(){var appboyInterface={};var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}var ca="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function fa(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ha=fa(this);function ia(a,b){if(b)a:{var c=ha;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&da(c,a,{configurable:!0,writable:!0,value:b})}}var ja;
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={eg:!0},ma={};try{ma.__proto__=la;ka=ma.eg;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
function oa(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Kh=b.prototype}
ia("String.prototype.repeat",function(a){return a?a:function(b){if(null==this)throw new TypeError("The 'this' value for String.prototype.repeat must not be null or undefined");var c=this+"";if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
ia("Promise",function(a){function b(f){this.Ob=0;this.Dd=void 0;this.mb=[];var h=this.ed();try{f(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.Fa=null}function d(f){return f instanceof b?f:new b(function(h){h(f)})}if(a)return a;c.prototype.Ae=function(f){if(null==this.Fa){this.Fa=[];var h=this;this.Be(function(){h.vg()})}this.Fa.push(f)};var e=ha.setTimeout;c.prototype.Be=function(f){e(f,0)};c.prototype.vg=function(){for(;this.Fa&&this.Fa.length;){var f=this.Fa;this.Fa=[];for(var h=
0;h<f.length;++h){var k=f[h];f[h]=null;try{k()}catch(m){this.ig(m)}}}this.Fa=null};c.prototype.ig=function(f){this.Be(function(){throw f;})};b.prototype.ed=function(){function f(m){return function(t){k||(k=!0,m.call(h,t))}}var h=this,k=!1;return{resolve:f(this.Jg),reject:f(this.Bd)}};b.prototype.Jg=function(f){if(f===this)this.Bd(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof b)this.Zg(f);else{a:switch(typeof f){case "object":var h=null!=f;break a;case "function":h=!0;break a;
default:h=!1}h?this.Ig(f):this.He(f)}};b.prototype.Ig=function(f){var h=void 0;try{h=f.then}catch(k){this.Bd(k);return}"function"==typeof h?this.$g(h,f):this.He(f)};b.prototype.Bd=function(f){this.Ne(2,f)};b.prototype.He=function(f){this.Ne(1,f)};b.prototype.Ne=function(f,h){if(0!=this.Ob)throw Error("Cannot settle("+f+", "+h+"): Promise already settled in state"+this.Ob);this.Ob=f;this.Dd=h;this.wg()};b.prototype.wg=function(){if(null!=this.mb){for(var f=0;f<this.mb.length;++f)g.Ae(this.mb[f]);this.mb=
null}};var g=new c;b.prototype.Zg=function(f){var h=this.ed();f.sc(h.resolve,h.reject)};b.prototype.$g=function(f,h){var k=this.ed();try{f.call(h,k.resolve,k.reject)}catch(m){k.reject(m)}};b.prototype.then=function(f,h){function k(z,A){return"function"==typeof z?function(B){try{m(z(B))}catch(C){t(C)}}:A}var m,t,x=new b(function(z,A){m=z;t=A});this.sc(k(f,m),k(h,t));return x};b.prototype.catch=function(f){return this.then(void 0,f)};b.prototype.sc=function(f,h){function k(){switch(m.Ob){case 1:f(m.Dd);
break;case 2:h(m.Dd);break;default:throw Error("Unexpected state: "+m.Ob);}}var m=this;null==this.mb?g.Ae(k):this.mb.push(k)};b.resolve=d;b.reject=function(f){return new b(function(h,k){k(f)})};b.race=function(f){return new b(function(h,k){for(var m=ba(f),t=m.next();!t.done;t=m.next())d(t.value).sc(h,k)})};b.all=function(f){var h=ba(f),k=h.next();return k.done?d([]):new b(function(m,t){function x(B){return function(C){z[B]=C;A--;0==A&&m(z)}}var z=[],A=0;do z.push(void 0),A++,d(k.value).sc(x(z.length-
1),t),k=h.next();while(!k.done)})};return b});var pa={ih:function(a){var b="=".repeat((4-a.length%4)%4);a=(a+b).replace(/\-/g,"+").replace(/_/g,"/");a=atob(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}};var qa={Gb:function(){function a(b){var c=(Math.random().toString(16)+"000000000").substr(2,8);return b?"-"+c.substr(0,4)+"-"+c.substr(4,4):c}return a()+a(!0)+a(!0)+a()}};function ra(a){var b=q;this.te="undefined"===typeof window?self:window;this.C=a;this.F=b}function sa(a){if("indexedDB"in a.te)return a.te.indexedDB}
function ta(a){try{if(null==sa(a))return!1;sa(a).open("Braze IndexedDB Support Test");if("undefined"!==typeof window){var b=window.Bh||window.hb||window.Gh;if(b&&b.Lg&&b.Lg.id)return a.F.info("Not using IndexedDB for storage because we are running inside an extension"),!1}return!0}catch(c){return a.F.info("Not using IndexedDB for storage due to following error: "+c),!1}}
function ua(a,b,c){var d=sa(a).open(a.C.O,a.C.VERSION);if(null==d)return"function"===typeof c&&c(),!1;d.onupgradeneeded=function(e){a.F.info("Upgrading indexedDB "+a.C.O+" to v"+a.C.VERSION+"...");e=e.target.result;for(var g in a.C.G)a.C.G.hasOwnProperty(g)&&!e.objectStoreNames.contains(a.C.G[g])&&e.createObjectStore(a.C.G[g])};d.onsuccess=function(e){var g=e.target.result;g.onversionchange=function(){g.close();"function"===typeof c&&c();a.F.error("Needed to close the database unexpectedly because of an upgrade in another tab")};
b(g)};d.onerror=function(e){a.F.info("Could not open indexedDB "+a.C.O+" v"+a.C.VERSION+": "+e.target.errorCode);"function"===typeof c&&c();return!0};return!0}
ra.prototype.setItem=function(a,b,c,d,e){if(!ta(this))return"function"===typeof e&&e(),!1;var g=this;return ua(this,function(f){f.objectStoreNames.contains(a)?(f=f.transaction([a],"readwrite").objectStore(a).put(c,b),f.onerror=function(){g.F.error("Could not store object "+b+" in "+a+" on indexedDB "+g.C.O);"function"===typeof e&&e()},f.onsuccess=function(){"function"===typeof d&&d()}):(g.F.error("Could not store object "+b+" in "+a+" on indexedDB "+g.C.O+" - "+a+" is not a valid objectStore"),"function"===
typeof e&&e())},e)};ra.prototype.getItem=function(a,b,c){if(!ta(this))return!1;var d=this;return ua(this,function(e){e.objectStoreNames.contains(a)?(e=e.transaction([a],"readonly").objectStore(a).get(b),e.onerror=function(){d.F.error("Could not retrieve object "+b+" in "+a+" on indexedDB "+d.C.O)},e.onsuccess=function(g){g=g.target.result;null!=g&&c(g)}):d.F.error("Could not retrieve object "+b+" in "+a+" on indexedDB "+d.C.O+" - "+a+" is not a valid objectStore")})};
function va(a,b,c,d){ta(a)?ua(a,function(e){e.objectStoreNames.contains(b)?(e=e.transaction([b],"readonly").objectStore(b).openCursor(null,"prev"),e.onerror=function(){a.F.error("Could not open cursor for "+b+" on indexedDB "+a.C.O);"function"===typeof d&&d()},e.onsuccess=function(g){g=g.target.result;null!=g&&null!=g.value&&null!=g.key?c(g.key,g.value):"function"===typeof d&&d()}):(a.F.error("Could not retrieve last record from "+b+" on indexedDB "+a.C.O+" - "+b+" is not a valid objectStore"),"function"===
typeof d&&d())},d):"function"===typeof d&&d()}function wa(a,b,c){ta(a)&&ua(a,function(d){d.objectStoreNames.contains(b)?d.transaction([b],"readwrite").objectStore(b)["delete"](c).onerror=function(){a.F.error("Could not delete record "+c+" from "+b+" on indexedDB "+a.C.O)}:a.F.error("Could not delete record "+c+" from "+b+" on indexedDB "+a.C.O+" - "+b+" is not a valid objectStore")})}
function xa(a,b,c){ta(a)&&ua(a,function(d){if(d.objectStoreNames.contains(b)){var e=d.transaction([b],"readwrite").objectStore(b);d=e.openCursor();var g=[];d.onerror=function(){0<g.length?(a.F.info("Cursor closed midway through for "+b+" on indexedDB "+a.C.O),c(g)):a.F.error("Could not open cursor for "+b+" on indexedDB "+a.C.O)};d.onsuccess=function(f){var h=f.target.result;null!=h?(null!=h.value&&null!=h.key&&(e["delete"](h.key).onsuccess=function(){g.push(h.value)}),h.continue()):0<g.length&&c(g)}}else a.F.error("Could not retrieve objects from "+
b+" on indexedDB "+a.C.O+" - "+b+" is not a valid objectStore")})}
ra.prototype.clearData=function(){if(!ta(this))return!1;var a=[],b;for(b in this.C.G)this.C.G.hasOwnProperty(b)&&this.C.G[b]!==this.C.G.rb&&a.push(this.C.G[b]);var c=this;return ua(this,function(d){d=d.transaction(a,"readwrite");for(var e=0;e<a.length;e++)d.objectStore(a[e]).clear().onerror=function(){c.F.error("Could not clear "+this.source.name+" on indexedDB "+c.C.O)};d.onerror=function(){c.F.error("Could not clear object stores on indexedDB "+c.C.O)}})};var u={md:function(a){if(void 0!==a||void 0===u.Ca)u.Ca=!!a;u.qe||(u.qe=!0)},Db:function(){u.qe=!1;u.Ca=void 0;u.F=void 0},Fd:function(a){"function"!==typeof a?u.info("Ignoring setLogger call since logger is not a function"):(u.md(),u.F=a)},Jd:function(){u.md();u.Ca?(console.log("Disabling Appboy logging"),u.Ca=!1):(console.log("Enabled Appboy logging"),u.Ca=!0)},info:function(a){u.Ca&&(a="Appboy: "+a,null!=u.F?u.F(a):console.log(a))},warn:function(a){u.Ca&&(a="Appboy SDK Warning: "+a+" (v3.5.1)",
null!=u.F?u.F(a):console.warn(a))},error:function(a){u.Ca&&(a="Appboy SDK Error: "+a+" (v3.5.1)",null!=u.F?u.F(a):console.error(a))}};var w={CustomEvent:"ce",yf:"p",If:"pc",wh:"ca",zf:"i",Hc:"ie",af:"cci",cf:"ccic",Ze:"ccc",$e:"ccd",ce:"ss",Nf:"se",xf:"si",Qd:"sc",Pd:"sbc",wf:"sfe",df:"iec",Ff:"lr",Ue:"uae",Ye:"ci",Xe:"cc",Df:"lcaa",Ef:"lcar",ff:"inc",ef:"add",gf:"rem",hf:"set",Of:"sgu"},ya={uf:"feed_displayed",bf:"content_cards_displayed"},za={aa:{O:"AppboyServiceWorkerAsyncStorage",VERSION:6,G:{jf:"data",Wd:"pushClicks",Pc:"pushSubscribed",nh:"fallbackDevice",Ve:"cardUpdates",rb:"optOut",Td:"pendingData",Yd:"sdkAuthenticationSignature"},
eb:1}},q=u,y={Re:"allowCrawlerActivity",zc:"baseUrl",Hf:"noCookies",Nd:"devicePropertyAllowlist",Dc:"devicePropertyWhitelist",qf:"disablePushTokenMaintenance",sf:"enableLogging",tf:"enableSdkAuthentication",Gf:"manageServiceWorkerExternally",vf:"minimumIntervalBetweenTriggerActionsInSeconds",Mf:"sessionTimeoutInSeconds",Te:"appVersion",Lf:"serviceWorkerLocation",Jf:"safariWebsitePushId",Lc:"localization",We:"contentSecurityNonce",rf:"enableHtmlInAppMessages",Se:"allowUserSuppliedJavascript",qh:"inAppMessageZIndex",
sh:"openInAppMessagesInNewTab",uh:"openNewsFeedCardsInNewTab",xh:"requireExplicitInAppMessageDismissal",mh:"doNotLoadFontAwesome",Zd:"sdkFlavor",Ic:"language",rh:"openCardsInNewTab"};function Aa(a,b,c,d){a=Ba(a);return-1===a.indexOf(b)?(q.error(c+" Valid values from "+d+' are "'+a.join('"/"')+'".'),!1):!0}function Ca(a){return Array.isArray?Array.isArray(a):"[object Array]"===Object.prototype.toString.call(a)}function Da(a){return"[object Date]"===Object.prototype.toString.call(a)}function Ea(a){return"[object Object]"===Object.prototype.toString.call(a)}function Fa(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b}
function Ba(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&void 0!==a[c]&&b.push(a[c]);return b}
function Ga(a,b){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;var c=a.toString();if(c!==b.toString())return!1;switch(c){case "[object RegExp]":case "[object String]":return""+a===""+b;case "[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case "[object Date]":case "[object Boolean]":return+a===+b}c="[object Array]"===c;if(!c){if("object"!==typeof a||"object"!==typeof b)return!1;var d=a.constructor,e=b.constructor;if(d!==e&&!("function"===typeof d&&d instanceof
d&&"function"===typeof e&&e instanceof e)&&"constructor"in a&&"constructor"in b)return!1}d=[];e=[];for(var g=d.length;g--;)if(d[g]===a)return e[g]===b;d.push(a);e.push(b);if(c){g=a.length;if(g!==b.length)return!1;for(;g--;)if(!Ga(a[g],b[g]))return!1}else{c=Fa(a);g=c.length;if(Fa(b).length!==g)return!1;for(;g--;){var f=c[g];if(!b.hasOwnProperty(f)||!Ga(a[f],b[f]))return!1}}d.pop();e.pop();return!0};function Ha(a,b){a/=1E3;b&&(a=Math.floor(a));return a}function Ia(a){var b=parseInt(a);return null==a||isNaN(b)?null:new Date(1E3*b)}function Ja(a){return null!=a&&Da(a)?a.toISOString().replace(/\.[0-9]{3}Z$/,""):a}function Ka(a){return null==a||""===a?null:new Date(a)};function D(a,b,c,d,e){this.$a=a;this.type=b;this.time=null==c||""===c?(new Date).valueOf():c;this.sessionId=d;this.data=e}D.prototype.qc=function(){var a={name:this.type,time:Ha(this.time),data:this.data||{},session_id:this.sessionId};null!=this.$a&&(a.user_id=this.$a);return a};D.prototype.A=function(){return{u:this.$a,t:this.type,ts:this.time,s:this.sessionId,d:this.data}};function La(a){return null!=a&&Ea(a)&&null!=a.t&&""!==a.t}function Ma(a){return new D(a.u,a.t,a.ts,a.s,a.d)};function Na(a,b,c){null==a&&(a=qa.Gb());c=parseInt(c);if(isNaN(c)||0===c)c=(new Date).valueOf();this.ga=a;this.Cb=c;this.Kb=(new Date).valueOf();this.fd=b}Na.prototype.A=function(){return{g:this.ga,e:this.fd,c:this.Cb,l:this.Kb}};function Oa(a){for(var b=a.length,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);127<d&&2047>=d?b++:2047<d&&65535>=d&&(b+=2);56320<=d&&57343>=d&&c--}return b};function Qa(a,b,c,d){(d="string"===typeof a||null===a&&d)||q.error("Cannot "+b+" because "+c+' "'+a+'" is invalid.');return d}function Ra(a,b,c){var d=null!=a&&"string"===typeof a&&(""===a||a.match(Sa));d||q.error("Cannot "+b+" because "+c+' "'+a+'" is invalid.');return d}
function Ta(a,b,c,d,e){null==a&&(a={});if("object"!==typeof a||Ca(a))return q.error(b+" requires that "+c+" be an object. Ignoring "+e+"."),[!1,null];b=JSON.stringify(a);if(Oa(b)>Ua)return q.error("Could not "+d+" because "+c+" was greater than the max size of "+Va+"."),[!1,null];try{var g=JSON.parse(b)}catch(m){return q.error("Could not "+d+" because "+c+" did not contain valid JSON."),[!1,null]}for(var f in a){if(!Ra(f,d,"the "+e+" property name"))return[!1,null];c=a[f];if(null==c)delete a[f],delete g[f];
else{Da(c)&&(g[f]=Ja(c));var h=d,k="the "+e+' property "'+f+'"';(b=Ea(c)||Ca(c)?Wa(c,g[f]):Xa(c))||q.error("Cannot "+h+" because "+k+' "'+c+'" is invalid.');if(!b)return[!1,null]}}return[!0,g]}function Wa(a,b){if(Ca(a)&&Ca(b))for(var c=0;c<a.length&&c<b.length;c++){if(Da(a[c])&&(b[c]=Ja(a[c])),!Wa(a[c],b[c]))return!1}else if(Ea(a)){c=ba(Fa(a));for(var d=c.next();!d.done;d=c.next())if(d=d.value,Da(a[d])&&(b[d]=Ja(a[d])),!Wa(a[d],b[d]))return!1}else return Xa(a);return!0}
function Xa(a){var b=typeof a;return null==a||"number"===b||"boolean"===b||Da(a)||"string"===b}var Sa=/^[^\x00-\x1F\x22]+$/,Ya=new RegExp(/^.+@.+\..+$/),Ua=51200,Va="50KB";var E={};function F(a,b){this.f=a;this.H=b}n=F.prototype;n.o=function(a){null==a&&q.error("getUserId must be supplied with a callback. e.g., appboy.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})");"function"===typeof a&&a(this.f.o())};
n.fg=function(a,b){if(!Qa(a,"add alias","the alias",!1)||0>=a.length)return q.error("addAlias requires a non-empty alias"),!1;if(!Qa(b,"add alias","the label",!1)||0>=b.length)return q.error("addAlias requires a non-empty label"),!1;var c=this.H,d=new Za,e=$a(c.D),g=w.Ue;d.j.push(new D(c.f.o(),g,(new Date).valueOf(),e,{a:a,l:b}));d.h=ab(c.b,d.j);return d.h};n.Tg=function(a){return Qa(a,"set first name","the firstName",!0)?bb(this.f,"first_name",a):!1};
n.Xg=function(a){return Qa(a,"set last name","the lastName",!0)?bb(this.f,"last_name",a):!1};n.Rg=function(a){return null===a||"string"===typeof a&&null!=a.toLowerCase().match(Ya)?bb(this.f,"email",a):(q.error('Cannot set email address - "'+a+'" did not pass RFC-5322 validation.'),!1)};n.Ug=function(a){"string"===typeof a&&(a=a.toLowerCase());return null===a||Aa(cb,a,'Gender "'+a+'" is not a valid gender.',"User.Genders")?bb(this.f,"gender",a):!1};
n.Qg=function(a,b,c){if(null===a&&null===b&&null===c)return bb(this.f,"dob",null);a=parseInt(a);b=parseInt(b);c=parseInt(c);return isNaN(a)||isNaN(b)||isNaN(c)||12<b||1>b||31<c||1>c?(q.error("Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);"),!1):bb(this.f,"dob",""+a+"-"+b+"-"+c)};n.Og=function(a){return Qa(a,"set country","the country",!0)?bb(this.f,"country",a):!1};
n.Vg=function(a){return Qa(a,"set home city","the homeCity",!0)?bb(this.f,"home_city",a):!1};n.Wg=function(a){return Qa(a,"set language","the language",!0)?bb(this.f,"language",a):!1};n.Sg=function(a){return Aa(db,a,'Email notification setting "'+a+'" is not a valid subscription type.',"User.NotificationSubscriptionTypes")?bb(this.f,"email_subscribe",a):!1};
n.Gd=function(a){return Aa(db,a,'Push notification setting "'+a+'" is not a valid subscription type.',"User.NotificationSubscriptionTypes")?bb(this.f,"push_subscribe",a):!1};n.Yg=function(a){return Qa(a,"set phone number","the phoneNumber",!0)?null===a||a.match(eb)?bb(this.f,"phone",a):(q.error('Cannot set phone number - "'+a+'" did not pass validation.'),!1):!1};n.Ng=function(a){return bb(this.f,"image_url",a)};
n.wc=function(a,b,c,d,e){if(null==a||null==b)return q.error("Cannot set last-known location - latitude and longitude are required."),!1;a=parseFloat(a);b=parseFloat(b);null!=c&&(c=parseFloat(c));null!=d&&(d=parseFloat(d));null!=e&&(e=parseFloat(e));return isNaN(a)||isNaN(b)||null!=c&&isNaN(c)||null!=d&&isNaN(d)||null!=e&&isNaN(e)?(q.error("Cannot set last-known location - all supplied parameters must be numeric."),!1):90<a||-90>a||180<b||-180>b?(q.error("Cannot set last-known location - latitude and longitude are bounded by \u00b190 and \u00b1180 respectively."),
!1):null!=c&&0>c||null!=e&&0>e?(q.error("Cannot set last-known location - accuracy and altitudeAccuracy may not be negative."),!1):this.H.wc(this.f.o(),a,b,d,c,e).h};
n.Ed=function(a,b){if(!Ra(a,"set custom user attribute","the given key"))return!1;var c=typeof b,d=Da(b),e=Ca(b);if("number"!==c&&"boolean"!==c&&!d&&!e&&null!==b&&!Ra(b,'set custom user attribute "'+a+'"',"the given value"))return!1;d&&(b=Ja(b));if(e){for(c=0;c<b.length;c++)if(!Ra(b[c],'set custom user attribute "'+a+'"',"the element in the given array"))return!1;return fb(this.H,w.hf,a,b).h}return this.f.Ed(a,b)};
n.gg=function(a,b){return!Ra(a,"add to custom user attribute array","the given key")||null!=b&&!Ra(b,"add to custom user attribute array","the given value")?!1:fb(this.H,w.ef,a,b).h};n.Gg=function(a,b){return!Ra(a,"remove from custom user attribute array","the given key")||null!=b&&!Ra(b,"remove from custom user attribute array","the given value")?!1:fb(this.H,w.gf,a,b).h};
n.zg=function(a,b){if(!Ra(a,"increment custom user attribute","the given key"))return!1;null==b&&(b=1);var c=parseInt(b);return isNaN(c)||c!==parseFloat(b)?(q.error('Cannot increment custom user attribute because the given incrementValue "'+b+'" is not an integer.'),!1):fb(this.H,w.ff,a,c).h};n.Ad=function(a,b,c,d,e){this.f.Ad(a,b,c,d,e);gb(this.H)};n.Mb=function(a){this.f.Mb(a)};
n.Pg=function(a,b,c){if(!Ra(a,"set custom location attribute","the given key"))return!1;if(null!==b||null!==c)if(b=parseFloat(b),c=parseFloat(c),isNaN(b)||90<b||-90>b||isNaN(c)||180<c||-180>c)return q.error("Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by \u00b190 and \u00b1180 respectively, or must both be null for removal."),!1;var d=this.H,e=c;c=new Za;if(hb(d.J,a))q.info('Custom Attribute "'+a+'" is blocklisted, ignoring.'),c.h=!1;else{var g=$a(d.D);
if(null===b&&null===e){var f=w.Ef;a={key:a}}else f=w.Df,a={key:a,latitude:b,longitude:e};c.j.push(new D(d.f.o(),f,(new Date).valueOf(),g,a));c.h=ab(d.b,c.j)}return c.h};n.hg=function(a){return!Qa(a,"add user to subscription group","subscription group ID",!1)||0>=a.length?(q.error("addToSubscriptionGroup requires a non-empty subscription group ID"),!1):ib(this.H,a,jb).h};
n.Hg=function(a){return!Qa(a,"remove user from subscription group","subscription group ID",!1)||0>=a.length?(q.error("removeFromSubscriptionGroup requires a non-empty subscription group ID"),!1):ib(this.H,a,kb).h};var eb=/^[0-9 .\\(\\)\\+\\-]+$/,cb={MALE:"m",FEMALE:"f",OTHER:"o",UNKNOWN:"u",NOT_APPLICABLE:"n",PREFER_NOT_TO_SAY:"p"},db={OPTED_IN:"opted_in",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed"},jb="subscribed",kb="unsubscribed";E.User=F;E.User.Genders=cb;
E.User.NotificationSubscriptionTypes=db;E.User.prototype.getUserId=F.prototype.o;E.User.prototype.setFirstName=F.prototype.Tg;E.User.prototype.setLastName=F.prototype.Xg;E.User.prototype.setEmail=F.prototype.Rg;E.User.prototype.setGender=F.prototype.Ug;E.User.prototype.setDateOfBirth=F.prototype.Qg;E.User.prototype.setCountry=F.prototype.Og;E.User.prototype.setHomeCity=F.prototype.Vg;E.User.prototype.setLanguage=F.prototype.Wg;E.User.prototype.setEmailNotificationSubscriptionType=F.prototype.Sg;
E.User.prototype.setPushNotificationSubscriptionType=F.prototype.Gd;E.User.prototype.setPhoneNumber=F.prototype.Yg;E.User.prototype.setAvatarImageUrl=F.prototype.Ng;E.User.prototype.setLastKnownLocation=F.prototype.wc;E.User.prototype.setCustomUserAttribute=F.prototype.Ed;E.User.prototype.addToCustomAttributeArray=F.prototype.gg;E.User.prototype.removeFromCustomAttributeArray=F.prototype.Gg;E.User.prototype.incrementCustomUserAttribute=F.prototype.zg;E.User.prototype.addAlias=F.prototype.fg;
E.User.prototype.setCustomLocationAttribute=F.prototype.Pg;E.User.prototype.addToSubscriptionGroup=F.prototype.hg;E.User.prototype.removeFromSubscriptionGroup=F.prototype.Hg;function lb(){}lb.prototype.hd=function(){};lb.prototype.kd=function(){};lb.prototype.kb=function(){};function mb(a,b){if(a&&b)if(a=a.toLowerCase(),Ca(b.M))for(var c=0;c<b.M.length;c++){if(-1!==a.indexOf(b.M[c].toLowerCase()))return b.R}else if(-1!==a.indexOf(b.M.toLowerCase()))return b.R};var nb={Ld:"Chrome",Ec:"Edge",Fc:"Internet Explorer",Sd:"Opera",Qc:"Safari",oh:"Firefox"};function pb(){if(this.userAgentData=navigator.userAgentData){var a=this.userAgentData.brands;if(a&&a.length){a=ba(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=void 0,d=[];for(c in nb)nb[c]!==nb.Fc&&d.push(nb[c]);if((c=b.brand.match(new RegExp("("+d.join("|")+")","i")))&&0<c.length){var e=c[0];var g=b.version;break}}}this.hb=e||"Unknown Browser";this.version=g||"Unknown Version"}}oa(pb,lb);pb.prototype.hd=function(){return this.hb};pb.prototype.kd=function(){return this.version};
pb.prototype.kb=function(a){var b=this;return this.ia?Promise.resolve(this.ia):(this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues(["platform"]):Promise.reject()).then(function(c){c=c.platform;for(var d=0;d<a.length;d++){var e=mb(c,a[d]);if(e)return b.ia=e,b.ia}return c}).catch(function(){return navigator.platform})};function qb(){this.De=rb()}oa(qb,lb);qb.prototype.hd=function(){return this.De[0]||"Unknown Browser"};qb.prototype.kd=function(){return this.De[1]||"Unknown Version"};qb.prototype.kb=function(a){for(var b=0;b<a.length;b++){var c=mb(a[b].U,a[b]);if(c)return"Mac"===c&&1<navigator.maxTouchPoints&&(c="iOS"),Promise.resolve(c)}return Promise.resolve(navigator.platform)};
function rb(){var a=navigator.userAgent||"",b=a.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(/trident/i.test(b[1])){var c=/\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(a)||[];return[nb.Fc,c[1]||""]}if(-1!==a.indexOf("(Web0S; Linux/SmartTV)"))return["LG Smart TV",null];if(-1!==a.indexOf("CrKey"))return["Chromecast",null];if(-1!==a.indexOf("BRAVIA")||-1!==a.indexOf("SonyCEBrowser")||-1!==a.indexOf("SonyDTV"))return["Sony Smart TV",
null];if(-1!==a.indexOf("PhilipsTV"))return["Philips Smart TV",null];if(a.match(/\b(Roku)\b/))return["Roku",null];if(a.match(/\bAFTM\b/))return["Amazon Fire Stick",null];if(b[1]===nb.Ld&&(c=a.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),null!=c))return c=c.slice(1),c[0]=c[0].replace("OPR",nb.Sd),c[0]=c[0].replace("EdgA",nb.Ec),"Edg"===c[0]&&(c[0]=nb.Ec),[c[0],c[1]];if(b[1]===nb.Qc&&(c=a.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),null!=c))return c=c.slice(1),c[0]=c[0].replace("EdgiOS",nb.Ec),
[c[0],c[1]];b=b[2]?[b[1],b[2]]:[null,null];b[0]===nb.Qc&&null!=(c=a.match(/version\/(\.?\d+(\.\d+)*)/i))&&b.splice(1,1,c[1]);null!=(c=a.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))&&b.splice(1,1,c[2]);if(b[0]===nb.Sd&&null!=(c=a.match(/mini\/(\.?\d+(\.\d+)*)/i)))return["Opera Mini",c[1]||""];b[0]&&(a=b[0].toLowerCase(),"msie"===a&&(b[0]=nb.Fc),"crios"===a&&(b[0]=nb.Ld),"tizen"===a&&(b[0]="Samsung Smart TV",b[1]=null),"samsungbrowser"===a&&(b[0]="Samsung Browser"));return b};function sb(){var a=this;this.xd=new (navigator.userAgentData?pb:qb);this.userAgent=navigator.userAgent;this.hb=this.xd.hd();this.version=this.xd.kd();this.kb().then(function(b){return a.ia=b});this.language=(navigator.Nh||navigator.language||navigator.browserLanguage||navigator.Lh||"").toLowerCase();this.Ag=tb(this.userAgent)}sb.prototype.kb=function(){var a=this;return this.ia?Promise.resolve(this.ia):this.xd.kb(ub).then(function(b){return a.ia=b})};
function tb(a){a=a.toLowerCase();for(var b="googlebot bingbot slurp duckduckbot baiduspider yandex facebookexternalhit sogou ia_archiver https://github.com/prerender/prerender aolbuild bingpreview msnbot adsbot mediapartners-google teoma".split(" "),c=0;c<b.length;c++)if(-1!==a.indexOf(b[c]))return!0;return!1}
var ub=[{U:navigator.platform,M:"Win",R:"Windows"},{U:navigator.platform,M:"Mac",R:"Mac"},{U:navigator.platform,M:"BlackBerry",R:"BlackBerry"},{U:navigator.platform,M:"FreeBSD",R:"FreeBSD"},{U:navigator.platform,M:"OpenBSD",R:"OpenBSD"},{U:navigator.platform,M:"Nintendo",R:"Nintendo"},{U:navigator.platform,M:"SunOS",R:"SunOS"},{U:navigator.platform,M:"PlayStation",R:"PlayStation"},{U:navigator.platform,M:"X11",R:"X11"},{U:navigator.userAgent,M:["iPhone","iPad","iPod"],R:"iOS"},{U:navigator.platform,
M:"Pike v",R:"iOS"},{U:navigator.userAgent,M:["Web0S"],R:"WebOS"},{U:navigator.platform,M:["Linux armv7l","Android"],R:"Android"},{U:navigator.userAgent,M:["Android"],R:"Android"},{U:navigator.platform,M:"Linux",R:"Linux"}],vb=new sb;function wb(a,b){this.kc=a;this.P=b}function xb(a,b,c){var d=c;null!=c&&c instanceof Na&&(d=c.A());a.kc.store(b,d)}function yb(a,b){var c=zb(a,b);null!=c&&(c.Kb=(new Date).valueOf(),xb(a,b,c))}function zb(a,b){a=a.kc.Z(b);null==a||null==a.g?a=null:(b=new Na(a.g,a.e,a.c),b.Kb=a.l,a=b);return a}function ab(a,b){if(null==b||0===b.length)return!1;Ca(b)||(b=[b]);var c=a.P.Z(M.Qb);null!=c&&Ca(c)||(c=[]);for(var d=0;d<b.length;d++)c.push(b[d].A());return a.P.store(M.Qb,c)}
function Ab(a){var b=a.P.Z(M.Qb);a.P.remove(M.Qb);null==b&&(b=[]);a=[];var c=!1,d=null;if(Ca(b))for(var e=0;e<b.length;e++)La(b[e])?a.push(Ma(b[e])):d=e;else c=!0;if(c||null!=d)e="Stored events could not be deserialized as Events",c&&(e+=", was "+Object.prototype.toString.call(b)+" not an array"),null!=d&&(e+=", value at index "+d+" does not look like an event"),e+=", serialized values were of type "+typeof b+": "+JSON.stringify(b),a.push(new D(null,w.Hc,(new Date).valueOf(),null,{e:e}));return a}
function N(a,b,c){Aa(M,b,"StorageManager cannot store object.","StorageManager.KEYS.OBJECTS")&&a.P.store(b,c)}function P(a,b){return Aa(M,b,"StorageManager cannot retrieve object.","StorageManager.KEYS.OBJECTS")?a.P.Z(b):!1}function Q(a,b){Aa(M,b,"StorageManager cannot remove object.","StorageManager.KEYS.OBJECTS")&&a.P.remove(b)}wb.prototype.clearData=function(){for(var a=Fa(Bb),b=Fa(M),c=0;c<a.length;c++)this.kc.remove(Bb[a[c]]);for(a=0;a<b.length;a++)this.P.remove(M[b[a]])};
function Cb(a,b){var c=a.P.Z(M.Ja);null==c&&(c={});var d=b.user_id||M.yc,e;for(e in b)"user_id"===e||null!=c[d]&&null!=c[d][e]||Db(a,b.user_id,e,b[e])}function Db(a,b,c,d){var e=a.P.Z(M.Ja);null==e&&(e={});var g=b||M.yc,f=e[g];null==f&&(f={},null!=b&&(f.user_id=b));if("custom"===c){null==f[c]&&(f[c]={});for(var h in d)f[c][h]=d[h]}else f[c]=d;e[g]=f;return a.P.store(M.Ja,e)}function Eb(a){var b=a.P.Z(M.Ja);a.P.remove(M.Ja);a=[];for(var c in b)null!=b[c]&&a.push(b[c]);return a}
var Bb={dc:"ab.storage.userId",Cc:"ab.storage.deviceId",La:"ab.storage.sessionId"},M={Rc:"ab.test",Qb:"ab.storage.events",Ja:"ab.storage.attributes",yc:"ab.storage.attributes.anonymous_user",Xb:"ab.storage.device",$d:"ab.storage.sdk_metadata",be:"ab.storage.session_id_for_cached_metadata",cc:"ab.storage.pushToken",Mc:"ab.storage.newsFeed",Kc:"ab.storage.lastNewsFeedRefresh",pb:"ab.storage.cardImpressions",ae:"ab.storage.serverConfig",Sc:"ab.storage.triggers",Tc:"ab.storage.triggers.ts",Bf:"ab.storage.lastTriggeredTime",
Af:"ab.storage.lastTriggeredTimesById",Cf:"ab.storage.lastTriggerEventDataById",$b:"ab.storage.messagingSessionStart",qb:"ab.storage.cc",Vb:"ab.storage.ccLastFullSync",Ub:"ab.storage.ccLastCardUpdated",ab:"ab.storage.ccClicks",bb:"ab.storage.ccImpressions",sa:"ab.storage.ccDismissals",Zb:"ab.storage.lastDisplayedTriggerTimesById",Jc:"ab.storage.lastDisplayedTriggerTime",tb:"ab.storage.triggerFireInstancesById",cb:"ab.storage.signature"};function Fb(a){this.$=a;this.Ge=vb.hb===nb.Qc?3:10}
Fb.prototype.Pa=function(a){return a+"."+this.$};Fb.prototype.store=function(a,b){b={v:b};try{return localStorage.setItem(this.Pa(a),JSON.stringify(b)),!0}catch(c){return q.info("Storage failure: "+c.message),!1}};Fb.prototype.Z=function(a){try{var b=JSON.parse(localStorage.getItem(this.Pa(a)));return null==b?null:b.v}catch(c){return q.info("Storage retrieval failure: "+c.message),null}};
Fb.prototype.remove=function(a){try{localStorage.removeItem(this.Pa(a))}catch(b){return q.info("Storage removal failure: "+b.message),!1}};function Gb(a,b){this.$=a;a=0;for(var c=document.location.hostname,d=c.split(".");a<d.length-1&&-1===document.cookie.indexOf("ab._gd=ab._gd");)a++,c="."+d.slice(-1-a).join("."),document.cookie="ab._gd=ab._gd;domain="+c+";";document.cookie="ab._gd=;expires="+(new Date(0)).toGMTString()+";domain="+c+";";this.ue=c;this.ne=525949;this.ye=!!b}
Gb.prototype.Pa=function(a){return null!=this.$?a+"."+this.$:a};function Hb(a){var b=new Date;b.setTime(b.getTime()+6E4*a.ne);return b.getFullYear()}
Gb.prototype.store=function(a,b){for(var c=Ba(Bb),d=document.cookie.split(";"),e=0;e<d.length;e++){for(var g=d[e];" "===g.charAt(0);)g=g.substring(1);for(var f=!1,h=0;h<c.length;h++)if(0===g.indexOf(c[h])){f=!0;break}f&&(g=g.split("=")[0],-1===g.indexOf("."+this.$)&&Ib(this,g))}c=new Date;c.setTime(c.getTime()+6E4*this.ne);c="expires="+c.toUTCString();d="domain="+this.ue;b=this.ye?b:encodeURIComponent(JSON.stringify(b));a=this.Pa(a)+"="+b+";"+c+";"+d+";path=/";if(4093<=a.length)return q.info("Storage failure: string is "+
a.length+" chars which is too large to store as a cookie."),!1;document.cookie=a;return!0};
Gb.prototype.Z=function(a){for(var b=[],c=this.Pa(a)+"=",d=document.cookie.split(";"),e=0;e<d.length;e++){for(var g=d[e];" "===g.charAt(0);)g=g.substring(1);if(0===g.indexOf(c))try{var f=void 0;f=this.ye?g.substring(c.length,g.length):JSON.parse(decodeURIComponent(g.substring(c.length,g.length)));b.push(f)}catch(h){return q.info("Storage retrieval failure: "+h.message),this.remove(a),null}}return 0<b.length?b[b.length-1]:null};Gb.prototype.remove=function(a){Ib(this,this.Pa(a))};
function Ib(a,b){b=b+"=;expires="+(new Date(0)).toGMTString();document.cookie=b;document.cookie=b+";path=/";document.cookie=b+";path="+document.location.pathname;a=b+";domain="+a.ue;document.cookie=a;document.cookie=a+";path=/";document.cookie=a+";path="+document.location.pathname}function Jb(){this.Zc={};this.se=5242880;this.Ge=3}
Jb.prototype.store=function(a,b){var c={value:b};var d=[];b=[b];for(var e=0;b.length;){var g=b.pop();if("boolean"===typeof g)e+=4;else if("string"===typeof g)e+=2*g.length;else if("number"===typeof g)e+=8;else if("object"===typeof g&&-1===d.indexOf(g)){d.push(g);for(var f in g)b.push(g[f])}}d=e;if(d>this.se)return q.info("Storage failure: object is \u2248"+d+" bytes which is greater than the max of "+this.se),!1;this.Zc[a]=c;return!0};Jb.prototype.Z=function(a){a=this.Zc[a];return null==a?null:a.value};
Jb.prototype.remove=function(a){this.Zc[a]=null};function Kb(a,b,c){this.la=[];b&&this.la.push(new Gb(a));c&&this.la.push(new Fb(a));this.la.push(new Jb)}Kb.prototype.store=function(a,b){for(var c=!0,d=0;d<this.la.length;d++)c=this.la[d].store(a,b)&&c;return c};Kb.prototype.Z=function(a){for(var b=0;b<this.la.length;b++){var c=this.la[b].Z(a);if(null!=c)return c}return null};Kb.prototype.remove=function(a){for(var b=0;b<this.la.length;b++)this.la[b].remove(a)};function Lb(){this.zb={}}function Mb(a,b){if("function"!==typeof b)return null;var c=qa.Gb();a.zb[c]=b;return c}Lb.prototype.N=function(a){delete this.zb[a]};Lb.prototype.K=function(){this.zb={}};function Nb(a,b){var c=[],d;for(d in a.zb)c.push(a.zb[d](b))};var Ob={Eh:function(){return 600>=screen.width},Ch:function(){if("orientation"in window)return 90===Math.abs(window.orientation)||270===window.orientation?Ob.bc.Rd:Ob.bc.Ud;if("screen"in window){var a=window.screen.orientation||screen.Fh||screen.Hh;null!=a&&"object"===typeof a&&(a=a.type);if("landscape-primary"===a||"landscape-secondary"===a)return Ob.bc.Rd}return Ob.bc.Ud},Eg:function(a,b,c){c||null!=b&&b.metaKey?window.open(a):window.location=a},bc:{Ud:0,Rd:1}};E.WindowUtils=Ob;
E.WindowUtils.openUri=Ob.Eg;function Pb(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C){this.id=a;this.viewed=b||!1;this.title=c||"";this.imageUrl=d;this.description=e||"";this.created=g||null;this.updated=f||null;this.categories=h||[];this.expiresAt=k||null;this.url=m;this.linkText=t;x=parseFloat(x);this.aspectRatio=isNaN(x)?null:x;this.extras=z;this.pinned=A||!1;this.dismissible=B||!1;this.dismissed=!1;this.clicked=C||!1;this.test=!1;this.Vc=this.X=null}function Qb(a){null==a.X&&(a.X=new Lb);return a.X}
function Rb(a){null==a.Vc&&(a.Vc=new Lb);return a.Vc}n=Pb.prototype;n.Pb=function(a){return Mb(Qb(this),a)};n.Hd=function(a){return Mb(Rb(this),a)};n.N=function(a){Qb(this).N(a);Rb(this).N(a)};n.K=function(){Qb(this).K();Rb(this).K()};n.zd=function(){this.viewed=!0};n.Ya=function(){this.clicked=this.viewed=!0;Nb(Qb(this))};n.yd=function(){return this.dismissible&&!this.dismissed?(this.dismissed=!0,Nb(Rb(this)),!0):!1};
function Sb(a,b){if(null==b||b[S.ua]!==a.id)return!0;if(b[S.Xd])return!1;if(null!=b[S.ca]&&null!=a.updated&&b[S.ca]<Ha(a.updated.valueOf()))return!0;b[S.xa]&&!a.viewed&&(a.viewed=!0);b[S.ra]&&!a.clicked&&(a.clicked=b[S.ra]);null!=b[S.Ma]&&(a.title=b[S.Ma]);null!=b[S.va]&&(a.imageUrl=b[S.va]);null!=b[S.Ka]&&(a.description=b[S.Ka]);if(null!=b[S.ca]){var c=Ia(b[S.ca]);null!=c&&(a.updated=c)}null!=b[S.ba]&&(a.expiresAt=b[S.ba]===Tb?null:Ia(b[S.ba]));null!=b[S.URL]&&(a.url=b[S.URL]);null!=b[S.wa]&&(a.linkText=
b[S.wa]);null!=b[S.qa]&&(c=parseFloat(b[S.qa]),a.aspectRatio=isNaN(c)?null:c);null!=b[S.ha]&&(a.extras=b[S.ha]);null!=b[S.ka]&&(a.pinned=b[S.ka]);null!=b[S.ta]&&(a.dismissible=b[S.ta]);null!=b[S.V]&&(a.test=b[S.V]);return!0}
function Ub(a){if(a[S.Xd])return null;var b=a[S.ua],c=a[S.TYPE],d=a[S.xa],e=a[S.Ma],g=a[S.va],f=a[S.Ka],h=Ia(a[S.ca]);var k=a[S.ba]===Tb?null:Ia(a[S.ba]);var m=a[S.URL],t=a[S.wa],x=a[S.qa],z=a[S.ha],A=a[S.ka],B=a[S.ta],C=a[S.ra];a=a[S.V]||!1;if(c===Vb.fe||c===Vb.ac)b=new Wb(b,d,e,g,f,null,h,null,k,m,t,x,z,A,B,C);else if(c===Vb.Sb)b=new Xb(b,d,e,g,f,null,h,null,k,m,t,x,z,A,B,C);else if(c===Vb.Rb)b=new Yb(b,d,g,null,h,null,k,m,t,x,z,A,B,C);else if(c===Vb.Ac)b=new Zb(b,d,h,k,z,A);else return q.error("Ignoring card with unknown type "+
c),null;b.test=a;return b}function $b(a){var b=a[V.ua],c=a[V.TYPE],d=a[V.xa],e=a[V.Ma],g=a[V.va],f=a[V.Ka],h=Ka(a[V.Wb]),k=Ka(a[V.ca]),m=a[V.Tb],t=Ka(a[V.ba]),x=a[V.URL],z=a[V.wa],A=a[V.qa],B=a[V.ha],C=a[V.ka],J=a[V.ta],I=a[V.ra];a=a[V.V]||!1;if(c===Vb.ac)b=new Wb(b,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I);else if(c===Vb.Sb)b=new Xb(b,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I);else if(c===Vb.Rb)b=new Yb(b,d,g,h,k,m,t,x,z,A,B,C,J,I);else if(c===Vb.Ac)b=new Zb(b,d,k,t,B,C);else return;b.test=a;return b}
n.tg=function(){if(this.dismissible&&!this.dismissed){this.Wf&&this.Wf(this);var a=this.yh;a&&(a.style.height=a.offsetHeight+"px",a.className+=" ab-hide",setTimeout(function(){a&&a.parentNode&&(a.style.height="0",a.style.margin="0",setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},ac))},bc))}};
var Tb=-1,Vb={Sb:"captioned_image",fe:"text_announcement",ac:"short_news",Rb:"banner_image",Ac:"control"},S={ua:"id",xa:"v",ta:"db",Xd:"r",ca:"ca",ka:"p",ba:"ea",ha:"e",TYPE:"tp",va:"i",Ma:"tt",Ka:"ds",URL:"u",wa:"dm",qa:"ar",ra:"cl",V:"t"},V={ua:"id",xa:"v",ta:"db",Wb:"cr",ca:"ca",ka:"p",Tb:"t",ba:"ea",ha:"e",TYPE:"tp",va:"i",Ma:"tt",Ka:"ds",URL:"u",wa:"dm",qa:"ar",ra:"cl",V:"s"},ac=400;E.Card=Pb;E.Card.fromContentCardsJson=Ub;E.Card.prototype.dismissCard=Pb.prototype.tg;
E.Card.prototype.subscribeToClickedEvent=Pb.prototype.Pb;E.Card.prototype.subscribeToDismissedEvent=Pb.prototype.Hd;E.Card.prototype.removeSubscription=Pb.prototype.N;E.Card.prototype.removeAllSubscriptions=Pb.prototype.K;function Yb(a,b,c,d,e,g,f,h,k,m,t,x,z,A){Pb.call(this,a,b,null,c,null,d,e,g,f,h,k,m,t,x,z,A)}oa(Yb,Pb);Yb.prototype.A=function(){var a={};a[V.TYPE]=Vb.Rb;a[V.ua]=this.id;a[V.xa]=this.viewed;a[V.va]=this.imageUrl;a[V.ca]=this.updated;a[V.Wb]=this.created;a[V.Tb]=this.categories;a[V.ba]=this.expiresAt;a[V.URL]=this.url;a[V.wa]=this.linkText;a[V.qa]=this.aspectRatio;a[V.ha]=this.extras;a[V.ka]=this.pinned;a[V.ta]=this.dismissible;a[V.ra]=this.clicked;a[V.V]=this.test;return a};E.Banner=Yb;function Xb(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C){Pb.call(this,a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C)}oa(Xb,Pb);
Xb.prototype.A=function(){var a={};a[V.TYPE]=Vb.Sb;a[V.ua]=this.id;a[V.xa]=this.viewed;a[V.Ma]=this.title;a[V.va]=this.imageUrl;a[V.Ka]=this.description;a[V.ca]=this.updated;a[V.Wb]=this.created;a[V.Tb]=this.categories;a[V.ba]=this.expiresAt;a[V.URL]=this.url;a[V.wa]=this.linkText;a[V.qa]=this.aspectRatio;a[V.ha]=this.extras;a[V.ka]=this.pinned;a[V.ta]=this.dismissible;a[V.ra]=this.clicked;a[V.V]=this.test;return a};E.CaptionedImage=Xb;function Wb(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C){Pb.call(this,a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C)}oa(Wb,Pb);
Wb.prototype.A=function(){var a={};a[V.TYPE]=Vb.ac;a[V.ua]=this.id;a[V.xa]=this.viewed;a[V.Ma]=this.title;a[V.va]=this.imageUrl;a[V.Ka]=this.description;a[V.ca]=this.updated;a[V.Wb]=this.created;a[V.Tb]=this.categories;a[V.ba]=this.expiresAt;a[V.URL]=this.url;a[V.wa]=this.linkText;a[V.qa]=this.aspectRatio;a[V.ha]=this.extras;a[V.ka]=this.pinned;a[V.ta]=this.dismissible;a[V.ra]=this.clicked;a[V.V]=this.test;return a};E.ClassicCard=Wb;function Zb(a,b,c,d,e,g){Pb.call(this,a,b,null,null,null,null,c,null,d,null,null,null,e,g,null)}oa(Zb,Pb);Zb.prototype.A=function(){var a={};a[V.TYPE]=Vb.Ac;a[V.ua]=this.id;a[V.xa]=this.viewed;a[V.ca]=this.updated;a[V.ba]=this.expiresAt;a[V.ha]=this.extras;a[V.ka]=this.pinned;a[V.V]=this.test;return a};E.ControlCard=Zb;function cc(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,X,R,Z,O,l,p,r,v,H){this.message=a;this.messageAlignment=b||dc;this.duration=x||5E3;this.slideFrom=c||ec;this.extras=d||{};this.campaignId=e;this.cardId=g;this.triggerId=f;this.clickAction=h||fc;this.uri=k;this.openTarget=m||gc;this.dismissType=t||hc;this.icon=z;this.imageUrl=A;this.imageStyle=B||ic;this.iconColor=C||jc.Uc;this.iconBackgroundColor=J||jc.Kd;this.backgroundColor=I||jc.Uc;this.textColor=K||jc.Md;this.closeButtonColor=T||jc.kf;this.animateIn=
G;null==this.animateIn&&(this.animateIn=!0);this.animateOut=ea;null==this.animateOut&&(this.animateOut=!0);this.header=X;this.headerAlignment=R||dc;this.headerTextColor=Z||jc.Md;this.frameColor=O||jc.Kf;this.buttons=l||[];this.cropType=p||kc;this.orientation=r;this.htmlId=v;this.css=H;this.oe=this.Oa=this.pe=!1;this.X=new Lb;this.fc=new Lb}n=cc.prototype;n.Je=function(){return!0};
function lc(a){if(null!=a.htmlId&&4<a.htmlId.length&&null!=a.htmlId&&4<a.htmlId.length&&null!=a.css&&0<a.css.length)return a.htmlId+"-css"}n.Pb=function(a){return Mb(this.X,a)};n.Hd=function(a){return Mb(this.fc,a)};n.N=function(a){this.X.N(a);this.fc.N(a)};n.K=function(){this.X.K();this.fc.K()};n.zd=function(){return this.pe?!1:this.pe=!0};n.Ya=function(){return this.Oa?!1:(this.Oa=!0,Nb(this.X),!0)};n.yd=function(){return this.oe?!1:(this.oe=!0,Nb(this.fc),!0)};
function mc(a){if(a.is_control)return new nc(a.trigger_id);var b=a.type;null!=b&&(b=b.toUpperCase());var c=a.message,d=a.text_align_message,e=a.slide_from,g=a.extras,f=a.campaign_id,h=a.card_id,k=a.trigger_id,m=a.click_action,t=a.uri,x=a.open_target,z=a.message_close,A=a.duration,B=a.icon,C=a.image_url,J=a.image_style,I=a.icon_color,K=a.icon_bg_color,T=a.bg_color,G=a.text_color,ea=a.close_btn_color,X=a.header,R=a.text_align_header,Z=a.header_text_color,O=a.frame_color,l=[],p=a.btns;null==p&&(p=[]);
for(var r=0;r<p.length;r++){var v=p[r];l.push(new oc(v.text,v.bg_color,v.text_color,v.border_color,v.click_action,v.uri,v.id))}p=a.crop_type;r=a.orientation;v=a.animate_in;var H=a.animate_out,L=a.html_id,U=a.css;if(null==L||""===L||null==U||""===U)U=L=void 0;if(b===pc||b===qc)c=new rc(c,d,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,v,H,X,R,Z,O,l,p,L,U);else if(b===sc)c=new tc(c,d,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,v,H,X,R,Z,O,l,p,r,L,U);else if(b===uc)c=new vc(c,d,e,g,f,h,k,m,t,x,z,A,B,C,I,K,T,G,ea,v,H,L,
U);else if(b===wc||b===xc)c=new yc(c,g,f,h,k,z,A,v,H,O,L,U,a.message_fields),c.Mh=a.trusted||!1;else{q.error("Ignoring message with unknown type "+b);return}c.Mg=b;return c}function zc(a,b){if(b&&b.parentNode){var c=b.closest(".ab-iam-root");null==c&&(c=b);a.Je()&&null!=c.parentNode&&((b=c.parentNode.classList)&&b.contains(Ac)&&b.remove(Ac),document.body.removeEventListener("touchmove",Bc));c.className=c.className.replace(Cc,Dc)}return a.animateOut}
function Ec(a,b){if(null!=b){a.Xf=null;var c=-1===b.className.indexOf("ab-in-app-message")?b.getElementsByClassName("ab-in-app-message")[0]:b;var d=!1;c&&(d=zc(a,c));var e=document.body;if(null!=e)var g=e.scrollTop;c=function(){if(b&&b.parentNode){var f=b.closest(".ab-iam-root");null==f&&(f=b);f.parentNode&&f.parentNode.removeChild(f)}null!=lc(a)&&(f=document.getElementById(lc(a)))&&f.parentNode&&f.parentNode.removeChild(f);null!=e&&"Safari"===vb.hb&&(e.scrollTop=g);a.yd()};d?setTimeout(c,Fc):c();
a.Zf&&a.Zf.focus()}}n.rg=function(){Ec(this,this.Xf)};function Bc(a){a.targetTouches&&1<a.targetTouches.length||a.target.classList&&a.target.classList.contains("ab-message-text")&&a.target.scrollHeight>a.target.clientHeight||document.querySelector("."+Ac)&&a.preventDefault()}
var jc={Md:4281545523,Uc:4294967295,Kd:4278219733,lf:4293914607,mf:4283782485,Kf:3224580915,kf:4288387995},Gc={ph:"hd",lh:"ias",vh:"of",nf:"do",ub:"umt",sb:"tf",Od:"te"},ec="BOTTOM",Hc={TOP:"TOP",BOTTOM:ec},fc="NONE",Ic={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:fc},hc="AUTO_DISMISS",Jc={AUTO_DISMISS:hc,MANUAL:"SWIPE"},gc="NONE",Kc={NONE:gc,BLANK:"BLANK"},ic="TOP",Lc={TOP:ic,GRAPHIC:"GRAPHIC"},dc="CENTER",Mc={START:"START",CENTER:dc,END:"END"},kc="FIT_CENTER",Nc={CENTER_CROP:"CENTER_CROP",FIT_CENTER:kc},
uc="SLIDEUP",pc="MODAL",qc="MODAL_STYLED",sc="FULL",wc="WEB_HTML",xc="HTML",Fc=500,Cc="ab-show",Dc="ab-hide",Ac="ab-pause-scrolling";E.InAppMessage=cc;E.InAppMessage.SlideFrom=Hc;E.InAppMessage.ClickAction=Ic;E.InAppMessage.DismissType=Jc;E.InAppMessage.OpenTarget=Kc;E.InAppMessage.ImageStyle=Lc;E.InAppMessage.TextAlignment=Mc;E.InAppMessage.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"};E.InAppMessage.CropType=Nc;E.InAppMessage.fromJson=mc;
E.InAppMessage.prototype.subscribeToClickedEvent=cc.prototype.Pb;E.InAppMessage.prototype.subscribeToDismissedEvent=cc.prototype.Hd;E.InAppMessage.prototype.removeSubscription=cc.prototype.N;E.InAppMessage.prototype.removeAllSubscriptions=cc.prototype.K;E.InAppMessage.prototype.closeMessage=cc.prototype.rg;function oc(a,b,c,d,e,g,f){this.text=a||"";this.backgroundColor=b||jc.Kd;this.textColor=c||jc.Uc;this.borderColor=d||this.backgroundColor;this.clickAction=e||fc;this.uri=g;null==f&&(f=Oc);this.id=f;this.Oa=!1;this.X=new Lb}oc.prototype.Pb=function(a){return Mb(this.X,a)};oc.prototype.N=function(a){this.X.N(a)};oc.prototype.K=function(){this.X.K()};oc.prototype.Ya=function(){return this.Oa?!1:(this.Oa=!0,Nb(this.X),!0)};var Oc=-1;E.InAppMessageButton=oc;
E.InAppMessageButton.prototype.subscribeToClickedEvent=oc.prototype.Pb;E.InAppMessageButton.prototype.removeSubscription=oc.prototype.N;E.InAppMessageButton.prototype.removeAllSubscriptions=oc.prototype.K;function nc(a){this.triggerId=a}E.ControlMessage=nc;function tc(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,X,R,Z,O,l,p,r,v){cc.call(this,a,b,null,c,d,e,g,f,h,k,m||"SWIPE",t,x,z,A,B,C,J,I,K,T,G,ea,X,R,Z,O,l||"CENTER_CROP",p||"PORTRAIT",r,v)}oa(tc,cc);E.FullScreenMessage=tc;function yc(a,b,c,d,e,g,f,h,k,m,t,x,z){null!=a&&0<a.length&&0<a.indexOf('"ab-in-app-message ab-html-message ab-email-capture"')&&0<a.indexOf('"ab-in-app-message ab-show ab-modal ab-effect-modal"')&&(k=h=!0);cc.call(this,a,null,null,b,c,d,e,null,null,null,g||"SWIPE",f,null,null,null,null,null,null,null,null,h,k,null,null,null,m,void 0,void 0,void 0,t,x);this.messageFields=z}oa(yc,cc);yc.prototype.Ya=function(a){if(this.Mg===wc){if(this.Oa)return!1;this.Oa=!0}Nb(this.X,a);return!0};E.HtmlMessage=yc;function rc(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,X,R,Z,O,l,p,r){l=l||kc;cc.call(this,a,b,null,c,d,e,g,f,h,k,m||"SWIPE",t,x,z,A,B,C,J,I,K,T,G,ea,X,R,Z,O,l,void 0,p,r)}oa(rc,cc);E.ModalMessage=rc;function vc(a,b,c,d,e,g,f,h,k,m,t,x,z,A,B,C,J,I,K,T,G,ea,X){I=I||jc.mf;J=J||jc.lf;cc.call(this,a,b||"START",c,d,e,g,f,h,k,m,t,x,z,A,null,B,C,J,I,K,T,G,void 0,void 0,void 0,void 0,void 0,void 0,void 0,ea,X)}oa(vc,cc);vc.prototype.Je=function(){return!1};E.SlideUpMessage=vc;function Pc(a,b){Qc={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:"\u0644\u064a\u0633 \u0644\u062f\u064a\u0646\u0627 \u0623\u064a \u062a\u062d\u062f\u064a\u062b. \u064a\u0631\u062c\u0649 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u0644\u0627\u062d\u0642\u0627\u064b",FEED_TIMEOUT_MESSAGE:"\u064a\u0631\u062c\u0649 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0644\u0627\u062d\u0642\u0627"},
cs:{NO_CARDS_MESSAGE:"V tuto chv\u00edli pro v\u00e1s nem\u00e1me \u017e\u00e1dn\u00e9 aktualizace.<br/>Zkontrolujte pros\u00edm znovu pozd\u011bji.",FEED_TIMEOUT_MESSAGE:"Pros\u00edm zkuste to znovu pozd\u011bji."},da:{NO_CARDS_MESSAGE:"Vi har ingen updates.<br/>Pr\u00f8v venligst senere.",FEED_TIMEOUT_MESSAGE:"Pr\u00f8v venligst senere."},de:{NO_CARDS_MESSAGE:"Derzeit sind keine Updates verf\u00fcgbar.<br/>Bitte sp\u00e4ter noch einmal versuchen.",FEED_TIMEOUT_MESSAGE:"Bitte sp\u00e4ter noch einmal versuchen."},
es:{NO_CARDS_MESSAGE:"No tenemos actualizaciones.<br/>Por favor compru\u00e9belo m\u00e1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor int\u00e9ntelo m\u00e1s tarde."},"es-mx":{NO_CARDS_MESSAGE:"No tenemos ninguna actualizaci\u00f3n.<br/>Vuelva a verificar m\u00e1s tarde.",FEED_TIMEOUT_MESSAGE:"Por favor, vuelva a intentarlo m\u00e1s 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\u00e4ivityksi\u00e4 ei ole saatavilla.<br/>Tarkista my\u00f6hemmin uudelleen.",
FEED_TIMEOUT_MESSAGE:"Yrit\u00e4 my\u00f6hemmin uudelleen."},fr:{NO_CARDS_MESSAGE:"Aucune mise \u00e0 jour disponible.<br/>Veuillez v\u00e9rifier ult\u00e9rieurement.",FEED_TIMEOUT_MESSAGE:"Veuillez r\u00e9essayer ult\u00e9rieurement."},he:{NO_CARDS_MESSAGE:".\u05d0\u05d9\u05df \u05dc\u05e0\u05d5 \u05e2\u05d3\u05db\u05d5\u05e0\u05d9\u05dd. \u05d1\u05d1\u05e7\u05e9\u05d4 \u05d1\u05d3\u05d5\u05e7 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1",FEED_TIMEOUT_MESSAGE:".\u05d1\u05d1\u05e7\u05e9\u05d4 \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 \u05d1\u05e7\u05e8\u05d5\u05d1"},
hi:{NO_CARDS_MESSAGE:"\u0939\u092e\u093e\u0930\u0947 \u092a\u093e\u0938 \u0915\u094b\u0908 \u0905\u092a\u0921\u0947\u091f \u0928\u0939\u0940\u0902 \u0939\u0948\u0902\u0964 \u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u092b\u093f\u0930 \u0938\u0947 \u091c\u093e\u0901\u091a \u0915\u0930\u0947\u0902.\u0964",FEED_TIMEOUT_MESSAGE:"\u0915\u0943\u092a\u092f\u093e \u092c\u093e\u0926 \u092e\u0947\u0902 \u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947\u0902\u0964."},
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\u00f9 tardi.",FEED_TIMEOUT_MESSAGE:"Riprovare pi\u00f9 tardi."},ja:{NO_CARDS_MESSAGE:"\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br/>\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",FEED_TIMEOUT_MESSAGE:"\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002"},
ko:{NO_CARDS_MESSAGE:"\uc5c5\ub370\uc774\ud2b8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc5d0 \ub2e4\uc2dc \ud655\uc778\ud574 \uc8fc\uc2ed\uc2dc\uc624.",FEED_TIMEOUT_MESSAGE:"\ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud574 \uc8fc\uc2ed\uc2dc\uc624."},ms:{NO_CARDS_MESSAGE:"Tiada kemas kini. Sila periksa kemudian.",FEED_TIMEOUT_MESSAGE:"Sila cub