mergn-webapp-sdk 1.0.206 → 1.0.208

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,75 +1 @@
1
- /* Copyright (c) 2025 MERGN */
2
- "use strict";(()=>{var vi=Object.defineProperty,fi=Object.defineProperties;var hi=Object.getOwnPropertyDescriptors;var ft=Object.getOwnPropertySymbols;var bi=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var bt=d=>{throw TypeError(d)};var ht=(d,e,t)=>e in d?vi(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t,z=(d,e)=>{for(var t in e||(e={}))bi.call(e,t)&&ht(d,t,e[t]);if(ft)for(var t of ft(e))Si.call(e,t)&&ht(d,t,e[t]);return d},Ne=(d,e)=>fi(d,hi(e));var Be=(d,e,t)=>e.has(d)||bt("Cannot "+t);var l=(d,e,t)=>(Be(d,e,"read from private field"),t?t.call(d):e.get(d)),E=(d,e,t)=>e.has(d)?bt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(d):e.set(d,t),h=(d,e,t,i)=>(Be(d,e,"write to private field"),i?i.call(d,t):e.set(d,t),t),a=(d,e,t)=>(Be(d,e,"access private method"),t);var c=(d,e,t)=>new Promise((i,r)=>{var n=I=>{try{v(t.next(I))}catch(S){r(S)}},o=I=>{try{v(t.throw(I))}catch(S){r(S)}},v=I=>I.done?i(I.value):Promise.resolve(I.value).then(n,o);v((t=t.apply(d,e)).next())});var St="1.0.206";var yt="https://api.mergn.com/sdk-management/api",$e="/attribute",Tt="/set-attribute",Ve="/event",wt="/record-event";var Pt="/customer",Nt="/device/add-device-token",Ot="/set-identity",_t="/brand/get-web-push-public-key",At="/brand/get-time";var g=class extends Error{constructor(e){super(e),this.name="MergnError"}};g.disableSDK=!1,g.offline=!navigator.onLine,g.debugLevel=0,g.isInitialized=!1,g.loading=!1;var Ti=(d,e)=>{e instanceof g?s(2,`OriginateFrom: ${d}
3
- MergnError: ${e.message}`):e instanceof Error?s(2,`OriginateFrom: ${d}
4
- Unexpected error: ${e.message}`):s(2,`OriginateFrom: ${d}
5
- Unexpected error: ${String(e)}`)},O=(d,e,t,i=!1)=>c(void 0,null,function*(){try{D(d,!0),C(`${d} Time`,!0);try{if(d!=="verify API key"){if(d!=="verify API key"&&g.disableSDK)throw new g("Mergn SDK is disabled!");if(d!=="record event"&&g.offline)throw new g("Mergn is offline!");if(d!=="init"&&d!=="verify API key"&&d!=="record event"&&d!=="recordAttribute"&&d!=="log level check"&&!g.isInitialized)throw new g("Mergn not initialized!");if(d!=="login"&&d!=="record event"&&d!=="recordAttribute"&&g.loading)throw new g("Mergn is loading!")}return yield e()}catch(r){return t?t(r):(g.debugLevel===2||g.debugLevel===3)&&Ti(d,r),null}finally{C(`${d} Time`,!1),D(d,!1)}}catch(r){return null}});var x=(n=>(n[n.NONE=0]="NONE",n[n.INFO=1]="INFO",n[n.ERROR=2]="ERROR",n[n.ALL=3]="ALL",n[n.DEBUG=4]="DEBUG",n))(x||{}),s=(d,e)=>{g.debugLevel!==0&&(g.debugLevel>=3?d===1?console.info(`INFO: ${new Date().toISOString()}`,e):d===2&&console.error(`ERROR: ${new Date().toISOString()}`,e):g.debugLevel===1&&d===1?console.info(`INFO: ${new Date().toISOString()}`,e):g.debugLevel===2&&d===2&&console.error(`ERROR: ${new Date().toISOString()}`,e))},C=(d,e)=>{g.debugLevel!==0&&(e?console.time(d):console.timeEnd(d))},D=(d,e)=>{g.debugLevel!==0&&(e?console.group(d):console.groupEnd())};var ne,k,Ee,Oe,T=class T{constructor(){E(this,k)}retryPromise(e,t=3,i=1e3){return new Promise((r,n)=>{let o=v=>c(this,null,function*(){try{let I=yield e();r(I)}catch(I){v===0?n(I):setTimeout(()=>{o(v-1)},i)}});o(t)})}static getInstance(){return l(T,ne)||h(T,ne,new T),l(T,ne)}setApiURL(e){T.API_URL=e}updateAPIKey(e){T.apiKey=e;let t=e,i=/m(\d+)rgn/,r=t.match(i);r&&(T.brandId=r[1])}getAPIKey(){return T.apiKey}getBrandId(){return T.brandId}get(e){return c(this,null,function*(){let t=a(this,k,Oe).call(this,T.apiKey);try{let i=yield fetch(a(this,k,Ee).call(this)+e,{headers:{Authorization:t,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`${t} - ${JSON.stringify(yield i.json())}`);return i.json()}catch(i){return Promise.reject(i)}})}post(e,t,i){return c(this,null,function*(){let r=a(this,k,Oe).call(this,T.apiKey);try{return(yield fetch(a(this,k,Ee).call(this)+e,{body:JSON.stringify(t||{}),headers:{Authorization:r,"Content-Type":"application/json"},method:"POST",signal:i})).json()}catch(n){return Promise.reject(n)}})}put(e,t){return c(this,null,function*(){return(yield fetch(a(this,k,Ee).call(this)+e,{body:JSON.stringify(t||{}),headers:{Authorization:a(this,k,Oe).call(this,T.apiKey),"Content-Type":"application/json"},method:"PUT"})).json()})}syncRealWorldTime(){return c(this,null,function*(){try{let e=(yield(yield fetch(a(this,k,Ee).call(this)+At)).json()).data;T.UTCDate=new Date(e),T.lastSyncTime=new Date}catch(e){s(2,"Failed to sync real-world time")}})}getCurrentUTCDate(){if(!T.UTCDate||!T.lastSyncTime)return s(2,"UTC Date or last sync time is not set"),new Date;let t=new Date().getTime()-T.lastSyncTime.getTime();return new Date(T.UTCDate.getTime()+t)}retryPost(e,t,i){return c(this,null,function*(){return this.retryPromise(()=>this.post(e,t,i))})}};ne=new WeakMap,k=new WeakSet,Ee=function(){return T.API_URL},Oe=function(e){return btoa(`${e}:${new Date().getTime()}`)},E(T,ne),T.API_URL=yt;var Ge=T,_=Ge.getInstance();var Rt=(I=>(I.UTM_SOURCE="utm_source",I.UTM_MEDIUM="utm_medium",I.UTM_CAMPAIGN="utm_campaign",I.UTM_TERM="utm_term",I.UTM_CONTENT="utm_content",I.GAD_SOURCE="gad_source",I.GCLID="gclid",I.FBCLID="fbclid",I))(Rt||{});var Lt=new Set(Object.values(Rt));var oe="Popup Action";var Je="Content Card Action";var se,M,ae,Y,Ie,ve,Q,b,Ke,Dt,je,_e,Ut,Le,Ae,ze,xt,Re,q,kt,f=class f{constructor(){E(this,b);this.permission=null;this.pushMessageToSW=e=>{s(1,"Pushing message to service worker"),navigator.serviceWorker.getRegistrations().then(t=>{s(1,"Service Worker registration"),t.forEach(i=>{var r;i!=null&&i.active&&i.active.scriptURL.includes(l(f,Q)||"mergn-sw.js")&&(s(1,"Service Worker ready"),(r=i.active)==null||r.postMessage(JSON.stringify(e)))})}).catch(t=>{s(2,`Failed to push message to service worker: ${t.message}`)})};this.loadWebPushActionInLocalStorage=()=>{u.loadActionInLocalStorage({actionCondition:()=>!0,actionMethod:e=>a(this,b,Ae).call(this,Number(e.web_optin_instance_id)),localStorageKey:"web_push_action"})};E(this,Le,()=>{u.storeActionInLocalStorageInternal("web_push_action")});E(this,q,e=>{u.clearActionInLocalStorage({id:e,localStorageKey:"web_push_action"})})}static getInstance(){return l(f,se)||h(f,se,new f),l(f,se)}init(e,t,i){return c(this,null,function*(){var r;if(s(1,"Initializing Notification Service"),m.recordDebugEvents({eventName:"init",eventProperties:[{eventProperty:"service_worker",value:"serviceWorker"in navigator},{eventProperty:"push_manager",value:"PushManager"in window}]}),"serviceWorker"in navigator&&"PushManager"in window){s(1,"Service Worker and Push Manager are supported");try{m.recordDebugEvents({eventName:"init_condition"}),s(1,`isExtensionSW: ${i}`),h(f,Q,i?`${window.origin}/apps/mergn/mergn-sw.js`:t||"/mergn-sw.js"),s(1,`swPath: ${l(f,Q)}`),h(f,M,yield navigator.serviceWorker.register(l(f,Q))),s(1,"Service Worker registered"),s(1,"Pushing message to service worker for initialization"),setTimeout(()=>{this.pushMessageToSW({customer:localStorage.getItem("customer")||"",events:m.getStoredEvents(),API_KEY:_.getAPIKey(),debugLevel:g.debugLevel,device_id:localStorage.getItem("uniqueIdentity")||"",operatingSystem:u.getOperatingSystem(),osVersion:u.getOSVersion(),Platform:u.getPlatform()})},1e3),h(f,Ie,!0);let n=a(this,b,ze).call(this),o=Object.keys(n||{});if(o.length&&a(this,b,Ae).call(this,Number(o[0])),!e)return;let v=yield(r=l(f,M))==null?void 0:r.pushManager.getSubscription();s(1,"Checking for existing subscription"),l(f,M)&&(s(1,"Service Worker registration is available"),l(f,M).update()),v?(s(1,"Existing subscription found"),m.recordDebugEvents({eventName:"existing_subscription"}),yield a(this,b,_e).call(this),h(f,ae,!0)):(s(1,"No existing subscription found"),yield a(this,b,Ke).call(this,l(f,ve)||void 0))}catch(n){let o=n&&n.message?n.message.substring(0,100):"undefined";yield m.recordDebugEvents({eventName:"Reachability Push Web",eventProperties:[{eventProperty:"message",value:`${o}`}]}),s(2,"Service Worker registration failed:"),s(2,o)}}})}showNotification(e){if(!l(f,Ie)){h(f,ve,e),m.recordDebugEvents({eventName:"notification_service_not_initialized"}),s(2,"Notification service is not initialized");return}O("showNotification",()=>c(this,null,function*(){var i;let t=JSON.parse(localStorage.getItem("web_push_action")||"{}");if(t){for(let r in t)if(((i=t[r])==null?void 0:i.type)===e.type){s(1,`Notification ${e.type} already in cache`);return}}a(this,b,Ut).call(this,e),l(this,Le).call(this),a(this,b,Ae).call(this,e.web_optin_instance_id)}))}};se=new WeakMap,M=new WeakMap,ae=new WeakMap,Y=new WeakMap,Ie=new WeakMap,ve=new WeakMap,Q=new WeakMap,b=new WeakSet,Ke=function(e){return c(this,null,function*(){s(1,`Checking notification permission: ${JSON.stringify(e)} `),m.recordDebugEvents({eventName:"check_permission"});let t;try{if(t=Notification.permission,t)if(s(1,`Notification permission: ${t}`),t==="default")e||(this.permission="default",m.recordDebugEvents({eventName:"Turned Off Notification Reset Permission"})),e&&(m.recordDebugEvents({eventName:"notification_data",eventProperties:[{eventProperty:"type",value:`${e==null?void 0:e.type}`}]}),l(this,q).call(this,e.web_optin_instance_id),e.type==="two_step"?a(this,b,Dt).call(this,e):yield a(this,b,je).call(this,e));else if(t==="denied")m.recordDebugEvents({eventName:"Turned Off Notification"}),s(1,"The user has blocked notifications."),e&&e.web_optin_instance_id&&l(this,q).call(this,e.web_optin_instance_id);else{if(e&&e.web_optin_instance_id){l(this,q).call(this,e.web_optin_instance_id);return}m.recordDebugEvents({eventName:"already_registered"}),s(1,"The user has already enabled notifications."),l(f,ae)||(yield a(this,b,_e).call(this),yield m.recordEvent({eventName:"Already Registered To Web Push"}),e||h(f,ae,!0))}}catch(i){s(2,"Failed to check notification permission"),m.recordDebugEvents({eventName:"notification_permission_error"})}})},Dt=function(e){try{let t=document.createElement("div"),i;e.banner_design.banner_image&&(i=document.createElement("img"),i.src=e.banner_design.banner_image,i.alt="Image",i.id="centered-image");let r=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div"),v=document.createElement("img"),I=document.createElement("div"),S=document.createElement("div"),y=document.createElement("div"),R=document.createElement("div"),B=document.createElement("div"),j=document.createElement("div"),F=document.createElement("button"),L=document.createElement("button");t.className="mergn-overlay",r.className="mergnWebPushPopup",n.className=R.className=B.className="mergn-row",o.className="mergn-column-25",I.className="mergn-column-75",j.className="button-container",S.id="title",y.id="subtitle",F.id="button-1",L.id="button-2",v.src=e.banner_design.banner_icon,v.alt="Image",v.id="logo",S.textContent=e.banner_design.banner_title,y.textContent=e.banner_design.banner_text,F.textContent=e.banner_design.button_1.text,L.textContent=e.banner_design.button_2.text,o.appendChild(v),I.appendChild(S),I.appendChild(y),n.appendChild(o),n.appendChild(I),i&&(R.appendChild(i),i.style.cssText=`
6
- max-width: 100%;
7
- height: auto;
8
- display: block;
9
- margin-left: auto;
10
- margin-right: auto;
11
- border-radius: 10px;
12
- max-width: 350px;
13
- aspect-ratio: 2 / 1;
14
- `),j.appendChild(F),j.appendChild(L),B.appendChild(j),r.appendChild(n),r.appendChild(R),r.appendChild(B),t.appendChild(r),t.style.cssText=`
15
- position: fixed;
16
- top: 0;
17
- left: 0;
18
- width: 100%;
19
- height: 100%;
20
- background-color: rgba(0, 0, 0, 0.5);
21
- z-index: 99999999999;
22
- display: flex;
23
- justify-content: center;
24
- align-items: start;
25
- `,r.style.cssText=`
26
- background-color: ${e.banner_design.banner_color};
27
- padding: 15px;
28
- border-radius: 5px;
29
- max-width: 380px;
30
- max-height: 463px;
31
- `,n.style.cssText=R.style.cssText=B.style.cssText=`
32
- display: flex;
33
- flex-wrap: wrap;
34
- margin-bottom: 10px;
35
- `,o.style.cssText=`
36
- width: 25%;
37
- `,I.style.cssText=`
38
- width: 73%;
39
- margin-left: 2%;
40
- `,v.style.cssText=`
41
- max-width: 100%;
42
- height: auto;
43
- `,F.style.cssText=`
44
- padding: 12px 20px;
45
- border: none;
46
- background-color: ${e.banner_design.button_1.backgroundColor};
47
- color: ${e.banner_design.button_1.color};
48
- cursor: pointer;
49
- border-radius: 5px;
50
- width: 48%;
51
- `,L.style.cssText=`
52
- padding: 12px 20px;
53
- border: none;
54
- background-color: ${e.banner_design.button_2.backgroundColor};
55
- color: ${e.banner_design.button_2.color};
56
- cursor: pointer;
57
- border-radius: 5px;
58
- width: 48%;
59
- `,j.style.cssText=`
60
- display: flex;
61
- justify-content: space-between;
62
- align-items: center;
63
- flex-wrap: nowrap;
64
- width: 100%;
65
- `,S.style.cssText=`
66
- margin-bottom: 5px;
67
- font-size: 16px;
68
- color: ${e.banner_design.text_color}
69
- `,y.style.cssText=`
70
- margin-bottom: 5px;
71
- font-size: 13px;
72
- color: ${e.banner_design.text_color}
73
- `,document.body.appendChild(t),document.body.style.overflow="hidden",m.recordEvent({eventName:"Viewed Web Push Soft-ask",name:"viewed",web_optin_instance_id:e.web_optin_instance_id}),F==null||F.addEventListener("click",()=>c(this,null,function*(){t.remove(),h(f,Y,!1),document.body.style.overflow="auto",yield m.recordEvent({eventName:"Denied Web Push Soft-ask",web_optin_instance_id:e.web_optin_instance_id}),s(1,"User denied the notification permission.")})),L==null||L.addEventListener("click",()=>c(this,null,function*(){t.remove(),document.body.style.overflow="auto",m.recordEvent({eventName:"Accepted Web Push Soft-ask",web_optin_instance_id:e.web_optin_instance_id}),yield a(this,b,je).call(this,e)}))}catch(t){}},je=function(e){return c(this,null,function*(){try{m.recordEvent({eventName:"Displayed Web Push Subscription",name:"viewed",web_optin_instance_id:e.web_optin_instance_id});let t=yield Notification.requestPermission();t==="granted"?(s(1,"User granted the notification permission."),yield a(this,b,_e).call(this),yield m.recordEvent({eventName:"Allowed Web Push Subscription",name:"subscribed",web_optin_instance_id:e.web_optin_instance_id})):t==="denied"?(yield m.recordEvent({eventName:"Blocked Web Push Subscription"}),s(1,"User denied the notification permission.")):t==="default"&&(yield m.recordEvent({eventName:"Closed Web Push Subscription"}),s(1,"User closed the notification permission dialog."))}catch(t){s(2,"Failed to request notification permission")}h(f,Y,!1)})},_e=function(){return c(this,null,function*(){var t,i;let e=yield _.get(`${_t}`);if(s(1,`Getting Web Key: ${e.success}`),e.success){let r=yield(t=l(f,M))==null?void 0:t.pushManager.getSubscription();s(1,`Existing Subscription: ${!!r}`),r&&(yield r.unsubscribe());let n=yield(i=l(f,M))==null?void 0:i.pushManager.subscribe({applicationServerKey:e.data||"",userVisibleOnly:!0}),o=localStorage.getItem("customer")||"";s(1,`subscribeUserToPush Customer ID: ${o}`),(!o||o==="undefined")&&(yield u.setIdentity()),yield _.put(`${Nt}`,{customer_id:localStorage.getItem("customer"),device_id:localStorage.getItem("uniqueIdentity"),device_platform:u.getOperatingSystem(),is_web_push_subscribed:!0,os:u.getPlatform(),web_push_subscription_page_url:window.location.pathname,web_push_token:{token:JSON.parse(JSON.stringify(n))}}),this.pushMessageToSW({customer:localStorage.getItem("customer")||"",events:m.getStoredEvents(),API_KEY:_.getAPIKey(),debugLevel:g.debugLevel,device_id:localStorage.getItem("uniqueIdentity")||"",operatingSystem:u.getOperatingSystem(),osVersion:u.getOSVersion(),Platform:u.getPlatform()}),s(1,"User is subscribed")}else throw new Error("Failed to subscribe the user")})},Ut=function(e){u.storeActionInLocalStorage(e,"web_push_action","web_optin_instance_id")},Le=new WeakMap,Ae=function(e){if(l(f,Y))return;h(f,Y,!0);let t=a(this,b,ze).call(this);if(t!=null&&t[e])switch(t[e].entry_time){case"DELAY":{a(this,b,xt).call(this,t[e]);break}case"IMMEDIATELY":{a(this,b,Re).call(this,t[e]);break}case"SCROLL":{a(this,b,kt).call(this,t[e]);break}default:return}},ze=function(){let e=localStorage.getItem("web_push_action");return e?JSON.parse(e):null},xt=function(e){u.showDelayedAction({clearActionMethod:l(this,q).bind(this),data:e,displayMethod:a(this,b,Re).bind(this),idKey:"web_optin_instance_id",timeValueKey:"entry_time_value"})},Re=function(e){a(this,b,Ke).call(this,e)},q=new WeakMap,kt=function(e){u.showAfterScrollAction({data:e,displayMethod:a(this,b,Re).bind(this),timeValueKey:"entry_time_value"})},E(f,se),E(f,M,null),E(f,ae,!1),E(f,Y,!1),E(f,Ie,!1),E(f,ve,null),E(f,Q,"");var He=f,U=He.getInstance();var Z,w,Ft,Qe,Wt,Mt,le,De,Ce,fe,Bt,$t,Vt,Gt,Ue,$=class ${constructor(){E(this,w);E(this,le,e=>{u.clearActionInLocalStorage({id:e,localStorageKey:"action"})});E(this,De,(e,t)=>{let i=document.createElement("div");i.innerHTML=t,i.querySelectorAll("script").forEach(n=>{let o=document.createElement("script");n.src?o.src=n.src:o.textContent=n.textContent,e.appendChild(o)})});E(this,fe,({campaignCustomerInstanceId:e,campaignId:t,customForm:i,formDiv:r,popupContainer:n})=>{let o=(r==null?void 0:r.querySelector("form"))||i;o&&(o.querySelectorAll("input").forEach(v=>{v.style.setProperty("padding",v.style.padding,"important")}),o.addEventListener("submit",()=>c(this,null,function*(){n.remove();let v=new FormData(o),I={};s(1,"Form submitted values:");let S=[];for(let[y,R]of v.entries())I[y]=R,s(1,`${y}: ${R}`),S.push(G.recordAttribute(y,R.toString()));yield Promise.allSettled(S),setTimeout(()=>c(this,null,function*(){yield m.recordEvent({campaignCustomerInstanceId:e,campaignId:t,eventName:oe,eventProperties:[{eventProperty:"Form Submit",value:JSON.stringify({campaignId:t,formId:(r==null?void 0:r.id)||"custom_form",formValues:I})},{eventProperty:"Campaign Id",value:t.toString()}],name:"form"})}))})))});this.loadPopupEventActionInLocalStorage=()=>{u.loadActionInLocalStorage({actionCondition:e=>e.message.name==="Popup",actionMethod:e=>a(this,w,Qe).call(this,e.campaignId),localStorageKey:"action"})};E(this,Ue,()=>{u.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return l($,Z)||(h($,Z,new $),a(e=l($,Z),w,Ft).call(e)),l($,Z)}showPopup(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){s(1,"Popup already in cache");return}a(this,w,Gt).call(this,e),l(this,Ue).call(this),a(this,w,Qe).call(this,e.campaignId)}isPopupAction(e){return e==="Popup"}};Z=new WeakMap,w=new WeakSet,Ft=function(){return c(this,null,function*(){})},Qe=function(e){let t=a(this,w,Wt).call(this);if(document.getElementById(`popup_container_${e}`)){s(1,"Popup already displayed"),l(this,le).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{a(this,w,Mt).call(this,t[e]);break}case"IMMEDIATELY":{a(this,w,Ce).call(this,t[e]);break}case"SCROLL":{a(this,w,Vt).call(this,t[e]);break}default:return}},Wt=function(){let e=localStorage.getItem("action");return e?JSON.parse(e):null},Mt=function(e){u.showDelayedAction({clearActionMethod:l(this,le).bind(this),data:e,displayMethod:a(this,w,Ce).bind(this),idKey:"campaignId",timeValueKey:"campaignEntryTimeValue"})},le=new WeakMap,De=new WeakMap,Ce=function(e){if(document.getElementById(`popup_container_${e.campaignId}`))s(1,"Popup already displayed");else{let t=a(this,w,$t).call(this,"div",e);l(this,De).call(this,t,e.message.design),document.body.appendChild(t),m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:oe,eventProperties:[{eventProperty:"Popup View",value:JSON.stringify({campaignId:e.campaignId})}],name:"view"})}l(this,le).call(this,e.campaignId)},fe=new WeakMap,Bt=function(e,t){let i=e.parentElement;for(;i;){if(i.id.startsWith(t))return i;i=i.parentElement}return null},$t=function(e,t){let{campaignCustomerInstanceId:i,campaignId:r,message:{design:n}}=t,o=document.createElement(e);o.id=`popup_container_${r}`,o.innerHTML=n,o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.style.zIndex="99999999";let v=o.querySelector(".u-popup-container");v&&(v.style.zIndex="50");let I=v.querySelector(".u-popup-overlay");I&&(s(1,"Popup overlay element found"),I.style.setProperty("display","block","important")),o.querySelectorAll("form").forEach(y=>{let R=a(this,w,Bt).call(this,y,"u_content_form_");R?l(this,fe).call(this,{campaignCustomerInstanceId:i,campaignId:r,formDiv:R,popupContainer:o}):l(this,fe).call(this,{campaignCustomerInstanceId:i,campaignId:r,customForm:y,popupContainer:o})});let S=o.querySelector(".u-close-button");return(S==null?void 0:S.getAttribute("href"))==="#"&&S.removeAttribute("href"),S==null||S.addEventListener("click",()=>c(this,null,function*(){o.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:r,eventName:oe,eventProperties:[{eventProperty:"Close Click",value:JSON.stringify({campaignId:r})}],name:"close"})})),o.querySelectorAll('[id^="u_content_button_"]').forEach(y=>{y.addEventListener("click",()=>c(this,null,function*(){o.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:r,eventName:oe,eventProperties:[{eventProperty:"Button Click",value:JSON.stringify({buttonId:y.id,campaignId:r})}],name:"click"})}))}),o.querySelectorAll(".u-popup-container img").forEach(y=>{y.addEventListener("click",()=>c(this,null,function*(){var R;((R=y.parentElement)==null?void 0:R.tagName)==="A"&&y.parentElement.getAttribute("href")&&o.remove(),yield m.recordEvent({campaignCustomerInstanceId:i,campaignId:r,eventName:oe,eventProperties:[{eventProperty:"Image Click",value:JSON.stringify({campaignId:r,imageClassName:y.className,imageId:y.id})}],name:"click"})}))}),o},Vt=function(e){u.showAfterScrollAction({data:e,displayMethod:a(this,w,Ce).bind(this),timeValueKey:"campaignEntryTimeValue"})},Gt=function(e){u.storeActionInLocalStorage(e,"action","campaignId")},Ue=new WeakMap,E($,Z);var Ye=$,V=Ye.getInstance();var X,A,Jt,xe,Ht,Kt,jt,zt,Yt,J=class J{constructor(){E(this,A);this.queue=Promise.resolve()}static getInstance(){var e;return l(J,X)||(h(J,X,new J),a(e=l(J,X),A,Jt).call(e)),l(J,X)}pushToQueue(e){let t=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]");t.push(e),localStorage.setItem("preInitializedEvents",JSON.stringify(t))}recordEventsFromQueue(){return c(this,null,function*(){let e=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]");if(Array.isArray(e))for(let t of e)yield this.recordEventPreInitialized(t)})}recordEvent(e,t){return c(this,null,function*(){g.isInitialized&&!g.loading?yield a(this,A,xe).call(this,e,t):this.pushToQueue(e)})}recordEventPreInitialized(e){return c(this,null,function*(){try{yield a(this,A,xe).call(this,e)}finally{a(this,A,Yt).call(this,e.eventName)}})}recordDebugEvents(e){return c(this,null,function*(){g.debugLevel===4&&(!g.recordDebugEventsToggle||g.recordDebugEventsToggle[e.eventName])&&(yield a(this,A,xe).call(this,e))})}getStoredEvents(){let e=localStorage.getItem("events");return e?JSON.parse(e):{}}storeEventsAndPropertiesInLocalStorage(){return c(this,null,function*(){if(!localStorage.getItem("events")){let e=(yield this.fetchEventData()).data;if(e){localStorage.setItem("events",JSON.stringify(e));try{U.pushMessageToSW({events:e})}catch(t){}}}})}fetchEventData(){return c(this,null,function*(){try{return yield _.get(`${Ve}`)}catch(e){throw new Error("Error fetching event data")}})}postEventRecord(e,t){return c(this,null,function*(){let i=null,r=null,n=new AbortController;return this.queue=this.queue.then(()=>c(this,null,function*(){try{if(e.events.length===0)throw new Error("No events to record");let o=yield _.post(`/v2${Ve}${wt}`,e,n.signal);if(o.success)return r=o,o;if(o.message===`Customer with id ${localStorage.getItem("customer")} not exists`)throw localStorage.removeItem("customer"),new Error("Re initializing customer Id")}catch(o){throw s(2,"Error posting event record:"),s(2,`name: ${o.name}`),s(2,`message: ${o.message}`),(o.name==="AbortError"||o.name==="TypeError"&&o.message==="Failed to fetch"||o.message==="Load failed")&&(s(2,"Request aborted"),t&&a(this,A,zt).call(this,t)),i=new Error((o==null?void 0:o.message)||"Error posting event record"),o}return null})).catch(()=>{}),this.queue.then(()=>{if(i)throw i;return r})})}};X=new WeakMap,A=new WeakSet,Jt=function(){return c(this,null,function*(){})},xe=function(e,t){return c(this,null,function*(){yield O("# record event",()=>c(this,null,function*(){var mt,Et,It,vt;let{campaignCustomerInstanceId:i,campaignId:r,eventName:n,eventProperties:o,name:v,web_optin_instance_id:I}=e;s(1,"# Recording event"),D("Recording event",!0),C("Recording event Time",!0),s(1,"Event Payload"),s(1,{campaignCustomerInstanceId:i,eventName:n,eventProperties:o,name:v,web_optin_instance_id:I});let S=u.getPlatform();if(S==="Crawlers"||S==="Unknown")throw new Error("Invalid platform");n!=="Web Session Concluded"&&(yield u.checkTTL());let y=[];o&&y.push(...o),y.push({eventProperty:"Platform",value:S}),y.push({eventProperty:"operating-system",value:u.getOperatingSystem()}),y.push({eventProperty:"os-version",value:u.getOSVersion()});let R=this.getStoredEvents(),B=a(this,A,Kt).call(this,R,n,y);if(typeof B=="string"){s(2,B);return}u.updateSessionCreated();let{id:j}=R[n],F=a(this,A,jt).call(this,z(Ne(z(z(z({},i?{campaignCustomerInstanceId:i}:{}),r?{campaignId:r}:{}),I?{web_optin_instance_id:I}:{}),{eventId:j,eventProperties:B,sessionId:localStorage.getItem("session")||""}),v?{name:v}:{}));if(g.offline){let W=JSON.parse(localStorage.getItem("offlineEvents")||"[]");W.length<=50&&(W.push(...F.events),localStorage.setItem("offlineEvents",JSON.stringify(W)));return}let L=yield this.postEventRecord(F,e);(mt=L==null?void 0:L.data)!=null&&mt.optIn?(yield this.recordDebugEvents({eventName:"optin_data"}),U.showNotification(L.data.optIn)):n==="Viewed Webpage"&&(yield this.recordDebugEvents({eventName:"no_optin",eventProperties:[{eventProperty:"message",value:`${"Notification"in window&&typeof((Et=window==null?void 0:window.Notification)==null?void 0:Et.permission)!="undefined"}`}]})),(vt=(It=L==null?void 0:L.data)==null?void 0:It.campaigns)==null||vt.forEach(W=>{if(V.isPopupAction(W.message.name)){if(a(this,A,Ht).call(this,W.campaignId)){s(1,`Popup event is in queue for campaignId: ${W.campaignId}`);return}V.showPopup(W)}else de.isContentCardAction(W.message.name)&&de.showContentCard(W)}),C("Recording event Time",!1),D("Recording event",!1)}),i=>{_.getBrandId()==="67"&&i.message!=="Failed to fetch"&&i.message!=="Load failed"&&i.message.includes("Failed to fetch")},t)})},Ht=function(e){return s(1,`Checking if popup event is in queue for campaignId: ${e}`),JSON.parse(localStorage.getItem("preInitializedEvents")||"[]").find(i=>i.campaignId===e)},Kt=function(e,t,i){if(!Object.prototype.hasOwnProperty.call(e,t))return`Event ${t} is not valid.`;if(!i)return[];let r=e[t];if(!(r!=null&&r.eventProperty))return s(2,`Event ${t} does not have a valid eventProperty.`),`Event ${t} does not have a valid eventProperty.`;let n=i.filter(({eventProperty:o})=>!Object.prototype.hasOwnProperty.call(r.eventProperty,o)).map(({eventProperty:o})=>o);return n.length>0&&(s(2,`Filtering Event ${t} invalid eventProperties: ${n.join(", ")}.`),i=i.filter(({eventProperty:o})=>!n.includes(o))),i.map(({eventProperty:o,value:v})=>({eventPropertyId:r.eventProperty[o].id,value:v}))},jt=function(e){return{customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",events:[e]}},zt=function(e){s(1,"Adding to pre-initialized event:"),s(1,e);let t=localStorage.getItem("preInitializedEvents");t&&t!=="undefined"?(t=JSON.parse(t),t.push(e)):t=[e],localStorage.setItem("preInitializedEvents",JSON.stringify(t))},Yt=function(e){let t=JSON.parse(localStorage.getItem("preInitializedEvents")||"[]"),i=t.findIndex(r=>r.eventName===e);i>=0&&t.splice(i,1),localStorage.setItem("preInitializedEvents",JSON.stringify(t))},E(J,X);var qe=J,m=qe.getInstance();var ee,N,Qt,Xe,qt,Zt,ue,ke,Xt,ei,ti,Fe,H=class H{constructor(){E(this,N);E(this,ue,e=>{u.clearActionInLocalStorage({id:e,localStorageKey:"action"})});this.loadContentCardEventActionInLocalStorage=()=>{u.loadActionInLocalStorage({actionCondition:e=>e.message.name==="ContentCard",actionMethod:e=>a(this,N,Xe).call(this,e.campaignId),localStorageKey:"action"})};E(this,Fe,()=>{u.storeActionInLocalStorageInternal("action")})}static getInstance(){var e;return l(H,ee)||(h(H,ee,new H),a(e=l(H,ee),N,Qt).call(e)),l(H,ee)}showContentCard(e){let t=JSON.parse(localStorage.getItem("action")||"{}");if(t&&t[e==null?void 0:e.campaignId]){s(1,"ContentCard already in cache");return}a(this,N,ti).call(this,e),l(this,Fe).call(this),a(this,N,Xe).call(this,e.campaignId)}isContentCardAction(e){return e==="content_card"}};ee=new WeakMap,N=new WeakSet,Qt=function(){return c(this,null,function*(){})},Xe=function(e){let t=a(this,N,qt).call(this);if(document.getElementById(`contentCard_container_${e}`)){s(1,"ContentCard already displayed"),l(this,ue).call(this,e);return}if(t!=null&&t[e])switch(t[e].campaignEntryTime){case"DELAY":{a(this,N,Zt).call(this,t[e]);break}case"IMMEDIATELY":{a(this,N,ke).call(this,t[e]);break}case"SCROLL":{a(this,N,ei).call(this,t[e]);break}default:return}},qt=function(){let e=localStorage.getItem("action");return e?JSON.parse(e):null},Zt=function(e){u.showDelayedAction({clearActionMethod:l(this,ue).bind(this),data:e,displayMethod:a(this,N,ke).bind(this),idKey:"campaignId",timeValueKey:"campaignEntryTimeValue"})},ue=new WeakMap,ke=function(e){var t;if(document.getElementById(`contentCard_container_${e.campaignId}`))s(1,"ContentCard already displayed");else{let i=a(this,N,Xt).call(this,"div",e),r=document.querySelector(`#${e.message.divId}`);r&&(r.innerHTML=i.outerHTML,m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:Je,eventProperties:[{eventProperty:"Content Card View",value:JSON.stringify({campaignId:e.campaignId})}],name:"view"}),(t=document.getElementById(`contentCard_container_${e.campaignId}`))==null||t.addEventListener("click",()=>{m.recordEvent({campaignCustomerInstanceId:e.campaignCustomerInstanceId,campaignId:e.campaignId,eventName:Je,eventProperties:[{eventProperty:"Content Card Click",value:JSON.stringify({campaignId:e.campaignId})}],name:"click"})}))}l(this,ue).call(this,e.campaignId)},Xt=function(e,t){var o;let{campaignId:i,message:{design:r}}=t,n=document.createElement(e);return n.id=`contentCard_container_${i}`,n.innerHTML=r,(o=n.querySelector(".u-close-button"))==null||o.remove(),n},ei=function(e){u.showAfterScrollAction({data:e,displayMethod:a(this,N,ke).bind(this),timeValueKey:"campaignEntryTimeValue"})},ti=function(e){u.storeActionInLocalStorage(e,"action","campaignId")},Fe=new WeakMap,E(H,ee);var Ze=H,de=Ze.getInstance();var ge,be,Se,ye,Te,we,Pe,We,p,ii,ri,ni,he,tt,it,rt,nt,oi,si,ot,st,ai,ci,li,at,ct,di,ui,te=class te{constructor(){E(this,p);E(this,be);E(this,Se);E(this,ye);E(this,Te,null);E(this,we,null);E(this,Pe,!1);E(this,We,()=>{setInterval(()=>{O("listen to shopify data",()=>c(this,null,function*(){let e=localStorage.getItem("mergn_shopify");if(e!==l(this,we)){s(1,"Shopify data changed"),h(this,we,e);let t=JSON.parse(e||"{}");if(t!=null&&t.pushMessageToSW){s(1,"Pushing message to SW from Shopify data");let i=t.pushMessageToSW;delete t.pushMessageToSW,localStorage.setItem("mergn_shopify",JSON.stringify(t)),U.pushMessageToSW(i)}if(t!=null&&t.optIn){let i=t.optIn;delete t.optIn,localStorage.setItem("mergn_shopify",JSON.stringify(t)),U.showNotification(i)}if(t!=null&&t.campaigns){let i=t.campaigns;delete t.campaigns,localStorage.setItem("mergn_shopify",JSON.stringify(t)),i.forEach(r=>{V.isPopupAction(r.message.name)?V.showPopup(r):de.isContentCardAction(r.message.name)&&de.showContentCard(r)})}}}))},1e3)});this.storeActionInLocalStorageInternal=e=>{let t=()=>{let i=JSON.parse(localStorage.getItem(e)||"{}");Object.keys(i).forEach(r=>{i[r].initialTime=new Date().getTime()}),localStorage.setItem(e,JSON.stringify(i))};t(),window.addEventListener("beforeunload",t)};this.clearActionInLocalStorage=({id:e,localStorageKey:t})=>{let i=JSON.parse(localStorage.getItem(t)||"{}");i[e]&&delete i[e],localStorage.setItem(t,JSON.stringify(i))};this.loadActionInLocalStorage=({actionCondition:e,actionMethod:t,localStorageKey:i})=>{let r=JSON.parse(localStorage.getItem(i)||"{}");Object.keys(r).forEach(n=>{e(r[n])&&t(r[n])})}}static getInstance(){return l(te,ge)||h(te,ge,new te),l(te,ge)}init(e,t){return c(this,null,function*(){s(1,"Initializing base service");let i=a(this,p,he).call(this);t!=null&&t.shopify&&h(this,Pe,!0),a(this,p,ii).call(this,e);let r=this.getPlatform();if(r==="Crawlers"||r==="Unknown"){s(2,"Not initializing base service for crawlers or unknown platforms");return}if(yield _.syncRealWorldTime(),s(1,"Verifying API Key"),yield a(this,p,at).call(this,3),t!=null&&t.shopify&&l(this,We).call(this),t!=null&&t.identity)try{g.loading=!0,yield this.setIdentity(t.identity)}finally{g.loading=!1}yield this.checkTTL(),yield m.recordEventsFromQueue(),yield G.recordAttributeFromQueue(),m.recordDebugEvents({eventName:"base_init"}),s(1,"Initializing notification service from Base Service"),yield O("notification service",()=>c(this,null,function*(){yield U.init(i,t==null?void 0:t.swPath,t==null?void 0:t.isExtensionSW)})),yield a(this,p,ui).call(this,t==null?void 0:t.shopify);let n=history.pushState;history.pushState=(...o)=>{n.apply(history,o),a(this,p,di).call(this,t==null?void 0:t.shopify)},s(1,"tracking page change register")})}setPlatform(e){h(this,be,e)}setOSVersion(e){h(this,Se,e)}setOperatingSystem(e){h(this,ye,e)}setPreviousUrl(e){h(this,Te,e)}getPreviousUrl(){return l(this,Te)}getPlatform(){return l(this,be)}getOSVersion(){return l(this,Se)}getOperatingSystem(){return l(this,ye)}updateSessionCreated(){}showAfterScrollAction({data:e,displayMethod:t,timeValueKey:i}){let r=()=>{var S;let n=window.innerHeight,o=document.documentElement.scrollHeight;window.scrollY/(o-n)*100>(((S=e[i])==null?void 0:S.value)||0)&&(window.removeEventListener("scroll",r),t(e))};window.addEventListener("scroll",r)}showDelayedAction({clearActionMethod:e,data:t,displayMethod:i,idKey:r,timeValueKey:n}){var I,S,y;let o=(I=t[n])==null?void 0:I.value;((S=t[n])==null?void 0:S.duration)==="min"&&(o=o*60);let v=t.initialTime-500+(o||0)*1e3-new Date().getTime();s(1,`Initial time: ${t.initialTime}`),s(1,`Time value: ${(y=t[n])==null?void 0:y.value}`),s(1,`Current time: ${new Date().getTime()}`),s(1,`Time difference: ${v}`),v>0?setTimeout(()=>{e(t[r]),i(t)},v):(e(t[r]),i(t))}storeActionInLocalStorage(e,t,i){var o;let r=JSON.parse(localStorage.getItem(t)||"{}"),n=(o=i in e&&e[i])!=null?o:"";n&&(r[n]=Ne(z({},e),{initialTime:new Date().getTime()}),localStorage.setItem(t,JSON.stringify(r)))}checkTTL(){return c(this,null,function*(){yield O("# check TTL",()=>c(this,null,function*(){if(l(this,Pe))return;s(1,"Checking TTL"),D("Checking TTL",!0),C("Checking TTL Time",!0);let e=localStorage.getItem("ttl"),t=!1;if(t=a(this,p,he).call(this,e),t){let i=localStorage.getItem("session"),r=localStorage.getItem("ttl");if(i&&r){let n=parseInt(r,10);yield m.recordEvent({eventName:"Web Session Concluded",eventProperties:[{eventProperty:"SESSION_ID",value:localStorage.getItem("session")},{eventProperty:"SESSION_CREATED",value:Number.isInteger(n)?new Date(n).toISOString():new Date().toISOString()}]})}localStorage.removeItem("ttl"),localStorage.removeItem("session"),localStorage.setItem("ttl",`${new Date().getTime()}`),yield a(this,p,st).call(this),this.clearLocalStorage()}(!e||t||a(this,p,si).call(this))&&(a(this,p,nt).call(this)&&a(this,p,ot).call(this),a(this,p,rt).call(this)&&(yield this.setIdentity()),(a(this,p,he).call(this)||a(this,p,tt).call(this))&&(yield a(this,p,ci).call(this)),yield a(this,p,st).call(this),(a(this,p,he).call(this)||a(this,p,it).call(this))&&(yield a(this,p,li).call(this))),C("Checking TTL Time",!1),D("Checking TTL",!1)}))})}clearLocalStorage(){localStorage.removeItem("action"),localStorage.removeItem("events"),localStorage.removeItem("attributes"),localStorage.removeItem("offlineEvents")}checkIfIdentityExists(e){if(_.getBrandId()==="39")return!1;let t=this.getCookie("mergn_identity");if(t&&t!=="undefined"){let i=this.decodeData(t);return e&&e===i?!0:i}return!1}storeIdentity(e){let t=this.encodeData(e);this.setCookie("mergn_identity",t,365)}removeIdentity(){document.cookie="mergn_identity=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"}encodeData(e){let i=new TextEncoder().encode(e),r="";for(let n=0;n<i.length;n++)r+=String.fromCharCode(i[n]);return btoa(r)}decodeData(e){let t=atob(e),i=new Uint8Array(t.length);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return new TextDecoder().decode(i)}getCookie(e){var r;let i=`; ${document.cookie}`.split(`; ${e}=`);return i.length===2&&((r=i.pop())==null?void 0:r.split(";").shift())||null}setCookie(e,t,i){let r=new Date;r.setTime(r.getTime()+i*24*60*60*1e3);let n=`expires=${r.toUTCString()}`;document.cookie=`${e}=${t}; ${n}; path=/; secure; SameSite=Strict`}setIdentity(e){return c(this,null,function*(){s(1,"identity received: "),s(1,e);let t=this.checkIfIdentityExists(e);if(s(1,`local identity: ${t}`),typeof t=="boolean"&&t)return;let i=localStorage.getItem("uniqueIdentity");(!i||i==="undefined")&&(i=a(this,p,ot).call(this));let r={deviceId:i,os:this.getPlatform()};if(e)r.identity=e;else if(typeof t=="string")r.identity=t;else if(!e&&localStorage.getItem("customer"))return;try{s(1,"Setting identity to:"),s(1,r),this.storeIdentity(r.identity);let n=yield a(this,p,ai).call(this,r);if(n!==void 0){localStorage.setItem("customer",n);try{U.pushMessageToSW({customer:n})}catch(o){}}}catch(n){throw this.removeIdentity(),new Error("Error setting identity")}})}};ge=new WeakMap,be=new WeakMap,Se=new WeakMap,ye=new WeakMap,Te=new WeakMap,we=new WeakMap,Pe=new WeakMap,We=new WeakMap,p=new WeakSet,ii=function(e){_.updateAPIKey(e),this.setPlatform(a(this,p,ri).call(this)),this.setOSVersion(a(this,p,ni).call(this)),this.setOperatingSystem(navigator.userAgent)},ri=function(){var t;let e=navigator.userAgent.toLowerCase();return/googlebot|bingbot|yandexbot|duckduckbot|slurp|twitterbot|linkedinbot|facebot|pinterest|vkshare|applebot|baiduspider|adsbot-google|msnbot|yahoobot|sogou|facebookexternalhit/i.test(e)?"Crawlers":/wv|wkwebview|instagram|facebook|fbav|fban|twitter|snapchat|pinterest|linkedin|tiktok/i.test(e)?"Mobile":/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(e)?("Notification"in window&&typeof((t=window==null?void 0:window.Notification)==null?void 0:t.permission)!="undefined","Mobile"):/windows|macintosh|linux|x11/i.test(e)?"Web":"Unknown"},ni=function(){let e=navigator.userAgent,t;return e.indexOf("Instagram")>-1?t="Instagram":e.indexOf("Facebook")>-1||e.indexOf("FBAV")>-1||e.indexOf("FBAN")>-1?t="Facebook":e.indexOf("Twitter")>-1?t="Twitter":e.indexOf("Snapchat")>-1?t="Snapchat":e.indexOf("LinkedIn")>-1?t="LinkedIn":e.indexOf("TikTok")>-1?t="TikTok":e.indexOf("Chrome")>-1&&e.indexOf("Edg")===-1?t="Google Chrome":e.indexOf("Safari")>-1&&e.indexOf("Chrome")===-1?t="Safari":e.indexOf("Firefox")>-1?t="Mozilla Firefox":e.indexOf("Edg")>-1?t="Microsoft Edge":e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1?t="Internet Explorer":e.indexOf("Opera")>-1||e.indexOf("OPR")>-1?t="Opera":e.indexOf("Vivaldi")>-1?t="Vivaldi":e.indexOf("Brave")>-1?t="Brave":e.indexOf("SamsungBrowser")>-1?t="Samsung Internet":e.indexOf("UCBrowser")>-1?t="UC Browser":e.indexOf("QQBrowser")>-1?t="QQ Browser":e.indexOf("Baidu")>-1?t="Baidu Browser":e.indexOf("Sogou")>-1?t="Sogou Browser":t="Unknown",t},he=function(e){let t;return e||(t=localStorage.getItem("ttl")),e||t?new Date().getTime()-parseInt(e||t||"",10)>12e5:!0},tt=function(){return!localStorage.getItem("events")},it=function(){return!localStorage.getItem("attributes")},rt=function(){return!localStorage.getItem("customer")},nt=function(){return!localStorage.getItem("uniqueIdentity")},oi=function(){return!localStorage.getItem("session")},si=function(){return a(this,p,tt).call(this)||a(this,p,it).call(this)||a(this,p,rt).call(this)||a(this,p,nt).call(this)||a(this,p,oi).call(this)},ot=function(){let e=localStorage.getItem("uniqueIdentity");return e||(e=crypto.randomUUID(),localStorage.setItem("uniqueIdentity",e)),e},st=function(){return c(this,null,function*(){yield O("store session",()=>c(this,null,function*(){let e=localStorage.getItem("session");if(!e){e=crypto.randomUUID(),localStorage.setItem("session",e);let t=localStorage.getItem("ttl"),i=t?parseInt(t,10):"";yield m.recordEvent({eventName:"Web Session Started",eventProperties:[{eventProperty:"SESSION_ID",value:localStorage.getItem("session")},{eventProperty:"SESSION_CREATED",value:i?new Date(i).toISOString():new Date().toISOString()}]})}}),e=>{_.getBrandId()==="67"&&e.message!=="Failed to fetch"&&e.message})})},ai=function(e){return c(this,null,function*(){try{return(yield _.retryPost(`${Pt}${Ot}`,e)).data}catch(t){throw new Error("Error posting identity data")}})},ci=function(){return c(this,null,function*(){yield m.storeEventsAndPropertiesInLocalStorage()})},li=function(){return c(this,null,function*(){yield G.storeAttributeInLocalStorage()})},at=function(e){return c(this,null,function*(){yield O("verify API key",()=>c(this,null,function*(){var t;try{let i=parseInt(localStorage.getItem("verifyTTL")||"0",10)||0;if(!i||i&&new Date().getTime()>i){let r=yield _.get("/brand");if(!(r!=null&&r.success))throw new Error(JSON.stringify(r));localStorage.setItem("verifyTTL",(new Date().getTime()+3e5).toString())}g.disableSDK=!1,g.isInitialized=!0}catch(i){if(_.getBrandId()==="67"&&!((t=i==null?void 0:i.message)!=null&&t.startsWith("get"))&&(i==null?void 0:i.message)!=="Error verifying API key"&&i.message!=="Failed to fetch"&&i.message,e&&e>=1){yield new Promise(r=>setTimeout(r,1500)),yield a(this,p,at).call(this,e-1);return}throw g.disableSDK=!0,new Error("Error verifying API key")}}))})},ct=function(e){return c(this,null,function*(){var r;s(1,"Performing viewed web page event");let t=(r=window==null?void 0:window.location)==null?void 0:r.href;if(this.setPreviousUrl(t),e){t.includes("thank_you")&&(yield m.recordEvent({eventName:"Thank you page"}));return}m.recordDebugEvents({eventName:"pre_vwp"});let i=[];new URLSearchParams(new URL(window.location.href).search).forEach((n,o)=>c(this,null,function*(){Lt.has(o)&&i.push({eventProperty:o,value:n})})),yield m.recordEvent({eventName:"Viewed Webpage",eventProperties:[{eventProperty:"URL",value:window.location.pathname},...i]})})},di=function(e){return c(this,null,function*(){var i;s(1,"Tracking page change");let t=(i=window==null?void 0:window.location)==null?void 0:i.href;(this.getPreviousUrl()===null||this.getPreviousUrl()===void 0||t!==this.getPreviousUrl())&&(yield a(this,p,ct).call(this,e))})},ui=function(e){return c(this,null,function*(){var i,r;let t=(i=window==null?void 0:window.location)==null?void 0:i.href;m.recordDebugEvents({eventName:"show_notification_error",eventProperties:[{eventProperty:"message",value:`${t!==this.getPreviousUrl()}:${t}:${this.getPreviousUrl()}`}]});try{yield a(this,p,ct).call(this,e)}catch(n){let o=n&&n.message?(r=n==null?void 0:n.message)==null?void 0:r.substring(0,100):"undefined";yield m.recordDebugEvents({eventName:"vwp_error",eventProperties:[{eventProperty:"message",value:`${o}`}]})}})},E(te,ge);var et=te,u=et.getInstance();var ie,pe,P,gi,pi,mi,Me,dt,ut,Ei,Ii,K=class K{constructor(){E(this,P);E(this,pe,!1)}static getInstance(){var e;return l(K,ie)||(h(K,ie,new K),a(e=l(K,ie),P,gi).call(e)),l(K,ie)}recordAttributeFromQueue(){return c(this,null,function*(){yield O("# recordAttributeFromQueue",()=>c(this,null,function*(){let e=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");if(Array.isArray(e))for(let t of e){if(s(1,"Recording pre-initialized attributes"),s(1,t),yield this.checkIfAttributeExists(t.attributeName,t.attributeValue)){s(1,`Pre Initialized Attribute ${t.attributeName} already exists with value ${t.attributeValue}`),a(this,P,Me).call(this,t.attributeName,t.attributeValue);return}yield a(this,P,dt).call(this,{attributeName:t.attributeName,attributeValue:t.attributeValue})}}))})}recordAttribute(e,t,i){return c(this,null,function*(){if(yield this.checkIfAttributeExists(e,t)){s(1,`Attribute ${e} already exists with value ${t}`),a(this,P,Me).call(this,e,t);return}a(this,P,mi).call(this,e),a(this,P,pi).call(this,e,t),g.isInitialized&&!g.loading&&(yield a(this,P,dt).call(this,{attributeName:e,attributeProperties:i,attributeValue:t}))})}storeAttributeInLocalStorage(){return c(this,null,function*(){if(!localStorage.getItem("attributes")&&!l(this,pe)){h(this,pe,!0);try{let e=(yield this.fetchAttributeData()).data;e&&localStorage.setItem("attributes",JSON.stringify(e))}catch(e){throw new Error("Error storing attribute data in local storage")}finally{h(this,pe,!1)}}})}fetchAttributeData(){return c(this,null,function*(){try{return yield _.get(`${$e}`)}catch(e){throw new Error("Error fetching attribute data")}})}storeAttribute(e,t){return c(this,null,function*(){let i=u.getCookie("mergn_customer_attributes"),r;if(!i)r={};else{let o=u.decodeData(i);r=JSON.parse(o)}r[e]=t;let n=u.encodeData(JSON.stringify(r));u.setCookie("mergn_customer_attributes",n,365)})}removeAttribute(e){return c(this,null,function*(){let t=u.getCookie("mergn_customer_attributes"),i;if(!t)i={};else{let n=u.decodeData(t);i=JSON.parse(n)}delete i[e];let r=u.encodeData(JSON.stringify(i));u.setCookie("mergn_customer_attributes",r,365)})}checkIfAttributeExists(e,t){return c(this,null,function*(){let i=u.getCookie("mergn_customer_attributes");if(!i)return!1;let r=u.decodeData(i),n=JSON.parse(r);return Object.prototype.hasOwnProperty.call(n,e)?t!==void 0?n[e]===t:!0:!1})}};ie=new WeakMap,pe=new WeakMap,P=new WeakSet,gi=function(){return c(this,null,function*(){})},pi=function(e,t){let i=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");i.push({attributeName:e,attributeValue:t}),localStorage.setItem("preInitializedAttributes",JSON.stringify(i))},mi=function(e){return c(this,null,function*(){let t=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");for(let i of t)i.attributeName===e&&(t.splice(t.indexOf(i),1),localStorage.setItem("preInitializedAttributes",JSON.stringify(t)))})},Me=function(e,t){return c(this,null,function*(){let i=JSON.parse(localStorage.getItem("preInitializedAttributes")||"[]");for(let r of i)JSON.stringify(r)===JSON.stringify({attributeName:e,attributeValue:t})&&(i.splice(i.indexOf(r),1),localStorage.setItem("preInitializedAttributes",JSON.stringify(i)))})},dt=function(r){return c(this,arguments,function*({attributeName:e,attributeProperties:t,attributeValue:i}){yield O("# recordAttribute",()=>c(this,null,function*(){if(s(1,"Recording attribute"),D("Recording attribute",!0),C("Recording attribute Time",!0),s(1,"Attribute Payload:"),s(1,`Attribute Name: ${e} | Attribute Value: ${i}`),!i||i===""){s(2,"Attribute value is required");return}yield u.checkTTL(),yield a(this,P,Ei).call(this);let n=JSON.parse(localStorage.getItem("attributes")||"{}"),o=t?a(this,P,ut).call(this,n,e,t):a(this,P,ut).call(this,n,e);if(typeof o=="string"){s(2,o);return}n[e].should_set_identity&&(yield u.setIdentity(typeof i=="string"?i:JSON.stringify(i))),u.updateSessionCreated();let{id:v}=n[e],I={attributeId:v,attributeProperties:o,customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",value:i};yield a(this,P,Ii).call(this,I,e,i),a(this,P,Me).call(this,e,i),C("Recording attribute Time",!1),D("Recording attribute",!1)}))})},ut=function(e,t,i){if(!Object.prototype.hasOwnProperty.call(e,t))return`Attribute ${t} is not valid.`;if(!i)return[];let r=e[t];if(!(r!=null&&r.attributeProperty))return`Attribute ${t} does not have a valid attributeProperty.`;let n=i.filter(({attributeProperty:o})=>!Object.prototype.hasOwnProperty.call(r.attributeProperty,o)).map(({attributeProperty:o})=>o);return n.length>0?`Attribute ${t} has invalid attributeProperties: ${n.join(", ")}.`:i.map(({attributeProperty:o,value:v})=>({attributePropertyId:r.attributeProperty[o].id,value:v}))},Ei=function(){return c(this,null,function*(){localStorage.getItem("attributes")||(yield this.storeAttributeInLocalStorage())})},Ii=function(e,t,i){return c(this,null,function*(){try{return yield this.storeAttribute(t,i),yield _.post(`${$e}${Tt}`,e)}catch(r){throw yield this.removeAttribute(t),new Error("Error posting attribute record")}})},E(K,ie);var lt=K,G=lt.getInstance();var me,re=class re{constructor(){}static getInstance(){return l(re,me)||h(re,me,new re),l(re,me)}init(e,t){setTimeout(()=>{O("init",()=>c(this,null,function*(){yield O("log level check",()=>c(this,null,function*(){s(1,"Log level check");let i=localStorage.getItem("mergn_debug_level");i&&(g.debugLevel=parseInt(i,10))})),s(1,"Initializing Mergn SDK"),yield u.init(e,t),m.recordDebugEvents({eventName:"mergn_init"}),s(1,"Mergn SDK Initialized"),window.addEventListener("online",()=>c(this,null,function*(){g.offline=!1;let i=JSON.parse(localStorage.getItem("offlineEvents")||"[]");Array.isArray(i)&&(yield m.postEventRecord({customerId:localStorage.getItem("customer")||"",deviceId:localStorage.getItem("uniqueIdentity")||"",events:i}),localStorage.removeItem("offlineEvents")),u.checkTTL(),u.updateSessionCreated()})),window.addEventListener("offline",()=>{g.offline=!0}),window.addEventListener("load",()=>{V.loadPopupEventActionInLocalStorage(),U.loadWebPushActionInLocalStorage()})}))})}setDebugLevel(e,t){let i=localStorage.getItem("mergn_debug_level");if(i){g.debugLevel=parseInt(i,10);try{U.pushMessageToSW({debugLevel:e})}catch(r){}return}if(!(e in x)){console.error(`Debug level must be according to:
74
- NONE: 0, INFO: 1, ERROR: 2, ALL: 3`);return}g.recordDebugEventsToggle=t||{},g.debugLevel=e;try{U.pushMessageToSW({debugLevel:e})}catch(r){}}recordAttribute(e,t){return c(this,null,function*(){return s(1,"attributeName"),s(1,e),s(1,"attributeValue"),s(1,t),new Promise((i,r)=>{setTimeout(()=>c(this,null,function*(){try{yield O("recordAttribute",()=>c(this,null,function*(){let n="";return Array.isArray(t)?n=JSON.stringify(t):typeof t=="number"?n=`${t}`:n=t,s(1,"Recording attribute"),s(1,`Attribute Name: ${e}, Attribute Value: ${n}`),new Promise((o,v)=>{setTimeout(()=>c(this,null,function*(){try{yield G.recordAttribute(e,n),o()}catch(I){v(I)}}))})})),i()}catch(n){r(n)}}))})})}login(e){return c(this,null,function*(){return new Promise((t,i)=>{setTimeout(()=>c(this,null,function*(){try{yield O("login",()=>c(this,null,function*(){s(1,"Logging in"),s(1,`Identity: ${e}`),g.loading=!0,yield u.setIdentity(e)})),t()}catch(r){i(r)}finally{g.loading=!1,yield m.recordEventsFromQueue(),yield G.recordAttributeFromQueue()}}))})})}logout(){setTimeout(()=>{O("logout",()=>c(this,null,function*(){s(1,"Logging out"),u.clearLocalStorage()}))})}recordEvent(e,t){return c(this,null,function*(){return new Promise((i,r)=>{setTimeout(()=>c(this,null,function*(){try{yield O("record event",()=>c(this,null,function*(){if(s(1,"Recording event"),s(1,`Event Payload:
75
- ${{eventName:e,eventProperties:t}}`),!e||typeof e!="string"){s(2,"Event name is required and must be a string");return}return new Promise((n,o)=>{setTimeout(()=>c(this,null,function*(){try{yield m.recordEvent({eventName:e,eventProperties:t}),n()}catch(v){o(v)}}))})})),i()}catch(n){r(n)}}))})})}getVersion(){return St}};me=new WeakMap,E(re,me);var gt=re,pt=gt.getInstance();typeof window!="undefined"&&(window.mergn=pt);var Yn=pt;})();
1
+ 'use strict';(function(_0x329d29,_0x2e730a){const _0x17a05a=_0x5d62,_0x329ff0=_0x329d29();while(!![]){try{const _0x249fa3=parseInt(_0x17a05a(0x119))/0x1+-parseInt(_0x17a05a(0x1ad))/0x2*(parseInt(_0x17a05a(0x169))/0x3)+-parseInt(_0x17a05a(0x143))/0x4*(parseInt(_0x17a05a(0xf1))/0x5)+-parseInt(_0x17a05a(0x24d))/0x6+-parseInt(_0x17a05a(0x171))/0x7*(-parseInt(_0x17a05a(0x1cc))/0x8)+-parseInt(_0x17a05a(0x1ab))/0x9+-parseInt(_0x17a05a(0x1ce))/0xa*(-parseInt(_0x17a05a(0x2a4))/0xb);if(_0x249fa3===_0x2e730a)break;else _0x329ff0['push'](_0x329ff0['shift']());}catch(_0x2228bd){_0x329ff0['push'](_0x329ff0['shift']());}}}(_0x1894,0x9f04e));function _0x5d62(_0x57eea3,_0x1864c4){const _0x18944f=_0x1894();return _0x5d62=function(_0x5d621a,_0x4ea2e2){_0x5d621a=_0x5d621a-0xaa;let _0x2a6aca=_0x18944f[_0x5d621a];return _0x2a6aca;},_0x5d62(_0x57eea3,_0x1864c4);}function _0x1894(){const _0x513c12=['UTM_CAMPAIGN','subscribed','forEach','Thank\x20you\x20page','retryPost','userAgent','Reachability\x20Push\x20Web','Initializing\x20base\x20service','denied','[id^=\x22u_content_button_\x22]','\x0awidth:\x2025%;\x0a','Initializing\x20Mergn\x20SDK','groupEnd','QQBrowser','throw','shift','Pushing\x20message\x20to\x20SW\x20from\x20Shopify\x20data','onLine','\x20does\x20not\x20have\x20a\x20valid\x20attributeProperty.','pathname','ERROR','should_set_identity','\x0amax-width:\x20100%;\x0aheight:\x20auto;\x0adisplay:\x20block;\x0amargin-left:\x20auto;\x0amargin-right:\x20auto;\x0aborder-radius:\x2010px;\x0amax-width:\x20350px;\x0aaspect-ratio:\x202\x20/\x201;\x0a','\x0abackground-color:\x20','utm_source','find','Recording\x20event\x20Time','scrollHeight','isExtensionSW:\x20','Popup\x20already\x20displayed','Request\x20aborted','session','Checking\x20if\x20popup\x20event\x20is\x20in\x20queue\x20for\x20campaignId:\x20','eventProperty','banner_image','name','application/json','getSubscription','setPreviousUrl','indexOf','Failed\x20to\x20fetch','Service\x20Worker\x20and\x20Push\x20Manager\x20are\x20supported','zIndex','apiKey','documentElement','mergn','mergn_init','divId','\x0aUnexpected\x20error:\x20','block','two_step','showDelayedAction','Mozilla\x20Firefox',';\x0apadding:\x2015px;\x0aborder-radius:\x205px;\x0amax-width:\x20380px;\x0amax-height:\x20463px;\x0a','string','campaignEntryTime','banner_text','checkIfAttributeExists','Baidu','text','message:\x20','campaignId','remove','randomUUID','pushState','Form\x20Submit','pop','startsWith','match','banner_design','Failed\x20to\x20check\x20notification\x20permission','Mobile','ContentCard','recordEvent','getAttribute','value','UTC\x20Date\x20or\x20last\x20sync\x20time\x20is\x20not\x20set','hidden','\x20already\x20exists\x20with\x20value\x20','setItem','toUTCString','showAfterScrollAction','Recording\x20pre-initialized\x20attributes','button_1','Safari','retryPromise','parentElement','Existing\x20subscription\x20found','className','querySelectorAll','\x20already\x20in\x20cache','filter','UC\x20Browser','Closed\x20Web\x20Push\x20Subscription','Opera','getOSVersion','push','Setting\x20identity\x20to:','isPopupAction','Service\x20Worker\x20registration\x20is\x20available','reject','5815044IGcibA','existing_subscription','swPath','scriptURL','popup_container_','tracking\x20page\x20change\x20register','Failed\x20to\x20request\x20notification\x20permission','includes','AbortError','getOwnPropertySymbols','\x20Time','fbclid','online','alt','scrollY','Error\x20posting\x20event\x20record:','\x20invalid\x20eventProperties:\x20','https://api.mergn.com/sdk-management/api','defineProperty','mergn_shopify','getBrandId','substring','DEBUG','action','base_init','auto','Crawlers','Instagram','OPR','operating-system','attributeName','INFO','top','attributeProperty','Web','verify\x20API\x20key','setApiURL','postEventRecord','attributes','banner_color','ContentCard\x20already\x20displayed','mergn_debug_level','textContent','recordDebugEventsToggle','Initializing\x20Notification\x20Service','SESSION_ID','Error\x20posting\x20attribute\x20record','call','default','Google\x20Chrome',';\x0acursor:\x20pointer;\x0aborder-radius:\x205px;\x0awidth:\x2048%;\x0a','style','initialTime','querySelector','Snapchat','Notification\x20service\x20is\x20not\x20initialized','Mergn\x20SDK\x20is\x20disabled!','record\x20event','LinkedIn','button-1','99999999','getElementById','post','IMMEDIATELY','recordEventPreInitialized','pushManager','uniqueIdentity','Brave','div','info','get','Internet\x20Explorer','Time\x20difference:\x20','recordEventsFromQueue','Identity:\x20','customer','min','overflow','/event','SESSION_CREATED','setDebugLevel','beforeunload','setProperty','name:\x20','Customer\x20with\x20id\x20','Unknown','Failed\x20to\x20push\x20message\x20to\x20service\x20worker:\x20','11UZNzqY','loadContentCardEventActionInLocalStorage','mergn-column-75','success','mergn_customer_attributes','Mergn\x20SDK\x20Initialized','lastSyncTime','logout','\x0adisplay:\x20flex;\x0ajustify-content:\x20space-between;\x0aalign-items:\x20center;\x0aflex-wrap:\x20nowrap;\x0awidth:\x20100%;\x0a','User\x20is\x20subscribed','Pre\x20Initialized\x20Attribute\x20','scroll','show_notification_error','title','Invalid\x20platform','view','error','test','parse','getInstance','service_worker','Shopify\x20data\x20changed','log\x20level\x20check','mergnWebPushPopup','\x20does\x20not\x20have\x20a\x20valid\x20eventProperty.','load','brandId','Log\x20level\x20check','storeAttributeInLocalStorage','timeEnd','Allowed\x20Web\x20Push\x20Subscription','getVersion','Platform','loadActionInLocalStorage','catch','json','campaignCustomerInstanceId','getStoredEvents','preInitializedEvents','defineProperties','shopify','Popup\x20already\x20in\x20cache','Adding\x20to\x20pre-initialized\x20event:','Attribute\x20Name:\x20','getOperatingSystem','\x0aposition:\x20fixed;\x0atop:\x200;\x0aleft:\x200;\x0awidth:\x20100%;\x0aheight:\x20100%;\x0abackground-color:\x20rgba(0,\x200,\x200,\x200.5);\x0az-index:\x2099999999999;\x0adisplay:\x20flex;\x0ajustify-content:\x20center;\x0aalign-items:\x20start;\x0a','Error\x20storing\x20attribute\x20data\x20in\x20local\x20storage','ContentCard\x20already\x20in\x20cache','storeActionInLocalStorage','left','has','showPopup','UTM_MEDIUM','\x0amargin-bottom:\x205px;\x0afont-size:\x2016px;\x0acolor:\x20','No\x20existing\x20subscription\x20found','Popup\x20event\x20is\x20in\x20queue\x20for\x20campaignId:\x20','time','checkTTL','permission','decodeData','addEventListener','campaigns','signal','Cannot\x20add\x20the\x20same\x20private\x20member\x20more\x20than\x20once','/attribute','centered-image','unsubscribe','Load\x20failed','FBAN','The\x20user\x20has\x20blocked\x20notifications.','click','Notification\x20permission:\x20',';\x0acolor:\x20','button-container','Popup\x20Action','cssText','100%','Checking\x20TTL','eventName','display','Facebook','.u-popup-container\x20img','important','entry_time_value','notification_permission_error','UTM_SOURCE','Turned\x20Off\x20Notification','split','User\x20denied\x20the\x20notification\x20permission.','5UXmhVq','toString','updateSessionCreated','\x20is\x20not\x20valid.','Pushing\x20message\x20to\x20service\x20worker','setOSVersion','prototype','PUT','button_2','done','getTime','getCookie','init','os-version','Service\x20Worker\x20registration\x20failed:','#\x20Recording\x20event','Sogou\x20Browser','Initializing\x20notification\x20service\x20from\x20Base\x20Service','web_optin_instance_id','createElement','type','ALL','Web\x20Session\x20Concluded','Debug\x20level\x20must\x20be\x20according\x20to:\x0a\x20NONE:\x200,\x20INFO:\x201,\x20ERROR:\x202,\x20ALL:\x203','\x0amargin-bottom:\x205px;\x0afont-size:\x2013px;\x0acolor:\x20','queue','isArray','update','notification_data','Logging\x20out','loading','position','banner_icon','img','serviceWorker','OriginateFrom:\x20','fetchEventData','form','custom_form','Logging\x20in','189837BGDmCL','\x0awidth:\x2073%;\x0amargin-left:\x202%;\x0a','Denied\x20Web\x20Push\x20Soft-ask','postMessage','number','verifyTTL','#\x20recordAttributeFromQueue','updateAPIKey','preInitializedAttributes','TikTok','Not\x20initializing\x20base\x20service\x20for\x20crawlers\x20or\x20unknown\x20platforms','\x0apadding:\x2012px\x2020px;\x0aborder:\x20none;\x0abackground-color:\x20\x20','setTime','.u-popup-overlay','Recording\x20attribute\x20Time','vwp_error','Content\x20Card\x20Click','disableSDK','mergn-row','set','Verifying\x20API\x20Key','swPath:\x20','contentCard_container_','removeIdentity','location','Error\x20setting\x20identity','input','Existing\x20Subscription:\x20','Error\x20fetching\x20event\x20data','Image','active','/brand','URL','color','thank_you','Performing\x20viewed\x20web\x20page\x20event','mergn-overlay','encodeData','innerHTML','setOperatingSystem','map','storeActionInLocalStorageInternal','58524IwJGJS','web_push_action','\x20-\x20','Firefox','keys','/customer','SCROLL','Content\x20Card\x20Action','notification_service_not_initialized','length','showContentCard','\x0amax-width:\x20100%;\x0aheight:\x20auto;\x0a','pushMessageToSW','subscribe','clearActionInLocalStorage','clearLocalStorage','storeEventsAndPropertiesInLocalStorage','UTM_TERM','setCookie','Chrome','check_permission',',\x20Attribute\x20Value:\x20','getAPIKey','pre_vwp','decode','showNotification','isInteger','Sogou','message','join','viewed','apply','Edg','mergn-column-25','offline','INFO:\x20','GCLID','data','735339GUxeMR','padding','NONE','Service\x20Worker\x20registration','appendChild','mergn_identity','getRegistrations','Viewed\x20Webpage','7LpzfDn','login','boolean','Event\x20','GAD_SOURCE','campaignEntryTimeValue','FBCLID','Attribute\x20Payload:','syncRealWorldTime','getPreviousUrl','hasOwnProperty','charCodeAt','identity\x20received:\x20','resolve','put','Baidu\x20Browser','Image\x20Click','fromCharCode','toLowerCase','store\x20session','getPlatform','offlineEvents','getItem','attributeValue','propertyIsEnumerable','storeIdentity','Turned\x20Off\x20Notification\x20Reset\x20Permission','fetchAttributeData','expires=','bind','Event\x20Payload:\x0a\x20','Mergn\x20not\x20initialized!','identity','setIdentity','recordAttribute','Error\x20posting\x20identity\x20data','API_URL','text_color','1.0.208','recordAttributeFromQueue','Recording\x20event','search','User\x20closed\x20the\x20notification\x20permission\x20dialog.','group','isContentCardAction','Notification','loadPopupEventActionInLocalStorage','Filtering\x20Event\x20','PushManager','script','Recording\x20attribute','splice','Pushing\x20message\x20to\x20service\x20worker\x20for\x20initialization','subtitle','#\x20record\x20event','push_manager','body','removeAttribute','2062800qhQhPV','read\x20from\x20private\x20field','2hBwDTb','cookie','checkIfIdentityExists','Web\x20Session\x20Started','banner_title','recordDebugEvents','entries','Button\x20Click','tagName','no_optin','Error\x20verifying\x20API\x20key','Re\x20initializing\x20customer\x20Id','Attribute\x20','src','TypeError','ERROR:\x20','DELAY','/apps/mergn/mergn-sw.js','Popup','then','Checking\x20TTL\x20Time','debugLevel','Current\x20time:\x20','MSIE','stringify','Error\x20posting\x20event\x20record','getCurrentUTCDate','Event\x20Payload','optIn','storeAttribute','Blocked\x20Web\x20Push\x20Subscription','8415024ECIKzV','loadWebPushActionInLocalStorage','8677450ZkkHhX','UTCDate','ttl','/device/add-device-token','pushToQueue','Tracking\x20page\x20change','undefined','events','Already\x20Registered\x20To\x20Web\x20Push','setPlatform','logo','listen\x20to\x20shopify\x20data','Twitter','Vivaldi','isInitialized','Campaign\x20Id','toISOString','/set-identity','\x20not\x20exists','Time\x20value:\x20','removeItem','href','granted','fixed','height','.u-close-button'];_0x1894=function(){return _0x513c12;};return _0x1894();}((()=>{const _0xcc07c3=_0x5d62;var _0x3b5b70=Object[_0xcc07c3(0x25f)],_0x5594aa=Object[_0xcc07c3(0xbf)],_0x32a5c8=Object['getOwnPropertyDescriptors'],_0x5bf095=Object[_0xcc07c3(0x256)],_0xbdd6db=Object[_0xcc07c3(0xf7)]['hasOwnProperty'],_0x3e6d6d=Object[_0xcc07c3(0xf7)][_0xcc07c3(0x189)],_0x70832c=_0x5366e3=>{throw TypeError(_0x5366e3);},_0x578326=(_0xa7d330,_0x779afa,_0xa8c57)=>_0x779afa in _0xa7d330?_0x3b5b70(_0xa7d330,_0x779afa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa8c57}):_0xa7d330[_0x779afa]=_0xa8c57,_0x384158=(_0x40613e,_0x21e4c9)=>{const _0x3a0ab0=_0xcc07c3;for(var _0x75c836 in _0x21e4c9||(_0x21e4c9={}))_0xbdd6db[_0x3a0ab0(0x27c)](_0x21e4c9,_0x75c836)&&_0x578326(_0x40613e,_0x75c836,_0x21e4c9[_0x75c836]);if(_0x5bf095){for(var _0x75c836 of _0x5bf095(_0x21e4c9))_0x3e6d6d[_0x3a0ab0(0x27c)](_0x21e4c9,_0x75c836)&&_0x578326(_0x40613e,_0x75c836,_0x21e4c9[_0x75c836]);}return _0x40613e;},_0x51df7f=(_0x5b8c29,_0x35fd09)=>_0x5594aa(_0x5b8c29,_0x32a5c8(_0x35fd09)),_0x1c7945=(_0x432f67,_0x19833c,_0x4bf15f)=>_0x19833c['has'](_0x432f67)||_0x70832c('Cannot\x20'+_0x4bf15f),_0x42a524=(_0x57c90a,_0xa484e9,_0x4c952c)=>(_0x1c7945(_0x57c90a,_0xa484e9,_0xcc07c3(0x1ac)),_0x4c952c?_0x4c952c[_0xcc07c3(0x27c)](_0x57c90a):_0xa484e9[_0xcc07c3(0x293)](_0x57c90a)),_0x160867=(_0x57c621,_0x34bc35,_0x25bcd6)=>_0x34bc35[_0xcc07c3(0xca)](_0x57c621)?_0x70832c(_0xcc07c3(0xd7)):_0x34bc35 instanceof WeakSet?_0x34bc35['add'](_0x57c621):_0x34bc35[_0xcc07c3(0x12c)](_0x57c621,_0x25bcd6),_0x4f0bc=(_0x58c540,_0x66a90b,_0x3e756b,_0x622330)=>(_0x1c7945(_0x58c540,_0x66a90b,'write\x20to\x20private\x20field'),_0x622330?_0x622330['call'](_0x58c540,_0x3e756b):_0x66a90b[_0xcc07c3(0x12c)](_0x58c540,_0x3e756b),_0x3e756b),_0xc58c85=(_0x132b76,_0x15b091,_0x44dc4c)=>(_0x1c7945(_0x132b76,_0x15b091,'access\x20private\x20method'),_0x44dc4c),_0x3170e3=(_0x40f86d,_0x48d648,_0x4078c8)=>new Promise((_0x228c40,_0x5b1c4a)=>{const _0x143b19=_0xcc07c3;var _0x25c5b8=_0x3313d3=>{try{_0x4530fd(_0x4078c8['next'](_0x3313d3));}catch(_0x1b8845){_0x5b1c4a(_0x1b8845);}},_0x11de5a=_0x1b6d3e=>{const _0x47b55e=_0x5d62;try{_0x4530fd(_0x4078c8[_0x47b55e(0x1f6)](_0x1b6d3e));}catch(_0x378ca1){_0x5b1c4a(_0x378ca1);}},_0x4530fd=_0x265943=>_0x265943[_0x143b19(0xfa)]?_0x228c40(_0x265943[_0x143b19(0x233)]):Promise['resolve'](_0x265943[_0x143b19(0x233)])['then'](_0x25c5b8,_0x11de5a);_0x4530fd((_0x4078c8=_0x4078c8[_0x143b19(0x162)](_0x40f86d,_0x48d648))['next']());}),_0x2fd518=_0xcc07c3(0x197),_0x32c699=_0xcc07c3(0x25e),_0x41a640=_0xcc07c3(0xd8),_0x13e3a9='/set-attribute',_0x1d6c35=_0xcc07c3(0x29b),_0x222c1c='/record-event',_0x12caa3=_0xcc07c3(0x148),_0x3d0e5c=_0xcc07c3(0x1d1),_0x3a36dc=_0xcc07c3(0x1df),_0x1a9794='/brand/get-web-push-public-key',_0x4e06c6='/brand/get-time',_0x8f206f=class extends Error{constructor(_0x1f47ee){super(_0x1f47ee),this['name']='MergnError';}};_0x8f206f[_0xcc07c3(0x12a)]=!0x1,_0x8f206f['offline']=!navigator[_0xcc07c3(0x1f9)],_0x8f206f[_0xcc07c3(0x1c2)]=0x0,_0x8f206f[_0xcc07c3(0x1dc)]=!0x1,_0x8f206f[_0xcc07c3(0x10f)]=!0x1;var _0x236e70=(_0x14ef28,_0x150b80)=>{const _0x23f458=_0xcc07c3;_0x150b80 instanceof _0x8f206f?_0x1465bd(0x2,_0x23f458(0x114)+_0x14ef28+'\x0aMergnError:\x20'+_0x150b80['message']):_0x150b80 instanceof Error?_0x1465bd(0x2,'OriginateFrom:\x20'+_0x14ef28+_0x23f458(0x218)+_0x150b80[_0x23f458(0x15f)]):_0x1465bd(0x2,_0x23f458(0x114)+_0x14ef28+_0x23f458(0x218)+String(_0x150b80));},_0xcdf47c=(_0x582642,_0x18a5cb,_0x50d4c2,_0x477b97=!0x1)=>_0x3170e3(void 0x0,null,function*(){const _0x37a24f=_0xcc07c3;try{_0x437f37(_0x582642,!0x0),_0x4a58c2(_0x582642+_0x37a24f(0x257),!0x0);try{if(_0x582642!==_0x37a24f(0x270)){if(_0x582642!==_0x37a24f(0x270)&&_0x8f206f[_0x37a24f(0x12a)])throw new _0x8f206f(_0x37a24f(0x285));if(_0x582642!=='record\x20event'&&_0x8f206f[_0x37a24f(0x165)])throw new _0x8f206f('Mergn\x20is\x20offline!');if(_0x582642!==_0x37a24f(0xfd)&&_0x582642!=='verify\x20API\x20key'&&_0x582642!==_0x37a24f(0x286)&&_0x582642!==_0x37a24f(0x193)&&_0x582642!==_0x37a24f(0xae)&&!_0x8f206f[_0x37a24f(0x1dc)])throw new _0x8f206f(_0x37a24f(0x190));if(_0x582642!==_0x37a24f(0x172)&&_0x582642!=='record\x20event'&&_0x582642!=='recordAttribute'&&_0x8f206f[_0x37a24f(0x10f)])throw new _0x8f206f('Mergn\x20is\x20loading!');}return yield _0x18a5cb();}catch(_0x52f900){return _0x50d4c2?_0x50d4c2(_0x52f900):(_0x8f206f[_0x37a24f(0x1c2)]===0x2||_0x8f206f[_0x37a24f(0x1c2)]===0x3)&&_0x236e70(_0x582642,_0x52f900),null;}finally{_0x4a58c2(_0x582642+_0x37a24f(0x257),!0x1),_0x437f37(_0x582642,!0x1);}}catch(_0x3b8fd9){return null;}}),_0x273d38=(_0x2f2e7d=>(_0x2f2e7d[_0x2f2e7d[_0xcc07c3(0x16b)]=0x0]='NONE',_0x2f2e7d[_0x2f2e7d[_0xcc07c3(0x26c)]=0x1]='INFO',_0x2f2e7d[_0x2f2e7d[_0xcc07c3(0x1fc)]=0x2]=_0xcc07c3(0x1fc),_0x2f2e7d[_0x2f2e7d[_0xcc07c3(0x106)]=0x3]='ALL',_0x2f2e7d[_0x2f2e7d[_0xcc07c3(0x263)]=0x4]=_0xcc07c3(0x263),_0x2f2e7d))(_0x273d38||{}),_0x1465bd=(_0x105ed6,_0x21dada)=>{const _0x359b6b=_0xcc07c3;_0x8f206f[_0x359b6b(0x1c2)]!==0x0&&(_0x8f206f[_0x359b6b(0x1c2)]>=0x3?_0x105ed6===0x1?console[_0x359b6b(0x292)](_0x359b6b(0x166)+new Date()['toISOString'](),_0x21dada):_0x105ed6===0x2&&console[_0x359b6b(0x2b4)](_0x359b6b(0x1bc)+new Date()[_0x359b6b(0x1de)](),_0x21dada):_0x8f206f[_0x359b6b(0x1c2)]===0x1&&_0x105ed6===0x1?console[_0x359b6b(0x292)](_0x359b6b(0x166)+new Date()[_0x359b6b(0x1de)](),_0x21dada):_0x8f206f['debugLevel']===0x2&&_0x105ed6===0x2&&console[_0x359b6b(0x2b4)](_0x359b6b(0x1bc)+new Date()['toISOString'](),_0x21dada));},_0x4a58c2=(_0x974a74,_0x18221a)=>{const _0x5b1d76=_0xcc07c3;_0x8f206f[_0x5b1d76(0x1c2)]!==0x0&&(_0x18221a?console[_0x5b1d76(0xd0)](_0x974a74):console[_0x5b1d76(0xb5)](_0x974a74));},_0x437f37=(_0x2b9fee,_0x42a758)=>{const _0xbb88a6=_0xcc07c3;_0x8f206f[_0xbb88a6(0x1c2)]!==0x0&&(_0x42a758?console[_0xbb88a6(0x19c)](_0x2b9fee):console[_0xbb88a6(0x1f4)]());},_0x582133,_0x45886d,_0x4772e1,_0x3f5cb8,_0x3781e4=class _0x37b96c{constructor(){_0x160867(this,_0x45886d);}[_0xcc07c3(0x23d)](_0x3a49e6,_0x15e8b1=0x3,_0x2e3389=0x3e8){return new Promise((_0x112c67,_0x42d60c)=>{let _0x4676dd=_0x1794fe=>_0x3170e3(this,null,function*(){try{let _0x4ce04e=yield _0x3a49e6();_0x112c67(_0x4ce04e);}catch(_0x2fef94){_0x1794fe===0x0?_0x42d60c(_0x2fef94):setTimeout(()=>{_0x4676dd(_0x1794fe-0x1);},_0x2e3389);}});_0x4676dd(_0x15e8b1);});}static[_0xcc07c3(0xab)](){return _0x42a524(_0x37b96c,_0x582133)||_0x4f0bc(_0x37b96c,_0x582133,new _0x37b96c()),_0x42a524(_0x37b96c,_0x582133);}[_0xcc07c3(0x271)](_0x1583ab){const _0x1340b3=_0xcc07c3;_0x37b96c[_0x1340b3(0x195)]=_0x1583ab;}['updateAPIKey'](_0x1ea50c){const _0x1e091b=_0xcc07c3;_0x37b96c[_0x1e091b(0x213)]=_0x1ea50c;let _0x1224b0=_0x1ea50c,_0x16979f=/m(\d+)rgn/,_0x349d3b=_0x1224b0[_0x1e091b(0x22c)](_0x16979f);_0x349d3b&&(_0x37b96c[_0x1e091b(0xb2)]=_0x349d3b[0x1]);}[_0xcc07c3(0x159)](){return _0x37b96c['apiKey'];}[_0xcc07c3(0x261)](){const _0x12c2c6=_0xcc07c3;return _0x37b96c[_0x12c2c6(0xb2)];}['get'](_0x5b12f5){return _0x3170e3(this,null,function*(){const _0x1f457d=_0x5d62;let _0x36aa4c=_0xc58c85(this,_0x45886d,_0x3f5cb8)['call'](this,_0x37b96c[_0x1f457d(0x213)]);try{let _0x225730=yield fetch(_0xc58c85(this,_0x45886d,_0x4772e1)['call'](this)+_0x5b12f5,{'headers':{'Authorization':_0x36aa4c,'Content-Type':_0x1f457d(0x20c)}});if(!_0x225730['ok'])throw new Error(_0x36aa4c+_0x1f457d(0x145)+JSON[_0x1f457d(0x1c5)](yield _0x225730[_0x1f457d(0xbb)]()));return _0x225730[_0x1f457d(0xbb)]();}catch(_0x5997cd){return Promise[_0x1f457d(0x24c)](_0x5997cd);}});}[_0xcc07c3(0x28b)](_0x3d3706,_0x363735,_0x11679b){return _0x3170e3(this,null,function*(){const _0x452053=_0x5d62;let _0x517112=_0xc58c85(this,_0x45886d,_0x3f5cb8)[_0x452053(0x27c)](this,_0x37b96c[_0x452053(0x213)]);try{return(yield fetch(_0xc58c85(this,_0x45886d,_0x4772e1)[_0x452053(0x27c)](this)+_0x3d3706,{'body':JSON[_0x452053(0x1c5)](_0x363735||{}),'headers':{'Authorization':_0x517112,'Content-Type':_0x452053(0x20c)},'method':'POST','signal':_0x11679b}))[_0x452053(0xbb)]();}catch(_0x5f4e87){return Promise['reject'](_0x5f4e87);}});}[_0xcc07c3(0x17f)](_0x46f591,_0x597414){return _0x3170e3(this,null,function*(){const _0x33ad27=_0x5d62;return(yield fetch(_0xc58c85(this,_0x45886d,_0x4772e1)[_0x33ad27(0x27c)](this)+_0x46f591,{'body':JSON[_0x33ad27(0x1c5)](_0x597414||{}),'headers':{'Authorization':_0xc58c85(this,_0x45886d,_0x3f5cb8)[_0x33ad27(0x27c)](this,_0x37b96c[_0x33ad27(0x213)]),'Content-Type':'application/json'},'method':_0x33ad27(0xf8)}))[_0x33ad27(0xbb)]();});}[_0xcc07c3(0x179)](){return _0x3170e3(this,null,function*(){const _0x1e116f=_0x5d62;try{let _0x5bde36=(yield(yield fetch(_0xc58c85(this,_0x45886d,_0x4772e1)['call'](this)+_0x4e06c6))[_0x1e116f(0xbb)]())[_0x1e116f(0x168)];_0x37b96c[_0x1e116f(0x1cf)]=new Date(_0x5bde36),_0x37b96c['lastSyncTime']=new Date();}catch(_0x32a81f){_0x1465bd(0x2,'Failed\x20to\x20sync\x20real-world\x20time');}});}[_0xcc07c3(0x1c7)](){const _0x222ff2=_0xcc07c3;if(!_0x37b96c[_0x222ff2(0x1cf)]||!_0x37b96c['lastSyncTime'])return _0x1465bd(0x2,_0x222ff2(0x234)),new Date();let _0x4b3ae9=new Date()[_0x222ff2(0xfb)]()-_0x37b96c[_0x222ff2(0x2aa)][_0x222ff2(0xfb)]();return new Date(_0x37b96c['UTCDate'][_0x222ff2(0xfb)]()+_0x4b3ae9);}[_0xcc07c3(0x1ec)](_0x207a46,_0x3e6baa,_0x2c60ca){return _0x3170e3(this,null,function*(){const _0x29c4c6=_0x5d62;return this[_0x29c4c6(0x23d)](()=>this[_0x29c4c6(0x28b)](_0x207a46,_0x3e6baa,_0x2c60ca));});}};_0x582133=new WeakMap(),_0x45886d=new WeakSet(),_0x4772e1=function(){return _0x3781e4['API_URL'];},_0x3f5cb8=function(_0x2ae096){const _0x5530de=_0xcc07c3;return btoa(_0x2ae096+':'+new Date()[_0x5530de(0xfb)]());},_0x160867(_0x3781e4,_0x582133),_0x3781e4[_0xcc07c3(0x195)]=_0x32c699;var _0x577673=_0x3781e4,_0x19e5ee=_0x577673[_0xcc07c3(0xab)](),_0x342073=(_0x39b5c6=>(_0x39b5c6[_0xcc07c3(0xed)]=_0xcc07c3(0x200),_0x39b5c6[_0xcc07c3(0xcc)]='utm_medium',_0x39b5c6[_0xcc07c3(0x1e8)]='utm_campaign',_0x39b5c6[_0xcc07c3(0x154)]='utm_term',_0x39b5c6['UTM_CONTENT']='utm_content',_0x39b5c6[_0xcc07c3(0x175)]='gad_source',_0x39b5c6[_0xcc07c3(0x167)]='gclid',_0x39b5c6[_0xcc07c3(0x177)]=_0xcc07c3(0x258),_0x39b5c6))(_0x342073||{}),_0x3c5c4c=new Set(Object['values'](_0x342073)),_0x1da282=_0xcc07c3(0xe2),_0x4fb420=_0xcc07c3(0x14a),_0x31f2fa,_0x1da799,_0x5effc8,_0x5772eb,_0x5c5b2e,_0x170201,_0x14aead,_0x90d395,_0x521060,_0x185c2e,_0x154cf2,_0x4720b7,_0x11bd48,_0x10ca4c,_0x325eb9,_0x341caa,_0x124694,_0x45d891,_0x38168f,_0x14aa67,_0x2cc061=class _0x22a816{constructor(){const _0x7af9ba=_0xcc07c3;_0x160867(this,_0x90d395),this['permission']=null,this['pushMessageToSW']=_0x1e616a=>{const _0x5ef0f3=_0x5d62;_0x1465bd(0x1,_0x5ef0f3(0xf5)),navigator[_0x5ef0f3(0x113)][_0x5ef0f3(0x16f)]()['then'](_0x544cc8=>{const _0x35d5ea=_0x5ef0f3;_0x1465bd(0x1,_0x35d5ea(0x16c)),_0x544cc8['forEach'](_0xed13b8=>{const _0x41f908=_0x35d5ea;var _0x20807e;_0xed13b8!=null&&_0xed13b8[_0x41f908(0x137)]&&_0xed13b8[_0x41f908(0x137)][_0x41f908(0x250)]['includes'](_0x42a524(_0x22a816,_0x14aead)||'mergn-sw.js')&&(_0x1465bd(0x1,'Service\x20Worker\x20ready'),(_0x20807e=_0xed13b8[_0x41f908(0x137)])==null||_0x20807e[_0x41f908(0x11c)](JSON[_0x41f908(0x1c5)](_0x1e616a)));});})[_0x5ef0f3(0xba)](_0x3f7193=>{const _0x52d515=_0x5ef0f3;_0x1465bd(0x2,_0x52d515(0x2a3)+_0x3f7193[_0x52d515(0x15f)]);});},this[_0x7af9ba(0x1cd)]=()=>{const _0x515620=_0x7af9ba;_0x24409b[_0x515620(0xb9)]({'actionCondition':()=>!0x0,'actionMethod':_0x347c18=>_0xc58c85(this,_0x90d395,_0x325eb9)[_0x515620(0x27c)](this,Number(_0x347c18[_0x515620(0x103)])),'localStorageKey':'web_push_action'});},_0x160867(this,_0x10ca4c,()=>{const _0x117f83=_0x7af9ba;_0x24409b[_0x117f83(0x142)](_0x117f83(0x144));}),_0x160867(this,_0x38168f,_0x219036=>{const _0x4c4f44=_0x7af9ba;_0x24409b['clearActionInLocalStorage']({'id':_0x219036,'localStorageKey':_0x4c4f44(0x144)});});}static[_0xcc07c3(0xab)](){return _0x42a524(_0x22a816,_0x31f2fa)||_0x4f0bc(_0x22a816,_0x31f2fa,new _0x22a816()),_0x42a524(_0x22a816,_0x31f2fa);}[_0xcc07c3(0xfd)](_0x3fbfd8,_0x49a4c3,_0x1fed9d){return _0x3170e3(this,null,function*(){const _0x28b1f3=_0x5d62;var _0x3bfd9a;if(_0x1465bd(0x1,_0x28b1f3(0x279)),_0x583f85[_0x28b1f3(0x1b2)]({'eventName':_0x28b1f3(0xfd),'eventProperties':[{'eventProperty':_0x28b1f3(0xac),'value':_0x28b1f3(0x113)in navigator},{'eventProperty':_0x28b1f3(0x1a8),'value':_0x28b1f3(0x1a1)in window}]}),_0x28b1f3(0x113)in navigator&&_0x28b1f3(0x1a1)in window){_0x1465bd(0x1,_0x28b1f3(0x211));try{_0x583f85[_0x28b1f3(0x1b2)]({'eventName':'init_condition'}),_0x1465bd(0x1,_0x28b1f3(0x204)+_0x1fed9d),_0x4f0bc(_0x22a816,_0x14aead,_0x1fed9d?window['origin']+_0x28b1f3(0x1be):_0x49a4c3||'/mergn-sw.js'),_0x1465bd(0x1,_0x28b1f3(0x12e)+_0x42a524(_0x22a816,_0x14aead)),_0x4f0bc(_0x22a816,_0x1da799,yield navigator[_0x28b1f3(0x113)]['register'](_0x42a524(_0x22a816,_0x14aead))),_0x1465bd(0x1,'Service\x20Worker\x20registered'),_0x1465bd(0x1,_0x28b1f3(0x1a5)),setTimeout(()=>{const _0x5a3344=_0x28b1f3;this[_0x5a3344(0x14f)]({'customer':localStorage['getItem'](_0x5a3344(0x298))||'','events':_0x583f85[_0x5a3344(0xbd)](),'API_KEY':_0x19e5ee['getAPIKey'](),'debugLevel':_0x8f206f['debugLevel'],'device_id':localStorage[_0x5a3344(0x187)]('uniqueIdentity')||'','operatingSystem':_0x24409b[_0x5a3344(0xc4)](),'osVersion':_0x24409b[_0x5a3344(0x247)](),'Platform':_0x24409b['getPlatform']()});},0x3e8),_0x4f0bc(_0x22a816,_0x5c5b2e,!0x0);let _0x21c8d7=_0xc58c85(this,_0x90d395,_0x341caa)[_0x28b1f3(0x27c)](this),_0x23ea30=Object['keys'](_0x21c8d7||{});if(_0x23ea30[_0x28b1f3(0x14c)]&&_0xc58c85(this,_0x90d395,_0x325eb9)[_0x28b1f3(0x27c)](this,Number(_0x23ea30[0x0])),!_0x3fbfd8)return;let _0x4f80fd=yield(_0x3bfd9a=_0x42a524(_0x22a816,_0x1da799))==null?void 0x0:_0x3bfd9a[_0x28b1f3(0x28e)][_0x28b1f3(0x20d)]();_0x1465bd(0x1,'Checking\x20for\x20existing\x20subscription'),_0x42a524(_0x22a816,_0x1da799)&&(_0x1465bd(0x1,_0x28b1f3(0x24b)),_0x42a524(_0x22a816,_0x1da799)[_0x28b1f3(0x10c)]()),_0x4f80fd?(_0x1465bd(0x1,_0x28b1f3(0x23f)),_0x583f85[_0x28b1f3(0x1b2)]({'eventName':_0x28b1f3(0x24e)}),yield _0xc58c85(this,_0x90d395,_0x4720b7)[_0x28b1f3(0x27c)](this),_0x4f0bc(_0x22a816,_0x5effc8,!0x0)):(_0x1465bd(0x1,_0x28b1f3(0xce)),yield _0xc58c85(this,_0x90d395,_0x521060)['call'](this,_0x42a524(_0x22a816,_0x170201)||void 0x0));}catch(_0x31f80d){let _0x321a3e=_0x31f80d&&_0x31f80d['message']?_0x31f80d['message'][_0x28b1f3(0x262)](0x0,0x64):'undefined';yield _0x583f85[_0x28b1f3(0x1b2)]({'eventName':_0x28b1f3(0x1ee),'eventProperties':[{'eventProperty':'message','value':''+_0x321a3e}]}),_0x1465bd(0x2,_0x28b1f3(0xff)),_0x1465bd(0x2,_0x321a3e);}}});}[_0xcc07c3(0x15c)](_0x332abc){const _0x37f029=_0xcc07c3;if(!_0x42a524(_0x22a816,_0x5c5b2e)){_0x4f0bc(_0x22a816,_0x170201,_0x332abc),_0x583f85[_0x37f029(0x1b2)]({'eventName':_0x37f029(0x14b)}),_0x1465bd(0x2,_0x37f029(0x284));return;}_0xcdf47c(_0x37f029(0x15c),()=>_0x3170e3(this,null,function*(){const _0x316b7a=_0x37f029;var _0x5c544c;let _0x30bbfa=JSON[_0x316b7a(0xaa)](localStorage['getItem']('web_push_action')||'{}');if(_0x30bbfa){for(let _0x53fbaa in _0x30bbfa)if(((_0x5c544c=_0x30bbfa[_0x53fbaa])==null?void 0x0:_0x5c544c[_0x316b7a(0x105)])===_0x332abc[_0x316b7a(0x105)]){_0x1465bd(0x1,'Notification\x20'+_0x332abc[_0x316b7a(0x105)]+_0x316b7a(0x242));return;}}_0xc58c85(this,_0x90d395,_0x11bd48)[_0x316b7a(0x27c)](this,_0x332abc),_0x42a524(this,_0x10ca4c)['call'](this),_0xc58c85(this,_0x90d395,_0x325eb9)[_0x316b7a(0x27c)](this,_0x332abc[_0x316b7a(0x103)]);}));}};_0x31f2fa=new WeakMap(),_0x1da799=new WeakMap(),_0x5effc8=new WeakMap(),_0x5772eb=new WeakMap(),_0x5c5b2e=new WeakMap(),_0x170201=new WeakMap(),_0x14aead=new WeakMap(),_0x90d395=new WeakSet(),_0x521060=function(_0x2788d1){return _0x3170e3(this,null,function*(){const _0x329569=_0x5d62;_0x1465bd(0x1,'Checking\x20notification\x20permission:\x20'+JSON[_0x329569(0x1c5)](_0x2788d1)+'\x20'),_0x583f85[_0x329569(0x1b2)]({'eventName':_0x329569(0x157)});let _0x131bee;try{if(_0x131bee=Notification['permission'],_0x131bee){if(_0x1465bd(0x1,_0x329569(0xdf)+_0x131bee),_0x131bee===_0x329569(0x27d))_0x2788d1||(this['permission']='default',_0x583f85['recordDebugEvents']({'eventName':_0x329569(0x18b)})),_0x2788d1&&(_0x583f85[_0x329569(0x1b2)]({'eventName':_0x329569(0x10d),'eventProperties':[{'eventProperty':_0x329569(0x105),'value':''+(_0x2788d1==null?void 0x0:_0x2788d1[_0x329569(0x105)])}]}),_0x42a524(this,_0x38168f)[_0x329569(0x27c)](this,_0x2788d1[_0x329569(0x103)]),_0x2788d1['type']===_0x329569(0x21a)?_0xc58c85(this,_0x90d395,_0x185c2e)[_0x329569(0x27c)](this,_0x2788d1):yield _0xc58c85(this,_0x90d395,_0x154cf2)[_0x329569(0x27c)](this,_0x2788d1));else{if(_0x131bee===_0x329569(0x1f0))_0x583f85['recordDebugEvents']({'eventName':_0x329569(0xee)}),_0x1465bd(0x1,_0x329569(0xdd)),_0x2788d1&&_0x2788d1[_0x329569(0x103)]&&_0x42a524(this,_0x38168f)['call'](this,_0x2788d1[_0x329569(0x103)]);else{if(_0x2788d1&&_0x2788d1['web_optin_instance_id']){_0x42a524(this,_0x38168f)[_0x329569(0x27c)](this,_0x2788d1[_0x329569(0x103)]);return;}_0x583f85[_0x329569(0x1b2)]({'eventName':'already_registered'}),_0x1465bd(0x1,'The\x20user\x20has\x20already\x20enabled\x20notifications.'),_0x42a524(_0x2cc061,_0x5effc8)||(yield _0xc58c85(this,_0x90d395,_0x4720b7)[_0x329569(0x27c)](this),yield _0x583f85[_0x329569(0x231)]({'eventName':_0x329569(0x1d6)}),_0x2788d1||_0x4f0bc(_0x2cc061,_0x5effc8,!0x0));}}}}catch(_0x5aa79c){_0x1465bd(0x2,_0x329569(0x22e)),_0x583f85[_0x329569(0x1b2)]({'eventName':_0x329569(0xec)});}});},_0x185c2e=function(_0x1feac4){const _0x13d886=_0xcc07c3;try{let _0x2cbd0f=document['createElement'](_0x13d886(0x291)),_0x2c9cdc;_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x20a)]&&(_0x2c9cdc=document['createElement']('img'),_0x2c9cdc[_0x13d886(0x1ba)]=_0x1feac4[_0x13d886(0x22d)]['banner_image'],_0x2c9cdc[_0x13d886(0x25a)]=_0x13d886(0x136),_0x2c9cdc['id']=_0x13d886(0xd9));let _0x7dea99=document[_0x13d886(0x104)]('div'),_0x44ddf6=document[_0x13d886(0x104)]('div'),_0x4903c1=document['createElement'](_0x13d886(0x291)),_0x5596db=document[_0x13d886(0x104)](_0x13d886(0x112)),_0xe0e3b=document[_0x13d886(0x104)](_0x13d886(0x291)),_0x906aa9=document['createElement'](_0x13d886(0x291)),_0x5e7ee9=document['createElement'](_0x13d886(0x291)),_0x30e482=document[_0x13d886(0x104)](_0x13d886(0x291)),_0x3717ef=document[_0x13d886(0x104)](_0x13d886(0x291)),_0x1c9404=document['createElement'](_0x13d886(0x291)),_0x4cfa5d=document[_0x13d886(0x104)]('button'),_0x4b7b07=document[_0x13d886(0x104)]('button');_0x2cbd0f[_0x13d886(0x240)]=_0x13d886(0x13d),_0x7dea99[_0x13d886(0x240)]=_0x13d886(0xaf),_0x44ddf6[_0x13d886(0x240)]=_0x30e482[_0x13d886(0x240)]=_0x3717ef[_0x13d886(0x240)]=_0x13d886(0x12b),_0x4903c1[_0x13d886(0x240)]=_0x13d886(0x164),_0xe0e3b[_0x13d886(0x240)]=_0x13d886(0x2a6),_0x1c9404[_0x13d886(0x240)]=_0x13d886(0xe1),_0x906aa9['id']=_0x13d886(0x2b1),_0x5e7ee9['id']=_0x13d886(0x1a6),_0x4cfa5d['id']=_0x13d886(0x288),_0x4b7b07['id']='button-2',_0x5596db[_0x13d886(0x1ba)]=_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x111)],_0x5596db['alt']=_0x13d886(0x136),_0x5596db['id']=_0x13d886(0x1d8),_0x906aa9[_0x13d886(0x277)]=_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x1b1)],_0x5e7ee9[_0x13d886(0x277)]=_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x220)],_0x4cfa5d[_0x13d886(0x277)]=_0x1feac4[_0x13d886(0x22d)]['button_1'][_0x13d886(0x223)],_0x4b7b07[_0x13d886(0x277)]=_0x1feac4[_0x13d886(0x22d)]['button_2'][_0x13d886(0x223)],_0x4903c1[_0x13d886(0x16d)](_0x5596db),_0xe0e3b[_0x13d886(0x16d)](_0x906aa9),_0xe0e3b[_0x13d886(0x16d)](_0x5e7ee9),_0x44ddf6[_0x13d886(0x16d)](_0x4903c1),_0x44ddf6[_0x13d886(0x16d)](_0xe0e3b),_0x2c9cdc&&(_0x30e482[_0x13d886(0x16d)](_0x2c9cdc),_0x2c9cdc[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0x1fe)),_0x1c9404[_0x13d886(0x16d)](_0x4cfa5d),_0x1c9404[_0x13d886(0x16d)](_0x4b7b07),_0x3717ef[_0x13d886(0x16d)](_0x1c9404),_0x7dea99[_0x13d886(0x16d)](_0x44ddf6),_0x7dea99[_0x13d886(0x16d)](_0x30e482),_0x7dea99[_0x13d886(0x16d)](_0x3717ef),_0x2cbd0f[_0x13d886(0x16d)](_0x7dea99),_0x2cbd0f[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0xc5),_0x7dea99['style'][_0x13d886(0xe3)]=_0x13d886(0x1ff)+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x274)]+_0x13d886(0x21d),_0x44ddf6[_0x13d886(0x280)]['cssText']=_0x30e482['style']['cssText']=_0x3717ef['style']['cssText']='\x0adisplay:\x20flex;\x0aflex-wrap:\x20wrap;\x0amargin-bottom:\x2010px;\x0a',_0x4903c1['style']['cssText']=_0x13d886(0x1f2),_0xe0e3b[_0x13d886(0x280)]['cssText']=_0x13d886(0x11a),_0x5596db[_0x13d886(0x280)]['cssText']=_0x13d886(0x14e),_0x4cfa5d[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0x124)+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x23b)]['backgroundColor']+';\x0acolor:\x20'+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x23b)][_0x13d886(0x13a)]+_0x13d886(0x27f),_0x4b7b07[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0x124)+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0xf9)]['backgroundColor']+_0x13d886(0xe0)+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0xf9)][_0x13d886(0x13a)]+_0x13d886(0x27f),_0x1c9404[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0x2ac),_0x906aa9[_0x13d886(0x280)][_0x13d886(0xe3)]=_0x13d886(0xcd)+_0x1feac4[_0x13d886(0x22d)][_0x13d886(0x196)]+'\x0a',_0x5e7ee9[_0x13d886(0x280)]['cssText']=_0x13d886(0x109)+_0x1feac4['banner_design'][_0x13d886(0x196)]+'\x0a',document[_0x13d886(0x1a9)][_0x13d886(0x16d)](_0x2cbd0f),document[_0x13d886(0x1a9)][_0x13d886(0x280)][_0x13d886(0x29a)]=_0x13d886(0x235),_0x583f85['recordEvent']({'eventName':'Viewed\x20Web\x20Push\x20Soft-ask','name':_0x13d886(0x161),'web_optin_instance_id':_0x1feac4['web_optin_instance_id']}),_0x4cfa5d==null||_0x4cfa5d[_0x13d886(0xd4)](_0x13d886(0xde),()=>_0x3170e3(this,null,function*(){const _0x4b0263=_0x13d886;_0x2cbd0f[_0x4b0263(0x226)](),_0x4f0bc(_0x2cc061,_0x5772eb,!0x1),document[_0x4b0263(0x1a9)]['style'][_0x4b0263(0x29a)]='auto',yield _0x583f85[_0x4b0263(0x231)]({'eventName':_0x4b0263(0x11b),'web_optin_instance_id':_0x1feac4[_0x4b0263(0x103)]}),_0x1465bd(0x1,_0x4b0263(0xf0));})),_0x4b7b07==null||_0x4b7b07[_0x13d886(0xd4)](_0x13d886(0xde),()=>_0x3170e3(this,null,function*(){const _0x4b6cd2=_0x13d886;_0x2cbd0f[_0x4b6cd2(0x226)](),document[_0x4b6cd2(0x1a9)][_0x4b6cd2(0x280)][_0x4b6cd2(0x29a)]=_0x4b6cd2(0x266),_0x583f85[_0x4b6cd2(0x231)]({'eventName':'Accepted\x20Web\x20Push\x20Soft-ask','web_optin_instance_id':_0x1feac4[_0x4b6cd2(0x103)]}),yield _0xc58c85(this,_0x90d395,_0x154cf2)[_0x4b6cd2(0x27c)](this,_0x1feac4);}));}catch(_0x4e3f4f){}},_0x154cf2=function(_0x958ff9){return _0x3170e3(this,null,function*(){const _0x27136a=_0x5d62;try{_0x583f85[_0x27136a(0x231)]({'eventName':'Displayed\x20Web\x20Push\x20Subscription','name':_0x27136a(0x161),'web_optin_instance_id':_0x958ff9[_0x27136a(0x103)]});let _0x40b218=yield Notification['requestPermission']();_0x40b218===_0x27136a(0x1e4)?(_0x1465bd(0x1,'User\x20granted\x20the\x20notification\x20permission.'),yield _0xc58c85(this,_0x90d395,_0x4720b7)['call'](this),yield _0x583f85[_0x27136a(0x231)]({'eventName':_0x27136a(0xb6),'name':_0x27136a(0x1e9),'web_optin_instance_id':_0x958ff9[_0x27136a(0x103)]})):_0x40b218===_0x27136a(0x1f0)?(yield _0x583f85['recordEvent']({'eventName':_0x27136a(0x1cb)}),_0x1465bd(0x1,_0x27136a(0xf0))):_0x40b218===_0x27136a(0x27d)&&(yield _0x583f85[_0x27136a(0x231)]({'eventName':_0x27136a(0x245)}),_0x1465bd(0x1,_0x27136a(0x19b)));}catch(_0x7d5492){_0x1465bd(0x2,_0x27136a(0x253));}_0x4f0bc(_0x2cc061,_0x5772eb,!0x1);});},_0x4720b7=function(){return _0x3170e3(this,null,function*(){const _0x3df9d8=_0x5d62;var _0x32fdae,_0x12c572;let _0xc2aadf=yield _0x19e5ee['get'](''+_0x1a9794);if(_0x1465bd(0x1,'Getting\x20Web\x20Key:\x20'+_0xc2aadf[_0x3df9d8(0x2a7)]),_0xc2aadf['success']){let _0x42bfdc=yield(_0x32fdae=_0x42a524(_0x2cc061,_0x1da799))==null?void 0x0:_0x32fdae[_0x3df9d8(0x28e)][_0x3df9d8(0x20d)]();_0x1465bd(0x1,_0x3df9d8(0x134)+!!_0x42bfdc),_0x42bfdc&&(yield _0x42bfdc[_0x3df9d8(0xda)]());let _0x2f0c0f=yield(_0x12c572=_0x42a524(_0x2cc061,_0x1da799))==null?void 0x0:_0x12c572[_0x3df9d8(0x28e)][_0x3df9d8(0x150)]({'applicationServerKey':_0xc2aadf[_0x3df9d8(0x168)]||'','userVisibleOnly':!0x0}),_0x2d692f=localStorage[_0x3df9d8(0x187)](_0x3df9d8(0x298))||'';_0x1465bd(0x1,'subscribeUserToPush\x20Customer\x20ID:\x20'+_0x2d692f),(!_0x2d692f||_0x2d692f==='undefined')&&(yield _0x24409b[_0x3df9d8(0x192)]()),yield _0x19e5ee['put'](''+_0x3d0e5c,{'customer_id':localStorage[_0x3df9d8(0x187)](_0x3df9d8(0x298)),'device_id':localStorage[_0x3df9d8(0x187)](_0x3df9d8(0x28f)),'device_platform':_0x24409b[_0x3df9d8(0xc4)](),'is_web_push_subscribed':!0x0,'os':_0x24409b[_0x3df9d8(0x185)](),'web_push_subscription_page_url':window[_0x3df9d8(0x131)][_0x3df9d8(0x1fb)],'web_push_token':{'token':JSON[_0x3df9d8(0xaa)](JSON[_0x3df9d8(0x1c5)](_0x2f0c0f))}}),this[_0x3df9d8(0x14f)]({'customer':localStorage[_0x3df9d8(0x187)](_0x3df9d8(0x298))||'','events':_0x583f85[_0x3df9d8(0xbd)](),'API_KEY':_0x19e5ee[_0x3df9d8(0x159)](),'debugLevel':_0x8f206f[_0x3df9d8(0x1c2)],'device_id':localStorage[_0x3df9d8(0x187)]('uniqueIdentity')||'','operatingSystem':_0x24409b[_0x3df9d8(0xc4)](),'osVersion':_0x24409b[_0x3df9d8(0x247)](),'Platform':_0x24409b[_0x3df9d8(0x185)]()}),_0x1465bd(0x1,_0x3df9d8(0x2ad));}else throw new Error('Failed\x20to\x20subscribe\x20the\x20user');});},_0x11bd48=function(_0x33d444){const _0x4b2b1b=_0xcc07c3;_0x24409b[_0x4b2b1b(0xc8)](_0x33d444,'web_push_action',_0x4b2b1b(0x103));},_0x10ca4c=new WeakMap(),_0x325eb9=function(_0x3862e7){const _0x3cd387=_0xcc07c3;if(_0x42a524(_0x2cc061,_0x5772eb))return;_0x4f0bc(_0x2cc061,_0x5772eb,!0x0);let _0x7e57f3=_0xc58c85(this,_0x90d395,_0x341caa)[_0x3cd387(0x27c)](this);if(_0x7e57f3!=null&&_0x7e57f3[_0x3862e7])switch(_0x7e57f3[_0x3862e7]['entry_time']){case _0x3cd387(0x1bd):{_0xc58c85(this,_0x90d395,_0x124694)['call'](this,_0x7e57f3[_0x3862e7]);break;}case _0x3cd387(0x28c):{_0xc58c85(this,_0x90d395,_0x45d891)[_0x3cd387(0x27c)](this,_0x7e57f3[_0x3862e7]);break;}case _0x3cd387(0x149):{_0xc58c85(this,_0x90d395,_0x14aa67)[_0x3cd387(0x27c)](this,_0x7e57f3[_0x3862e7]);break;}default:return;}},_0x341caa=function(){const _0x3edeb1=_0xcc07c3;let _0x1e8892=localStorage[_0x3edeb1(0x187)]('web_push_action');return _0x1e8892?JSON[_0x3edeb1(0xaa)](_0x1e8892):null;},_0x124694=function(_0x239bfd){const _0x15f730=_0xcc07c3;_0x24409b[_0x15f730(0x21b)]({'clearActionMethod':_0x42a524(this,_0x38168f)['bind'](this),'data':_0x239bfd,'displayMethod':_0xc58c85(this,_0x90d395,_0x45d891)['bind'](this),'idKey':_0x15f730(0x103),'timeValueKey':'entry_time_value'});},_0x45d891=function(_0x268a99){_0xc58c85(this,_0x90d395,_0x521060)['call'](this,_0x268a99);},_0x38168f=new WeakMap(),_0x14aa67=function(_0x43ce4f){const _0x2f6051=_0xcc07c3;_0x24409b[_0x2f6051(0x239)]({'data':_0x43ce4f,'displayMethod':_0xc58c85(this,_0x90d395,_0x45d891)[_0x2f6051(0x18e)](this),'timeValueKey':_0x2f6051(0xeb)});},_0x160867(_0x2cc061,_0x31f2fa),_0x160867(_0x2cc061,_0x1da799,null),_0x160867(_0x2cc061,_0x5effc8,!0x1),_0x160867(_0x2cc061,_0x5772eb,!0x1),_0x160867(_0x2cc061,_0x5c5b2e,!0x1),_0x160867(_0x2cc061,_0x170201,null),_0x160867(_0x2cc061,_0x14aead,'');var _0x2079ac=_0x2cc061,_0xd45efb=_0x2079ac['getInstance'](),_0x4246bb,_0x4c198a,_0x27af32,_0x396a8f,_0x462d0e,_0x46783f,_0x4da836,_0x5e4713,_0x4457f7,_0x191228,_0x414325,_0xa6546f,_0x12d95b,_0x29ad64,_0x37056a,_0x1eee2c=class _0x183987{constructor(){const _0x269503=_0xcc07c3;_0x160867(this,_0x4c198a),_0x160867(this,_0x4da836,_0x3f2877=>{const _0x44feea=_0x5d62;_0x24409b[_0x44feea(0x151)]({'id':_0x3f2877,'localStorageKey':_0x44feea(0x264)});}),_0x160867(this,_0x5e4713,(_0x5b4307,_0x4a09d5)=>{const _0x357b9c=_0x5d62;let _0x44b563=document[_0x357b9c(0x104)](_0x357b9c(0x291));_0x44b563[_0x357b9c(0x13f)]=_0x4a09d5,_0x44b563['querySelectorAll'](_0x357b9c(0x1a2))['forEach'](_0x4b2e78=>{const _0x3671b9=_0x357b9c;let _0x44f187=document['createElement'](_0x3671b9(0x1a2));_0x4b2e78[_0x3671b9(0x1ba)]?_0x44f187[_0x3671b9(0x1ba)]=_0x4b2e78[_0x3671b9(0x1ba)]:_0x44f187[_0x3671b9(0x277)]=_0x4b2e78['textContent'],_0x5b4307['appendChild'](_0x44f187);});}),_0x160867(this,_0x191228,({campaignCustomerInstanceId:_0x284dc3,campaignId:_0x38cf9e,customForm:_0x568e3a,formDiv:_0xb6cf9d,popupContainer:_0x432dd1})=>{const _0x465411=_0x5d62;let _0x33e1cf=(_0xb6cf9d==null?void 0x0:_0xb6cf9d[_0x465411(0x282)](_0x465411(0x116)))||_0x568e3a;_0x33e1cf&&(_0x33e1cf[_0x465411(0x241)](_0x465411(0x133))[_0x465411(0x1ea)](_0x56e7f9=>{const _0x1dea98=_0x465411;_0x56e7f9[_0x1dea98(0x280)]['setProperty'](_0x1dea98(0x16a),_0x56e7f9[_0x1dea98(0x280)][_0x1dea98(0x16a)],_0x1dea98(0xea));}),_0x33e1cf['addEventListener']('submit',()=>_0x3170e3(this,null,function*(){const _0x304b35=_0x465411;_0x432dd1[_0x304b35(0x226)]();let _0x4098f8=new FormData(_0x33e1cf),_0x442f24={};_0x1465bd(0x1,'Form\x20submitted\x20values:');let _0x2ea04f=[];for(let [_0x1dd749,_0x355d9e]of _0x4098f8[_0x304b35(0x1b3)]())_0x442f24[_0x1dd749]=_0x355d9e,_0x1465bd(0x1,_0x1dd749+':\x20'+_0x355d9e),_0x2ea04f[_0x304b35(0x248)](_0x4d3d10[_0x304b35(0x193)](_0x1dd749,_0x355d9e[_0x304b35(0xf2)]()));yield Promise['allSettled'](_0x2ea04f),setTimeout(()=>_0x3170e3(this,null,function*(){const _0x92a7d4=_0x304b35;yield _0x583f85[_0x92a7d4(0x231)]({'campaignCustomerInstanceId':_0x284dc3,'campaignId':_0x38cf9e,'eventName':_0x1da282,'eventProperties':[{'eventProperty':_0x92a7d4(0x229),'value':JSON[_0x92a7d4(0x1c5)]({'campaignId':_0x38cf9e,'formId':(_0xb6cf9d==null?void 0x0:_0xb6cf9d['id'])||_0x92a7d4(0x117),'formValues':_0x442f24})},{'eventProperty':_0x92a7d4(0x1dd),'value':_0x38cf9e[_0x92a7d4(0xf2)]()}],'name':_0x92a7d4(0x116)});}));})));}),this[_0x269503(0x19f)]=()=>{const _0x4983d5=_0x269503;_0x24409b[_0x4983d5(0xb9)]({'actionCondition':_0x3c9934=>_0x3c9934[_0x4983d5(0x15f)][_0x4983d5(0x20b)]===_0x4983d5(0x1bf),'actionMethod':_0x535ef8=>_0xc58c85(this,_0x4c198a,_0x396a8f)['call'](this,_0x535ef8[_0x4983d5(0x225)]),'localStorageKey':_0x4983d5(0x264)});},_0x160867(this,_0x37056a,()=>{const _0x3b1705=_0x269503;_0x24409b[_0x3b1705(0x142)](_0x3b1705(0x264));});}static['getInstance'](){const _0x1b58eb=_0xcc07c3;var _0x3375da;return _0x42a524(_0x183987,_0x4246bb)||(_0x4f0bc(_0x183987,_0x4246bb,new _0x183987()),_0xc58c85(_0x3375da=_0x42a524(_0x183987,_0x4246bb),_0x4c198a,_0x27af32)[_0x1b58eb(0x27c)](_0x3375da)),_0x42a524(_0x183987,_0x4246bb);}[_0xcc07c3(0xcb)](_0x443762){const _0x4cae8b=_0xcc07c3;let _0x2848aa=JSON[_0x4cae8b(0xaa)](localStorage[_0x4cae8b(0x187)](_0x4cae8b(0x264))||'{}');if(_0x2848aa&&_0x2848aa[_0x443762==null?void 0x0:_0x443762[_0x4cae8b(0x225)]]){_0x1465bd(0x1,_0x4cae8b(0xc1));return;}_0xc58c85(this,_0x4c198a,_0x29ad64)[_0x4cae8b(0x27c)](this,_0x443762),_0x42a524(this,_0x37056a)[_0x4cae8b(0x27c)](this),_0xc58c85(this,_0x4c198a,_0x396a8f)[_0x4cae8b(0x27c)](this,_0x443762['campaignId']);}[_0xcc07c3(0x24a)](_0x273715){const _0x43164f=_0xcc07c3;return _0x273715===_0x43164f(0x1bf);}};_0x4246bb=new WeakMap(),_0x4c198a=new WeakSet(),_0x27af32=function(){return _0x3170e3(this,null,function*(){});},_0x396a8f=function(_0x283a4d){const _0x3be348=_0xcc07c3;let _0x1bda52=_0xc58c85(this,_0x4c198a,_0x462d0e)['call'](this);if(document[_0x3be348(0x28a)](_0x3be348(0x251)+_0x283a4d)){_0x1465bd(0x1,'Popup\x20already\x20displayed'),_0x42a524(this,_0x4da836)[_0x3be348(0x27c)](this,_0x283a4d);return;}if(_0x1bda52!=null&&_0x1bda52[_0x283a4d])switch(_0x1bda52[_0x283a4d][_0x3be348(0x21f)]){case _0x3be348(0x1bd):{_0xc58c85(this,_0x4c198a,_0x46783f)[_0x3be348(0x27c)](this,_0x1bda52[_0x283a4d]);break;}case _0x3be348(0x28c):{_0xc58c85(this,_0x4c198a,_0x4457f7)['call'](this,_0x1bda52[_0x283a4d]);break;}case _0x3be348(0x149):{_0xc58c85(this,_0x4c198a,_0x12d95b)[_0x3be348(0x27c)](this,_0x1bda52[_0x283a4d]);break;}default:return;}},_0x462d0e=function(){const _0x30cc08=_0xcc07c3;let _0x4a5983=localStorage['getItem'](_0x30cc08(0x264));return _0x4a5983?JSON[_0x30cc08(0xaa)](_0x4a5983):null;},_0x46783f=function(_0x46370c){const _0xc05b69=_0xcc07c3;_0x24409b['showDelayedAction']({'clearActionMethod':_0x42a524(this,_0x4da836)[_0xc05b69(0x18e)](this),'data':_0x46370c,'displayMethod':_0xc58c85(this,_0x4c198a,_0x4457f7)[_0xc05b69(0x18e)](this),'idKey':_0xc05b69(0x225),'timeValueKey':'campaignEntryTimeValue'});},_0x4da836=new WeakMap(),_0x5e4713=new WeakMap(),_0x4457f7=function(_0x3bd7c6){const _0x163986=_0xcc07c3;if(document[_0x163986(0x28a)](_0x163986(0x251)+_0x3bd7c6[_0x163986(0x225)]))_0x1465bd(0x1,_0x163986(0x205));else{let _0xbe589f=_0xc58c85(this,_0x4c198a,_0xa6546f)[_0x163986(0x27c)](this,_0x163986(0x291),_0x3bd7c6);_0x42a524(this,_0x5e4713)[_0x163986(0x27c)](this,_0xbe589f,_0x3bd7c6[_0x163986(0x15f)]['design']),document['body']['appendChild'](_0xbe589f),_0x583f85['recordEvent']({'campaignCustomerInstanceId':_0x3bd7c6[_0x163986(0xbc)],'campaignId':_0x3bd7c6['campaignId'],'eventName':_0x1da282,'eventProperties':[{'eventProperty':'Popup\x20View','value':JSON[_0x163986(0x1c5)]({'campaignId':_0x3bd7c6['campaignId']})}],'name':_0x163986(0x2b3)});}_0x42a524(this,_0x4da836)['call'](this,_0x3bd7c6[_0x163986(0x225)]);},_0x191228=new WeakMap(),_0x414325=function(_0x1b11d0,_0x59247f){let _0x307712=_0x1b11d0['parentElement'];for(;_0x307712;){if(_0x307712['id']['startsWith'](_0x59247f))return _0x307712;_0x307712=_0x307712['parentElement'];}return null;},_0xa6546f=function(_0x22512e,_0x332006){const _0x554623=_0xcc07c3;let {campaignCustomerInstanceId:_0x1e6d42,campaignId:_0x1e5c84,message:{design:_0xbe58be}}=_0x332006,_0x5e145e=document['createElement'](_0x22512e);_0x5e145e['id']=_0x554623(0x251)+_0x1e5c84,_0x5e145e['innerHTML']=_0xbe58be,_0x5e145e[_0x554623(0x280)][_0x554623(0x110)]=_0x554623(0x1e5),_0x5e145e[_0x554623(0x280)][_0x554623(0x26d)]='0',_0x5e145e['style'][_0x554623(0xc9)]='0',_0x5e145e[_0x554623(0x280)]['width']=_0x554623(0xe4),_0x5e145e['style'][_0x554623(0x1e6)]=_0x554623(0xe4),_0x5e145e['style'][_0x554623(0x212)]=_0x554623(0x289);let _0x4069ac=_0x5e145e[_0x554623(0x282)]('.u-popup-container');_0x4069ac&&(_0x4069ac[_0x554623(0x280)][_0x554623(0x212)]='50');let _0x114b87=_0x4069ac[_0x554623(0x282)](_0x554623(0x126));_0x114b87&&(_0x1465bd(0x1,'Popup\x20overlay\x20element\x20found'),_0x114b87[_0x554623(0x280)][_0x554623(0x29f)](_0x554623(0xe7),_0x554623(0x219),_0x554623(0xea))),_0x5e145e[_0x554623(0x241)](_0x554623(0x116))['forEach'](_0x27834e=>{const _0x185207=_0x554623;let _0x5657a3=_0xc58c85(this,_0x4c198a,_0x414325)[_0x185207(0x27c)](this,_0x27834e,'u_content_form_');_0x5657a3?_0x42a524(this,_0x191228)['call'](this,{'campaignCustomerInstanceId':_0x1e6d42,'campaignId':_0x1e5c84,'formDiv':_0x5657a3,'popupContainer':_0x5e145e}):_0x42a524(this,_0x191228)[_0x185207(0x27c)](this,{'campaignCustomerInstanceId':_0x1e6d42,'campaignId':_0x1e5c84,'customForm':_0x27834e,'popupContainer':_0x5e145e});});let _0x3f14b8=_0x5e145e[_0x554623(0x282)](_0x554623(0x1e7));return(_0x3f14b8==null?void 0x0:_0x3f14b8[_0x554623(0x232)](_0x554623(0x1e3)))==='#'&&_0x3f14b8['removeAttribute'](_0x554623(0x1e3)),_0x3f14b8==null||_0x3f14b8['addEventListener'](_0x554623(0xde),()=>_0x3170e3(this,null,function*(){const _0x48e198=_0x554623;_0x5e145e[_0x48e198(0x226)](),yield _0x583f85[_0x48e198(0x231)]({'campaignCustomerInstanceId':_0x1e6d42,'campaignId':_0x1e5c84,'eventName':_0x1da282,'eventProperties':[{'eventProperty':'Close\x20Click','value':JSON[_0x48e198(0x1c5)]({'campaignId':_0x1e5c84})}],'name':'close'});})),_0x5e145e[_0x554623(0x241)](_0x554623(0x1f1))[_0x554623(0x1ea)](_0x29e0d1=>{const _0xc38c71=_0x554623;_0x29e0d1[_0xc38c71(0xd4)](_0xc38c71(0xde),()=>_0x3170e3(this,null,function*(){const _0x577731=_0xc38c71;_0x5e145e[_0x577731(0x226)](),yield _0x583f85[_0x577731(0x231)]({'campaignCustomerInstanceId':_0x1e6d42,'campaignId':_0x1e5c84,'eventName':_0x1da282,'eventProperties':[{'eventProperty':_0x577731(0x1b4),'value':JSON[_0x577731(0x1c5)]({'buttonId':_0x29e0d1['id'],'campaignId':_0x1e5c84})}],'name':_0x577731(0xde)});}));}),_0x5e145e[_0x554623(0x241)](_0x554623(0xe9))[_0x554623(0x1ea)](_0xa9c63e=>{const _0x503e5e=_0x554623;_0xa9c63e[_0x503e5e(0xd4)](_0x503e5e(0xde),()=>_0x3170e3(this,null,function*(){const _0x34619b=_0x503e5e;var _0x493182;((_0x493182=_0xa9c63e[_0x34619b(0x23e)])==null?void 0x0:_0x493182[_0x34619b(0x1b5)])==='A'&&_0xa9c63e['parentElement'][_0x34619b(0x232)](_0x34619b(0x1e3))&&_0x5e145e[_0x34619b(0x226)](),yield _0x583f85[_0x34619b(0x231)]({'campaignCustomerInstanceId':_0x1e6d42,'campaignId':_0x1e5c84,'eventName':_0x1da282,'eventProperties':[{'eventProperty':_0x34619b(0x181),'value':JSON['stringify']({'campaignId':_0x1e5c84,'imageClassName':_0xa9c63e[_0x34619b(0x240)],'imageId':_0xa9c63e['id']})}],'name':_0x34619b(0xde)});}));}),_0x5e145e;},_0x12d95b=function(_0x168fe6){const _0x3dadac=_0xcc07c3;_0x24409b['showAfterScrollAction']({'data':_0x168fe6,'displayMethod':_0xc58c85(this,_0x4c198a,_0x4457f7)[_0x3dadac(0x18e)](this),'timeValueKey':_0x3dadac(0x176)});},_0x29ad64=function(_0x851583){const _0x5a51dd=_0xcc07c3;_0x24409b[_0x5a51dd(0xc8)](_0x851583,_0x5a51dd(0x264),_0x5a51dd(0x225));},_0x37056a=new WeakMap(),_0x160867(_0x1eee2c,_0x4246bb);var _0x52e22d=_0x1eee2c,_0x6e17be=_0x52e22d[_0xcc07c3(0xab)](),_0x286d98,_0x29275a,_0x3309da,_0x4178d3,_0x55d365,_0x31a0b2,_0x3fbb51,_0x50be7f,_0x48c649,_0x5c0de4=class _0x31dce5{constructor(){const _0x13fe7e=_0xcc07c3;_0x160867(this,_0x29275a),this['queue']=Promise[_0x13fe7e(0x17e)]();}static[_0xcc07c3(0xab)](){var _0x21f2a7;return _0x42a524(_0x31dce5,_0x286d98)||(_0x4f0bc(_0x31dce5,_0x286d98,new _0x31dce5()),_0xc58c85(_0x21f2a7=_0x42a524(_0x31dce5,_0x286d98),_0x29275a,_0x3309da)['call'](_0x21f2a7)),_0x42a524(_0x31dce5,_0x286d98);}[_0xcc07c3(0x1d2)](_0x3c4f8e){const _0xd9947f=_0xcc07c3;let _0x484eec=JSON[_0xd9947f(0xaa)](localStorage[_0xd9947f(0x187)](_0xd9947f(0xbe))||'[]');_0x484eec[_0xd9947f(0x248)](_0x3c4f8e),localStorage[_0xd9947f(0x237)](_0xd9947f(0xbe),JSON[_0xd9947f(0x1c5)](_0x484eec));}[_0xcc07c3(0x296)](){return _0x3170e3(this,null,function*(){const _0x3e5966=_0x5d62;let _0x2060a8=JSON[_0x3e5966(0xaa)](localStorage['getItem'](_0x3e5966(0xbe))||'[]');if(Array[_0x3e5966(0x10b)](_0x2060a8)){for(let _0x298b32 of _0x2060a8)yield this[_0x3e5966(0x28d)](_0x298b32);}});}[_0xcc07c3(0x231)](_0x2a37bd,_0x81d70f){return _0x3170e3(this,null,function*(){const _0x3c5216=_0x5d62;_0x8f206f['isInitialized']&&!_0x8f206f[_0x3c5216(0x10f)]?yield _0xc58c85(this,_0x29275a,_0x4178d3)[_0x3c5216(0x27c)](this,_0x2a37bd,_0x81d70f):this[_0x3c5216(0x1d2)](_0x2a37bd);});}[_0xcc07c3(0x28d)](_0x5e0872){return _0x3170e3(this,null,function*(){const _0x448369=_0x5d62;try{yield _0xc58c85(this,_0x29275a,_0x4178d3)[_0x448369(0x27c)](this,_0x5e0872);}finally{_0xc58c85(this,_0x29275a,_0x48c649)[_0x448369(0x27c)](this,_0x5e0872['eventName']);}});}[_0xcc07c3(0x1b2)](_0x5ea3f1){return _0x3170e3(this,null,function*(){const _0x465c3a=_0x5d62;_0x8f206f['debugLevel']===0x4&&(!_0x8f206f[_0x465c3a(0x278)]||_0x8f206f['recordDebugEventsToggle'][_0x5ea3f1['eventName']])&&(yield _0xc58c85(this,_0x29275a,_0x4178d3)[_0x465c3a(0x27c)](this,_0x5ea3f1));});}[_0xcc07c3(0xbd)](){const _0x147051=_0xcc07c3;let _0xd616e0=localStorage['getItem'](_0x147051(0x1d5));return _0xd616e0?JSON['parse'](_0xd616e0):{};}[_0xcc07c3(0x153)](){return _0x3170e3(this,null,function*(){const _0x175665=_0x5d62;if(!localStorage[_0x175665(0x187)]('events')){let _0x294a90=(yield this[_0x175665(0x115)]())['data'];if(_0x294a90){localStorage[_0x175665(0x237)](_0x175665(0x1d5),JSON['stringify'](_0x294a90));try{_0xd45efb[_0x175665(0x14f)]({'events':_0x294a90});}catch(_0x3a94c5){}}}});}[_0xcc07c3(0x115)](){return _0x3170e3(this,null,function*(){const _0x5af1ca=_0x5d62;try{return yield _0x19e5ee[_0x5af1ca(0x293)](''+_0x1d6c35);}catch(_0x565c7b){throw new Error(_0x5af1ca(0x135));}});}['postEventRecord'](_0x179ada,_0x5c593e){return _0x3170e3(this,null,function*(){const _0x482b66=_0x5d62;let _0x53c0c1=null,_0x5d60db=null,_0x1a5df4=new AbortController();return this[_0x482b66(0x10a)]=this['queue'][_0x482b66(0x1c0)](()=>_0x3170e3(this,null,function*(){const _0x3f0aa3=_0x482b66;try{if(_0x179ada[_0x3f0aa3(0x1d5)][_0x3f0aa3(0x14c)]===0x0)throw new Error('No\x20events\x20to\x20record');let _0x521e8c=yield _0x19e5ee[_0x3f0aa3(0x28b)]('/v2'+_0x1d6c35+_0x222c1c,_0x179ada,_0x1a5df4[_0x3f0aa3(0xd6)]);if(_0x521e8c['success'])return _0x5d60db=_0x521e8c,_0x521e8c;if(_0x521e8c['message']===_0x3f0aa3(0x2a1)+localStorage['getItem'](_0x3f0aa3(0x298))+_0x3f0aa3(0x1e0))throw localStorage[_0x3f0aa3(0x1e2)](_0x3f0aa3(0x298)),new Error(_0x3f0aa3(0x1b8));}catch(_0xb6d350){throw _0x1465bd(0x2,_0x3f0aa3(0x25c)),_0x1465bd(0x2,_0x3f0aa3(0x2a0)+_0xb6d350['name']),_0x1465bd(0x2,_0x3f0aa3(0x224)+_0xb6d350[_0x3f0aa3(0x15f)]),(_0xb6d350[_0x3f0aa3(0x20b)]===_0x3f0aa3(0x255)||_0xb6d350[_0x3f0aa3(0x20b)]===_0x3f0aa3(0x1bb)&&_0xb6d350[_0x3f0aa3(0x15f)]==='Failed\x20to\x20fetch'||_0xb6d350[_0x3f0aa3(0x15f)]===_0x3f0aa3(0xdb))&&(_0x1465bd(0x2,_0x3f0aa3(0x206)),_0x5c593e&&_0xc58c85(this,_0x29275a,_0x50be7f)[_0x3f0aa3(0x27c)](this,_0x5c593e)),_0x53c0c1=new Error((_0xb6d350==null?void 0x0:_0xb6d350['message'])||_0x3f0aa3(0x1c6)),_0xb6d350;}return null;}))[_0x482b66(0xba)](()=>{}),this['queue'][_0x482b66(0x1c0)](()=>{if(_0x53c0c1)throw _0x53c0c1;return _0x5d60db;});});}};_0x286d98=new WeakMap(),_0x29275a=new WeakSet(),_0x3309da=function(){return _0x3170e3(this,null,function*(){});},_0x4178d3=function(_0x4123fb,_0xb7af20){return _0x3170e3(this,null,function*(){const _0x3a8af2=_0x5d62;yield _0xcdf47c(_0x3a8af2(0x1a7),()=>_0x3170e3(this,null,function*(){const _0x4d9f94=_0x3a8af2;var _0xf8bee7,_0x15d04e,_0x1b1b53,_0xbe62aa;let {campaignCustomerInstanceId:_0x50deab,campaignId:_0x1f0108,eventName:_0x438549,eventProperties:_0x693ec6,name:_0x2192e7,web_optin_instance_id:_0x315b3f}=_0x4123fb;_0x1465bd(0x1,_0x4d9f94(0x100)),_0x437f37(_0x4d9f94(0x199),!0x0),_0x4a58c2(_0x4d9f94(0x202),!0x0),_0x1465bd(0x1,_0x4d9f94(0x1c8)),_0x1465bd(0x1,{'campaignCustomerInstanceId':_0x50deab,'eventName':_0x438549,'eventProperties':_0x693ec6,'name':_0x2192e7,'web_optin_instance_id':_0x315b3f});let _0x3555f6=_0x24409b[_0x4d9f94(0x185)]();if(_0x3555f6===_0x4d9f94(0x267)||_0x3555f6===_0x4d9f94(0x2a2))throw new Error(_0x4d9f94(0x2b2));_0x438549!==_0x4d9f94(0x107)&&(yield _0x24409b[_0x4d9f94(0xd1)]());let _0xe51d8b=[];_0x693ec6&&_0xe51d8b[_0x4d9f94(0x248)](..._0x693ec6),_0xe51d8b[_0x4d9f94(0x248)]({'eventProperty':_0x4d9f94(0xb8),'value':_0x3555f6}),_0xe51d8b[_0x4d9f94(0x248)]({'eventProperty':_0x4d9f94(0x26a),'value':_0x24409b[_0x4d9f94(0xc4)]()}),_0xe51d8b['push']({'eventProperty':_0x4d9f94(0xfe),'value':_0x24409b[_0x4d9f94(0x247)]()});let _0x22c0a0=this['getStoredEvents'](),_0x61d652=_0xc58c85(this,_0x29275a,_0x31a0b2)['call'](this,_0x22c0a0,_0x438549,_0xe51d8b);if(typeof _0x61d652=='string'){_0x1465bd(0x2,_0x61d652);return;}_0x24409b['updateSessionCreated']();let {id:_0x41bab1}=_0x22c0a0[_0x438549],_0x2d1e50=_0xc58c85(this,_0x29275a,_0x3fbb51)[_0x4d9f94(0x27c)](this,_0x384158(_0x51df7f(_0x384158(_0x384158(_0x384158({},_0x50deab?{'campaignCustomerInstanceId':_0x50deab}:{}),_0x1f0108?{'campaignId':_0x1f0108}:{}),_0x315b3f?{'web_optin_instance_id':_0x315b3f}:{}),{'eventId':_0x41bab1,'eventProperties':_0x61d652,'sessionId':localStorage[_0x4d9f94(0x187)](_0x4d9f94(0x207))||''}),_0x2192e7?{'name':_0x2192e7}:{}));if(_0x8f206f['offline']){let _0x13e958=JSON[_0x4d9f94(0xaa)](localStorage[_0x4d9f94(0x187)](_0x4d9f94(0x186))||'[]');_0x13e958[_0x4d9f94(0x14c)]<=0x32&&(_0x13e958[_0x4d9f94(0x248)](..._0x2d1e50[_0x4d9f94(0x1d5)]),localStorage[_0x4d9f94(0x237)]('offlineEvents',JSON[_0x4d9f94(0x1c5)](_0x13e958)));return;}let _0x3c5c1a=yield this['postEventRecord'](_0x2d1e50,_0x4123fb);(_0xf8bee7=_0x3c5c1a==null?void 0x0:_0x3c5c1a[_0x4d9f94(0x168)])!=null&&_0xf8bee7[_0x4d9f94(0x1c9)]?(yield this['recordDebugEvents']({'eventName':'optin_data'}),_0xd45efb[_0x4d9f94(0x15c)](_0x3c5c1a['data'][_0x4d9f94(0x1c9)])):_0x438549===_0x4d9f94(0x170)&&(yield this[_0x4d9f94(0x1b2)]({'eventName':_0x4d9f94(0x1b6),'eventProperties':[{'eventProperty':_0x4d9f94(0x15f),'value':''+(_0x4d9f94(0x19e)in window&&typeof((_0x15d04e=window==null?void 0x0:window[_0x4d9f94(0x19e)])==null?void 0x0:_0x15d04e[_0x4d9f94(0xd2)])!=_0x4d9f94(0x1d4))}]})),(_0xbe62aa=(_0x1b1b53=_0x3c5c1a==null?void 0x0:_0x3c5c1a[_0x4d9f94(0x168)])==null?void 0x0:_0x1b1b53[_0x4d9f94(0xd5)])==null||_0xbe62aa['forEach'](_0x54a28e=>{const _0x1d841c=_0x4d9f94;if(_0x6e17be[_0x1d841c(0x24a)](_0x54a28e['message']['name'])){if(_0xc58c85(this,_0x29275a,_0x55d365)['call'](this,_0x54a28e[_0x1d841c(0x225)])){_0x1465bd(0x1,_0x1d841c(0xcf)+_0x54a28e[_0x1d841c(0x225)]);return;}_0x6e17be[_0x1d841c(0xcb)](_0x54a28e);}else _0xd1646d[_0x1d841c(0x19d)](_0x54a28e['message'][_0x1d841c(0x20b)])&&_0xd1646d[_0x1d841c(0x14d)](_0x54a28e);}),_0x4a58c2(_0x4d9f94(0x202),!0x1),_0x437f37(_0x4d9f94(0x199),!0x1);}),_0x2fe4d7=>{const _0x2786f9=_0x3a8af2;_0x19e5ee[_0x2786f9(0x261)]()==='67'&&_0x2fe4d7[_0x2786f9(0x15f)]!==_0x2786f9(0x210)&&_0x2fe4d7[_0x2786f9(0x15f)]!==_0x2786f9(0xdb)&&_0x2fe4d7[_0x2786f9(0x15f)]['includes'](_0x2786f9(0x210));},_0xb7af20);});},_0x55d365=function(_0x23cebe){const _0x1e79ee=_0xcc07c3;return _0x1465bd(0x1,_0x1e79ee(0x208)+_0x23cebe),JSON[_0x1e79ee(0xaa)](localStorage[_0x1e79ee(0x187)](_0x1e79ee(0xbe))||'[]')[_0x1e79ee(0x201)](_0x570b24=>_0x570b24[_0x1e79ee(0x225)]===_0x23cebe);},_0x31a0b2=function(_0x4fba1a,_0xbcb9ae,_0x52679d){const _0x380847=_0xcc07c3;if(!Object[_0x380847(0xf7)][_0x380847(0x17b)][_0x380847(0x27c)](_0x4fba1a,_0xbcb9ae))return _0x380847(0x174)+_0xbcb9ae+_0x380847(0xf4);if(!_0x52679d)return[];let _0x4fb2e7=_0x4fba1a[_0xbcb9ae];if(!(_0x4fb2e7!=null&&_0x4fb2e7[_0x380847(0x209)]))return _0x1465bd(0x2,_0x380847(0x174)+_0xbcb9ae+_0x380847(0xb0)),_0x380847(0x174)+_0xbcb9ae+_0x380847(0xb0);let _0x2a4e54=_0x52679d['filter'](({eventProperty:_0x38c1cf})=>!Object[_0x380847(0xf7)][_0x380847(0x17b)][_0x380847(0x27c)](_0x4fb2e7['eventProperty'],_0x38c1cf))['map'](({eventProperty:_0x3d56f9})=>_0x3d56f9);return _0x2a4e54[_0x380847(0x14c)]>0x0&&(_0x1465bd(0x2,_0x380847(0x1a0)+_0xbcb9ae+_0x380847(0x25d)+_0x2a4e54[_0x380847(0x160)](',\x20')+'.'),_0x52679d=_0x52679d[_0x380847(0x243)](({eventProperty:_0x14d948})=>!_0x2a4e54[_0x380847(0x254)](_0x14d948))),_0x52679d[_0x380847(0x141)](({eventProperty:_0xdc85a7,value:_0x20551f})=>({'eventPropertyId':_0x4fb2e7[_0x380847(0x209)][_0xdc85a7]['id'],'value':_0x20551f}));},_0x3fbb51=function(_0x47d1ac){const _0x25d9c9=_0xcc07c3;return{'customerId':localStorage['getItem'](_0x25d9c9(0x298))||'','deviceId':localStorage[_0x25d9c9(0x187)](_0x25d9c9(0x28f))||'','events':[_0x47d1ac]};},_0x50be7f=function(_0x5eed2c){const _0x45319d=_0xcc07c3;_0x1465bd(0x1,_0x45319d(0xc2)),_0x1465bd(0x1,_0x5eed2c);let _0x18cfac=localStorage['getItem']('preInitializedEvents');_0x18cfac&&_0x18cfac!==_0x45319d(0x1d4)?(_0x18cfac=JSON[_0x45319d(0xaa)](_0x18cfac),_0x18cfac[_0x45319d(0x248)](_0x5eed2c)):_0x18cfac=[_0x5eed2c],localStorage[_0x45319d(0x237)](_0x45319d(0xbe),JSON[_0x45319d(0x1c5)](_0x18cfac));},_0x48c649=function(_0x294e0a){const _0x1f64c3=_0xcc07c3;let _0x1703fc=JSON[_0x1f64c3(0xaa)](localStorage[_0x1f64c3(0x187)](_0x1f64c3(0xbe))||'[]'),_0x433ebe=_0x1703fc['findIndex'](_0xbd407e=>_0xbd407e[_0x1f64c3(0xe6)]===_0x294e0a);_0x433ebe>=0x0&&_0x1703fc[_0x1f64c3(0x1a4)](_0x433ebe,0x1),localStorage[_0x1f64c3(0x237)](_0x1f64c3(0xbe),JSON[_0x1f64c3(0x1c5)](_0x1703fc));},_0x160867(_0x5c0de4,_0x286d98);var _0xb70ff4=_0x5c0de4,_0x583f85=_0xb70ff4[_0xcc07c3(0xab)](),_0x324ac2,_0x4a1e1d,_0x483288,_0x580e57,_0x2076b9,_0x4eeb4b,_0x3e8a09,_0xae1a4d,_0x5ca226,_0xf41b62,_0x25fdea,_0x45863b,_0x31ab77=class _0x443fbf{constructor(){const _0x34f66e=_0xcc07c3;_0x160867(this,_0x4a1e1d),_0x160867(this,_0x3e8a09,_0x259511=>{const _0x2770c5=_0x5d62;_0x24409b[_0x2770c5(0x151)]({'id':_0x259511,'localStorageKey':_0x2770c5(0x264)});}),this[_0x34f66e(0x2a5)]=()=>{const _0x5127d1=_0x34f66e;_0x24409b[_0x5127d1(0xb9)]({'actionCondition':_0x5a3437=>_0x5a3437[_0x5127d1(0x15f)][_0x5127d1(0x20b)]===_0x5127d1(0x230),'actionMethod':_0x315657=>_0xc58c85(this,_0x4a1e1d,_0x580e57)[_0x5127d1(0x27c)](this,_0x315657[_0x5127d1(0x225)]),'localStorageKey':_0x5127d1(0x264)});},_0x160867(this,_0x45863b,()=>{const _0x224beb=_0x34f66e;_0x24409b[_0x224beb(0x142)](_0x224beb(0x264));});}static['getInstance'](){var _0x1e3299;return _0x42a524(_0x443fbf,_0x324ac2)||(_0x4f0bc(_0x443fbf,_0x324ac2,new _0x443fbf()),_0xc58c85(_0x1e3299=_0x42a524(_0x443fbf,_0x324ac2),_0x4a1e1d,_0x483288)['call'](_0x1e3299)),_0x42a524(_0x443fbf,_0x324ac2);}[_0xcc07c3(0x14d)](_0x50cf8a){const _0x369d6a=_0xcc07c3;let _0x413557=JSON[_0x369d6a(0xaa)](localStorage['getItem'](_0x369d6a(0x264))||'{}');if(_0x413557&&_0x413557[_0x50cf8a==null?void 0x0:_0x50cf8a[_0x369d6a(0x225)]]){_0x1465bd(0x1,_0x369d6a(0xc7));return;}_0xc58c85(this,_0x4a1e1d,_0x25fdea)[_0x369d6a(0x27c)](this,_0x50cf8a),_0x42a524(this,_0x45863b)[_0x369d6a(0x27c)](this),_0xc58c85(this,_0x4a1e1d,_0x580e57)['call'](this,_0x50cf8a[_0x369d6a(0x225)]);}['isContentCardAction'](_0xd83704){return _0xd83704==='content_card';}};_0x324ac2=new WeakMap(),_0x4a1e1d=new WeakSet(),_0x483288=function(){return _0x3170e3(this,null,function*(){});},_0x580e57=function(_0x449a85){const _0x2c451a=_0xcc07c3;let _0x21fad9=_0xc58c85(this,_0x4a1e1d,_0x2076b9)['call'](this);if(document['getElementById'](_0x2c451a(0x12f)+_0x449a85)){_0x1465bd(0x1,_0x2c451a(0x275)),_0x42a524(this,_0x3e8a09)['call'](this,_0x449a85);return;}if(_0x21fad9!=null&&_0x21fad9[_0x449a85])switch(_0x21fad9[_0x449a85][_0x2c451a(0x21f)]){case _0x2c451a(0x1bd):{_0xc58c85(this,_0x4a1e1d,_0x4eeb4b)[_0x2c451a(0x27c)](this,_0x21fad9[_0x449a85]);break;}case _0x2c451a(0x28c):{_0xc58c85(this,_0x4a1e1d,_0xae1a4d)[_0x2c451a(0x27c)](this,_0x21fad9[_0x449a85]);break;}case'SCROLL':{_0xc58c85(this,_0x4a1e1d,_0xf41b62)[_0x2c451a(0x27c)](this,_0x21fad9[_0x449a85]);break;}default:return;}},_0x2076b9=function(){const _0x560ee2=_0xcc07c3;let _0x5e9beb=localStorage[_0x560ee2(0x187)](_0x560ee2(0x264));return _0x5e9beb?JSON[_0x560ee2(0xaa)](_0x5e9beb):null;},_0x4eeb4b=function(_0x6cbe67){const _0x37249d=_0xcc07c3;_0x24409b[_0x37249d(0x21b)]({'clearActionMethod':_0x42a524(this,_0x3e8a09)[_0x37249d(0x18e)](this),'data':_0x6cbe67,'displayMethod':_0xc58c85(this,_0x4a1e1d,_0xae1a4d)[_0x37249d(0x18e)](this),'idKey':_0x37249d(0x225),'timeValueKey':_0x37249d(0x176)});},_0x3e8a09=new WeakMap(),_0xae1a4d=function(_0x5b1d32){const _0x432bab=_0xcc07c3;var _0x1f2bdd;if(document[_0x432bab(0x28a)]('contentCard_container_'+_0x5b1d32[_0x432bab(0x225)]))_0x1465bd(0x1,_0x432bab(0x275));else{let _0x28cfa7=_0xc58c85(this,_0x4a1e1d,_0x5ca226)[_0x432bab(0x27c)](this,'div',_0x5b1d32),_0xfdc935=document[_0x432bab(0x282)]('#'+_0x5b1d32['message'][_0x432bab(0x217)]);_0xfdc935&&(_0xfdc935[_0x432bab(0x13f)]=_0x28cfa7['outerHTML'],_0x583f85['recordEvent']({'campaignCustomerInstanceId':_0x5b1d32[_0x432bab(0xbc)],'campaignId':_0x5b1d32[_0x432bab(0x225)],'eventName':_0x4fb420,'eventProperties':[{'eventProperty':'Content\x20Card\x20View','value':JSON['stringify']({'campaignId':_0x5b1d32[_0x432bab(0x225)]})}],'name':_0x432bab(0x2b3)}),(_0x1f2bdd=document['getElementById'](_0x432bab(0x12f)+_0x5b1d32[_0x432bab(0x225)]))==null||_0x1f2bdd[_0x432bab(0xd4)](_0x432bab(0xde),()=>{const _0x17e072=_0x432bab;_0x583f85[_0x17e072(0x231)]({'campaignCustomerInstanceId':_0x5b1d32[_0x17e072(0xbc)],'campaignId':_0x5b1d32[_0x17e072(0x225)],'eventName':_0x4fb420,'eventProperties':[{'eventProperty':_0x17e072(0x129),'value':JSON[_0x17e072(0x1c5)]({'campaignId':_0x5b1d32[_0x17e072(0x225)]})}],'name':_0x17e072(0xde)});}));}_0x42a524(this,_0x3e8a09)['call'](this,_0x5b1d32[_0x432bab(0x225)]);},_0x5ca226=function(_0x4f88f7,_0x68567c){const _0x2b7aaa=_0xcc07c3;var _0x4d2924;let {campaignId:_0x27db42,message:{design:_0x6368c7}}=_0x68567c,_0x4fc77b=document['createElement'](_0x4f88f7);return _0x4fc77b['id']=_0x2b7aaa(0x12f)+_0x27db42,_0x4fc77b[_0x2b7aaa(0x13f)]=_0x6368c7,(_0x4d2924=_0x4fc77b['querySelector'](_0x2b7aaa(0x1e7)))==null||_0x4d2924[_0x2b7aaa(0x226)](),_0x4fc77b;},_0xf41b62=function(_0x590c81){const _0x5c6d37=_0xcc07c3;_0x24409b[_0x5c6d37(0x239)]({'data':_0x590c81,'displayMethod':_0xc58c85(this,_0x4a1e1d,_0xae1a4d)[_0x5c6d37(0x18e)](this),'timeValueKey':'campaignEntryTimeValue'});},_0x25fdea=function(_0x4822eb){const _0x299d40=_0xcc07c3;_0x24409b[_0x299d40(0xc8)](_0x4822eb,_0x299d40(0x264),_0x299d40(0x225));},_0x45863b=new WeakMap(),_0x160867(_0x31ab77,_0x324ac2);var _0x370d7b=_0x31ab77,_0xd1646d=_0x370d7b[_0xcc07c3(0xab)](),_0x4314cb,_0x1404b5,_0x19c269,_0xc21923,_0x1efbb0,_0x1edcf3,_0x5918ea,_0x183178,_0x77b6f0,_0x33a7ae,_0x4f61ab,_0x4ea315,_0x1ff310,_0x47ed55,_0x426234,_0x2ad152,_0x552f9d,_0x1ee126,_0x3f8173,_0x19d315,_0x21d716,_0x4fa22a,_0x240343,_0x21c66d,_0x390a09,_0x5615d1,_0x46213a,_0x261b58,_0x316b97=class _0x35cbfc{constructor(){const _0x375bba=_0xcc07c3;_0x160867(this,_0x77b6f0),_0x160867(this,_0x1404b5),_0x160867(this,_0x19c269),_0x160867(this,_0xc21923),_0x160867(this,_0x1efbb0,null),_0x160867(this,_0x1edcf3,null),_0x160867(this,_0x5918ea,!0x1),_0x160867(this,_0x183178,()=>{setInterval(()=>{const _0x18eb02=_0x5d62;_0xcdf47c(_0x18eb02(0x1d9),()=>_0x3170e3(this,null,function*(){const _0x2a8a24=_0x18eb02;let _0x1853d4=localStorage['getItem'](_0x2a8a24(0x260));if(_0x1853d4!==_0x42a524(this,_0x1edcf3)){_0x1465bd(0x1,_0x2a8a24(0xad)),_0x4f0bc(this,_0x1edcf3,_0x1853d4);let _0x468c49=JSON[_0x2a8a24(0xaa)](_0x1853d4||'{}');if(_0x468c49!=null&&_0x468c49[_0x2a8a24(0x14f)]){_0x1465bd(0x1,_0x2a8a24(0x1f8));let _0x45e144=_0x468c49[_0x2a8a24(0x14f)];delete _0x468c49[_0x2a8a24(0x14f)],localStorage[_0x2a8a24(0x237)](_0x2a8a24(0x260),JSON[_0x2a8a24(0x1c5)](_0x468c49)),_0xd45efb[_0x2a8a24(0x14f)](_0x45e144);}if(_0x468c49!=null&&_0x468c49[_0x2a8a24(0x1c9)]){let _0x3c0770=_0x468c49['optIn'];delete _0x468c49['optIn'],localStorage[_0x2a8a24(0x237)](_0x2a8a24(0x260),JSON[_0x2a8a24(0x1c5)](_0x468c49)),_0xd45efb['showNotification'](_0x3c0770);}if(_0x468c49!=null&&_0x468c49['campaigns']){let _0x21fff9=_0x468c49[_0x2a8a24(0xd5)];delete _0x468c49[_0x2a8a24(0xd5)],localStorage['setItem']('mergn_shopify',JSON['stringify'](_0x468c49)),_0x21fff9[_0x2a8a24(0x1ea)](_0x45a651=>{const _0x213870=_0x2a8a24;_0x6e17be[_0x213870(0x24a)](_0x45a651[_0x213870(0x15f)][_0x213870(0x20b)])?_0x6e17be[_0x213870(0xcb)](_0x45a651):_0xd1646d[_0x213870(0x19d)](_0x45a651[_0x213870(0x15f)]['name'])&&_0xd1646d[_0x213870(0x14d)](_0x45a651);});}}}));},0x3e8);}),this[_0x375bba(0x142)]=_0x3991dc=>{const _0x8a5afd=_0x375bba;let _0x4a7721=()=>{const _0x5663e0=_0x5d62;let _0x2e3ec3=JSON[_0x5663e0(0xaa)](localStorage[_0x5663e0(0x187)](_0x3991dc)||'{}');Object[_0x5663e0(0x147)](_0x2e3ec3)[_0x5663e0(0x1ea)](_0x5e3f0e=>{const _0x1cccb5=_0x5663e0;_0x2e3ec3[_0x5e3f0e][_0x1cccb5(0x281)]=new Date()[_0x1cccb5(0xfb)]();}),localStorage[_0x5663e0(0x237)](_0x3991dc,JSON['stringify'](_0x2e3ec3));};_0x4a7721(),window[_0x8a5afd(0xd4)](_0x8a5afd(0x29e),_0x4a7721);},this[_0x375bba(0x151)]=({id:_0x1304a8,localStorageKey:_0x5a51fa})=>{const _0xd1d745=_0x375bba;let _0x4a2500=JSON[_0xd1d745(0xaa)](localStorage[_0xd1d745(0x187)](_0x5a51fa)||'{}');_0x4a2500[_0x1304a8]&&delete _0x4a2500[_0x1304a8],localStorage[_0xd1d745(0x237)](_0x5a51fa,JSON[_0xd1d745(0x1c5)](_0x4a2500));},this[_0x375bba(0xb9)]=({actionCondition:_0x51a9ac,actionMethod:_0x5da22f,localStorageKey:_0x2321fd})=>{const _0x1da540=_0x375bba;let _0xde028a=JSON[_0x1da540(0xaa)](localStorage[_0x1da540(0x187)](_0x2321fd)||'{}');Object[_0x1da540(0x147)](_0xde028a)[_0x1da540(0x1ea)](_0x219c5e=>{_0x51a9ac(_0xde028a[_0x219c5e])&&_0x5da22f(_0xde028a[_0x219c5e]);});};}static[_0xcc07c3(0xab)](){return _0x42a524(_0x35cbfc,_0x4314cb)||_0x4f0bc(_0x35cbfc,_0x4314cb,new _0x35cbfc()),_0x42a524(_0x35cbfc,_0x4314cb);}[_0xcc07c3(0xfd)](_0x18c235,_0x75071b){return _0x3170e3(this,null,function*(){const _0x26b118=_0x5d62;_0x1465bd(0x1,_0x26b118(0x1ef));let _0x1cf98f=_0xc58c85(this,_0x77b6f0,_0x1ff310)[_0x26b118(0x27c)](this);_0x75071b!=null&&_0x75071b['shopify']&&_0x4f0bc(this,_0x5918ea,!0x0),_0xc58c85(this,_0x77b6f0,_0x33a7ae)[_0x26b118(0x27c)](this,_0x18c235);let _0x310035=this[_0x26b118(0x185)]();if(_0x310035===_0x26b118(0x267)||_0x310035===_0x26b118(0x2a2)){_0x1465bd(0x2,_0x26b118(0x123));return;}if(yield _0x19e5ee['syncRealWorldTime'](),_0x1465bd(0x1,_0x26b118(0x12d)),yield _0xc58c85(this,_0x77b6f0,_0x390a09)['call'](this,0x3),_0x75071b!=null&&_0x75071b['shopify']&&_0x42a524(this,_0x183178)['call'](this),_0x75071b!=null&&_0x75071b[_0x26b118(0x191)])try{_0x8f206f['loading']=!0x0,yield this[_0x26b118(0x192)](_0x75071b[_0x26b118(0x191)]);}finally{_0x8f206f[_0x26b118(0x10f)]=!0x1;}yield this[_0x26b118(0xd1)](),yield _0x583f85[_0x26b118(0x296)](),yield _0x4d3d10[_0x26b118(0x198)](),_0x583f85['recordDebugEvents']({'eventName':_0x26b118(0x265)}),_0x1465bd(0x1,_0x26b118(0x102)),yield _0xcdf47c('notification\x20service',()=>_0x3170e3(this,null,function*(){const _0x31e162=_0x26b118;yield _0xd45efb['init'](_0x1cf98f,_0x75071b==null?void 0x0:_0x75071b[_0x31e162(0x24f)],_0x75071b==null?void 0x0:_0x75071b['isExtensionSW']);})),yield _0xc58c85(this,_0x77b6f0,_0x261b58)[_0x26b118(0x27c)](this,_0x75071b==null?void 0x0:_0x75071b['shopify']);let _0x3708fe=history[_0x26b118(0x228)];history[_0x26b118(0x228)]=(..._0x1a0853)=>{const _0x170bc9=_0x26b118;_0x3708fe[_0x170bc9(0x162)](history,_0x1a0853),_0xc58c85(this,_0x77b6f0,_0x46213a)[_0x170bc9(0x27c)](this,_0x75071b==null?void 0x0:_0x75071b[_0x170bc9(0xc0)]);},_0x1465bd(0x1,_0x26b118(0x252));});}[_0xcc07c3(0x1d7)](_0x33b188){_0x4f0bc(this,_0x1404b5,_0x33b188);}[_0xcc07c3(0xf6)](_0x45c7c2){_0x4f0bc(this,_0x19c269,_0x45c7c2);}[_0xcc07c3(0x140)](_0x3acef6){_0x4f0bc(this,_0xc21923,_0x3acef6);}[_0xcc07c3(0x20e)](_0x43faf8){_0x4f0bc(this,_0x1efbb0,_0x43faf8);}[_0xcc07c3(0x17a)](){return _0x42a524(this,_0x1efbb0);}[_0xcc07c3(0x185)](){return _0x42a524(this,_0x1404b5);}[_0xcc07c3(0x247)](){return _0x42a524(this,_0x19c269);}[_0xcc07c3(0xc4)](){return _0x42a524(this,_0xc21923);}[_0xcc07c3(0xf3)](){}[_0xcc07c3(0x239)]({data:_0x5e3049,displayMethod:_0x2eb37a,timeValueKey:_0x225a04}){const _0x898252=_0xcc07c3;let _0x56469d=()=>{const _0x24a8a9=_0x5d62;var _0x388202;let _0x4cd0f9=window['innerHeight'],_0x833e52=document[_0x24a8a9(0x214)][_0x24a8a9(0x203)];window[_0x24a8a9(0x25b)]/(_0x833e52-_0x4cd0f9)*0x64>(((_0x388202=_0x5e3049[_0x225a04])==null?void 0x0:_0x388202[_0x24a8a9(0x233)])||0x0)&&(window['removeEventListener']('scroll',_0x56469d),_0x2eb37a(_0x5e3049));};window[_0x898252(0xd4)](_0x898252(0x2af),_0x56469d);}[_0xcc07c3(0x21b)]({clearActionMethod:_0x4cf74f,data:_0x26061d,displayMethod:_0x2d4f99,idKey:_0x568d6f,timeValueKey:_0x1e5138}){const _0x4c04b4=_0xcc07c3;var _0x15f4ae,_0x4d827d,_0x2c3e84;let _0x45d897=(_0x15f4ae=_0x26061d[_0x1e5138])==null?void 0x0:_0x15f4ae[_0x4c04b4(0x233)];((_0x4d827d=_0x26061d[_0x1e5138])==null?void 0x0:_0x4d827d['duration'])===_0x4c04b4(0x299)&&(_0x45d897=_0x45d897*0x3c);let _0xb4a0e8=_0x26061d[_0x4c04b4(0x281)]-0x1f4+(_0x45d897||0x0)*0x3e8-new Date()[_0x4c04b4(0xfb)]();_0x1465bd(0x1,'Initial\x20time:\x20'+_0x26061d[_0x4c04b4(0x281)]),_0x1465bd(0x1,_0x4c04b4(0x1e1)+((_0x2c3e84=_0x26061d[_0x1e5138])==null?void 0x0:_0x2c3e84[_0x4c04b4(0x233)])),_0x1465bd(0x1,_0x4c04b4(0x1c3)+new Date()[_0x4c04b4(0xfb)]()),_0x1465bd(0x1,_0x4c04b4(0x295)+_0xb4a0e8),_0xb4a0e8>0x0?setTimeout(()=>{_0x4cf74f(_0x26061d[_0x568d6f]),_0x2d4f99(_0x26061d);},_0xb4a0e8):(_0x4cf74f(_0x26061d[_0x568d6f]),_0x2d4f99(_0x26061d));}[_0xcc07c3(0xc8)](_0x211620,_0x7db60f,_0x224ac3){const _0x587600=_0xcc07c3;var _0x47e9af;let _0x2d56e8=JSON[_0x587600(0xaa)](localStorage[_0x587600(0x187)](_0x7db60f)||'{}'),_0x5c650e=(_0x47e9af=_0x224ac3 in _0x211620&&_0x211620[_0x224ac3])!=null?_0x47e9af:'';_0x5c650e&&(_0x2d56e8[_0x5c650e]=_0x51df7f(_0x384158({},_0x211620),{'initialTime':new Date()[_0x587600(0xfb)]()}),localStorage[_0x587600(0x237)](_0x7db60f,JSON[_0x587600(0x1c5)](_0x2d56e8)));}[_0xcc07c3(0xd1)](){return _0x3170e3(this,null,function*(){yield _0xcdf47c('#\x20check\x20TTL',()=>_0x3170e3(this,null,function*(){const _0x502510=_0x5d62;if(_0x42a524(this,_0x5918ea))return;_0x1465bd(0x1,'Checking\x20TTL'),_0x437f37(_0x502510(0xe5),!0x0),_0x4a58c2(_0x502510(0x1c1),!0x0);let _0x10199c=localStorage['getItem'](_0x502510(0x1d0)),_0x89e49b=!0x1;if(_0x89e49b=_0xc58c85(this,_0x77b6f0,_0x1ff310)[_0x502510(0x27c)](this,_0x10199c),_0x89e49b){let _0x17d5ea=localStorage[_0x502510(0x187)](_0x502510(0x207)),_0x5f1cee=localStorage[_0x502510(0x187)](_0x502510(0x1d0));if(_0x17d5ea&&_0x5f1cee){let _0x2302bb=parseInt(_0x5f1cee,0xa);yield _0x583f85['recordEvent']({'eventName':_0x502510(0x107),'eventProperties':[{'eventProperty':_0x502510(0x27a),'value':localStorage['getItem'](_0x502510(0x207))},{'eventProperty':_0x502510(0x29c),'value':Number[_0x502510(0x15d)](_0x2302bb)?new Date(_0x2302bb)['toISOString']():new Date()[_0x502510(0x1de)]()}]});}localStorage['removeItem'](_0x502510(0x1d0)),localStorage[_0x502510(0x1e2)](_0x502510(0x207)),localStorage[_0x502510(0x237)](_0x502510(0x1d0),''+new Date()['getTime']()),yield _0xc58c85(this,_0x77b6f0,_0x21d716)[_0x502510(0x27c)](this),this[_0x502510(0x152)]();}(!_0x10199c||_0x89e49b||_0xc58c85(this,_0x77b6f0,_0x3f8173)[_0x502510(0x27c)](this))&&(_0xc58c85(this,_0x77b6f0,_0x552f9d)['call'](this)&&_0xc58c85(this,_0x77b6f0,_0x19d315)[_0x502510(0x27c)](this),_0xc58c85(this,_0x77b6f0,_0x2ad152)[_0x502510(0x27c)](this)&&(yield this[_0x502510(0x192)]()),(_0xc58c85(this,_0x77b6f0,_0x1ff310)[_0x502510(0x27c)](this)||_0xc58c85(this,_0x77b6f0,_0x47ed55)['call'](this))&&(yield _0xc58c85(this,_0x77b6f0,_0x240343)[_0x502510(0x27c)](this)),yield _0xc58c85(this,_0x77b6f0,_0x21d716)[_0x502510(0x27c)](this),(_0xc58c85(this,_0x77b6f0,_0x1ff310)[_0x502510(0x27c)](this)||_0xc58c85(this,_0x77b6f0,_0x426234)[_0x502510(0x27c)](this))&&(yield _0xc58c85(this,_0x77b6f0,_0x21c66d)[_0x502510(0x27c)](this))),_0x4a58c2(_0x502510(0x1c1),!0x1),_0x437f37(_0x502510(0xe5),!0x1);}));});}[_0xcc07c3(0x152)](){const _0x424686=_0xcc07c3;localStorage['removeItem'](_0x424686(0x264)),localStorage['removeItem'](_0x424686(0x1d5)),localStorage[_0x424686(0x1e2)](_0x424686(0x273)),localStorage[_0x424686(0x1e2)](_0x424686(0x186));}['checkIfIdentityExists'](_0x504e5a){const _0x3c0396=_0xcc07c3;if(_0x19e5ee[_0x3c0396(0x261)]()==='39')return!0x1;let _0x116b10=this['getCookie'](_0x3c0396(0x16e));if(_0x116b10&&_0x116b10!==_0x3c0396(0x1d4)){let _0x526f87=this['decodeData'](_0x116b10);return _0x504e5a&&_0x504e5a===_0x526f87?!0x0:_0x526f87;}return!0x1;}[_0xcc07c3(0x18a)](_0x4b4966){const _0x5ceaa5=_0xcc07c3;let _0x57f141=this[_0x5ceaa5(0x13e)](_0x4b4966);this[_0x5ceaa5(0x155)](_0x5ceaa5(0x16e),_0x57f141,0x16d);}[_0xcc07c3(0x130)](){const _0x1f1b94=_0xcc07c3;document[_0x1f1b94(0x1ae)]='mergn_identity=;\x20expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20UTC;\x20path=/;';}[_0xcc07c3(0x13e)](_0x5385e2){const _0x22d663=_0xcc07c3;let _0x3b3c41=new TextEncoder()['encode'](_0x5385e2),_0x5229b5='';for(let _0x656c2b=0x0;_0x656c2b<_0x3b3c41['length'];_0x656c2b++)_0x5229b5+=String[_0x22d663(0x182)](_0x3b3c41[_0x656c2b]);return btoa(_0x5229b5);}[_0xcc07c3(0xd3)](_0x2749b2){const _0x5a4be5=_0xcc07c3;let _0x5948b1=atob(_0x2749b2),_0x2a0ed6=new Uint8Array(_0x5948b1[_0x5a4be5(0x14c)]);for(let _0x1769d8=0x0;_0x1769d8<_0x5948b1[_0x5a4be5(0x14c)];_0x1769d8++)_0x2a0ed6[_0x1769d8]=_0x5948b1[_0x5a4be5(0x17c)](_0x1769d8);return new TextDecoder()[_0x5a4be5(0x15b)](_0x2a0ed6);}[_0xcc07c3(0xfc)](_0x3bca0b){const _0x29cd12=_0xcc07c3;var _0x5da491;let _0x496f16=(';\x20'+document[_0x29cd12(0x1ae)])[_0x29cd12(0xef)](';\x20'+_0x3bca0b+'=');return _0x496f16[_0x29cd12(0x14c)]===0x2&&((_0x5da491=_0x496f16[_0x29cd12(0x22a)]())==null?void 0x0:_0x5da491[_0x29cd12(0xef)](';')[_0x29cd12(0x1f7)]())||null;}[_0xcc07c3(0x155)](_0x553376,_0x74170d,_0x5bb527){const _0x286632=_0xcc07c3;let _0x5b730c=new Date();_0x5b730c[_0x286632(0x125)](_0x5b730c[_0x286632(0xfb)]()+_0x5bb527*0x18*0x3c*0x3c*0x3e8);let _0x4c078d=_0x286632(0x18d)+_0x5b730c[_0x286632(0x238)]();document[_0x286632(0x1ae)]=_0x553376+'='+_0x74170d+';\x20'+_0x4c078d+';\x20path=/;\x20secure;\x20SameSite=Strict';}[_0xcc07c3(0x192)](_0x228327){return _0x3170e3(this,null,function*(){const _0x11e459=_0x5d62;_0x1465bd(0x1,_0x11e459(0x17d)),_0x1465bd(0x1,_0x228327);let _0x4b127f=this[_0x11e459(0x1af)](_0x228327);if(_0x1465bd(0x1,'local\x20identity:\x20'+_0x4b127f),typeof _0x4b127f==_0x11e459(0x173)&&_0x4b127f)return;let _0x1c35a1=localStorage[_0x11e459(0x187)]('uniqueIdentity');(!_0x1c35a1||_0x1c35a1===_0x11e459(0x1d4))&&(_0x1c35a1=_0xc58c85(this,_0x77b6f0,_0x19d315)[_0x11e459(0x27c)](this));let _0x543e70={'deviceId':_0x1c35a1,'os':this['getPlatform']()};if(_0x228327)_0x543e70[_0x11e459(0x191)]=_0x228327;else{if(typeof _0x4b127f=='string')_0x543e70[_0x11e459(0x191)]=_0x4b127f;else{if(!_0x228327&&localStorage[_0x11e459(0x187)]('customer'))return;}}try{_0x1465bd(0x1,_0x11e459(0x249)),_0x1465bd(0x1,_0x543e70),this[_0x11e459(0x18a)](_0x543e70['identity']);let _0x89385f=yield _0xc58c85(this,_0x77b6f0,_0x4fa22a)[_0x11e459(0x27c)](this,_0x543e70);if(_0x89385f!==void 0x0){localStorage[_0x11e459(0x237)](_0x11e459(0x298),_0x89385f);try{_0xd45efb['pushMessageToSW']({'customer':_0x89385f});}catch(_0x436b26){}}}catch(_0x2b27bc){throw this[_0x11e459(0x130)](),new Error(_0x11e459(0x132));}});}[_0xcc07c3(0xb7)](){return _0x2fd518;}};_0x4314cb=new WeakMap(),_0x1404b5=new WeakMap(),_0x19c269=new WeakMap(),_0xc21923=new WeakMap(),_0x1efbb0=new WeakMap(),_0x1edcf3=new WeakMap(),_0x5918ea=new WeakMap(),_0x183178=new WeakMap(),_0x77b6f0=new WeakSet(),_0x33a7ae=function(_0x56ca45){const _0x49a198=_0xcc07c3;_0x19e5ee[_0x49a198(0x120)](_0x56ca45),this['setPlatform'](_0xc58c85(this,_0x77b6f0,_0x4f61ab)['call'](this)),this['setOSVersion'](_0xc58c85(this,_0x77b6f0,_0x4ea315)['call'](this)),this[_0x49a198(0x140)](navigator[_0x49a198(0x1ed)]);},_0x4f61ab=function(){const _0x362036=_0xcc07c3;var _0x39b41f;let _0x14d14a=navigator[_0x362036(0x1ed)][_0x362036(0x183)]();return/googlebot|bingbot|yandexbot|duckduckbot|slurp|twitterbot|linkedinbot|facebot|pinterest|vkshare|applebot|baiduspider|adsbot-google|msnbot|yahoobot|sogou|facebookexternalhit/i['test'](_0x14d14a)?_0x362036(0x267):/wv|wkwebview|instagram|facebook|fbav|fban|twitter|snapchat|pinterest|linkedin|tiktok/i[_0x362036(0x2b5)](_0x14d14a)?_0x362036(0x22f):/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i[_0x362036(0x2b5)](_0x14d14a)?(_0x362036(0x19e)in window&&typeof((_0x39b41f=window==null?void 0x0:window[_0x362036(0x19e)])==null?void 0x0:_0x39b41f['permission'])!='undefined',_0x362036(0x22f)):/windows|macintosh|linux|x11/i[_0x362036(0x2b5)](_0x14d14a)?_0x362036(0x26f):'Unknown';},_0x4ea315=function(){const _0x4dec43=_0xcc07c3;let _0x35ae1f=navigator[_0x4dec43(0x1ed)],_0x15d6be;return _0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x268))>-0x1?_0x15d6be=_0x4dec43(0x268):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0xe8))>-0x1||_0x35ae1f[_0x4dec43(0x20f)]('FBAV')>-0x1||_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0xdc))>-0x1?_0x15d6be=_0x4dec43(0xe8):_0x35ae1f['indexOf'](_0x4dec43(0x1da))>-0x1?_0x15d6be=_0x4dec43(0x1da):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x283))>-0x1?_0x15d6be='Snapchat':_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x287))>-0x1?_0x15d6be=_0x4dec43(0x287):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x122))>-0x1?_0x15d6be=_0x4dec43(0x122):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x156))>-0x1&&_0x35ae1f['indexOf'](_0x4dec43(0x163))===-0x1?_0x15d6be=_0x4dec43(0x27e):_0x35ae1f['indexOf'](_0x4dec43(0x23c))>-0x1&&_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x156))===-0x1?_0x15d6be=_0x4dec43(0x23c):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x146))>-0x1?_0x15d6be=_0x4dec43(0x21c):_0x35ae1f['indexOf'](_0x4dec43(0x163))>-0x1?_0x15d6be='Microsoft\x20Edge':_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x1c4))>-0x1||_0x35ae1f[_0x4dec43(0x20f)]('Trident')>-0x1?_0x15d6be=_0x4dec43(0x294):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x246))>-0x1||_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x269))>-0x1?_0x15d6be=_0x4dec43(0x246):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x1db))>-0x1?_0x15d6be=_0x4dec43(0x1db):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x290))>-0x1?_0x15d6be='Brave':_0x35ae1f[_0x4dec43(0x20f)]('SamsungBrowser')>-0x1?_0x15d6be='Samsung\x20Internet':_0x35ae1f[_0x4dec43(0x20f)]('UCBrowser')>-0x1?_0x15d6be=_0x4dec43(0x244):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x1f5))>-0x1?_0x15d6be='QQ\x20Browser':_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x222))>-0x1?_0x15d6be=_0x4dec43(0x180):_0x35ae1f[_0x4dec43(0x20f)](_0x4dec43(0x15e))>-0x1?_0x15d6be=_0x4dec43(0x101):_0x15d6be=_0x4dec43(0x2a2),_0x15d6be;},_0x1ff310=function(_0xf2a474){const _0x57881f=_0xcc07c3;let _0x3f264d;return _0xf2a474||(_0x3f264d=localStorage['getItem'](_0x57881f(0x1d0))),_0xf2a474||_0x3f264d?new Date()[_0x57881f(0xfb)]()-parseInt(_0xf2a474||_0x3f264d||'',0xa)>0x124f80:!0x0;},_0x47ed55=function(){const _0x5f4cfd=_0xcc07c3;return!localStorage[_0x5f4cfd(0x187)]('events');},_0x426234=function(){const _0x582378=_0xcc07c3;return!localStorage[_0x582378(0x187)](_0x582378(0x273));},_0x2ad152=function(){const _0x3fde3b=_0xcc07c3;return!localStorage[_0x3fde3b(0x187)](_0x3fde3b(0x298));},_0x552f9d=function(){const _0x5bf9ee=_0xcc07c3;return!localStorage['getItem'](_0x5bf9ee(0x28f));},_0x1ee126=function(){const _0x33345c=_0xcc07c3;return!localStorage[_0x33345c(0x187)](_0x33345c(0x207));},_0x3f8173=function(){const _0x1d3791=_0xcc07c3;return _0xc58c85(this,_0x77b6f0,_0x47ed55)['call'](this)||_0xc58c85(this,_0x77b6f0,_0x426234)[_0x1d3791(0x27c)](this)||_0xc58c85(this,_0x77b6f0,_0x2ad152)[_0x1d3791(0x27c)](this)||_0xc58c85(this,_0x77b6f0,_0x552f9d)['call'](this)||_0xc58c85(this,_0x77b6f0,_0x1ee126)[_0x1d3791(0x27c)](this);},_0x19d315=function(){const _0x385af3=_0xcc07c3;let _0x1e9a46=localStorage[_0x385af3(0x187)](_0x385af3(0x28f));return _0x1e9a46||(_0x1e9a46=crypto[_0x385af3(0x227)](),localStorage['setItem'](_0x385af3(0x28f),_0x1e9a46)),_0x1e9a46;},_0x21d716=function(){return _0x3170e3(this,null,function*(){const _0x5a1d33=_0x5d62;yield _0xcdf47c(_0x5a1d33(0x184),()=>_0x3170e3(this,null,function*(){const _0x37364f=_0x5a1d33;let _0x5a20fe=localStorage[_0x37364f(0x187)](_0x37364f(0x207));if(!_0x5a20fe){_0x5a20fe=crypto[_0x37364f(0x227)](),localStorage['setItem']('session',_0x5a20fe);let _0x118439=localStorage[_0x37364f(0x187)](_0x37364f(0x1d0)),_0x5dcb10=_0x118439?parseInt(_0x118439,0xa):'';yield _0x583f85[_0x37364f(0x231)]({'eventName':_0x37364f(0x1b0),'eventProperties':[{'eventProperty':_0x37364f(0x27a),'value':localStorage[_0x37364f(0x187)](_0x37364f(0x207))},{'eventProperty':'SESSION_CREATED','value':_0x5dcb10?new Date(_0x5dcb10)[_0x37364f(0x1de)]():new Date()['toISOString']()}]});}}),_0x32decc=>{const _0x54e42d=_0x5a1d33;_0x19e5ee['getBrandId']()==='67'&&_0x32decc[_0x54e42d(0x15f)]!==_0x54e42d(0x210)&&_0x32decc[_0x54e42d(0x15f)];});});},_0x4fa22a=function(_0x41b2bc){return _0x3170e3(this,null,function*(){const _0x2aff60=_0x5d62;try{return(yield _0x19e5ee['retryPost'](''+_0x12caa3+_0x3a36dc,_0x41b2bc))[_0x2aff60(0x168)];}catch(_0x58d0f1){throw new Error(_0x2aff60(0x194));}});},_0x240343=function(){return _0x3170e3(this,null,function*(){yield _0x583f85['storeEventsAndPropertiesInLocalStorage']();});},_0x21c66d=function(){return _0x3170e3(this,null,function*(){yield _0x4d3d10['storeAttributeInLocalStorage']();});},_0x390a09=function(_0x3b0c52){return _0x3170e3(this,null,function*(){const _0xb4e1e2=_0x5d62;yield _0xcdf47c(_0xb4e1e2(0x270),()=>_0x3170e3(this,null,function*(){const _0x3b1a8f=_0xb4e1e2;var _0x358c79;try{let _0x13023f=parseInt(localStorage[_0x3b1a8f(0x187)](_0x3b1a8f(0x11e))||'0',0xa)||0x0;if(!_0x13023f||_0x13023f&&new Date()[_0x3b1a8f(0xfb)]()>_0x13023f){let _0x356be9=yield _0x19e5ee[_0x3b1a8f(0x293)](_0x3b1a8f(0x138));if(!(_0x356be9!=null&&_0x356be9['success']))throw new Error(JSON[_0x3b1a8f(0x1c5)](_0x356be9));localStorage[_0x3b1a8f(0x237)](_0x3b1a8f(0x11e),(new Date()[_0x3b1a8f(0xfb)]()+0x493e0)[_0x3b1a8f(0xf2)]());}_0x8f206f[_0x3b1a8f(0x12a)]=!0x1,_0x8f206f[_0x3b1a8f(0x1dc)]=!0x0;}catch(_0x44ff70){if(_0x19e5ee[_0x3b1a8f(0x261)]()==='67'&&!((_0x358c79=_0x44ff70==null?void 0x0:_0x44ff70[_0x3b1a8f(0x15f)])!=null&&_0x358c79[_0x3b1a8f(0x22b)](_0x3b1a8f(0x293)))&&(_0x44ff70==null?void 0x0:_0x44ff70[_0x3b1a8f(0x15f)])!==_0x3b1a8f(0x1b7)&&_0x44ff70[_0x3b1a8f(0x15f)]!==_0x3b1a8f(0x210)&&_0x44ff70[_0x3b1a8f(0x15f)],_0x3b0c52&&_0x3b0c52>=0x1){yield new Promise(_0x2bead8=>setTimeout(_0x2bead8,0x5dc)),yield _0xc58c85(this,_0x77b6f0,_0x390a09)[_0x3b1a8f(0x27c)](this,_0x3b0c52-0x1);return;}throw _0x8f206f[_0x3b1a8f(0x12a)]=!0x0,new Error('Error\x20verifying\x20API\x20key');}}));});},_0x5615d1=function(_0x32fc5a){return _0x3170e3(this,null,function*(){const _0x140042=_0x5d62;var _0x3d0741;_0x1465bd(0x1,_0x140042(0x13c));let _0x26b00c=(_0x3d0741=window==null?void 0x0:window['location'])==null?void 0x0:_0x3d0741['href'];if(this[_0x140042(0x20e)](_0x26b00c),_0x32fc5a){_0x26b00c['includes'](_0x140042(0x13b))&&(yield _0x583f85[_0x140042(0x231)]({'eventName':_0x140042(0x1eb)}));return;}_0x583f85[_0x140042(0x1b2)]({'eventName':_0x140042(0x15a)});let _0x206de4=[];new URLSearchParams(new URL(window[_0x140042(0x131)][_0x140042(0x1e3)])[_0x140042(0x19a)])[_0x140042(0x1ea)]((_0x13db5e,_0x585c42)=>_0x3170e3(this,null,function*(){const _0x1b1104=_0x140042;_0x3c5c4c[_0x1b1104(0xca)](_0x585c42)&&_0x206de4['push']({'eventProperty':_0x585c42,'value':_0x13db5e});})),yield _0x583f85[_0x140042(0x231)]({'eventName':'Viewed\x20Webpage','eventProperties':[{'eventProperty':_0x140042(0x139),'value':window[_0x140042(0x131)]['pathname']},..._0x206de4]});});},_0x46213a=function(_0x56eeac){return _0x3170e3(this,null,function*(){const _0x107a26=_0x5d62;var _0x29862a;_0x1465bd(0x1,_0x107a26(0x1d3));let _0x390df1=(_0x29862a=window==null?void 0x0:window[_0x107a26(0x131)])==null?void 0x0:_0x29862a['href'];(this[_0x107a26(0x17a)]()===null||this[_0x107a26(0x17a)]()===void 0x0||_0x390df1!==this[_0x107a26(0x17a)]())&&(yield _0xc58c85(this,_0x77b6f0,_0x5615d1)[_0x107a26(0x27c)](this,_0x56eeac));});},_0x261b58=function(_0x3d5301){return _0x3170e3(this,null,function*(){const _0x275a06=_0x5d62;var _0x28887f,_0x49ab9b;let _0x2ba31c=(_0x28887f=window==null?void 0x0:window[_0x275a06(0x131)])==null?void 0x0:_0x28887f[_0x275a06(0x1e3)];_0x583f85[_0x275a06(0x1b2)]({'eventName':_0x275a06(0x2b0),'eventProperties':[{'eventProperty':'message','value':(_0x2ba31c!==this[_0x275a06(0x17a)]())+':'+_0x2ba31c+':'+this[_0x275a06(0x17a)]()}]});try{yield _0xc58c85(this,_0x77b6f0,_0x5615d1)[_0x275a06(0x27c)](this,_0x3d5301);}catch(_0x50823a){let _0x488bef=_0x50823a&&_0x50823a[_0x275a06(0x15f)]?(_0x49ab9b=_0x50823a==null?void 0x0:_0x50823a[_0x275a06(0x15f)])==null?void 0x0:_0x49ab9b[_0x275a06(0x262)](0x0,0x64):_0x275a06(0x1d4);yield _0x583f85[_0x275a06(0x1b2)]({'eventName':_0x275a06(0x128),'eventProperties':[{'eventProperty':'message','value':''+_0x488bef}]});}});},_0x160867(_0x316b97,_0x4314cb);var _0x1707e9=_0x316b97,_0x24409b=_0x1707e9[_0xcc07c3(0xab)](),_0x5a028b,_0x21c8ea,_0x55a1bf,_0x3b7ded,_0x1b8fde,_0x11aa11,_0x33d0b8,_0x3123df,_0xc9e5d3,_0x363e98,_0x4f007e,_0x2e3bab=class _0x4f137d{constructor(){_0x160867(this,_0x55a1bf),_0x160867(this,_0x21c8ea,!0x1);}static[_0xcc07c3(0xab)](){const _0x3cd955=_0xcc07c3;var _0x5990ae;return _0x42a524(_0x4f137d,_0x5a028b)||(_0x4f0bc(_0x4f137d,_0x5a028b,new _0x4f137d()),_0xc58c85(_0x5990ae=_0x42a524(_0x4f137d,_0x5a028b),_0x55a1bf,_0x3b7ded)[_0x3cd955(0x27c)](_0x5990ae)),_0x42a524(_0x4f137d,_0x5a028b);}['recordAttributeFromQueue'](){return _0x3170e3(this,null,function*(){const _0x6b58c2=_0x5d62;yield _0xcdf47c(_0x6b58c2(0x11f),()=>_0x3170e3(this,null,function*(){const _0x8fb18a=_0x6b58c2;let _0x22633e=JSON[_0x8fb18a(0xaa)](localStorage['getItem'](_0x8fb18a(0x121))||'[]');if(Array[_0x8fb18a(0x10b)](_0x22633e))for(let _0x4c0367 of _0x22633e){if(_0x1465bd(0x1,_0x8fb18a(0x23a)),_0x1465bd(0x1,_0x4c0367),yield this[_0x8fb18a(0x221)](_0x4c0367[_0x8fb18a(0x26b)],_0x4c0367[_0x8fb18a(0x188)])){_0x1465bd(0x1,_0x8fb18a(0x2ae)+_0x4c0367[_0x8fb18a(0x26b)]+_0x8fb18a(0x236)+_0x4c0367[_0x8fb18a(0x188)]),_0xc58c85(this,_0x55a1bf,_0x33d0b8)['call'](this,_0x4c0367[_0x8fb18a(0x26b)],_0x4c0367[_0x8fb18a(0x188)]);return;}yield _0xc58c85(this,_0x55a1bf,_0x3123df)['call'](this,{'attributeName':_0x4c0367[_0x8fb18a(0x26b)],'attributeValue':_0x4c0367['attributeValue']});}}));});}[_0xcc07c3(0x193)](_0xea45f6,_0x3ac648,_0x165f08){return _0x3170e3(this,null,function*(){const _0x56dfac=_0x5d62;if(yield this[_0x56dfac(0x221)](_0xea45f6,_0x3ac648)){_0x1465bd(0x1,'Attribute\x20'+_0xea45f6+_0x56dfac(0x236)+_0x3ac648),_0xc58c85(this,_0x55a1bf,_0x33d0b8)[_0x56dfac(0x27c)](this,_0xea45f6,_0x3ac648);return;}_0xc58c85(this,_0x55a1bf,_0x11aa11)['call'](this,_0xea45f6),_0xc58c85(this,_0x55a1bf,_0x1b8fde)[_0x56dfac(0x27c)](this,_0xea45f6,_0x3ac648),_0x8f206f[_0x56dfac(0x1dc)]&&!_0x8f206f[_0x56dfac(0x10f)]&&(yield _0xc58c85(this,_0x55a1bf,_0x3123df)[_0x56dfac(0x27c)](this,{'attributeName':_0xea45f6,'attributeProperties':_0x165f08,'attributeValue':_0x3ac648}));});}[_0xcc07c3(0xb4)](){return _0x3170e3(this,null,function*(){const _0x3eb178=_0x5d62;if(!localStorage[_0x3eb178(0x187)](_0x3eb178(0x273))&&!_0x42a524(this,_0x21c8ea)){_0x4f0bc(this,_0x21c8ea,!0x0);try{let _0x54bcd8=(yield this['fetchAttributeData']())['data'];_0x54bcd8&&localStorage[_0x3eb178(0x237)]('attributes',JSON['stringify'](_0x54bcd8));}catch(_0xb18802){throw new Error(_0x3eb178(0xc6));}finally{_0x4f0bc(this,_0x21c8ea,!0x1);}}});}[_0xcc07c3(0x18c)](){return _0x3170e3(this,null,function*(){const _0x2d0e67=_0x5d62;try{return yield _0x19e5ee[_0x2d0e67(0x293)](''+_0x41a640);}catch(_0x534ab2){throw new Error('Error\x20fetching\x20attribute\x20data');}});}['storeAttribute'](_0x1c577b,_0x5120b3){return _0x3170e3(this,null,function*(){const _0x49e591=_0x5d62;let _0x48840e=_0x24409b[_0x49e591(0xfc)](_0x49e591(0x2a8)),_0x4cc43e;if(!_0x48840e)_0x4cc43e={};else{let _0x2593fe=_0x24409b[_0x49e591(0xd3)](_0x48840e);_0x4cc43e=JSON[_0x49e591(0xaa)](_0x2593fe);}_0x4cc43e[_0x1c577b]=_0x5120b3;let _0x2710ab=_0x24409b['encodeData'](JSON[_0x49e591(0x1c5)](_0x4cc43e));_0x24409b[_0x49e591(0x155)](_0x49e591(0x2a8),_0x2710ab,0x16d);});}[_0xcc07c3(0x1aa)](_0x2ee7e5){return _0x3170e3(this,null,function*(){const _0x42029f=_0x5d62;let _0x53eaf9=_0x24409b[_0x42029f(0xfc)](_0x42029f(0x2a8)),_0x45fbed;if(!_0x53eaf9)_0x45fbed={};else{let _0x5b3d35=_0x24409b[_0x42029f(0xd3)](_0x53eaf9);_0x45fbed=JSON[_0x42029f(0xaa)](_0x5b3d35);}delete _0x45fbed[_0x2ee7e5];let _0x3e25cf=_0x24409b[_0x42029f(0x13e)](JSON[_0x42029f(0x1c5)](_0x45fbed));_0x24409b[_0x42029f(0x155)](_0x42029f(0x2a8),_0x3e25cf,0x16d);});}[_0xcc07c3(0x221)](_0xed0ef6,_0x3012d2){return _0x3170e3(this,null,function*(){const _0xf6a335=_0x5d62;let _0x5aeb37=_0x24409b[_0xf6a335(0xfc)](_0xf6a335(0x2a8));if(!_0x5aeb37)return!0x1;let _0x46a47b=_0x24409b[_0xf6a335(0xd3)](_0x5aeb37),_0x4a93ba=JSON['parse'](_0x46a47b);return Object[_0xf6a335(0xf7)]['hasOwnProperty'][_0xf6a335(0x27c)](_0x4a93ba,_0xed0ef6)?_0x3012d2!==void 0x0?_0x4a93ba[_0xed0ef6]===_0x3012d2:!0x0:!0x1;});}};_0x5a028b=new WeakMap(),_0x21c8ea=new WeakMap(),_0x55a1bf=new WeakSet(),_0x3b7ded=function(){return _0x3170e3(this,null,function*(){});},_0x1b8fde=function(_0x106fa5,_0x129f8b){const _0x47286b=_0xcc07c3;let _0x17c101=JSON['parse'](localStorage[_0x47286b(0x187)](_0x47286b(0x121))||'[]');_0x17c101[_0x47286b(0x248)]({'attributeName':_0x106fa5,'attributeValue':_0x129f8b}),localStorage['setItem'](_0x47286b(0x121),JSON[_0x47286b(0x1c5)](_0x17c101));},_0x11aa11=function(_0x25731c){return _0x3170e3(this,null,function*(){const _0xda7edc=_0x5d62;let _0x30f8cc=JSON[_0xda7edc(0xaa)](localStorage[_0xda7edc(0x187)](_0xda7edc(0x121))||'[]');for(let _0x2d829e of _0x30f8cc)_0x2d829e['attributeName']===_0x25731c&&(_0x30f8cc[_0xda7edc(0x1a4)](_0x30f8cc[_0xda7edc(0x20f)](_0x2d829e),0x1),localStorage[_0xda7edc(0x237)]('preInitializedAttributes',JSON[_0xda7edc(0x1c5)](_0x30f8cc)));});},_0x33d0b8=function(_0x2327ed,_0x447db7){return _0x3170e3(this,null,function*(){const _0x58e3e3=_0x5d62;let _0x2fb07e=JSON[_0x58e3e3(0xaa)](localStorage[_0x58e3e3(0x187)]('preInitializedAttributes')||'[]');for(let _0x4c77e6 of _0x2fb07e)JSON['stringify'](_0x4c77e6)===JSON[_0x58e3e3(0x1c5)]({'attributeName':_0x2327ed,'attributeValue':_0x447db7})&&(_0x2fb07e['splice'](_0x2fb07e[_0x58e3e3(0x20f)](_0x4c77e6),0x1),localStorage[_0x58e3e3(0x237)](_0x58e3e3(0x121),JSON[_0x58e3e3(0x1c5)](_0x2fb07e)));});},_0x3123df=function(_0xd42e35){return _0x3170e3(this,arguments,function*({attributeName:_0x5b2762,attributeProperties:_0x421790,attributeValue:_0x3275d1}){yield _0xcdf47c('#\x20recordAttribute',()=>_0x3170e3(this,null,function*(){const _0x128f6a=_0x5d62;if(_0x1465bd(0x1,'Recording\x20attribute'),_0x437f37(_0x128f6a(0x1a3),!0x0),_0x4a58c2(_0x128f6a(0x127),!0x0),_0x1465bd(0x1,_0x128f6a(0x178)),_0x1465bd(0x1,_0x128f6a(0xc3)+_0x5b2762+'\x20|\x20Attribute\x20Value:\x20'+_0x3275d1),!_0x3275d1||_0x3275d1===''){_0x1465bd(0x2,'Attribute\x20value\x20is\x20required');return;}yield _0x24409b[_0x128f6a(0xd1)](),yield _0xc58c85(this,_0x55a1bf,_0x363e98)[_0x128f6a(0x27c)](this);let _0x2c9bc8=JSON[_0x128f6a(0xaa)](localStorage[_0x128f6a(0x187)](_0x128f6a(0x273))||'{}'),_0x290e02=_0x421790?_0xc58c85(this,_0x55a1bf,_0xc9e5d3)[_0x128f6a(0x27c)](this,_0x2c9bc8,_0x5b2762,_0x421790):_0xc58c85(this,_0x55a1bf,_0xc9e5d3)[_0x128f6a(0x27c)](this,_0x2c9bc8,_0x5b2762);if(typeof _0x290e02==_0x128f6a(0x21e)){_0x1465bd(0x2,_0x290e02);return;}_0x2c9bc8[_0x5b2762]['should_set_identity']&&(yield _0x24409b['setIdentity'](typeof _0x3275d1==_0x128f6a(0x21e)?_0x3275d1:JSON['stringify'](_0x3275d1))),_0x24409b[_0x128f6a(0xf3)]();let {id:_0x20c379}=_0x2c9bc8[_0x5b2762],_0xa21778={'attributeId':_0x20c379,'attributeProperties':_0x290e02,'customerId':localStorage[_0x128f6a(0x187)](_0x128f6a(0x298))||'','deviceId':localStorage[_0x128f6a(0x187)](_0x128f6a(0x28f))||'','sdkVersion':_0x24409b[_0x128f6a(0xb7)](),'should_set_identity':_0x2c9bc8[_0x5b2762][_0x128f6a(0x1fd)],'value':_0x3275d1};yield _0xc58c85(this,_0x55a1bf,_0x4f007e)[_0x128f6a(0x27c)](this,_0xa21778,_0x5b2762,_0x3275d1),_0xc58c85(this,_0x55a1bf,_0x33d0b8)[_0x128f6a(0x27c)](this,_0x5b2762,_0x3275d1),_0x4a58c2(_0x128f6a(0x127),!0x1),_0x437f37('Recording\x20attribute',!0x1);}));});},_0xc9e5d3=function(_0x3ac116,_0x1e695c,_0xb8599d){const _0x41d80a=_0xcc07c3;if(!Object[_0x41d80a(0xf7)][_0x41d80a(0x17b)]['call'](_0x3ac116,_0x1e695c))return _0x41d80a(0x1b9)+_0x1e695c+'\x20is\x20not\x20valid.';if(!_0xb8599d)return[];let _0x5589a7=_0x3ac116[_0x1e695c];if(!(_0x5589a7!=null&&_0x5589a7['attributeProperty']))return'Attribute\x20'+_0x1e695c+_0x41d80a(0x1fa);let _0x1f0142=_0xb8599d[_0x41d80a(0x243)](({attributeProperty:_0x1688a4})=>!Object[_0x41d80a(0xf7)]['hasOwnProperty']['call'](_0x5589a7[_0x41d80a(0x26e)],_0x1688a4))[_0x41d80a(0x141)](({attributeProperty:_0x4824aa})=>_0x4824aa);return _0x1f0142[_0x41d80a(0x14c)]>0x0?_0x41d80a(0x1b9)+_0x1e695c+'\x20has\x20invalid\x20attributeProperties:\x20'+_0x1f0142[_0x41d80a(0x160)](',\x20')+'.':_0xb8599d[_0x41d80a(0x141)](({attributeProperty:_0x2ac309,value:_0x26e239})=>({'attributePropertyId':_0x5589a7[_0x41d80a(0x26e)][_0x2ac309]['id'],'value':_0x26e239}));},_0x363e98=function(){return _0x3170e3(this,null,function*(){const _0x530981=_0x5d62;localStorage[_0x530981(0x187)](_0x530981(0x273))||(yield this[_0x530981(0xb4)]());});},_0x4f007e=function(_0x559747,_0x595125,_0x3e0a94){return _0x3170e3(this,null,function*(){const _0x32bd89=_0x5d62;try{return yield this[_0x32bd89(0x1ca)](_0x595125,_0x3e0a94),yield _0x19e5ee[_0x32bd89(0x28b)](''+_0x41a640+_0x13e3a9,_0x559747);}catch(_0x1fa47b){throw yield this[_0x32bd89(0x1aa)](_0x595125),new Error(_0x32bd89(0x27b));}});},_0x160867(_0x2e3bab,_0x5a028b);var _0x2aa614=_0x2e3bab,_0x4d3d10=_0x2aa614[_0xcc07c3(0xab)](),_0x184bde,_0x2d4868=class _0x1df27b{constructor(){}static[_0xcc07c3(0xab)](){return _0x42a524(_0x1df27b,_0x184bde)||_0x4f0bc(_0x1df27b,_0x184bde,new _0x1df27b()),_0x42a524(_0x1df27b,_0x184bde);}['init'](_0x387c45,_0x45bac3){setTimeout(()=>{const _0x2cf683=_0x5d62;_0xcdf47c(_0x2cf683(0xfd),()=>_0x3170e3(this,null,function*(){const _0x48558a=_0x2cf683;yield _0xcdf47c('log\x20level\x20check',()=>_0x3170e3(this,null,function*(){const _0x3496c7=_0x5d62;_0x1465bd(0x1,_0x3496c7(0xb3));let _0x36e5c1=localStorage[_0x3496c7(0x187)](_0x3496c7(0x276));_0x36e5c1&&(_0x8f206f[_0x3496c7(0x1c2)]=parseInt(_0x36e5c1,0xa));})),_0x1465bd(0x1,_0x48558a(0x1f3)),yield _0x24409b[_0x48558a(0xfd)](_0x387c45,_0x45bac3),_0x583f85['recordDebugEvents']({'eventName':_0x48558a(0x216)}),_0x1465bd(0x1,_0x48558a(0x2a9)),window[_0x48558a(0xd4)](_0x48558a(0x259),()=>_0x3170e3(this,null,function*(){const _0x369019=_0x48558a;_0x8f206f['offline']=!0x1;let _0x56d79a=JSON['parse'](localStorage[_0x369019(0x187)]('offlineEvents')||'[]');Array['isArray'](_0x56d79a)&&(yield _0x583f85[_0x369019(0x272)]({'customerId':localStorage[_0x369019(0x187)](_0x369019(0x298))||'','deviceId':localStorage[_0x369019(0x187)](_0x369019(0x28f))||'','events':_0x56d79a}),localStorage[_0x369019(0x1e2)](_0x369019(0x186))),_0x24409b[_0x369019(0xd1)](),_0x24409b['updateSessionCreated']();})),window['addEventListener'](_0x48558a(0x165),()=>{_0x8f206f['offline']=!0x0;}),window['addEventListener'](_0x48558a(0xb1),()=>{const _0x7cfea2=_0x48558a;_0x6e17be[_0x7cfea2(0x19f)](),_0xd45efb[_0x7cfea2(0x1cd)]();});}));});}[_0xcc07c3(0x29d)](_0x399d86,_0x4baf4d){const _0x178391=_0xcc07c3;let _0x27817b=localStorage[_0x178391(0x187)](_0x178391(0x276));if(_0x27817b){_0x8f206f['debugLevel']=parseInt(_0x27817b,0xa);try{_0xd45efb['pushMessageToSW']({'debugLevel':_0x399d86});}catch(_0xd79b71){}return;}if(!(_0x399d86 in _0x273d38)){console[_0x178391(0x2b4)](_0x178391(0x108));return;}_0x8f206f[_0x178391(0x278)]=_0x4baf4d||{},_0x8f206f[_0x178391(0x1c2)]=_0x399d86;try{_0xd45efb[_0x178391(0x14f)]({'debugLevel':_0x399d86});}catch(_0x4f3c8f){}}[_0xcc07c3(0x193)](_0x5c04e7,_0x13d486){return _0x3170e3(this,null,function*(){const _0x1929e2=_0x5d62;return _0x1465bd(0x1,'attributeName'),_0x1465bd(0x1,_0x5c04e7),_0x1465bd(0x1,_0x1929e2(0x188)),_0x1465bd(0x1,_0x13d486),new Promise((_0x150974,_0x163779)=>{setTimeout(()=>_0x3170e3(this,null,function*(){try{yield _0xcdf47c('recordAttribute',()=>_0x3170e3(this,null,function*(){const _0x4ce0df=_0x5d62;let _0x110a44='';return Array[_0x4ce0df(0x10b)](_0x13d486)?_0x110a44=JSON[_0x4ce0df(0x1c5)](_0x13d486):typeof _0x13d486==_0x4ce0df(0x11d)?_0x110a44=''+_0x13d486:_0x110a44=_0x13d486,_0x1465bd(0x1,_0x4ce0df(0x1a3)),_0x1465bd(0x1,'Attribute\x20Name:\x20'+_0x5c04e7+_0x4ce0df(0x158)+_0x110a44),new Promise((_0x36c1b9,_0x237c0a)=>{setTimeout(()=>_0x3170e3(this,null,function*(){try{yield _0x4d3d10['recordAttribute'](_0x5c04e7,_0x110a44),_0x36c1b9();}catch(_0x2abb20){_0x237c0a(_0x2abb20);}}));});})),_0x150974();}catch(_0xb35cca){_0x163779(_0xb35cca);}}));});});}[_0xcc07c3(0x172)](_0x1680cc){return _0x3170e3(this,null,function*(){return new Promise((_0x185179,_0x548f15)=>{setTimeout(()=>_0x3170e3(this,null,function*(){const _0x301210=_0x5d62;try{yield _0xcdf47c('login',()=>_0x3170e3(this,null,function*(){const _0x5173c9=_0x5d62;_0x1465bd(0x1,_0x5173c9(0x118)),_0x1465bd(0x1,_0x5173c9(0x297)+_0x1680cc),_0x8f206f[_0x5173c9(0x10f)]=!0x0,yield _0x24409b[_0x5173c9(0x192)](_0x1680cc);})),_0x185179();}catch(_0x2d2232){_0x548f15(_0x2d2232);}finally{_0x8f206f[_0x301210(0x10f)]=!0x1,yield _0x583f85[_0x301210(0x296)](),yield _0x4d3d10[_0x301210(0x198)]();}}));});});}[_0xcc07c3(0x2ab)](){setTimeout(()=>{const _0x2e5a71=_0x5d62;_0xcdf47c(_0x2e5a71(0x2ab),()=>_0x3170e3(this,null,function*(){const _0x38138c=_0x2e5a71;_0x1465bd(0x1,_0x38138c(0x10e)),_0x24409b[_0x38138c(0x152)]();}));});}['recordEvent'](_0x596054,_0x4e4a9b){return _0x3170e3(this,null,function*(){return new Promise((_0x295b59,_0x2e361a)=>{setTimeout(()=>_0x3170e3(this,null,function*(){const _0x26c1ab=_0x5d62;try{yield _0xcdf47c(_0x26c1ab(0x286),()=>_0x3170e3(this,null,function*(){const _0xf6c0e6=_0x26c1ab;if(_0x1465bd(0x1,_0xf6c0e6(0x199)),_0x1465bd(0x1,_0xf6c0e6(0x18f)+{'eventName':_0x596054,'eventProperties':_0x4e4a9b}),!_0x596054||typeof _0x596054!='string'){_0x1465bd(0x2,'Event\x20name\x20is\x20required\x20and\x20must\x20be\x20a\x20string');return;}return new Promise((_0x36f868,_0x3259b2)=>{setTimeout(()=>_0x3170e3(this,null,function*(){const _0x9f2ad6=_0x5d62;try{yield _0x583f85[_0x9f2ad6(0x231)]({'eventName':_0x596054,'eventProperties':_0x4e4a9b}),_0x36f868();}catch(_0x4f864e){_0x3259b2(_0x4f864e);}}));});})),_0x295b59();}catch(_0xcdd5b9){_0x2e361a(_0xcdd5b9);}}));});});}[_0xcc07c3(0xb7)](){return _0x2fd518;}};_0x184bde=new WeakMap(),_0x160867(_0x2d4868,_0x184bde);var _0x43a856=_0x2d4868,_0x1eb3ab=_0x43a856[_0xcc07c3(0xab)]();typeof window!=_0xcc07c3(0x1d4)&&(window[_0xcc07c3(0x215)]=_0x1eb3ab);var _0x28acef=_0x1eb3ab;})());