@letscooee/web-sdk 14.2.9 → 14.2.11
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.
- package/dist/{debugger.component-BofckKF3-BngPdP8n.js → debugger.component-DkFQPwbY-Ca57QVSr.js} +3 -3
- package/dist/{esm-B-weSuzB-2SRzcKVK.js → esm-B-weSuzB-C1ESCmj7.js} +1 -1
- package/dist/main.min.js +22 -22
- package/dist/renderer-K8_bGRGI-Sx5TMGxW.js +5 -0
- package/dist/{share-dialog.component-BazTl0PE-DhP9p-qq.js → share-dialog.component-CT9nWkmx-BQ1IogWg.js} +2 -2
- package/dist/{video-detail-dialog.component-DfGNupvC-DBIfo6i2.js → video-detail-dialog.component-Dwh3VEEL-ChvnLiXu.js} +5 -5
- package/dist/{widgets-CFanMqfB-Cxg_d_xd.js → widgets-DuMHGa1V-Ds8DXiiQ.js} +10 -10
- package/package.json +2 -2
- package/dist/renderer-Ha-eE6RF-C2JR_hwH.js +0 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letscooee/web-sdk",
|
|
3
3
|
"description": "Engage uniquely and boost conversions with AI-powered customer journeys driven by real-time intent",
|
|
4
|
-
"version": "14.2.
|
|
4
|
+
"version": "14.2.11",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "bash .dev/setup.sh",
|
|
7
7
|
"lint": "ng lint",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@letscooee/url-builder": "^0.0.5",
|
|
82
82
|
"@preact/signals": "^1.2.3",
|
|
83
83
|
"@sentry/browser": "9.42.0",
|
|
84
|
-
"@tailwindcss/oxide-linux-x64-gnu": "^4.
|
|
84
|
+
"@tailwindcss/oxide-linux-x64-gnu": "^4.3.0",
|
|
85
85
|
"@tailwindcss/postcss": "^4.0.8",
|
|
86
86
|
"bson": "^4.6.5",
|
|
87
87
|
"canvas-confetti": "^1.9.3",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { G, e as H, f as Ne, M, x, k as ke, m as mt, g as Be, j as jr, Y, X, I as Ir, O as Ot, L as Lt, U as Ue, h as kt, C as Ce, z as ze, R as Rt, A as At, i as A$1, S as Se, r, n as s, o as x$1, p as On, q as Sn, u as Nn, Q as Qt, v as S, y as dt, D as me, E as j, F as Xt, J as he, K as ai, P as Sn$1, N as Nn$1, $ as $e } from './main.min.js';
|
|
2
|
-
|
|
3
|
-
var A=class{loadedFonts=[];async loadAllFonts(e){e.elems?.forEach(t=>{t instanceof me&&this.loadFamily(t.typography?.fam);});}async loadFamily(e){if(!e?.fonts||this.loadedFonts.indexOf(e.name)>-1)return;let t=[];e.fonts.forEach(n=>{if(n.url){let c=new FontFace(`cooee`+e.name,n.getURL(),n.getFontDescriptor());t.push(c.load());}}),this.loadedFonts.push(e.name),(await Promise.all(t)).forEach(n=>{document.fonts.add(n);});}};var R=class{static updateIdentity(e){if(!this.isInstalled())return;let t={};e.email&&(t.email=e.email),e.mobile&&(t.phone_number=e.mobile),Y.verbose(`Sending email/mobile to Klaviyo`),window.klaviyo.push([`identify`,t]);}static isInstalled(){return window.klaviyo&&typeof window.klaviyo==`object`}};var D=class{action;triggerContext;constructor(e,t){this.action=e,this.triggerContext=t;}async execute(){let e=this.containsCTA()?`CE Trigger Clicked`:`CE Trigger Closed`;switch(this.action.at!==he.SUBMIT_FORM&&await this.closeTriggerAndSendEvent(e),this.action.at){case he.ACCEPT_POPUP:break;case he.GO_TO_URL:this.gotoURLAction();break;case he.SHARE:this.shareAction();break;case he.SUBMIT_FORM:await this.collectFormData();break;case he.OPEN_CART:x.get().open();break;case he.INITIATE_CHECKOUT:ai();break;default:Y.error(`Received an invalid ClickActionType: `,this.action.at);return}}gotoURLAction(){if(this.action.gu?.u){let e=this.action.gu.u;Sn$1(e)||(e=`//${e}`),window.open(e,`_self`);}}async closeTriggerAndSendEvent(e,t){this.triggerContext.closeInApp(e,t),await this.dispatchEvent();}shareAction(){if(!this.action.share)return;if(!navigator.share){Y.warn(`Navigator.share is not compatible with this browser`);return}navigator.share({text:this.action.share.text,title:`Share`}).then(t=>console.log(t)).catch(t=>console.error(t));}containsCTA(){return !!(this.action.at&&this.action.at!==he.REJECT_POPUP)}isEmpty(e){return e?Object.keys(e).length===0:true}async collectFormData(){let e={};for(let t of this.triggerContext.inputs){if(!t.isValid)return;let n=document.getElementById(t.id).value;t.type===51?e.email=n:t.type===52&&(e.mobile=n);}await this.closeTriggerAndSendEvent(`CE Form Submitted`,{form:e}),this.action.applyDiscount&&Nn$1(`Coupon applied on cart`),R.updateIdentity(e);}async dispatchEvent(){let e=this.triggerContext.triggerData,t={clickAction:this.action,items:this.triggerContext.selectedEmbeddedItems??e.embeddedItems??e.items,collections:e.collections,triggerData:e};await new $e().process(t);let r={action:this.containsCTA()?`CLICKED`:`CLOSED`};document.dispatchEvent(new CustomEvent(`letscooee:outbound:popup-activities`,{detail:r}));}};var a=class{renderer=P.get();parentHTMLEl;inappElement;inappHTMLEl;triggerContext;scalingFactor;constructor(e,t,r){this.parentHTMLEl=e,this.inappElement=t,this.triggerContext=r,this.scalingFactor=this.renderer.getScalingFactor();}getHTMLElement(){return this.inappHTMLEl}insertElement(){this.parentHTMLEl.appendChild(this.inappHTMLEl);}processCommonBlocks(){this.processWidthAndHeight(),this.processPositionBlock(),this.processTransformBlock(),this.processTransparency(),this.processShadow(),this.registerAction();let e=s(r(r(r(r({},this.getDisplayStyles()),this.getSpaceStyles()),this.getBorderStyles()),this.getBackgroundStyles()),{boxSizing:`border-box`,outline:`none`});S(this.inappHTMLEl,e);}getDisplayStyles(){return {display:`block`}}processWidthAndHeight(){this.inappElement.w&&H(this.inappHTMLEl,`width`,x$1(this.inappElement.w,this.scalingFactor)),this.inappElement.h&&H(this.inappHTMLEl,`height`,x$1(this.inappElement.h,this.scalingFactor));}processPositionBlock(){let e={position:`absolute`,left:x$1(this.inappElement.x,this.scalingFactor),top:x$1(this.inappElement.y,this.scalingFactor)};S(this.inappHTMLEl,e);}getBorderStyles(){return Nn(this.inappElement.br,this.scalingFactor)}getSpaceStyles(){return On(this.inappElement.spc,this.scalingFactor)}processTransparency(){let e=this.inappElement.alpha;if(!isNaN(e)){let t=(e/100).toFixed(2);H(this.inappHTMLEl,`opacity`,t);}}processShadow(){let e=this.inappElement.shd;e?H(this.inappHTMLEl,`box-shadow`,e.getStyle(this.scalingFactor)):H(this.inappHTMLEl,`box-shadow`,`unset`);}processTransformBlock(){let e=new j(this.inappElement.trf);e&&e.rotate&&H(this.inappHTMLEl,`transform`,`rotate(${e.rotate}deg)`);}registerAction(){let e=this.inappElement.clc;!e||Object.keys(e).length===0||(this.inappHTMLEl.addEventListener(`click`,t=>{t.stopPropagation(),new D(e,this.triggerContext).execute();}),H(this.inappHTMLEl,`cursor`,`pointer`));}getBackgroundStyles(){return Sn(this.inappElement.bg)}};var l=class extends a{constructor(e,t,r){super(e,t,r);}processCommonBlocks(){super.processCommonBlocks(),this.processFontBlock(),this.processAlignment();}processFontBlock(){let e={},t=this.inappElement.typography;return t&&(e.fontSize=x$1(t.fs,this.scalingFactor),e.fontFamily=`cooee`+t.fam?.name,e.lineHeight=`${t.lh}`,e.letterSpacing=t.letterSpacing),Qt(this.inappElement.color,`color`,e),S(this.inappHTMLEl,e),e}processPart(e,t){let r=[];t.u&&r.push(`underline`),t.st&&r.push(`line-through`),r.length||r.push(`normal`),H(e,`font-weight`,t.b?`bold`:`normal`),H(e,`font-style`,t.i?`italic`:`normal`),H(e,`text-decoration`,r.join(` `)),H(e,`color`,t.c??`inherit`),H(e,`font-family`,`inherit`);}processAlignment(){let e=this.inappElement.typography.ta,t=e?Xt[e]?.toLowerCase():this.inappElement.typography.alignment;t||(t=`start`),H(this.inappHTMLEl,`text-align`,t);}};var f=class extends l{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.inappElement.parts?.forEach(e=>{let t=document.createElement(`span`);t.innerHTML=e.txt?.toString()?.replace(/\n/g,`<br />`),this.processPart(t,e),this.inappHTMLEl.appendChild(t);}),this.processCommonBlocks();}};var v=class extends a{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.processCommonBlocks();}};var T=class extends a{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`img`),this.insertElement();}render(){this.inappHTMLEl.setAttribute(`src`,this.inappElement.src),H(this.inappHTMLEl,`max-width`,`none`),H(this.inappHTMLEl,`max-height`,`none`),H(this.inappHTMLEl,`margin`,`0 auto`),this.processCommonBlocks();}};var C=class o extends a{constructor(t,r,n){super(t,r,n);this.parent=t;this.inappHTMLEl=document.createElement(`div`);}static MAX_Z_INDEX=`2147483647`;render(){return this.parent||this.renderer.removeInApp(),this.insertElement(),this.processCommonBlocks(),this.inappHTMLEl.classList.add(`cooee-wrapper`),this.inappHTMLEl.classList.add(this.triggerContext.rootClassName),H(this.inappHTMLEl,`z-index`,o.MAX_Z_INDEX),this.inappHTMLEl}getBackgroundStyles(){return this.inappElement.cover?super.getBackgroundStyles():{}}processWidthAndHeight(){let t=this.inappElement.cont;if(this.inappElement.cover)this.renderer.isParentNotBody()?(H(this.inappHTMLEl,`width`,`100%`),H(this.inappHTMLEl,`height`,`100%`)):(H(this.inappHTMLEl,`width`,`100vw`),H(this.inappHTMLEl,`height`,`100vh`)),H(this.inappHTMLEl,`top`,`0`),H(this.inappHTMLEl,`left`,`0`);else {let r=this.inappElement.spc,n=Se(t.w,this.scalingFactor)+r.getHorizontal(),c=Se(t.h,this.scalingFactor)+r.getVertical();H(this.inappHTMLEl,`width`,n+`px`),H(this.inappHTMLEl,`height`,c+`px`);}}getSpaceStyles(){return {padding:this.inappElement.spc.getPaddingCSS()}}getDisplayStyles(){return r(r({display:`flex`},this.inappElement.getStylesForWrapper()),this.inappElement.getFlexStylesForContainer())}processPositionBlock(){this.renderer.isParentNotBody()?H(this.inappHTMLEl,`position`,`absolute`):H(this.inappHTMLEl,`position`,`fixed`);}getBorderStyles(){return {}}processTransparency(){}processTransformBlock(){}processShadow(){}};var de=`cooee-container`,k=class extends a{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){return this.processCommonBlocks(),H(this.inappHTMLEl,`position`,`relative`),H(this.inappHTMLEl,`overflow`,`hidden`),this.inappHTMLEl.classList.add(de),this}};var B=class o extends l{static DAYS=`Days`;static HOURS=`Hours`;static MINUTES=`Minutes`;static SECONDS=`Seconds`;elements;spans=[];constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`div`),this.insertElement();}render(){this.addTimerChildren(),this.processAndStartTimer(),this.processCommonBlocks();let e=s(r(r(r({flex:`1 1 0`},Sn(this.inappElement.bg)),Nn(this.inappElement.br,this.scalingFactor)),On(this.inappElement.spc,this.scalingFactor)),{marginLeft:x$1(this.inappElement.gap,this.scalingFactor),marginRight:x$1(this.inappElement.gap,this.scalingFactor)});this.addStylesToTimer(e);}getBackgroundStyles(){return {}}processFontBlock(){let e=super.processFontBlock();return Qt(this.inappElement.color,`color`,e),this.addStylesToTimer(e),e}getSpaceStyles(){return {}}getBorderStyles(){return {}}getDisplayStyles(){return {display:`flex`,flexWrap:`nowrap`,justifyContent:`center`}}addStylesToTimer(e){this.elements.forEach(t=>S(t,e));}addTimerChildren(){let e=this.inappElement.show;this.elements=[],e.day&&this.elements.push(this.getChild(o.DAYS)),e.hour&&this.elements.push(this.getChild(o.HOURS)),e.minute&&this.elements.push(this.getChild(o.MINUTES)),e.second&&this.elements.push(this.getChild(o.SECONDS)),this.elements.forEach(t=>this.inappHTMLEl.appendChild(t));}getChild(e){let t=document.createElement(`div`),r=document.createElement(`span`),n=document.createElement(`span`);return n.innerText=e,r.innerText=`00`,r.id=`lc-${e}`,H(n,`font-size`,`0.5em`),H(n,`text-align`,`center`),H(n,`font-family`,`inherit`),H(r,`text-align`,`center`),H(r,`font-family`,`inherit`),this.inappElement.lblPos===`start`?(t.appendChild(n),t.appendChild(r)):(t.appendChild(r),t.appendChild(n)),H(t,`display`,`flex`),H(t,`flex-direction`,this.inappElement.horizontal?``:`column`),H(t,`justify-content`,`center`),H(t,`align-items`,`center`),H(t,`gap`,`5px`),this.spans.push(r),t}processAndStartTimer(){let e=this.inappElement.timer.start(this.inappElement.timerType,t=>{this.spans.forEach(r=>{r.id===`lc-${o.DAYS}`?r.innerText=String(t.days).padStart(2,`0`):r.id===`lc-${o.HOURS}`?r.innerText=String(t.hours).padStart(2,`0`):r.id===`lc-${o.MINUTES}`?r.innerText=String(t.minutes).padStart(2,`0`):r.id===`lc-${o.SECONDS}`&&(r.innerText=String(t.seconds).padStart(2,`0`));});});this.triggerContext.intervals.push(e);}};var F=class extends l{constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`select`),this.insertElement();}render(){H(this.inappHTMLEl,`background`,`#ffffff00`),H(this.inappHTMLEl,`outline`,`none`),this.processCommonBlocks(),this.addListener(this.inappHTMLEl),this.addOptions();}addListener(e){this.triggerContext.selectedEmbeddedItems?.length||this.updateItems(this.triggerContext.triggerData.items[0].vars[0]),e.addEventListener(`click`,t=>{t.stopPropagation();}),e.addEventListener(`change`,()=>{let t=new dt(JSON.parse(e.value));this.updateItems(t);});}updateItems(e){let t=this.triggerContext.triggerData.items[0];this.triggerContext.selectedEmbeddedItems=[t.toEmbed(e)];let r=this.parentHTMLEl.querySelector(`#coo-13`);if(!r)return;let n=e.imgs[0]??t.imgs?.at(0);n?.url&&r.setAttribute(`src`,n.url);}addOptions(){let e=this.triggerContext.triggerData.items,t=this.inappHTMLEl;if(!e?.length){t.add(this.createOption(this.inappElement.placeholderText));return}let r=this.triggerContext.selectedEmbeddedItems?.at(0);e[0].vars.forEach(n=>{t.add(this.createOption(n.name??`Default`,n,n.mID===r?.vID));});}createOption(e,t,r){let n=document.createElement(`option`);return n.text=e,n.value=JSON.stringify(t),r&&(n.selected=true),t||(n.disabled=true),n}};var u=class extends l{borderColor=``;constructor(e,t,r){super(e,t,r),this.inappHTMLEl=document.createElement(`input`),this.insertElement();}render(){let e=this.setInputType();this.inappHTMLEl.setAttribute(`placeholder`,this.inappElement.placeholderText),H(this.inappHTMLEl,`background`,`#ffffff00`),H(this.inappHTMLEl,`outline`,`none`),this.inappHTMLEl.addEventListener(`click`,t=>{t.stopPropagation();}),this.processCommonBlocks(),this.addListener(this.inappHTMLEl,e),this.triggerContext.addInputField(e,this.inappElement.t);}};var O=class o extends u{static EMAIL_REGEX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;constructor(e,t,r){super(e,t,r);}setInputType(){let e=`coo-${this.inappElement.t}`;return this.inappHTMLEl.setAttribute(`type`,`email`),this.inappHTMLEl.setAttribute(`id`,e),e}addListener(e,t){e.addEventListener(`keydown`,r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),e.value.match(o.EMAIL_REGEX)?(H(this.inappHTMLEl,`border-color`,this.borderColor),this.triggerContext.updateValidation(t,true)):(H(this.inappHTMLEl,`border-color`,`red`),this.triggerContext.updateValidation(t,false)),r.stopPropagation();});}};var N=class o extends u{static MOBILE_REGEX=/^\d+$/;constructor(e,t,r){super(e,t,r);}setInputType(){let e=`coo-${this.inappElement.t}`;return this.inappHTMLEl.setAttribute(`type`,`tel`),this.inappHTMLEl.setAttribute(`id`,e),e}addListener(e,t){e.addEventListener(`keydown`,r=>{this.borderColor||(this.borderColor=this.inappHTMLEl.style.borderColor),e.value.match(o.MOBILE_REGEX)?(H(this.inappHTMLEl,`border-color`,this.borderColor),this.triggerContext.updateValidation(t,true)):(H(this.inappHTMLEl,`border-color`,`red`),this.triggerContext.updateValidation(t,false)),r.stopPropagation();});}};var _=class extends T{constructor(e,t,r){super(e,t,r);}render(){super.render(),this.inappHTMLEl.setAttribute(`id`,`coo-${this.inappElement.type}`);}};var P=class o{static DOCUMENT_STANDARD_MODE=`CSS1Compat`;static ACTIVE_TRIGGER_DATA;static _instance;parent;rootContainer;containerHTMLElement;ian;scalingFactor=1;triggerContext;resizeListener;cartDrawerToggleSubscription;constructor(e){this.resizeListener=()=>this.screenResized(),this.setParentContainer(e);}static get(){return o._instance}render(e){this.renderEngagement(new G(e));}getScalingFactor(){return this.scalingFactor}calculateScalingFactor(e){let t=e.max,r=e.cont.w,n=e.cont.h,c=e.spc,m=this.getWidth(),h=this.getHeight();t&&(m=m?Math.min(m,t):t,h=h?Math.min(h,t):t),h&&(m-=c.getHorizontal(),h-=c.getVertical(),m/h<r/n?this.scalingFactor=m/r:this.scalingFactor=h/n,this.scalingFactor=Math.min(this.scalingFactor,1));}setParentContainer(e){this.parent=e||document.body,this.isParentNotBody()&&H(this.parent,`position`,`relative`);}isParentNotBody(){return this.parent&&this.parent!==document.body}getWidth(){return this.isParentNotBody()?this.parent.clientWidth:document.compatMode===o.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parent.clientHeight:document.compatMode===o.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}async renderEngagement(e){this.triggerContext=new Ne(new Date,e),this.triggerContext.onClose(t=>{this.closeInApp(t);}),this.ian=e.ian,(M()||e.previewType===`mobile`)&&this.ian.overrideForMobileView(),await this.preloadImages(e),e.shouldDelay()?window.setTimeout(()=>{this.withCartDrawerClosed();},e.getDelaySeconds()):this.withCartDrawerClosed();}withCartDrawerClosed(){if(!x.get().isOpen()){this.startRenderingOnce();return}this.cartDrawerToggleSubscription=window.CooeeSDK.cartDrawerToggle$.subscribe(({open:t})=>{!t&&this.startRenderingOnce();});}startRenderingOnce(){if(!this.shouldSkipCampaign()){o.ACTIVE_TRIGGER_DATA=this.triggerContext.triggerData,o._instance=this;try{this.startRendering();}catch(e){ke(e,`render-popup`,{triggerContext:this.triggerContext});return}this.sendTriggerDisplayed(),M()||window.addEventListener(`resize`,this.resizeListener),this.cartDrawerToggleSubscription?.unsubscribe();}}shouldSkipCampaign(){let e=this.triggerContext.triggerData;if(!e.previewType&&o.ACTIVE_TRIGGER_DATA){let r={triggerShown:new mt(o.ACTIVE_TRIGGER_DATA??{})};return this.skipTrigger(e,r),true}if(Be().isGoKwikPopupOpen)return this.skipTrigger(e,{reason:`GoKwik popup is open`}),true;let t=jr.find(r=>!!document.querySelector(r.identifier));return t?(this.skipTrigger(e,{reason:`${t.gateway} modal is open`}),true):false}startRendering(){this.calculateScalingFactor(this.ian),this.rootContainer=new C(this.parent,this.ian,this.triggerContext).render();try{this.renderContainer(this.triggerContext);}catch(e){throw Y.error(e),e}}sendTriggerDisplayed(){let e={};this.triggerContext.triggerData.items?.length&&(e.promotedMIDs=this.triggerContext.triggerData.items?.map(n=>n.mID));X(new Ir(`CE Trigger Displayed`,e,this.triggerContext.triggerData));document.dispatchEvent(new CustomEvent(`letscooee:outbound:popup-activities`,{detail:{action:`DISPLAYED`}}));}sendTriggerClosed(e){let t=e.eventName;delete e.eventName;let r=new Ir(t,e,this.triggerContext.triggerData);r.name===`CE Trigger Clicked`&&(r.items=this.triggerContext.selectedEmbeddedItems??this.triggerContext.triggerData.items?.map(n=>n.toEmbed())),X(r);}addEnterAnimation(e){this.containerHTMLElement.animate(e.getEnterAnimation(),{duration:500});}renderElement(e,t,r){t instanceof Ot?new O(e,t,r).render():t instanceof Lt?new N(e,t,r).render():t instanceof Ue?new f(e,t,r).render():t instanceof kt?new _(e,t,r).render():t instanceof Ce?new T(e,t,r).render():t instanceof ze?new v(e,t,r).render():t instanceof Rt?new B(e,t,r).render():t instanceof At?new F(e,t,r).render():Y.error(`Unsupported element type- `+t.type);}renderContainer(e){let t=this.ian?.cont;t&&(this.containerHTMLElement=new k(this.rootContainer,t,e).render().getHTMLElement(),new A().loadAllFonts(this.ian),this.ian.elems?.forEach(async r=>{await this.renderElement(this.containerHTMLElement,r,e);}),this.addEnterAnimation(this.ian.anim));}closeInApp(e){let t=this.ian.anim.getExitAnimation();this.sendTriggerClosed(e),o.ACTIVE_TRIGGER_DATA=void 0;let r=this.containerHTMLElement.animate(t,{duration:500,easing:`ease-in-out`});r.onfinish=()=>{this.removeInApp(),window.removeEventListener(`resize`,this.resizeListener);};}screenResized(){this.removeInApp(),this.startRendering();}removeInApp(){let e=document.querySelector(`.${this.triggerContext.rootClassName}`);e&&e.parentElement.removeChild(e);}skipTrigger(e,t){X(new Ir(`CE Campaign Rejected`,t,e));}async preloadImages(e){let t=e.ian;if(!t)return;let r=[];t.elems.forEach(n=>{let c=n.bg?.img?.src;if(c&&r.push(c),n.t===1){let m=n.src;if(!m)return;r.push(m);}}),t.bg?.img?.src&&r.push(t.bg.img.src),t.cont.bg?.img?.src&&r.push(t.cont.bg.img.src),await Promise.all(r.map(n=>A$1(n)));}};
|
|
4
|
-
|
|
5
|
-
export { P as FreeformRenderer };
|