@everymatrix/bonus-elevate-shop-item 1.43.0 → 1.43.4

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 +1 @@
1
- import{p as e,b as s}from"./p-84e222d1.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>s([["p-c8d51d14",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e)));
1
+ import{p as e,b as s}from"./p-3d8363a3.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>s([["p-9546c5ba",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e)));
@@ -0,0 +1 @@
1
+ let e,t,n,l=!1,o=!1,s=!1,r=!1,i=!1;const c="undefined"!=typeof window?window:{},a=c.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},u=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=new WeakMap,p=e=>"sc-"+e.o,h={},m=e=>"object"==(e=typeof e)||"function"===e,b=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?y(null,l):l),r=s)};if(c(n),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,g);const a=y(e,null);return a.u=t,i.length>0&&(a.$=i),a.p=o,a},y=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null,p:null}),w={},g={forEach:(e,t)=>e.map(v).forEach(t),map:(e,t)=>e.map(v).map(t).map(j)},v=e=>({vattrs:e.u,vchildren:e.$,vkey:e.g,vname:e.p,vtag:e.h,vtext:e.i}),j=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),b(e.vtag,t,...e.vchildren||[])}const t=y(e.vtag,e.vtext);return t.u=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.p=e.vname,t},S=(e,t,n,l,o,s)=>{if(n!==l){let r=ie(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=m(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):ie(c,i)?i.slice(2):i[2]+t.slice(3),n&&f.rel(e,t,n,!1),l&&f.ael(e,t,l,!1)}},k=/\s/,O=e=>e?e.split(k):[],C=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.u||h,r=t.u||h;for(l in s)l in r||S(o,l,s[l],void 0,n,t.t);for(l in r)S(o,l,s[l],r[l],n,t.t)},M=(o,i,c,f)=>{let u,d,$,p=i.$[c],h=0;if(l||(s=!0,"slot"===p.h&&(e&&f.classList.add(e+"-s"),p.t|=p.$?2:1)),null!==p.i)u=p.m=a.createTextNode(p.i);else if(1&p.t)u=p.m=a.createTextNode("");else{if(r||(r="svg"===p.h),u=p.m=a.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&p.t?"slot-fb":p.h),r&&"foreignObject"===p.h&&(r=!1),C(null,p,r),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),p.$)for(h=0;h<p.$.length;++h)d=M(o,p,h,u),d&&u.appendChild(d);"svg"===p.h?r=!1:"foreignObject"===u.tagName&&(r=!0)}return u["s-hn"]=n,3&p.t&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=p.p||"",$=o&&o.$&&o.$[c],$&&$.h===p.h&&o.m&&R(o.m,!1)),u},R=(e,t)=>{f.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(N(o).insertBefore(o,L(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}f.t&=-2},x=(e,t,l,o,s,r)=>{let i,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=M(null,l,s,e),i&&(o[s].m=i,c.insertBefore(i,L(t))))},T=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},E=(e,t)=>e.h===t.h&&("slot"!==e.h||e.p===t.p),L=e=>e&&e["s-ol"]||e,N=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,P=(e,t)=>{const n=t.m=e.m,l=e.$,o=t.$,s=t.h,i=t.i;let c;null===i?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||C(e,t,r),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,r=0,i=t.length-1,c=t[0],a=t[i],f=l.length-1,u=l[0],d=l[f];for(;s<=i&&r<=f;)null==c?c=t[++s]:null==a?a=t[--i]:null==u?u=l[++r]:null==d?d=l[--f]:E(c,u)?(P(c,u),c=t[++s],u=l[++r]):E(a,d)?(P(a,d),a=t[--i],d=l[--f]):E(c,d)?("slot"!==c.h&&"slot"!==d.h||R(c.m.parentNode,!1),P(c,d),e.insertBefore(c.m,a.m.nextSibling),c=t[++s],d=l[--f]):E(a,u)?("slot"!==c.h&&"slot"!==d.h||R(a.m.parentNode,!1),P(a,u),e.insertBefore(a.m,c.m),a=t[--i],u=l[++r]):(o=M(t&&t[r],n,r,e),u=l[++r],o&&N(c.m).insertBefore(o,L(c.m)));s>i?x(e,null==l[f+1]?null:l[f+1].m,n,l,r,f):r>f&&T(t,s,i)})(n,l,t,o):null!==o?(null!==e.i&&(n.textContent=""),x(n,null,t,o,0,o.length-1)):null!==l&&T(l,0,l.length-1),r&&"svg"===s&&(r=!1)):(c=n["s-cr"])?c.parentNode.textContent=i:e.i!==i&&(n.data=i)},D=e=>{let t,n,l,o,s,r,i=e.childNodes;for(n=0,l=i.length;n<l;n++)if(t=i[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}D(t)}},F=[],U=e=>{let t,n,l,s,r,i,c=0,a=e.childNodes,f=a.length;for(;c<f;c++){if(t=a[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],i=l.length-1;i>=0;i--)n=l[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(W(n,s)?(r=F.find((e=>e.v===n)),o=!0,n["s-sn"]=n["s-sn"]||s,r?r.j=t:F.push({j:t,v:n}),n["s-sr"]&&F.map((e=>{W(e.v,n["s-sn"])&&(r=F.find((e=>e.v===n)),r&&!e.j&&(e.j=r.j))}))):F.some((e=>e.v===n))||F.push({v:n}));1===t.nodeType&&U(t)}},W=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(A)},H=e=>oe(e).S,q=(e,t,n)=>{const l=H(e);return{emit:e=>V(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},V=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},_=(e,t)=>{t&&!e.k&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.k=t)))},z=(e,t)=>{if(e.t|=16,!(4&e.t))return _(e,e.O),ye((()=>B(e,t)));e.t|=512},B=(e,t)=>{const n=e.C;let l;return t&&(l=Q(n,"componentWillLoad")),X(l,(()=>G(e,n,t)))},G=async(e,t,n)=>{const l=e.S,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,o=((e,t)=>{let n=p(t),l=ue.get(n);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let t,o=$.get(e=e.head||e);o||$.set(e,o=new Set),o.has(n)||(t=a.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);I(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>J(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},I=(r,i)=>{try{i=i.render(),r.t&=-17,r.t|=2,((r,i)=>{const c=r.S,u=r.M,d=r.R||y(null,null),$=(e=>e&&e.h===w)(i)?i:b(null,null,i);if(n=c.tagName,u.T&&($.u=$.u||{},u.T.map((([e,t])=>$.u[t]=c[e]))),$.h=null,$.t|=4,r.R=$,$.m=d.m=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&u.t),o=!1,P(d,$),f.t|=1,s){let e,t,n,l,o,s;U($.m);let r=0;for(;r<F.length;r++)e=F[r],t=e.v,t["s-ol"]||(n=a.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(r=0;r<F.length;r++)if(e=F[r],t=e.v,e.j){for(l=e.j.parentNode,o=e.j.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&D($.m),f.t&=-2,F.length=0})(r,i)}catch(e){ce(e,r.S)}return null},J=e=>{const t=e.S,n=e.C,l=e.O;Q(n,"componentDidRender"),64&e.t?Q(n,"componentDidUpdate"):(e.t|=64,Y(t),Q(n,"componentDidLoad"),e.L(t),l||K()),e.k&&(e.k(),e.k=void 0),512&e.t&&be((()=>z(e,!1))),e.t&=-517},K=()=>{Y(a.documentElement),be((()=>V(c,"appload",{detail:{namespace:"bonus-elevate-shop-item"}})))},Q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ce(e)}},X=(e,t)=>e&&e.then?e.then(t):t(),Y=e=>e.classList.add("hydrated"),Z=(e,t,n)=>{if(t.N){const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>oe(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=oe(e),s=o.P.get(t),r=o.t,i=o.C;n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),8&r&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(o.P.set(t,n),i&&2==(18&r)&&z(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){f.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},ee=e=>{Q(e,"connectedCallback")},te=(e,t={})=>{const n=[],l=t.exclude||[],o=c.customElements,s=a.head,r=s.querySelector("meta[charset]"),i=a.createElement("style"),u=[];let $,h=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",a.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],N:t[2],D:t[3]};s.N=t[2],s.T=[];const r=s.o,i=class extends HTMLElement{constructor(e){super(e),re(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),h?u.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=oe(e),n=t.M,l=()=>{};if(1&t.t)ee(t.C);else{t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=a.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){_(t,t.O=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=fe(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(Z(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){ce(e)}t.t&=-9,e(),ee(t.C)}if(o.style){let e=o.style;const t=p(n);if(!ue.has(t)){const l=()=>{};((e,t,n)=>{let l=ue.get(e);d&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ue.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.O,r=()=>z(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{0==(1&f.t)&&Q(oe(this).C,"disconnectedCallback")})()))}componentOnReady(){return oe(this).F}};s.U=e[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,Z(i,s,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,r?r.nextSibling:s.firstChild),h=!1,u.length?u.map((e=>e.connectedCallback())):f.jmp((()=>$=setTimeout(K,30)))},ne=(e,t)=>t,le=new WeakMap,oe=e=>le.get(e),se=(e,t)=>le.set(t.C=e,t),re=(e,t)=>{const n={t:0,S:e,M:t,P:new Map};return n.F=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],le.set(e,n)},ie=(e,t)=>t in e,ce=(e,t)=>(0,console.error)(e,t),ae=new Map,fe=e=>{const t=e.o.replace(/-/g,"_"),n=e.U,l=ae.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ae.set(n,e),e[t])),ce)},ue=new Map,de=[],$e=[],pe=(e,t)=>n=>{e.push(n),i||(i=!0,t&&4&f.t?be(me):f.raf(me))},he=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ce(e)}e.length=0},me=()=>{he(de),he($e),(i=de.length>0)&&f.raf(me)},be=e=>u().then(e),ye=pe($e,!0);export{ne as F,w as H,te as b,q as c,H as g,b as h,u as p,se as r}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,g as i,c as s,F as a,H as r}from"./p-3d8363a3.js";const o=class{constructor(t){e(this,t),this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0,this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()}}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let s=0;s<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;s++)i.push(t("li",{class:s==this.activeIndex?"active":"default",onClick:()=>{this.goTo(s),this.setActive(s)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},s={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{class:"SliderWrapper"},t("div",{class:"MainContent "},this.showSliderArrows&&t("div",{class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{fill:"none",stroke:"var(--emfe-w-color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:s,src:e}))))),this.showSliderArrows&&t("div",{class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{class:"DotsWrapper"},t("ul",{class:"Dots"},this.renderDots())))}get el(){return i(this)}},n=["ro","en","fr","ar","hu"],l={en:{coins:"Coins",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},ro:{coins:"Coins",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},fr:{coins:"Coins",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},ar:{coins:"Coins",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},hu:{coins:"Coins",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"}},d=(e,t)=>{const i=t;return l[void 0!==i&&n.includes(i)?i:"en"][e]},h=class{constructor(t){e(this,t),this.redeemGiftButton=s(this,"redeemGiftButton",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1,this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})()}redeemGiftConfirm(){window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase())return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=d(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||d("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])l[t][i]=e[t][i]})),t(!0)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}render(){return t(r,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling}),t("div",{class:"ElevateDetails"},this.isGiftNotFound&&t(a,null,t("div",{class:"Row ThumbnailRow"},t("div",{class:"BackButton",onClick:()=>{this.onBackClicked()}},"<")),t("div",{class:"Thumnails GiftNotFound"},d("noDataFound",this.language),".")),this.elevateGift&&t(a,null,t("div",{class:"ThumbnailRow"},t("div",{class:"Row"},t("div",{class:"BackButton",onClick:()=>{this.onBackClicked()}},"<"),t("bonus-elevate-shop-assets-slider",{class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{class:"Col Details"},t("h3",{class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{class:"GiftPoints"},t("span",{class:"Points"},this.elevateGift.points," "),t("span",{class:" PointsLabel"},d("coins",this.language))))),t("div",{class:"ShopItemDetail Details"},t("div",{class:"GiftPresentation"},t("p",null,this.elevateGift.presentation.description?this.elevateGift.presentation.description:d("noGiftPresentation",this.language))),t("div",{class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled":""}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},d("redeem",this.language)),t("span",{class:"RedeemError Error"}," ",this.redeemErrorMsg," ")))))}};h.style=":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}";const p=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return i(this)}};p.style=":host{display:block}";export{o as bonus_elevate_shop_assets_slider,h as bonus_elevate_shop_item,p as general_styling_wrapper}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-44774988.js');
5
+ const index = require('./index-355d8ffb.js');
6
6
 
7
7
  const BonusElevateShopAssetsSlider = class {
8
8
  constructor(hostRef) {
@@ -143,7 +143,7 @@ const DEFAULT_LANGUAGE = 'en';
143
143
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
144
144
  const TRANSLATIONS = {
145
145
  en: {
146
- points: 'Points',
146
+ coins: 'Coins',
147
147
  noGiftPresentation: 'No description',
148
148
  redeem: 'Redeem',
149
149
  noDataFound: 'No data found',
@@ -151,7 +151,7 @@ const TRANSLATIONS = {
151
151
  redeemFailed: 'Failed to redeem'
152
152
  },
153
153
  ro: {
154
- points: 'Points',
154
+ coins: 'Coins',
155
155
  noGiftPresentation: 'No description',
156
156
  redeem: 'Redeem',
157
157
  noDataFound: 'No data found',
@@ -159,7 +159,7 @@ const TRANSLATIONS = {
159
159
  redeemFailed: 'Failed to redeem'
160
160
  },
161
161
  fr: {
162
- points: 'Points',
162
+ coins: 'Coins',
163
163
  noGiftPresentation: 'No description',
164
164
  redeem: 'Redeem',
165
165
  noDataFound: 'No data found',
@@ -167,7 +167,7 @@ const TRANSLATIONS = {
167
167
  redeemFailed: 'Failed to redeem',
168
168
  },
169
169
  ar: {
170
- points: 'Points',
170
+ coins: 'Coins',
171
171
  noGiftPresentation: 'No description',
172
172
  redeem: 'Redeem',
173
173
  noDataFound: 'No data found',
@@ -175,7 +175,7 @@ const TRANSLATIONS = {
175
175
  redeemFailed: 'Failed to redeem',
176
176
  },
177
177
  hu: {
178
- points: 'Points',
178
+ coins: 'Coins',
179
179
  noGiftPresentation: 'No description',
180
180
  redeem: 'Redeem',
181
181
  noDataFound: 'No data found',
@@ -242,6 +242,7 @@ const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:fle
242
242
  const BonusElevateShopItem = class {
243
243
  constructor(hostRef) {
244
244
  index.registerInstance(this, hostRef);
245
+ this.redeemGiftButton = index.createEvent(this, "redeemGiftButton", 7);
245
246
  /**
246
247
  * Currently selected language.
247
248
  */
@@ -303,6 +304,7 @@ const BonusElevateShopItem = class {
303
304
  .then((res) => res.json())
304
305
  .then((res) => {
305
306
  if (res.success) {
307
+ this.redeemGiftButton.emit();
306
308
  window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href);
307
309
  }
308
310
  else {
@@ -362,7 +364,7 @@ const BonusElevateShopItem = class {
362
364
  render() {
363
365
  return (index.h(index.Host, null, index.h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling }), index.h("div", { class: 'ElevateDetails' }, this.isGiftNotFound && (index.h(index.Fragment, null, index.h("div", { class: "Row ThumbnailRow" }, index.h("div", { class: "BackButton", onClick: () => {
364
366
  this.onBackClicked();
365
- } }, '<')), index.h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && index.h(index.Fragment, null, index.h("div", { class: "ThumbnailRow" }, index.h("div", { class: 'Row' }, index.h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), index.h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), index.h("div", { class: 'Col Details' }, index.h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), index.h("div", { class: "GiftPoints" }, index.h("span", { class: "Points" }, this.elevateGift.points, " "), index.h("span", { class: " PointsLabel" }, translate('points', this.language))))), index.h("div", { class: 'ShopItemDetail Details' }, index.h("div", { class: "GiftPresentation" }, index.h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), index.h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
367
+ } }, '<')), index.h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && index.h(index.Fragment, null, index.h("div", { class: "ThumbnailRow" }, index.h("div", { class: 'Row' }, index.h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), index.h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), index.h("div", { class: 'Col Details' }, index.h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), index.h("div", { class: "GiftPoints" }, index.h("span", { class: "Points" }, this.elevateGift.points, " "), index.h("span", { class: " PointsLabel" }, translate('coins', this.language))))), index.h("div", { class: 'ShopItemDetail Details' }, index.h("div", { class: "GiftPresentation" }, index.h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), index.h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
366
368
  ${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), index.h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
367
369
  }
368
370
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-44774988.js');
3
+ const index = require('./index-355d8ffb.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -964,6 +964,19 @@ const renderVdom = (hostRef, renderFnResults) => {
964
964
  }
965
965
  };
966
966
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
967
+ const createEvent = (ref, name, flags) => {
968
+ const elm = getElement(ref);
969
+ return {
970
+ emit: (detail) => {
971
+ return emitEvent(elm, name, {
972
+ bubbles: !!(flags & 4 /* Bubbles */),
973
+ composed: !!(flags & 2 /* Composed */),
974
+ cancelable: !!(flags & 1 /* Cancellable */),
975
+ detail,
976
+ });
977
+ },
978
+ };
979
+ };
967
980
  /**
968
981
  * Helper function to create & dispatch a custom Event on a provided target
969
982
  * @param elm the target of the Event
@@ -1633,6 +1646,7 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1633
1646
  exports.Fragment = Fragment;
1634
1647
  exports.Host = Host;
1635
1648
  exports.bootstrapLazy = bootstrapLazy;
1649
+ exports.createEvent = createEvent;
1636
1650
  exports.getElement = getElement;
1637
1651
  exports.h = h;
1638
1652
  exports.promiseResolve = promiseResolve;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-44774988.js');
5
+ const index = require('./index-355d8ffb.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -1,4 +1,4 @@
1
- import { Component, Fragment, h, Host, Prop, State } from '@stencil/core';
1
+ import { Component, Event, Fragment, h, Host, Prop, State } from '@stencil/core';
2
2
  import '@everymatrix/general-styling-wrapper';
3
3
  import { getTranslations, translate } from '../../utils/locale.utils';
4
4
  import { getDevicePlatform } from '../../utils/utils';
@@ -65,6 +65,7 @@ export class BonusElevateShopItem {
65
65
  .then((res) => res.json())
66
66
  .then((res) => {
67
67
  if (res.success) {
68
+ this.redeemGiftButton.emit();
68
69
  window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href);
69
70
  }
70
71
  else {
@@ -144,7 +145,7 @@ export class BonusElevateShopItem {
144
145
  h("span", { class: "Points" },
145
146
  this.elevateGift.points,
146
147
  " "),
147
- h("span", { class: " PointsLabel" }, translate('points', this.language))))),
148
+ h("span", { class: " PointsLabel" }, translate('coins', this.language))))),
148
149
  h("div", { class: 'ShopItemDetail Details' },
149
150
  h("div", { class: "GiftPresentation" },
150
151
  h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))),
@@ -349,4 +350,24 @@ export class BonusElevateShopItem {
349
350
  "redeemErrorMsg": {},
350
351
  "isRedeeming": {}
351
352
  }; }
353
+ static get events() { return [{
354
+ "method": "redeemGiftButton",
355
+ "name": "redeemGiftButton",
356
+ "bubbles": true,
357
+ "cancelable": true,
358
+ "composed": true,
359
+ "docs": {
360
+ "tags": [],
361
+ "text": ""
362
+ },
363
+ "complexType": {
364
+ "original": "Object",
365
+ "resolved": "Object",
366
+ "references": {
367
+ "Object": {
368
+ "location": "global"
369
+ }
370
+ }
371
+ }
372
+ }]; }
352
373
  }
@@ -2,7 +2,7 @@ const DEFAULT_LANGUAGE = 'en';
2
2
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
3
3
  const TRANSLATIONS = {
4
4
  en: {
5
- points: 'Points',
5
+ coins: 'Coins',
6
6
  noGiftPresentation: 'No description',
7
7
  redeem: 'Redeem',
8
8
  noDataFound: 'No data found',
@@ -10,7 +10,7 @@ const TRANSLATIONS = {
10
10
  redeemFailed: 'Failed to redeem'
11
11
  },
12
12
  ro: {
13
- points: 'Points',
13
+ coins: 'Coins',
14
14
  noGiftPresentation: 'No description',
15
15
  redeem: 'Redeem',
16
16
  noDataFound: 'No data found',
@@ -18,7 +18,7 @@ const TRANSLATIONS = {
18
18
  redeemFailed: 'Failed to redeem'
19
19
  },
20
20
  fr: {
21
- points: 'Points',
21
+ coins: 'Coins',
22
22
  noGiftPresentation: 'No description',
23
23
  redeem: 'Redeem',
24
24
  noDataFound: 'No data found',
@@ -26,7 +26,7 @@ const TRANSLATIONS = {
26
26
  redeemFailed: 'Failed to redeem',
27
27
  },
28
28
  ar: {
29
- points: 'Points',
29
+ coins: 'Coins',
30
30
  noGiftPresentation: 'No description',
31
31
  redeem: 'Redeem',
32
32
  noDataFound: 'No data found',
@@ -34,7 +34,7 @@ const TRANSLATIONS = {
34
34
  redeemFailed: 'Failed to redeem',
35
35
  },
36
36
  hu: {
37
- points: 'Points',
37
+ coins: 'Coins',
38
38
  noGiftPresentation: 'No description',
39
39
  redeem: 'Redeem',
40
40
  noDataFound: 'No data found',
@@ -1,4 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$3 } from './bonus-elevate-shop-assets-slider2.js';
3
3
  import { d as defineCustomElement$2 } from './general-styling-wrapper2.js';
4
4
 
@@ -6,7 +6,7 @@ const DEFAULT_LANGUAGE = 'en';
6
6
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
7
7
  const TRANSLATIONS = {
8
8
  en: {
9
- points: 'Points',
9
+ coins: 'Coins',
10
10
  noGiftPresentation: 'No description',
11
11
  redeem: 'Redeem',
12
12
  noDataFound: 'No data found',
@@ -14,7 +14,7 @@ const TRANSLATIONS = {
14
14
  redeemFailed: 'Failed to redeem'
15
15
  },
16
16
  ro: {
17
- points: 'Points',
17
+ coins: 'Coins',
18
18
  noGiftPresentation: 'No description',
19
19
  redeem: 'Redeem',
20
20
  noDataFound: 'No data found',
@@ -22,7 +22,7 @@ const TRANSLATIONS = {
22
22
  redeemFailed: 'Failed to redeem'
23
23
  },
24
24
  fr: {
25
- points: 'Points',
25
+ coins: 'Coins',
26
26
  noGiftPresentation: 'No description',
27
27
  redeem: 'Redeem',
28
28
  noDataFound: 'No data found',
@@ -30,7 +30,7 @@ const TRANSLATIONS = {
30
30
  redeemFailed: 'Failed to redeem',
31
31
  },
32
32
  ar: {
33
- points: 'Points',
33
+ coins: 'Coins',
34
34
  noGiftPresentation: 'No description',
35
35
  redeem: 'Redeem',
36
36
  noDataFound: 'No data found',
@@ -38,7 +38,7 @@ const TRANSLATIONS = {
38
38
  redeemFailed: 'Failed to redeem',
39
39
  },
40
40
  hu: {
41
- points: 'Points',
41
+ coins: 'Coins',
42
42
  noGiftPresentation: 'No description',
43
43
  redeem: 'Redeem',
44
44
  noDataFound: 'No data found',
@@ -107,6 +107,7 @@ const BonusElevateShopItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
107
107
  super();
108
108
  this.__registerHost();
109
109
  this.__attachShadow();
110
+ this.redeemGiftButton = createEvent(this, "redeemGiftButton", 7);
110
111
  /**
111
112
  * Currently selected language.
112
113
  */
@@ -168,6 +169,7 @@ const BonusElevateShopItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
168
169
  .then((res) => res.json())
169
170
  .then((res) => {
170
171
  if (res.success) {
172
+ this.redeemGiftButton.emit();
171
173
  window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href);
172
174
  }
173
175
  else {
@@ -227,7 +229,7 @@ const BonusElevateShopItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
227
229
  render() {
228
230
  return (h(Host, null, h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling }), h("div", { class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, null, h("div", { class: "Row ThumbnailRow" }, h("div", { class: "BackButton", onClick: () => {
229
231
  this.onBackClicked();
230
- } }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('points', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
232
+ } }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('coins', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
231
233
  ${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
232
234
  }
233
235
  static get style() { return bonusElevateShopItemCss; }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement, F as Fragment, H as Host } from './index-dbb9b7c5.js';
1
+ import { r as registerInstance, h, g as getElement, c as createEvent, F as Fragment, H as Host } from './index-4927ce96.js';
2
2
 
3
3
  const BonusElevateShopAssetsSlider = class {
4
4
  constructor(hostRef) {
@@ -139,7 +139,7 @@ const DEFAULT_LANGUAGE = 'en';
139
139
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
140
140
  const TRANSLATIONS = {
141
141
  en: {
142
- points: 'Points',
142
+ coins: 'Coins',
143
143
  noGiftPresentation: 'No description',
144
144
  redeem: 'Redeem',
145
145
  noDataFound: 'No data found',
@@ -147,7 +147,7 @@ const TRANSLATIONS = {
147
147
  redeemFailed: 'Failed to redeem'
148
148
  },
149
149
  ro: {
150
- points: 'Points',
150
+ coins: 'Coins',
151
151
  noGiftPresentation: 'No description',
152
152
  redeem: 'Redeem',
153
153
  noDataFound: 'No data found',
@@ -155,7 +155,7 @@ const TRANSLATIONS = {
155
155
  redeemFailed: 'Failed to redeem'
156
156
  },
157
157
  fr: {
158
- points: 'Points',
158
+ coins: 'Coins',
159
159
  noGiftPresentation: 'No description',
160
160
  redeem: 'Redeem',
161
161
  noDataFound: 'No data found',
@@ -163,7 +163,7 @@ const TRANSLATIONS = {
163
163
  redeemFailed: 'Failed to redeem',
164
164
  },
165
165
  ar: {
166
- points: 'Points',
166
+ coins: 'Coins',
167
167
  noGiftPresentation: 'No description',
168
168
  redeem: 'Redeem',
169
169
  noDataFound: 'No data found',
@@ -171,7 +171,7 @@ const TRANSLATIONS = {
171
171
  redeemFailed: 'Failed to redeem',
172
172
  },
173
173
  hu: {
174
- points: 'Points',
174
+ coins: 'Coins',
175
175
  noGiftPresentation: 'No description',
176
176
  redeem: 'Redeem',
177
177
  noDataFound: 'No data found',
@@ -238,6 +238,7 @@ const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:fle
238
238
  const BonusElevateShopItem = class {
239
239
  constructor(hostRef) {
240
240
  registerInstance(this, hostRef);
241
+ this.redeemGiftButton = createEvent(this, "redeemGiftButton", 7);
241
242
  /**
242
243
  * Currently selected language.
243
244
  */
@@ -299,6 +300,7 @@ const BonusElevateShopItem = class {
299
300
  .then((res) => res.json())
300
301
  .then((res) => {
301
302
  if (res.success) {
303
+ this.redeemGiftButton.emit();
302
304
  window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href);
303
305
  }
304
306
  else {
@@ -358,7 +360,7 @@ const BonusElevateShopItem = class {
358
360
  render() {
359
361
  return (h(Host, null, h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling }), h("div", { class: 'ElevateDetails' }, this.isGiftNotFound && (h(Fragment, null, h("div", { class: "Row ThumbnailRow" }, h("div", { class: "BackButton", onClick: () => {
360
362
  this.onBackClicked();
361
- } }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('points', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
363
+ } }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('coins', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''}
362
364
  ${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " "))))));
363
365
  }
364
366
  };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-dbb9b7c5.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-4927ce96.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -942,6 +942,19 @@ const renderVdom = (hostRef, renderFnResults) => {
942
942
  }
943
943
  };
944
944
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
945
+ const createEvent = (ref, name, flags) => {
946
+ const elm = getElement(ref);
947
+ return {
948
+ emit: (detail) => {
949
+ return emitEvent(elm, name, {
950
+ bubbles: !!(flags & 4 /* Bubbles */),
951
+ composed: !!(flags & 2 /* Composed */),
952
+ cancelable: !!(flags & 1 /* Cancellable */),
953
+ detail,
954
+ });
955
+ },
956
+ };
957
+ };
945
958
  /**
946
959
  * Helper function to create & dispatch a custom Event on a provided target
947
960
  * @param elm the target of the Event
@@ -1608,4 +1621,4 @@ const flush = () => {
1608
1621
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1609
1622
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1610
1623
 
1611
- export { Fragment as F, Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
1624
+ export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-dbb9b7c5.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-4927ce96.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  import '@everymatrix/general-styling-wrapper';
2
3
  import { BonusElevateShopItemInfo } from '../../models/bonus-elevate-shop-item';
3
4
  export declare class BonusElevateShopItem {
@@ -44,6 +45,7 @@ export declare class BonusElevateShopItem {
44
45
  isGiftNotFound: boolean;
45
46
  redeemErrorMsg: string;
46
47
  isRedeeming: boolean;
48
+ redeemGiftButton: EventEmitter<Object>;
47
49
  private bindedHandler;
48
50
  deviceType: string;
49
51
  redeemGiftConfirm(): void;
@@ -118,6 +118,7 @@ declare namespace LocalJSX {
118
118
  * Currently selected language.
119
119
  */
120
120
  "language"?: string;
121
+ "onRedeemGiftButton"?: (event: CustomEvent<Object>) => void;
121
122
  /**
122
123
  * session
123
124
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/bonus-elevate-shop-item",
3
- "version": "1.43.0",
3
+ "version": "1.43.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- let e,t,n,l=!1,o=!1,s=!1,r=!1,i=!1;const c="undefined"!=typeof window?window:{},f=c.document||{head:{}},a={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},u=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=new WeakMap,p=e=>"sc-"+e.o,h={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1,i=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?b(null,l):l),r=s)};if(c(n),t){t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,g);const f=b(e,null);return f.u=t,i.length>0&&(f.$=i),f.p=o,f},b=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null,p:null}),w={},g={forEach:(e,t)=>e.map(v).forEach(t),map:(e,t)=>e.map(v).map(t).map(j)},v=e=>({vattrs:e.u,vchildren:e.$,vkey:e.g,vname:e.p,vtag:e.h,vtext:e.i}),j=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),y(e.vtag,t,...e.vchildren||[])}const t=b(e.vtag,e.vtext);return t.u=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.p=e.vname,t},S=(e,t,n,l,o,s)=>{if(n!==l){let r=se(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=m(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&s||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):se(c,i)?i.slice(2):i[2]+t.slice(3),n&&a.rel(e,t,n,!1),l&&a.ael(e,t,l,!1)}},k=/\s/,O=e=>e?e.split(k):[],C=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.u||h,r=t.u||h;for(l in s)l in r||S(o,l,s[l],void 0,n,t.t);for(l in r)S(o,l,s[l],r[l],n,t.t)},M=(o,i,c,a)=>{let u,d,$,p=i.$[c],h=0;if(l||(s=!0,"slot"===p.h&&(e&&a.classList.add(e+"-s"),p.t|=p.$?2:1)),null!==p.i)u=p.m=f.createTextNode(p.i);else if(1&p.t)u=p.m=f.createTextNode("");else{if(r||(r="svg"===p.h),u=p.m=f.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&p.t?"slot-fb":p.h),r&&"foreignObject"===p.h&&(r=!1),C(null,p,r),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),p.$)for(h=0;h<p.$.length;++h)d=M(o,p,h,u),d&&u.appendChild(d);"svg"===p.h?r=!1:"foreignObject"===u.tagName&&(r=!0)}return u["s-hn"]=n,3&p.t&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=p.p||"",$=o&&o.$&&o.$[c],$&&$.h===p.h&&o.m&&R(o.m,!1)),u},R=(e,t)=>{a.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(N(o).insertBefore(o,L(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}a.t&=-2},x=(e,t,l,o,s,r)=>{let i,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=r;++s)o[s]&&(i=M(null,l,s,e),i&&(o[s].m=i,c.insertBefore(i,L(t))))},T=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,A(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},E=(e,t)=>e.h===t.h&&("slot"!==e.h||e.p===t.p),L=e=>e&&e["s-ol"]||e,N=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,P=(e,t)=>{const n=t.m=e.m,l=e.$,o=t.$,s=t.h,i=t.i;let c;null===i?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||C(e,t,r),null!==l&&null!==o?((e,t,n,l)=>{let o,s=0,r=0,i=t.length-1,c=t[0],f=t[i],a=l.length-1,u=l[0],d=l[a];for(;s<=i&&r<=a;)null==c?c=t[++s]:null==f?f=t[--i]:null==u?u=l[++r]:null==d?d=l[--a]:E(c,u)?(P(c,u),c=t[++s],u=l[++r]):E(f,d)?(P(f,d),f=t[--i],d=l[--a]):E(c,d)?("slot"!==c.h&&"slot"!==d.h||R(c.m.parentNode,!1),P(c,d),e.insertBefore(c.m,f.m.nextSibling),c=t[++s],d=l[--a]):E(f,u)?("slot"!==c.h&&"slot"!==d.h||R(f.m.parentNode,!1),P(f,u),e.insertBefore(f.m,c.m),f=t[--i],u=l[++r]):(o=M(t&&t[r],n,r,e),u=l[++r],o&&N(c.m).insertBefore(o,L(c.m)));s>i?x(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&T(t,s,i)})(n,l,t,o):null!==o?(null!==e.i&&(n.textContent=""),x(n,null,t,o,0,o.length-1)):null!==l&&T(l,0,l.length-1),r&&"svg"===s&&(r=!1)):(c=n["s-cr"])?c.parentNode.textContent=i:e.i!==i&&(n.data=i)},D=e=>{let t,n,l,o,s,r,i=e.childNodes;for(n=0,l=i.length;n<l;n++)if(t=i[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(r=i[o].nodeType,i[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===r&&s===i[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===r||3===r&&""!==i[o].textContent.trim()){t.hidden=!0;break}D(t)}},F=[],U=e=>{let t,n,l,s,r,i,c=0,f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],i=l.length-1;i>=0;i--)n=l[i],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(W(n,s)?(r=F.find((e=>e.v===n)),o=!0,n["s-sn"]=n["s-sn"]||s,r?r.j=t:F.push({j:t,v:n}),n["s-sr"]&&F.map((e=>{W(e.v,n["s-sn"])&&(r=F.find((e=>e.v===n)),r&&!e.j&&(e.j=r.j))}))):F.some((e=>e.v===n))||F.push({v:n}));1===t.nodeType&&U(t)}},W=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(A)},H=e=>ne(e).S,q=(e,t)=>{t&&!e.k&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.k=t)))},V=(e,t)=>{if(e.t|=16,!(4&e.t))return q(e,e.O),me((()=>_(e,t)));e.t|=512},_=(e,t)=>{const n=e.C;let l;return t&&(l=J(n,"componentWillLoad")),K(l,(()=>z(e,n,t)))},z=async(e,t,n)=>{const l=e.S,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.S,l=t.t,o=((e,t)=>{let n=p(t),l=fe.get(n);if(e=11===e.nodeType?e:f,l)if("string"==typeof l){let t,o=$.get(e=e.head||e);o||$.set(e,o=new Set),o.has(n)||(t=f.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);B(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>G(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},B=(r,i)=>{try{i=i.render(),r.t&=-17,r.t|=2,((r,i)=>{const c=r.S,u=r.M,d=r.R||b(null,null),$=(e=>e&&e.h===w)(i)?i:y(null,null,i);if(n=c.tagName,u.T&&($.u=$.u||{},u.T.map((([e,t])=>$.u[t]=c[e]))),$.h=null,$.t|=4,r.R=$,$.m=d.m=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&u.t),o=!1,P(d,$),a.t|=1,s){let e,t,n,l,o,s;U($.m);let r=0;for(;r<F.length;r++)e=F[r],t=e.v,t["s-ol"]||(n=f.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(r=0;r<F.length;r++)if(e=F[r],t=e.v,e.j){for(l=e.j.parentNode,o=e.j.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&D($.m),a.t&=-2,F.length=0})(r,i)}catch(e){re(e,r.S)}return null},G=e=>{const t=e.S,n=e.C,l=e.O;J(n,"componentDidRender"),64&e.t?J(n,"componentDidUpdate"):(e.t|=64,Q(t),J(n,"componentDidLoad"),e.L(t),l||I()),e.k&&(e.k(),e.k=void 0),512&e.t&&he((()=>V(e,!1))),e.t&=-517},I=()=>{Q(f.documentElement),he((()=>(e=>{const t=a.ce("appload",{detail:{namespace:"bonus-elevate-shop-item"}});return e.dispatchEvent(t),t})(c)))},J=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){re(e)}},K=(e,t)=>e&&e.then?e.then(t):t(),Q=e=>e.classList.add("hydrated"),X=(e,t,n)=>{if(t.N){const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>ne(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ne(e),s=o.P.get(t),r=o.t,i=o.C;n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),8&r&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(o.P.set(t,n),i&&2==(18&r)&&V(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){a.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},Y=e=>{J(e,"connectedCallback")},Z=(e,t={})=>{const n=[],l=t.exclude||[],o=c.customElements,s=f.head,r=s.querySelector("meta[charset]"),i=f.createElement("style"),u=[];let $,h=!0;Object.assign(a,t),a.l=new URL(t.resourcesUrl||"./",f.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],N:t[2],D:t[3]};s.N=t[2],s.T=[];const r=s.o,i=class extends HTMLElement{constructor(e){super(e),oe(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),h?u.push(this):a.jmp((()=>(e=>{if(0==(1&a.t)){const t=ne(e),n=t.M,l=()=>{};if(1&t.t)Y(t.C);else{t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=f.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(t,t.O=n);break}}n.N&&Object.entries(n.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=ce(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(X(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){re(e)}t.t&=-9,e(),Y(t.C)}if(o.style){let e=o.style;const t=p(n);if(!fe.has(t)){const l=()=>{};((e,t,n)=>{let l=fe.get(e);d&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,fe.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.O,r=()=>V(t,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(()=>{0==(1&a.t)&&J(ne(this).C,"disconnectedCallback")})()))}componentOnReady(){return ne(this).F}};s.U=e[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,X(i,s,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),s.insertBefore(i,r?r.nextSibling:s.firstChild),h=!1,u.length?u.map((e=>e.connectedCallback())):a.jmp((()=>$=setTimeout(I,30)))},ee=(e,t)=>t,te=new WeakMap,ne=e=>te.get(e),le=(e,t)=>te.set(t.C=e,t),oe=(e,t)=>{const n={t:0,S:e,M:t,P:new Map};return n.F=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],te.set(e,n)},se=(e,t)=>t in e,re=(e,t)=>(0,console.error)(e,t),ie=new Map,ce=e=>{const t=e.o.replace(/-/g,"_"),n=e.U,l=ie.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ie.set(n,e),e[t])),re)},fe=new Map,ae=[],ue=[],de=(e,t)=>n=>{e.push(n),i||(i=!0,t&&4&a.t?he(pe):a.raf(pe))},$e=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){re(e)}e.length=0},pe=()=>{$e(ae),$e(ue),(i=ae.length>0)&&a.raf(pe)},he=e=>u().then(e),me=de(ue,!0);export{ee as F,w as H,Z as b,H as g,y as h,u as p,le as r}
@@ -1 +0,0 @@
1
- import{r as e,h as t,g as i,F as s,H as a}from"./p-84e222d1.js";const r=class{constructor(t){e(this,t),this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0,this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()}}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let s=0;s<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;s++)i.push(t("li",{class:s==this.activeIndex?"active":"default",onClick:()=>{this.goTo(s),this.setActive(s)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},s={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{class:"SliderWrapper"},t("div",{class:"MainContent "},this.showSliderArrows&&t("div",{class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{fill:"none",stroke:"var(--emfe-w-color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:s,src:e}))))),this.showSliderArrows&&t("div",{class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{class:"DotsWrapper"},t("ul",{class:"Dots"},this.renderDots())))}get el(){return i(this)}},o=["ro","en","fr","ar","hu"],n={en:{points:"Points",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},ro:{points:"Points",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},fr:{points:"Points",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},ar:{points:"Points",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"},hu:{points:"Points",noGiftPresentation:"No description",redeem:"Redeem",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem"}},l=(e,t)=>{const i=t;return n[void 0!==i&&o.includes(i)?i:"en"][e]},d=class{constructor(t){e(this,t),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1,this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})()}redeemGiftConfirm(){window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase())return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=l(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||l("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])n[t][i]=e[t][i]})),t(!0)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}render(){return t(a,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling}),t("div",{class:"ElevateDetails"},this.isGiftNotFound&&t(s,null,t("div",{class:"Row ThumbnailRow"},t("div",{class:"BackButton",onClick:()=>{this.onBackClicked()}},"<")),t("div",{class:"Thumnails GiftNotFound"},l("noDataFound",this.language),".")),this.elevateGift&&t(s,null,t("div",{class:"ThumbnailRow"},t("div",{class:"Row"},t("div",{class:"BackButton",onClick:()=>{this.onBackClicked()}},"<"),t("bonus-elevate-shop-assets-slider",{class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{class:"Col Details"},t("h3",{class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{class:"GiftPoints"},t("span",{class:"Points"},this.elevateGift.points," "),t("span",{class:" PointsLabel"},l("points",this.language))))),t("div",{class:"ShopItemDetail Details"},t("div",{class:"GiftPresentation"},t("p",null,this.elevateGift.presentation.description?this.elevateGift.presentation.description:l("noGiftPresentation",this.language))),t("div",{class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled":""}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},l("redeem",this.language)),t("span",{class:"RedeemError Error"}," ",this.redeemErrorMsg," ")))))}};d.style=":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}";const h=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return i(this)}};h.style=":host{display:block}";export{r as bonus_elevate_shop_assets_slider,d as bonus_elevate_shop_item,h as general_styling_wrapper}