@everymatrix/casino-header-controller 1.69.2 → 1.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{CasinoHeaderController-CM6M7oBn.js → CasinoHeaderController-B1x--_Oq.js} +1 -1
- package/components/{CasinoHeaderController-wemeTpGe.cjs → CasinoHeaderController-BRa3odIv.cjs} +1 -1
- package/components/{CasinoHeaderController-wAuW45el.js → CasinoHeaderController-BfAseLS8.js} +1 -1
- package/es2015/casino-header-controller.cjs +1 -1
- package/es2015/casino-header-controller.js +1 -1
- package/esnext/casino-header-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-CAQwtT6c.cjs → gamification-dropdown-343647b2-B50uewij.cjs} +1 -1
- package/stencil/{gamification-dropdown-8eb8a896-B34OfAvi.js → gamification-dropdown-343647b2-BtKUznL8.js} +8 -5
- package/stencil/{gamification-dropdown-8eb8a896-9N51mTKJ.js → gamification-dropdown-343647b2-DuhB4qAC.js} +6 -3
- package/stencil/gamification-dropdown-BXoXmCVj.js +25 -0
- package/stencil/gamification-dropdown-BgQs3qHL.cjs +1 -0
- package/stencil/gamification-dropdown-CHDfyBlq.js +7 -0
- package/stencil/{gamification-dropdown_4-DDitkdLY.cjs → gamification-dropdown_4-BCIlNfU2.cjs} +2 -2
- package/stencil/{gamification-dropdown_4-DBjdoNfc.js → gamification-dropdown_4-BMYGUc6f.js} +71 -64
- package/stencil/{gamification-dropdown_4-YGRZ_U5s.js → gamification-dropdown_4-Bwo0uyQb.js} +73 -66
- package/stencil/{index-71b1bdfa-BQViYc9r.js → index-71b1bdfa-Br04T1ks.js} +4 -4
- package/stencil/{index-71b1bdfa-BVbjDrHk.js → index-71b1bdfa-CqHhm_K7.js} +4 -4
- package/stencil/{index-71b1bdfa-CG5MERSu.cjs → index-71b1bdfa-DEOwV3WT.cjs} +1 -1
- package/stencil/player-elevate-card-CkeeX0Fc.cjs +64 -0
- package/stencil/{player-elevate-card-C0e-Dx1F.js → player-elevate-card-Csrn1cq3.js} +8 -8
- package/stencil/{player-elevate-card-CBRZZuy4.js → player-elevate-card-Cyj2vrTT.js} +8 -8
- package/stencil/{player-elevate-card-items-08c6fbd8-Dsdh-okx.js → player-elevate-card-items-08c6fbd8-DvNcpL9M.js} +1 -1
- package/stencil/{player-elevate-card-items-08c6fbd8-BF-ixp2m.js → player-elevate-card-items-08c6fbd8-GG7yo-HJ.js} +1 -1
- package/stencil/{player-elevate-card-items-08c6fbd8-mzRnJo_u.cjs → player-elevate-card-items-08c6fbd8-swAJgFA-.cjs} +1 -1
- package/stencil/{player-elevate-pointcard-BInA3gI1.js → player-elevate-pointcard-CDT1deRp.js} +6 -6
- package/stencil/{player-elevate-pointcard-CD45fOUi.js → player-elevate-pointcard-CQ618787.js} +6 -6
- package/stencil/player-elevate-pointcard-D962b07c.cjs +1 -0
- package/stencil/{player-rakeback-card-BAPJWhyX.js → player-rakeback-card-D-wGOAvr.js} +3 -3
- package/stencil/player-rakeback-card-DI8fIhnW.cjs +1 -0
- package/stencil/{player-rakeback-card-CAluJyQa.js → player-rakeback-card-r5qjxDTk.js} +3 -3
- package/stencil/gamification-dropdown-6aOjFbd0.cjs +0 -1
- package/stencil/gamification-dropdown-Brwhp697.js +0 -25
- package/stencil/gamification-dropdown-D6fl7GGs.js +0 -7
- package/stencil/player-elevate-card-DpFT4Eb4.cjs +0 -64
- package/stencil/player-elevate-pointcard-CSPhjhiu.cjs +0 -1
- package/stencil/player-rakeback-card-DBnWRkcb.cjs +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var l=(a,t,e)=>new Promise((o,i)=>{var c=r=>{try{s(e.next(r))}catch(b){i(b)}},d=r=>{try{s(e.throw(r))}catch(b){i(b)}},s=r=>r.done?o(r.value):Promise.resolve(r.value).then(c,d);s((e=e.apply(a,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-71b1bdfa-DEOwV3WT.cjs"),k=require("./locale-B_6Rn5-v.cjs"),f=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}",m=f,h=class{constructor(a){n.registerInstance(this,a),this.truncateNumber=(t,e=2)=>{const o=t.toString(),[i,c=""]=o.split(".");return e>0?`${i}.${c?c.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{!this.endpoint||!this.session||!this.rakebackInfo.claimable||this.isLoading||window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}onSessionOrEndpointChange(){return l(this,null,function*(){yield this.loadRakebackInfo()})}onShowOrHasRakebackWalletChange(){return l(this,null,function*(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet})}handleMessage(a){const{type:t}=a==null?void 0:a.data;t==="RakebackClaimConfirmed"&&this.claimRakeback()}loadRakebackInfo(){return l(this,null,function*(){if(!(!this.endpoint||!this.session)){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),t=yield fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const e=yield t.json();if(!e.success)throw new Error(e.errorMessage||"Failed to load rakeback info");const{rakebackWallet:o}=e==null?void 0:e.data;if(!o){window.postMessage({type:"RakebackWalletMissing"},window.location.href);return}const{total:i,claimable:c,currency:d,minutesCanClaim:s}=o||{};this.rakebackInfo={hasRakebackWallet:!0,points:i!=null&&i.points?this.truncateNumber(i.points,2):"0.00",currency:d||"",claimable:c||!1,showCanClaim:!!(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}})}claimRakeback(){return l(this,null,function*(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),t=yield fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const e=yield t.json();if(!e.success)throw new Error(e.errorMessage||"Failed to claim rakeback");yield this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}})}componentWillLoad(){return l(this,null,function*(){yield this.loadRakebackInfo(),yield this.onShowOrHasRakebackWalletChange()})}render(){return this.showTheWidget?n.h("div",{class:"RakebackCard"},n.h("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:k.TRANSLATIONS,translationUrl:this.translationUrl,mbSource:this.mbSource}),n.h("div",{class:"RakebackCardContent"},n.h("div",{class:"RakebackTitle"},k.translate("rakebackTitle",this.language)),n.h("div",{class:"RakebackDetails"},n.h("div",{class:"RakebackInfo"},n.h("div",{class:"RakebackNumContainer"},n.h("span",{class:"RakebackNum"},this.rakebackInfo.points),n.h("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),n.h("div",{class:`RakebackButton ${this.isLoading||!this.rakebackInfo.claimable?"disabled":""}`,onClick:this.sendRakebackClaimedEvent},k.translate("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&n.h("div",{class:"RakebackCoolOff"},k.translateWithParams("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};h.style=m;exports.player_rakeback_card=h;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as k, h as n } from "./index-71b1bdfa-
|
1
|
+
import { r as k, h as n } from "./index-71b1bdfa-Br04T1ks.js";
|
2
2
|
import { a as c, t as d, T as b } from "./locale-TxlOHoKi.js";
|
3
3
|
const h = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}", f = h, m = class {
|
4
4
|
constructor(a) {
|
@@ -7,7 +7,7 @@ const h = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}t
|
|
7
7
|
return t > 0 ? `${i}.${o ? o.slice(0, t) : "00"}` : `${i}`;
|
8
8
|
}, this.sendRakebackClaimedEvent = () => {
|
9
9
|
!this.endpoint || !this.session || !this.rakebackInfo.claimable || this.isLoading || window.postMessage({ type: "RakebackClaimTrigger", points: this.rakebackInfo.points }, window.location.href);
|
10
|
-
}, this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.language = "en", this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.show = !0, this.rakebackInfo = {
|
10
|
+
}, this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.language = "en", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.show = !0, this.rakebackInfo = {
|
11
11
|
hasRakebackWallet: !1,
|
12
12
|
points: 0,
|
13
13
|
currency: "TRY",
|
@@ -90,7 +90,7 @@ const h = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}t
|
|
90
90
|
await this.loadRakebackInfo(), await this.onShowOrHasRakebackWalletChange();
|
91
91
|
}
|
92
92
|
render() {
|
93
|
-
return this.showTheWidget ? n("div", { class: "RakebackCard" }, n("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: b, translationUrl: this.translationUrl }), n("div", { class: "RakebackCardContent" }, n("div", { class: "RakebackTitle" }, c("rakebackTitle", this.language)), n("div", { class: "RakebackDetails" }, n("div", { class: "RakebackInfo" }, n("div", { class: "RakebackNumContainer" }, n("span", { class: "RakebackNum" }, this.rakebackInfo.points), n("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), n("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? "disabled" : ""}`, onClick: this.sendRakebackClaimedEvent }, c("claim", this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && n("div", { class: "RakebackCoolOff" }, d("minutesCanClaim", {
|
93
|
+
return this.showTheWidget ? n("div", { class: "RakebackCard" }, n("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: b, translationUrl: this.translationUrl, mbSource: this.mbSource }), n("div", { class: "RakebackCardContent" }, n("div", { class: "RakebackTitle" }, c("rakebackTitle", this.language)), n("div", { class: "RakebackDetails" }, n("div", { class: "RakebackInfo" }, n("div", { class: "RakebackNumContainer" }, n("span", { class: "RakebackNum" }, this.rakebackInfo.points), n("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), n("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? "disabled" : ""}`, onClick: this.sendRakebackClaimedEvent }, c("claim", this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && n("div", { class: "RakebackCoolOff" }, d("minutesCanClaim", {
|
94
94
|
lang: this.language,
|
95
95
|
minutes: this.rakebackInfo.minutesCanClaim
|
96
96
|
})))) : null;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},c=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,c);l((t=t.apply(n,a)).next())});const p=require("./index-71b1bdfa-CG5MERSu.cjs"),y=require("./app-globals-0f993ce5-DgOnOgxM.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-6aOjFbd0.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield y.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],n)}));
|
@@ -1,25 +0,0 @@
|
|
1
|
-
var o = (n, a, l) => new Promise((s, i) => {
|
2
|
-
var g = (e) => {
|
3
|
-
try {
|
4
|
-
t(l.next(e));
|
5
|
-
} catch (r) {
|
6
|
-
i(r);
|
7
|
-
}
|
8
|
-
}, p = (e) => {
|
9
|
-
try {
|
10
|
-
t(l.throw(e));
|
11
|
-
} catch (r) {
|
12
|
-
i(r);
|
13
|
-
}
|
14
|
-
}, t = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(g, p);
|
15
|
-
t((l = l.apply(n, a)).next());
|
16
|
-
});
|
17
|
-
import { b as d, p as y } from "./index-71b1bdfa-BVbjDrHk.js";
|
18
|
-
import { g as c } from "./app-globals-0f993ce5-B6nNHmA4.js";
|
19
|
-
var v = () => {
|
20
|
-
const n = import.meta.url, a = {};
|
21
|
-
return n !== "" && (a.resourcesUrl = new URL(".", n).href), y(a);
|
22
|
-
};
|
23
|
-
v().then((n) => o(void 0, null, function* () {
|
24
|
-
return yield c(), d([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], n);
|
25
|
-
}));
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { b as a, p as l } from "./index-71b1bdfa-BQViYc9r.js";
|
2
|
-
import { g as t } from "./app-globals-0f993ce5-B6nNHmA4.js";
|
3
|
-
var r = () => {
|
4
|
-
const e = import.meta.url, n = {};
|
5
|
-
return e !== "" && (n.resourcesUrl = new URL(".", e).href), l(n);
|
6
|
-
};
|
7
|
-
r().then(async (e) => (await t(), a([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], e)));
|
@@ -1,64 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-71b1bdfa-CG5MERSu.cjs"),n=require("./player-elevate-card-items-08c6fbd8-mzRnJo_u.cjs"),i=require("./locale-B_6Rn5-v.cjs"),r=`@container (max-width: 270px) {
|
2
|
-
.Card .Inner {
|
3
|
-
flex-direction: column;
|
4
|
-
}
|
5
|
-
.Card .Inner .Content {
|
6
|
-
padding: 9px;
|
7
|
-
}
|
8
|
-
.Inner .Row .ExpirationPoints {
|
9
|
-
order: 1;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
.Card .PlayerImg {
|
13
|
-
order: 0;
|
14
|
-
}
|
15
|
-
.Card .ExpirationPoints {
|
16
|
-
order: 3;
|
17
|
-
}
|
18
|
-
.Card .LevelInfo {
|
19
|
-
order: 2;
|
20
|
-
}
|
21
|
-
.Card .Inner .Row .PlayerImg {
|
22
|
-
flex-direction: column;
|
23
|
-
}
|
24
|
-
.Card .Inner .Row .PointsInfo {
|
25
|
-
width: 100%;
|
26
|
-
text-align: center;
|
27
|
-
display: flex;
|
28
|
-
flex-direction: column;
|
29
|
-
max-height: 50%;
|
30
|
-
}
|
31
|
-
.Card .Inner .PlayerAvatar .Badge {
|
32
|
-
background-size: contain;
|
33
|
-
background-repeat: no-repeat;
|
34
|
-
position: absolute;
|
35
|
-
right: 5px;
|
36
|
-
bottom: -5px;
|
37
|
-
width: 40%;
|
38
|
-
height: 40%;
|
39
|
-
overflow: visible;
|
40
|
-
}
|
41
|
-
.Card .Inner .Row .ExpirationPoints {
|
42
|
-
text-align: left;
|
43
|
-
color: var(--emw--color-red, red);
|
44
|
-
}
|
45
|
-
.Card .Inner .Row .Points {
|
46
|
-
text-wrap: nowrap;
|
47
|
-
}
|
48
|
-
.Card .Inner .LevelInfo .ElevateLevel {
|
49
|
-
flex-direction: column;
|
50
|
-
}
|
51
|
-
.Card .Inner .LevelInfo .ElevateLevel .LevelName {
|
52
|
-
width: calc(100% - 20px);
|
53
|
-
text-align: left;
|
54
|
-
font-size: 13px;
|
55
|
-
padding-left: 20px;
|
56
|
-
margin: 10px 0;
|
57
|
-
}
|
58
|
-
.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {
|
59
|
-
text-align: center;
|
60
|
-
font-size: smaller;
|
61
|
-
}
|
62
|
-
.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {
|
63
|
-
margin-left: 5px;
|
64
|
-
}`,s=r,t=class{constructor(a){e.registerInstance(this,a),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerLevelFlag=0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(a){a.detail&&(a.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=a.detail.elevateLevelWalletTotal),a.detail.elevateLevel&&(this.playerElevateLevel=a.detail.elevateLevel),a.detail.pointExpireString&&(this.pointExpireString=a.detail.xpExpireString),a.detail.calculatedLevelFlag&&(this.playerLevelFlag=a.detail.calculatedLevelFlag))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language,calculateLevelFlag:!0}}render(){const a=e.getAssetPath("../static/card-ground.svg"),l=e.getAssetPath("../static/card-ground-over.svg");return e.h("div",{key:"278a328dd084ee73b2707b93a57bccae64a2c9c7",class:`ElevateCardWrapper ${this.theme}`},e.h("div",{key:"68c885baf533447a7c77fd887bbec11e53768277",class:"Card Outer",style:{backgroundImage:`url(${a}`}},e.h("general-styling-wrapper",{key:"4066253a70cdd5e712ca244a708e7c1600c83071",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:i.TRANSLATIONS,translationUrl:this.translationUrl}),e.h("player-elevate-card-data",{key:"64cda2a267c752056b3c7e3134cc324fa96bc261",params:this.paramProxy}),e.h("div",{key:"c63ae83b401a35f5a78acd83dc3d7296c25141d7",class:"OuterCover Inner",style:{backgroundImage:`url(${l}`}},this.playerElevateLevel&&e.h(e.Fragment,{key:"ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c"},e.h("div",{key:"fa1bf74f45e28318c95266cc42c54541bde92718",class:"Content Row"},e.h("div",{key:"7ede46f91bcc0d894b2b633627a4ca97d15fbe90",class:"PlayerImg"},e.h(n.PlayerAvatar,{key:"b6d0bac085e0178512b8a63ba8fccae7d4cc8399",playerAvatarUrl:this.playerAvatarUrl,loyaltyIconUrl:this.playerElevateLevel.presentation.asset}),e.h(n.PlayerPoints,{key:"88c445dbcd7dbe426a8de18beea02aecc03e26f3",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language})),this.pointExpireString&&e.h("div",{key:"4d985e486ecb74a6c916b28e619de83cb3d77ac1",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),e.h("div",{key:"34e051ee1ff79b825fca57db958e1e5684a0aca1",class:`LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}`},e.h(n.PlayerNameDiv,{key:"fa1b1f16e0b25c6adfba4c215e4ed377e05699b2",playerName:this.playerName}),e.h(n.PlayerElevateLoyaltyLevel,{key:"6d18b1422db202363ebcd56cc56946e0e071937b",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),e.h(n.PlayerLoyaltyProcess,{key:"7dae355c4a5a9e28c70dced0ac061608f1753020"}),e.h(n.PlayerElevateCardRedeem,{key:"7e5f830b612c962a828c58f20a88dc97d315c910",onRedeemClick:this.onRedeemClick,language:this.language})))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};t.style=s;exports.player_elevate_card=t;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-71b1bdfa-CG5MERSu.cjs"),a=require("./locale-B_6Rn5-v.cjs"),n=require("./player-elevate-card-items-08c6fbd8-mzRnJo_u.cjs"),r=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background: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%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}",s=r,i=class{constructor(t){e.registerInstance(this,t),this.isPointDetailCard=this.buttonType==="earningRule",this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(t){t.detail&&(t.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=t.detail.elevateLevelWalletTotal,this.elevateSPTotal=t.detail.loyaltyWalletTotal),t.detail.elevateLevel&&(this.playerElevateLevel=t.detail.elevateLevel),t.detail.pointExpireString&&(this.pointExpireString=t.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const t=e.getAssetPath("../static/card-ground.svg"),l=e.getAssetPath("../static/card-ground-over.svg");return e.h("div",{key:"ab47a39fc8fa5562e2843755b6b935296f6952fd",class:`ElevateCardWrapper ${this.theme}`},e.h("div",{key:"8b9ce754eb082af8005b40915e9b2e861ec99287",class:"PointsCard Outer ",style:{backgroundImage:`url(${t}`}},e.h("general-styling-wrapper",{key:"f7d660116db83ce86b36a558441bf02bf74592e6",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:a.TRANSLATIONS,translationUrl:this.translationUrl}),e.h("player-elevate-card-data",{key:"f42375d3631031e7ef8041ccabe62659858e6ac0",params:this.paramProxy}),e.h("div",{key:"0b5eb08baa589ed85c96e0c5731ea7d93c76d398",class:"OuterCover Inner",style:{backgroundImage:`url(${l}`}},e.h("div",{key:"3b66d8f8baa7c510c04a6ebe73ba87fc1ba33426",class:"Content Row"},this.playerElevateLevel&&e.h(e.Fragment,{key:"fa0f8a796e0d08f18bd37ab193f1e6a49d6138b5"},e.h("div",{key:"ffe65be1e5d9f04a2c3711e9f61f56c95818244b",class:"PlayerImg"},e.h(n.PlayerAvatar,{key:"4947af0ebd6978f938d5f3f0185f8700a3506b75",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),e.h("div",{key:"2f0a7c4ef826f16472313cca974b4c208c33e83a",class:`LevelInfo ${this.playerElevateLevel.name}`},e.h("div",{key:"118eabd6511b72fbb7c78a0ee2d190b719d708ae",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:a.translate("spendablePoints",this.language)),e.h("div",{key:"5a15d9630c51f23024ddd5967ef8753bac746936",class:"PointsTxt SPPoints"},e.h(n.PlayerPoints,{key:"7994e6b898d69a62ec8c4aeb0892a1c718104d7e",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),e.h("a",{key:"8d25c48516245dc067676278cd861193ca4863bd",class:"TC",onClick:()=>{this.onDetailsClick()}},a.translate("termAndConditions",this.language))),this.pointExpireString&&e.h("div",{key:"6c221bd9a75643bce76e493addbb45cee6edf8b9",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};i.style=s;exports.player_elevate_pointcard=i;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var l=(a,t,e)=>new Promise((o,i)=>{var c=r=>{try{s(e.next(r))}catch(b){i(b)}},d=r=>{try{s(e.throw(r))}catch(b){i(b)}},s=r=>r.done?o(r.value):Promise.resolve(r.value).then(c,d);s((e=e.apply(a,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-71b1bdfa-CG5MERSu.cjs"),k=require("./locale-B_6Rn5-v.cjs"),f=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}",g=f,h=class{constructor(a){n.registerInstance(this,a),this.truncateNumber=(t,e=2)=>{const o=t.toString(),[i,c=""]=o.split(".");return e>0?`${i}.${c?c.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{!this.endpoint||!this.session||!this.rakebackInfo.claimable||this.isLoading||window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}onSessionOrEndpointChange(){return l(this,null,function*(){yield this.loadRakebackInfo()})}onShowOrHasRakebackWalletChange(){return l(this,null,function*(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet})}handleMessage(a){const{type:t}=a==null?void 0:a.data;t==="RakebackClaimConfirmed"&&this.claimRakeback()}loadRakebackInfo(){return l(this,null,function*(){if(!(!this.endpoint||!this.session)){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),t=yield fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const e=yield t.json();if(!e.success)throw new Error(e.errorMessage||"Failed to load rakeback info");const{rakebackWallet:o}=e==null?void 0:e.data;if(!o){window.postMessage({type:"RakebackWalletMissing"},window.location.href);return}const{total:i,claimable:c,currency:d,minutesCanClaim:s}=o||{};this.rakebackInfo={hasRakebackWallet:!0,points:i!=null&&i.points?this.truncateNumber(i.points,2):"0.00",currency:d||"",claimable:c||!1,showCanClaim:!!(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}})}claimRakeback(){return l(this,null,function*(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),t=yield fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const e=yield t.json();if(!e.success)throw new Error(e.errorMessage||"Failed to claim rakeback");yield this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}})}componentWillLoad(){return l(this,null,function*(){yield this.loadRakebackInfo(),yield this.onShowOrHasRakebackWalletChange()})}render(){return this.showTheWidget?n.h("div",{class:"RakebackCard"},n.h("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:k.TRANSLATIONS,translationUrl:this.translationUrl}),n.h("div",{class:"RakebackCardContent"},n.h("div",{class:"RakebackTitle"},k.translate("rakebackTitle",this.language)),n.h("div",{class:"RakebackDetails"},n.h("div",{class:"RakebackInfo"},n.h("div",{class:"RakebackNumContainer"},n.h("span",{class:"RakebackNum"},this.rakebackInfo.points),n.h("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),n.h("div",{class:`RakebackButton ${this.isLoading||!this.rakebackInfo.claimable?"disabled":""}`,onClick:this.sendRakebackClaimedEvent},k.translate("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&n.h("div",{class:"RakebackCoolOff"},k.translateWithParams("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};h.style=g;exports.player_rakeback_card=h;
|