@everymatrix/gamification-dropdown 1.74.0 → 1.74.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gamification-dropdown_4.cjs.entry.js +5 -4
- package/dist/esm/gamification-dropdown_4.entry.js +5 -4
- package/dist/gamification-dropdown/gamification-dropdown_4.entry.js +1 -1
- package/package.json +1 -1
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -13,21 +13,22 @@ const mergeTranslations = (url, target) => {
|
|
|
13
13
|
.then((res) => res.json())
|
|
14
14
|
.then((data) => {
|
|
15
15
|
Object.keys(data).forEach((item) => {
|
|
16
|
-
target[item] = target[item] || target['en'];
|
|
16
|
+
target[item] = target[item] || Object.assign({}, target['en']);
|
|
17
17
|
Object.keys(data[item]).forEach((key) => {
|
|
18
18
|
//if there is not key in target, do nothing
|
|
19
19
|
if (!target['en'][key]) {
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
target[item][key] = target[item][key] || target['en'][key];
|
|
22
|
+
const defaultTranslation = target['en'][key];
|
|
24
23
|
if (typeof data[item][key] === 'object') {
|
|
24
|
+
// if the key is not in target, then take from en
|
|
25
|
+
target[item][key] = target[item][key] || Object.assign({}, defaultTranslation);
|
|
25
26
|
Object.keys(data[item][key]).forEach((subKey) => {
|
|
26
27
|
target[item][key][subKey] = data[item][key][subKey];
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
target[item][key] = data[item][key];
|
|
31
|
+
target[item][key] = data[item][key] || defaultTranslation;
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
});
|
|
@@ -10,21 +10,22 @@ const mergeTranslations = (url, target) => {
|
|
|
10
10
|
.then((res) => res.json())
|
|
11
11
|
.then((data) => {
|
|
12
12
|
Object.keys(data).forEach((item) => {
|
|
13
|
-
target[item] = target[item] || target['en'];
|
|
13
|
+
target[item] = target[item] || Object.assign({}, target['en']);
|
|
14
14
|
Object.keys(data[item]).forEach((key) => {
|
|
15
15
|
//if there is not key in target, do nothing
|
|
16
16
|
if (!target['en'][key]) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
target[item][key] = target[item][key] || target['en'][key];
|
|
19
|
+
const defaultTranslation = target['en'][key];
|
|
21
20
|
if (typeof data[item][key] === 'object') {
|
|
21
|
+
// if the key is not in target, then take from en
|
|
22
|
+
target[item][key] = target[item][key] || Object.assign({}, defaultTranslation);
|
|
22
23
|
Object.keys(data[item][key]).forEach((subKey) => {
|
|
23
24
|
target[item][key][subKey] = data[item][key][subKey];
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
else {
|
|
27
|
-
target[item][key] = data[item][key];
|
|
28
|
+
target[item][key] = data[item][key] || defaultTranslation;
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,a as n,b as t}from"./gamification-dropdown-343647b2.js";export{G as gamification_dropdown}from"./gamification-dropdown-343647b2.js";import{r as a,h as i,g as r,c as l,a as o,F as s}from"./index-71b1bdfa.js";import{t as d,T as c}from"./locale.utils-34e6f004.js";import{r as h,t as v,g,P as p,a as f,b,L as x}from"./player-elevate-card-items-08c6fbd8.js";const u=class{constructor(e){a(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?e(this.el,`${this.mbSource}.Style`):(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&n(this.el,this.clientStyling)}handleClientStylingUrlChange(e,n){e!=n&&this.clientStylingUrl&&t(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(n=this.translationUrl,t=this.targetTranslations,new Promise((e=>{fetch(n).then((e=>e.json())).then((n=>{Object.keys(n).forEach((e=>{t[e]=t[e]||t.en,Object.keys(n[e]).forEach((a=>{t.en[a]&&(t[e][a]=t[e][a]||t.en[a],"object"==typeof n[e][a]?Object.keys(n[e][a]).forEach((i=>{t[e][a][i]=n[e][a][i]})):t[e][a]=n[e][a])}))})),e(!0)})).catch((n=>{console.error("Failed to load translations:",n),e(!1)}))})));e.push(a)}var n,t;return await Promise.all(e)}render(){return i("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function y(e){h(1,arguments);var n=v(e);return n.setHours(0,0,0,0),n}function w(e,n){return h(2,arguments),v(e).getTime()-v(n).getTime()}u.style=":host{display:block}";var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function L(e){return e?m[e]:m.trunc}const I=class{constructor(e){a(this,e),this.playerElevateLeveLoaded=l(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,n(!0)})).catch((e=>{t(e)}))))}calcuatePointsToBeExpired(e,n){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,n)=>function(e,n){h(2,arguments);var t=v(e),a=v(n);return t.getTime()<a.getTime()}(new Date(e.expireTime),new Date(n.expireTime))?-1:1));const a=e.aboutToExpire[0],i=function(e,n){h(2,arguments);var t=y(e),a=y(n),i=t.getTime()-g(t),r=a.getTime()-g(a);return Math.round((i-r)/864e5)}(new Date(a.expireTime),new Date);let r=0,l=0,o=0===i?`${n}Day`:n;return i<=0&&(r=function(e,n,t){h(2,arguments);var a=w(e,n)/36e5;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),o=r>1?`${n}Hours`:`${n}Hour`,r<=0&&(l=function(e,n,t){h(2,arguments);var a=w(e,n)/6e4;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),o=l>1?`${n}Minutes`:`${n}Minute`)),t=d(o,{expirationPoints:a.points,expireDay:Math.max(i,r,l),lang:this.params.language}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var a,i,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void t(!0);let l=e.data;this.playerElevateLevel=l.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=l.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(i=e.data.spendableWallet)||void 0===i?void 0:i.total,s=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:s});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),c=this.calcuatePointsToBeExpired(s,"pointsToBeExpired");(d||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:c}),n(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),t(!0)}))))}setLoyaltyProgress(e){!function(e,n){const t=e.querySelector("#total_level"),a=t.getBBox().width,i=n>1?1:n,r=i*a-17<0?0:i*a-17,l=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),s=e.querySelector("#circle_current_level");t.setAttribute("viewbox",`0 0 ${r} 28`),l.setAttribute("width",`${r}`),s.setAttribute("cx",`${r<6.5?6.5:r}`),o.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),h=e.querySelector("#filter_ball"),v=e.querySelector("#filter_heart"),g=e.querySelector("#filter_lock"),p=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),x=e.querySelector("#heart_box"),u=a-10;d.setAttribute("cx",`${u}`),f.setAttribute("x1",`${u}`),f.setAttribute("x2",`${u}`),p.setAttribute("x1",""+(u-6)),p.setAttribute("x2",""+(u-6+11.2)),g.setAttribute("x",""+(u-6)),v.setAttribute("x",""+(u-6-2)),h.setAttribute("x",""+(u-6-2-2)),c.setAttribute("x",""+(u-6-2-2-4)),b.setAttribute("x",""+(u-6)),x.setAttribute("x",""+(u-6)),t.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,n)=>e.firstEntryPoints>n.firstEntryPoints?1:-1));const n=this.playerElevateLevel.loyaltyPoints;let t=0;this.levels.forEach(((e,a)=>{n>e.firstEntryPoints&&(t=a)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:t})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emw--elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emw--color-red, #9e595f);\n}';const C=class{constructor(e){a(this,e),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.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 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(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,n;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(n=this.playerElevateLevel)||void 0===n?void 0:n.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let n=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&n){const e=(n.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:n.name,lang:this.language})}return""}render(){const e=o("../static/card-ground.svg"),n=o("../static/card-ground-over.svg");return i("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"3648821972ac115a1c33705463cdc2cdb427a95b",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:c,translationUrl:this.translationUrl,mbSource:this.mbSource}),i("player-elevate-card-data",{key:"7b36c46a869bd4b014d1f04dbb718445b23ec964",params:this.paramProxy}),i("div",{key:"f4e5aa453459f693e07c166028aec9b0b696c907",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},i("div",{key:"d5f1894120cba3e7cf3c54b838a025f469bc445e",class:"Content Row"},this.playerElevateLevel&&i(s,{key:"112ee04598b23dda6911f043101c0c1631454d7f"},i("div",{key:"7af4b6e937bbe73cc00aae0f27f8c93da47bb626",class:"PlayerImg"},i(p,{key:"1b5037bfa196063f56cccd947c988a3aca0781b0",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"7b714e446f4e01edd4f4aefcc035d070b7d6a47b",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"37ad8ce5dae374685e74f6772d28e79d251932e3",class:"CardCell ElevateLevel"},i("span",{key:"2d9dcf4b08fcecc927d3e8bdca74c75ff4336480",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),i("div",{key:"cc89cbaa70d9583b9626da15e98f9fd61d82f81f",class:"PointsRange"},i(f,{key:"32de4cac05a4fd5610af857b25e096a7cb9ba34d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),i(f,{key:"298f492c8991384547c31396fc930b5c21f41501",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),i(b,{key:"aca4f5642c41db1c4b7fa04411331a5c25c655dd"}),i("div",{key:"d841c5df319de105376c6eee24bc685757916aae",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&i("div",{key:"774279829f3f52ee5696550a855a833b39df8c81",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&i(x,{key:"3a4319e502e85b26cb220942492b161ad842be82",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};C.style=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";export{u as general_styling_wrapper,I as player_elevate_card_data,C as player_elevate_loyaltycard}
|
|
1
|
+
import{s as e,a as n,b as t}from"./gamification-dropdown-343647b2.js";export{G as gamification_dropdown}from"./gamification-dropdown-343647b2.js";import{r as a,h as i,g as r,c as o,a as l,F as s}from"./index-71b1bdfa.js";import{t as d,T as c}from"./locale.utils-34e6f004.js";import{r as h,t as v,g,P as p,a as f,b,L as x}from"./player-elevate-card-items-08c6fbd8.js";const u=class{constructor(e){a(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?e(this.el,`${this.mbSource}.Style`):(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&n(this.el,this.clientStyling)}handleClientStylingUrlChange(e,n){e!=n&&this.clientStylingUrl&&t(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(n=this.translationUrl,t=this.targetTranslations,new Promise((e=>{fetch(n).then((e=>e.json())).then((n=>{Object.keys(n).forEach((e=>{t[e]=t[e]||Object.assign({},t.en),Object.keys(n[e]).forEach((a=>{if(!t.en[a])return;const i=t.en[a];"object"==typeof n[e][a]?(t[e][a]=t[e][a]||Object.assign({},i),Object.keys(n[e][a]).forEach((i=>{t[e][a][i]=n[e][a][i]}))):t[e][a]=n[e][a]||i}))})),e(!0)})).catch((n=>{console.error("Failed to load translations:",n),e(!1)}))})));e.push(a)}var n,t;return await Promise.all(e)}render(){return i("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function y(e){h(1,arguments);var n=v(e);return n.setHours(0,0,0,0),n}function w(e,n){return h(2,arguments),v(e).getTime()-v(n).getTime()}u.style=":host{display:block}";var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function L(e){return e?m[e]:m.trunc}const I=class{constructor(e){a(this,e),this.playerElevateLeveLoaded=o(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,n(!0)})).catch((e=>{t(e)}))))}calcuatePointsToBeExpired(e,n){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,n)=>function(e,n){h(2,arguments);var t=v(e),a=v(n);return t.getTime()<a.getTime()}(new Date(e.expireTime),new Date(n.expireTime))?-1:1));const a=e.aboutToExpire[0],i=function(e,n){h(2,arguments);var t=y(e),a=y(n),i=t.getTime()-g(t),r=a.getTime()-g(a);return Math.round((i-r)/864e5)}(new Date(a.expireTime),new Date);let r=0,o=0,l=0===i?`${n}Day`:n;return i<=0&&(r=function(e,n,t){h(2,arguments);var a=w(e,n)/36e5;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),l=r>1?`${n}Hours`:`${n}Hour`,r<=0&&(o=function(e,n,t){h(2,arguments);var a=w(e,n)/6e4;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${n}Minutes`:`${n}Minute`)),t=d(l,{expirationPoints:a.points,expireDay:Math.max(i,r,o),lang:this.params.language}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var a,i,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void t(!0);let o=e.data;this.playerElevateLevel=o.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=o.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const l=null===(i=e.data.spendableWallet)||void 0===i?void 0:i.total,s=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:l,loyaltyWalletTotal:s});let d=this.calcuatePointsToBeExpired(l,"coinsToBeExpired"),c=this.calcuatePointsToBeExpired(s,"pointsToBeExpired");(d||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:c}),n(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),t(!0)}))))}setLoyaltyProgress(e){!function(e,n){const t=e.querySelector("#total_level"),a=t.getBBox().width,i=n>1?1:n,r=i*a-17<0?0:i*a-17,o=e.querySelector("#current_level"),l=e.querySelector("#filter_current_level"),s=e.querySelector("#circle_current_level");t.setAttribute("viewbox",`0 0 ${r} 28`),o.setAttribute("width",`${r}`),s.setAttribute("cx",`${r<6.5?6.5:r}`),l.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),h=e.querySelector("#filter_ball"),v=e.querySelector("#filter_heart"),g=e.querySelector("#filter_lock"),p=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),x=e.querySelector("#heart_box"),u=a-10;d.setAttribute("cx",`${u}`),f.setAttribute("x1",`${u}`),f.setAttribute("x2",`${u}`),p.setAttribute("x1",""+(u-6)),p.setAttribute("x2",""+(u-6+11.2)),g.setAttribute("x",""+(u-6)),v.setAttribute("x",""+(u-6-2)),h.setAttribute("x",""+(u-6-2-2)),c.setAttribute("x",""+(u-6-2-2-4)),b.setAttribute("x",""+(u-6)),x.setAttribute("x",""+(u-6)),t.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,n)=>e.firstEntryPoints>n.firstEntryPoints?1:-1));const n=this.playerElevateLevel.loyaltyPoints;let t=0;this.levels.forEach(((e,a)=>{n>e.firstEntryPoints&&(t=a)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:t})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emw--elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emw--color-red, #9e595f);\n}';const C=class{constructor(e){a(this,e),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.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 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(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,n;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(n=this.playerElevateLevel)||void 0===n?void 0:n.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let n=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&n){const e=(n.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:n.name,lang:this.language})}return""}render(){const e=l("../static/card-ground.svg"),n=l("../static/card-ground-over.svg");return i("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"3648821972ac115a1c33705463cdc2cdb427a95b",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:c,translationUrl:this.translationUrl,mbSource:this.mbSource}),i("player-elevate-card-data",{key:"7b36c46a869bd4b014d1f04dbb718445b23ec964",params:this.paramProxy}),i("div",{key:"f4e5aa453459f693e07c166028aec9b0b696c907",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},i("div",{key:"d5f1894120cba3e7cf3c54b838a025f469bc445e",class:"Content Row"},this.playerElevateLevel&&i(s,{key:"112ee04598b23dda6911f043101c0c1631454d7f"},i("div",{key:"7af4b6e937bbe73cc00aae0f27f8c93da47bb626",class:"PlayerImg"},i(p,{key:"1b5037bfa196063f56cccd947c988a3aca0781b0",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"7b714e446f4e01edd4f4aefcc035d070b7d6a47b",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"37ad8ce5dae374685e74f6772d28e79d251932e3",class:"CardCell ElevateLevel"},i("span",{key:"2d9dcf4b08fcecc927d3e8bdca74c75ff4336480",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),i("div",{key:"cc89cbaa70d9583b9626da15e98f9fd61d82f81f",class:"PointsRange"},i(f,{key:"32de4cac05a4fd5610af857b25e096a7cb9ba34d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),i(f,{key:"298f492c8991384547c31396fc930b5c21f41501",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),i(b,{key:"aca4f5642c41db1c4b7fa04411331a5c25c655dd"}),i("div",{key:"d841c5df319de105376c6eee24bc685757916aae",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&i("div",{key:"774279829f3f52ee5696550a855a833b39df8c81",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&i(x,{key:"3a4319e502e85b26cb220942492b161ad842be82",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};C.style=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";export{u as general_styling_wrapper,I as player_elevate_card_data,C as player_elevate_loyaltycard}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|