@flowengage/react-chatbot 8.0.118 → 8.0.119
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.
|
@@ -255,7 +255,7 @@ Error generating stack: `+e.message+`
|
|
|
255
255
|
50% { transform: translate(-4px,-4px) scale(0.82); }
|
|
256
256
|
100% { transform: translate(-4px,-4px) scale(1); }
|
|
257
257
|
}
|
|
258
|
-
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var Ch=null,wh=null;function Th(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-toast`,document.body.appendChild(Ch)),Ch}function Eh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;Sh(),wh&&=(clearTimeout(wh),null);let i=Th();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(wh=setTimeout(()=>Dh(),r))}function Dh(e=0){Ch&&(e>0?wh=setTimeout(()=>{Ch&&Ch.classList.remove(`${Q}-show`)},e):Ch&&Ch.classList.remove(`${Q}-show`))}var Oh=null;function kh(){return(!Oh||!Oh.isConnected)&&(Oh=document.createElement(`div`),Oh.id=`${Q}-panel`,document.body.appendChild(Oh)),Oh}var Ah=12,jh=`right`,Mh=!1;function Nh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.querySelector(`.flowengage-widget-root`)?.getBoundingClientRect();if(!
|
|
258
|
+
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var Ch=null,wh=null;function Th(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-toast`,document.body.appendChild(Ch)),Ch}function Eh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;Sh(),wh&&=(clearTimeout(wh),null);let i=Th();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(wh=setTimeout(()=>Dh(),r))}function Dh(e=0){Ch&&(e>0?wh=setTimeout(()=>{Ch&&Ch.classList.remove(`${Q}-show`)},e):Ch&&Ch.classList.remove(`${Q}-show`))}var Oh=null;function kh(){return(!Oh||!Oh.isConnected)&&(Oh=document.createElement(`div`),Oh.id=`${Q}-panel`,document.body.appendChild(Oh)),Oh}var Ah=12,jh=`right`,Mh=!1;function Nh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.getElementById(`flowengage-root`),r=(n?.shadowRoot?.querySelector(`.flowengage-widget-root`)||document.querySelector(`.flowengage-widget-root`)||n)?.getBoundingClientRect();if(!r||!r.width){t===`left`?e.style.left=`calc(1.5rem + 120px)`:e.style.right=`calc(1.5rem + 120px)`;return}t===`left`?e.style.left=`${Math.round(r.right+Ah)}px`:e.style.right=`${Math.round(window.innerWidth-r.left+Ah)}px`,e.style.bottom=`${Math.max(12,Math.round(window.innerHeight-r.bottom))}px`}function Ph(e,t){let n=Number(e);if(!Number.isFinite(n))return null;let r=n.toLocaleString(void 0,{minimumFractionDigits:n%1==0?0:2,maximumFractionDigits:2});return t?`${t} ${r}`:r}function Fh(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`})}function Ih(e,{title:t=`Products`,side:n=`right`,productUrl:r=null}={}){if(typeof document>`u`)return;let i=Array.isArray(e)?e.filter(Boolean):[];if(!i.length)return Lh();Sh();let a=kh();jh=n===`left`?`left`:`right`,Nh(a,jh),Mh||(Mh=!0,window.addEventListener(`resize`,()=>{Oh?.classList.contains(`${Q}-show`)&&Nh(Oh,jh)})),a.innerHTML=``;let o=document.createElement(`div`);o.id=`${Q}-panel-head`;let s=document.createElement(`div`);s.id=`${Q}-panel-title`,s.textContent=t;let c=document.createElement(`span`);c.id=`${Q}-panel-count`,c.textContent=String(i.length);let l=document.createElement(`button`);l.id=`${Q}-panel-close`,l.type=`button`,l.setAttribute(`aria-label`,`Close product panel`),l.textContent=`×`,l.addEventListener(`click`,()=>Lh()),o.append(s,c,l);let u=document.createElement(`div`);u.id=`${Q}-panel-list`;for(let e of i){let t=typeof r==`function`?r(e):null,n=document.createElement(t?`a`:`div`);if(n.className=`${Q}-card`,t&&(n.href=t,n.rel=`noopener`),e.image){let t=document.createElement(`img`);t.className=`${Q}-card-thumb`,t.src=e.image,t.alt=``,t.loading=`lazy`,t.addEventListener(`error`,()=>{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,t.replaceWith(e)}),n.appendChild(t)}else{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,n.appendChild(e)}let i=document.createElement(`div`);i.className=`${Q}-card-body`;let a=document.createElement(`div`);a.className=`${Q}-card-title`,a.textContent=e.title||`Item`,i.appendChild(a);let o=[];e.quantity>1&&o.push(`Qty ${e.quantity}`);let s=Fh(e.orderedAt);if(s&&o.push(s),e.fulfillmentStatus&&o.push(e.fulfillmentStatus),o.length||e.productType){let t=document.createElement(`div`);if(t.className=`${Q}-card-meta`,e.productType){let n=document.createElement(`span`);n.className=`${Q}-chip`,n.textContent=e.productType,t.appendChild(n)}t.appendChild(document.createTextNode(o.join(` · `))),i.appendChild(t)}let c=Ph(e.price,e.currency);if(c){let e=document.createElement(`div`);e.className=`${Q}-card-price`,e.textContent=c,i.appendChild(e)}n.appendChild(i),u.appendChild(n)}a.append(o,u),a.classList.remove(`${Q}-show`),a.offsetHeight,a.classList.add(`${Q}-show`)}function Lh(){Oh&&Oh.classList.remove(`${Q}-show`)}var Rh=null,zh=[];function Bh(){return(!Rh||!Rh.isConnected)&&(Rh=document.createElement(`div`),Rh.id=`${Q}-bar`,document.body.appendChild(Rh)),Rh}function Vh(){if(typeof document>`u`)return;Sh(),zh.forEach(clearTimeout),zh=[];let e=Bh();e.style.transition=`none`,e.style.width=`0%`,e.classList.add(`${Q}-bar-active`),e.offsetHeight,e.style.transition=`width 0.35s ease, opacity 0.25s ease`;let t=[[80,`width 0.6s ease`],[92,`width 1.2s ease`]],n=50;for(let[e,r]of t){let t=n,i=e,a=r;zh.push(setTimeout(()=>{Rh&&(Rh.style.transition=a,Rh.style.width=`${i}%`)},t)),n+=800}}function Hh(){Rh&&(zh.forEach(clearTimeout),zh=[],Rh.style.transition=`width 0.2s ease`,Rh.style.width=`100%`,zh.push(setTimeout(()=>{Rh&&(Rh.style.transition=`opacity 0.35s ease`,Rh.style.opacity=`0`,zh.push(setTimeout(()=>{Rh&&(Rh.style.width=`0%`,Rh.classList.remove(`${Q}-bar-active`))},380)))},220)))}var Uh=`<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
259
259
|
<filter id="${Q}-csh">
|
|
260
260
|
<feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
|
|
261
261
|
</filter>
|
package/dist/flowengage-embed.js
CHANGED
|
@@ -255,7 +255,7 @@ Error generating stack: `+e.message+`
|
|
|
255
255
|
50% { transform: translate(-4px,-4px) scale(0.82); }
|
|
256
256
|
100% { transform: translate(-4px,-4px) scale(1); }
|
|
257
257
|
}
|
|
258
|
-
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var Ch=null,wh=null;function Th(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-toast`,document.body.appendChild(Ch)),Ch}function Eh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;Sh(),wh&&=(clearTimeout(wh),null);let i=Th();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(wh=setTimeout(()=>Dh(),r))}function Dh(e=0){Ch&&(e>0?wh=setTimeout(()=>{Ch&&Ch.classList.remove(`${Q}-show`)},e):Ch&&Ch.classList.remove(`${Q}-show`))}var Oh=null;function kh(){return(!Oh||!Oh.isConnected)&&(Oh=document.createElement(`div`),Oh.id=`${Q}-panel`,document.body.appendChild(Oh)),Oh}var Ah=12,jh=`right`,Mh=!1;function Nh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.querySelector(`.flowengage-widget-root`)?.getBoundingClientRect();if(!
|
|
258
|
+
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var Ch=null,wh=null;function Th(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-toast`,document.body.appendChild(Ch)),Ch}function Eh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;Sh(),wh&&=(clearTimeout(wh),null);let i=Th();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(wh=setTimeout(()=>Dh(),r))}function Dh(e=0){Ch&&(e>0?wh=setTimeout(()=>{Ch&&Ch.classList.remove(`${Q}-show`)},e):Ch&&Ch.classList.remove(`${Q}-show`))}var Oh=null;function kh(){return(!Oh||!Oh.isConnected)&&(Oh=document.createElement(`div`),Oh.id=`${Q}-panel`,document.body.appendChild(Oh)),Oh}var Ah=12,jh=`right`,Mh=!1;function Nh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.getElementById(`flowengage-root`),r=(n?.shadowRoot?.querySelector(`.flowengage-widget-root`)||document.querySelector(`.flowengage-widget-root`)||n)?.getBoundingClientRect();if(!r||!r.width){t===`left`?e.style.left=`calc(1.5rem + 120px)`:e.style.right=`calc(1.5rem + 120px)`;return}t===`left`?e.style.left=`${Math.round(r.right+Ah)}px`:e.style.right=`${Math.round(window.innerWidth-r.left+Ah)}px`,e.style.bottom=`${Math.max(12,Math.round(window.innerHeight-r.bottom))}px`}function Ph(e,t){let n=Number(e);if(!Number.isFinite(n))return null;let r=n.toLocaleString(void 0,{minimumFractionDigits:n%1==0?0:2,maximumFractionDigits:2});return t?`${t} ${r}`:r}function Fh(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`})}function Ih(e,{title:t=`Products`,side:n=`right`,productUrl:r=null}={}){if(typeof document>`u`)return;let i=Array.isArray(e)?e.filter(Boolean):[];if(!i.length)return Lh();Sh();let a=kh();jh=n===`left`?`left`:`right`,Nh(a,jh),Mh||(Mh=!0,window.addEventListener(`resize`,()=>{Oh?.classList.contains(`${Q}-show`)&&Nh(Oh,jh)})),a.innerHTML=``;let o=document.createElement(`div`);o.id=`${Q}-panel-head`;let s=document.createElement(`div`);s.id=`${Q}-panel-title`,s.textContent=t;let c=document.createElement(`span`);c.id=`${Q}-panel-count`,c.textContent=String(i.length);let l=document.createElement(`button`);l.id=`${Q}-panel-close`,l.type=`button`,l.setAttribute(`aria-label`,`Close product panel`),l.textContent=`×`,l.addEventListener(`click`,()=>Lh()),o.append(s,c,l);let u=document.createElement(`div`);u.id=`${Q}-panel-list`;for(let e of i){let t=typeof r==`function`?r(e):null,n=document.createElement(t?`a`:`div`);if(n.className=`${Q}-card`,t&&(n.href=t,n.rel=`noopener`),e.image){let t=document.createElement(`img`);t.className=`${Q}-card-thumb`,t.src=e.image,t.alt=``,t.loading=`lazy`,t.addEventListener(`error`,()=>{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,t.replaceWith(e)}),n.appendChild(t)}else{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,n.appendChild(e)}let i=document.createElement(`div`);i.className=`${Q}-card-body`;let a=document.createElement(`div`);a.className=`${Q}-card-title`,a.textContent=e.title||`Item`,i.appendChild(a);let o=[];e.quantity>1&&o.push(`Qty ${e.quantity}`);let s=Fh(e.orderedAt);if(s&&o.push(s),e.fulfillmentStatus&&o.push(e.fulfillmentStatus),o.length||e.productType){let t=document.createElement(`div`);if(t.className=`${Q}-card-meta`,e.productType){let n=document.createElement(`span`);n.className=`${Q}-chip`,n.textContent=e.productType,t.appendChild(n)}t.appendChild(document.createTextNode(o.join(` · `))),i.appendChild(t)}let c=Ph(e.price,e.currency);if(c){let e=document.createElement(`div`);e.className=`${Q}-card-price`,e.textContent=c,i.appendChild(e)}n.appendChild(i),u.appendChild(n)}a.append(o,u),a.classList.remove(`${Q}-show`),a.offsetHeight,a.classList.add(`${Q}-show`)}function Lh(){Oh&&Oh.classList.remove(`${Q}-show`)}var Rh=null,zh=[];function Bh(){return(!Rh||!Rh.isConnected)&&(Rh=document.createElement(`div`),Rh.id=`${Q}-bar`,document.body.appendChild(Rh)),Rh}function Vh(){if(typeof document>`u`)return;Sh(),zh.forEach(clearTimeout),zh=[];let e=Bh();e.style.transition=`none`,e.style.width=`0%`,e.classList.add(`${Q}-bar-active`),e.offsetHeight,e.style.transition=`width 0.35s ease, opacity 0.25s ease`;let t=[[80,`width 0.6s ease`],[92,`width 1.2s ease`]],n=50;for(let[e,r]of t){let t=n,i=e,a=r;zh.push(setTimeout(()=>{Rh&&(Rh.style.transition=a,Rh.style.width=`${i}%`)},t)),n+=800}}function Hh(){Rh&&(zh.forEach(clearTimeout),zh=[],Rh.style.transition=`width 0.2s ease`,Rh.style.width=`100%`,zh.push(setTimeout(()=>{Rh&&(Rh.style.transition=`opacity 0.35s ease`,Rh.style.opacity=`0`,zh.push(setTimeout(()=>{Rh&&(Rh.style.width=`0%`,Rh.classList.remove(`${Q}-bar-active`))},380)))},220)))}var Uh=`<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
259
259
|
<filter id="${Q}-csh">
|
|
260
260
|
<feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
|
|
261
261
|
</filter>
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
50% { transform: translate(-4px,-4px) scale(0.82); }
|
|
248
248
|
100% { transform: translate(-4px,-4px) scale(1); }
|
|
249
249
|
}
|
|
250
|
-
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var vh=null,yh=null;function bh(){return(!vh||!vh.isConnected)&&(vh=document.createElement(`div`),vh.id=`${Q}-toast`,document.body.appendChild(vh)),vh}function xh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;_h(),yh&&=(clearTimeout(yh),null);let i=bh();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(yh=setTimeout(()=>Sh(),r))}function Sh(e=0){vh&&(e>0?yh=setTimeout(()=>{vh&&vh.classList.remove(`${Q}-show`)},e):vh&&vh.classList.remove(`${Q}-show`))}var Ch=null;function wh(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-panel`,document.body.appendChild(Ch)),Ch}var Th=12,Eh=`right`,Dh=!1;function Oh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.querySelector(`.flowengage-widget-root`)?.getBoundingClientRect();if(!
|
|
250
|
+
`,t=document.createElement(`style`);t.id=`${Q}-styles`,t.textContent=e,(document.head||document.documentElement).appendChild(t)}var vh=null,yh=null;function bh(){return(!vh||!vh.isConnected)&&(vh=document.createElement(`div`),vh.id=`${Q}-toast`,document.body.appendChild(vh)),vh}function xh(e,{spinner:t=!0,icon:n=null,duration:r=0}={}){if(typeof document>`u`)return;_h(),yh&&=(clearTimeout(yh),null);let i=bh();if(i.innerHTML=``,n){let e=document.createElement(`span`);e.className=`${Q}-icon`,e.textContent=n,i.appendChild(e)}else if(t){let e=document.createElement(`span`);e.className=`${Q}-spin`,i.appendChild(e)}let a=document.createElement(`span`);a.textContent=e,i.appendChild(a),i.classList.remove(`${Q}-show`),i.offsetHeight,i.classList.add(`${Q}-show`),r>0&&(yh=setTimeout(()=>Sh(),r))}function Sh(e=0){vh&&(e>0?yh=setTimeout(()=>{vh&&vh.classList.remove(`${Q}-show`)},e):vh&&vh.classList.remove(`${Q}-show`))}var Ch=null;function wh(){return(!Ch||!Ch.isConnected)&&(Ch=document.createElement(`div`),Ch.id=`${Q}-panel`,document.body.appendChild(Ch)),Ch}var Th=12,Eh=`right`,Dh=!1;function Oh(e,t){if(e.style.left=``,e.style.right=``,e.style.bottom=``,window.innerWidth<=900)return;let n=document.getElementById(`flowengage-root`),r=(n?.shadowRoot?.querySelector(`.flowengage-widget-root`)||document.querySelector(`.flowengage-widget-root`)||n)?.getBoundingClientRect();if(!r||!r.width){t===`left`?e.style.left=`calc(1.5rem + 120px)`:e.style.right=`calc(1.5rem + 120px)`;return}t===`left`?e.style.left=`${Math.round(r.right+Th)}px`:e.style.right=`${Math.round(window.innerWidth-r.left+Th)}px`,e.style.bottom=`${Math.max(12,Math.round(window.innerHeight-r.bottom))}px`}function kh(e,t){let n=Number(e);if(!Number.isFinite(n))return null;let r=n.toLocaleString(void 0,{minimumFractionDigits:n%1==0?0:2,maximumFractionDigits:2});return t?`${t} ${r}`:r}function Ah(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`})}function jh(e,{title:t=`Products`,side:n=`right`,productUrl:r=null}={}){if(typeof document>`u`)return;let i=Array.isArray(e)?e.filter(Boolean):[];if(!i.length)return Mh();_h();let a=wh();Eh=n===`left`?`left`:`right`,Oh(a,Eh),Dh||(Dh=!0,window.addEventListener(`resize`,()=>{Ch?.classList.contains(`${Q}-show`)&&Oh(Ch,Eh)})),a.innerHTML=``;let o=document.createElement(`div`);o.id=`${Q}-panel-head`;let s=document.createElement(`div`);s.id=`${Q}-panel-title`,s.textContent=t;let c=document.createElement(`span`);c.id=`${Q}-panel-count`,c.textContent=String(i.length);let l=document.createElement(`button`);l.id=`${Q}-panel-close`,l.type=`button`,l.setAttribute(`aria-label`,`Close product panel`),l.textContent=`×`,l.addEventListener(`click`,()=>Mh()),o.append(s,c,l);let u=document.createElement(`div`);u.id=`${Q}-panel-list`;for(let e of i){let t=typeof r==`function`?r(e):null,n=document.createElement(t?`a`:`div`);if(n.className=`${Q}-card`,t&&(n.href=t,n.rel=`noopener`),e.image){let t=document.createElement(`img`);t.className=`${Q}-card-thumb`,t.src=e.image,t.alt=``,t.loading=`lazy`,t.addEventListener(`error`,()=>{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,t.replaceWith(e)}),n.appendChild(t)}else{let e=document.createElement(`div`);e.className=`${Q}-card-thumb-ph`,e.textContent=`🛍`,n.appendChild(e)}let i=document.createElement(`div`);i.className=`${Q}-card-body`;let a=document.createElement(`div`);a.className=`${Q}-card-title`,a.textContent=e.title||`Item`,i.appendChild(a);let o=[];e.quantity>1&&o.push(`Qty ${e.quantity}`);let s=Ah(e.orderedAt);if(s&&o.push(s),e.fulfillmentStatus&&o.push(e.fulfillmentStatus),o.length||e.productType){let t=document.createElement(`div`);if(t.className=`${Q}-card-meta`,e.productType){let n=document.createElement(`span`);n.className=`${Q}-chip`,n.textContent=e.productType,t.appendChild(n)}t.appendChild(document.createTextNode(o.join(` · `))),i.appendChild(t)}let c=kh(e.price,e.currency);if(c){let e=document.createElement(`div`);e.className=`${Q}-card-price`,e.textContent=c,i.appendChild(e)}n.appendChild(i),u.appendChild(n)}a.append(o,u),a.classList.remove(`${Q}-show`),a.offsetHeight,a.classList.add(`${Q}-show`)}function Mh(){Ch&&Ch.classList.remove(`${Q}-show`)}var Nh=null,Ph=[];function Fh(){return(!Nh||!Nh.isConnected)&&(Nh=document.createElement(`div`),Nh.id=`${Q}-bar`,document.body.appendChild(Nh)),Nh}function Ih(){if(typeof document>`u`)return;_h(),Ph.forEach(clearTimeout),Ph=[];let e=Fh();e.style.transition=`none`,e.style.width=`0%`,e.classList.add(`${Q}-bar-active`),e.offsetHeight,e.style.transition=`width 0.35s ease, opacity 0.25s ease`;let t=[[80,`width 0.6s ease`],[92,`width 1.2s ease`]],n=50;for(let[e,r]of t){let t=n,i=e,a=r;Ph.push(setTimeout(()=>{Nh&&(Nh.style.transition=a,Nh.style.width=`${i}%`)},t)),n+=800}}function Lh(){Nh&&(Ph.forEach(clearTimeout),Ph=[],Nh.style.transition=`width 0.2s ease`,Nh.style.width=`100%`,Ph.push(setTimeout(()=>{Nh&&(Nh.style.transition=`opacity 0.35s ease`,Nh.style.opacity=`0`,Ph.push(setTimeout(()=>{Nh&&(Nh.style.width=`0%`,Nh.classList.remove(`${Q}-bar-active`))},380)))},220)))}var Rh=`<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
251
251
|
<filter id="${Q}-csh">
|
|
252
252
|
<feDropShadow dx="1" dy="2" stdDeviation="1.5" flood-color="#00000060"/>
|
|
253
253
|
</filter>
|
|
@@ -9851,12 +9851,12 @@ function Lh() {
|
|
|
9851
9851
|
var Rh = 12, zh = "right", Bh = !1;
|
|
9852
9852
|
function Vh(e, t) {
|
|
9853
9853
|
if (e.style.left = "", e.style.right = "", e.style.bottom = "", window.innerWidth <= 900) return;
|
|
9854
|
-
let n = document.querySelector(".flowengage-widget-root")?.getBoundingClientRect();
|
|
9855
|
-
if (!
|
|
9856
|
-
t === "left" ? e.style.left = "1.5rem" : e.style.right = "1.5rem";
|
|
9854
|
+
let n = document.getElementById("flowengage-root"), r = (n?.shadowRoot?.querySelector(".flowengage-widget-root") || document.querySelector(".flowengage-widget-root") || n)?.getBoundingClientRect();
|
|
9855
|
+
if (!r || !r.width) {
|
|
9856
|
+
t === "left" ? e.style.left = "calc(1.5rem + 120px)" : e.style.right = "calc(1.5rem + 120px)";
|
|
9857
9857
|
return;
|
|
9858
9858
|
}
|
|
9859
|
-
t === "left" ? e.style.left = `${Math.round(
|
|
9859
|
+
t === "left" ? e.style.left = `${Math.round(r.right + Rh)}px` : e.style.right = `${Math.round(window.innerWidth - r.left + Rh)}px`, e.style.bottom = `${Math.max(12, Math.round(window.innerHeight - r.bottom))}px`;
|
|
9860
9860
|
}
|
|
9861
9861
|
function Hh(e, t) {
|
|
9862
9862
|
let n = Number(e);
|