@everymatrix/user-deposit-withdrawal 1.30.0 → 1.31.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/user-deposit-withdrawal.cjs.entry.js +11 -1
- package/dist/cjs/user-deposit-withdrawal.cjs.js +1 -1
- package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.js +47 -1
- package/dist/components/user-deposit-withdrawal.js +13 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/user-deposit-withdrawal.entry.js +11 -1
- package/dist/esm/user-deposit-withdrawal.js +1 -1
- package/dist/types/components/user-deposit-withdrawal/user-deposit-withdrawal.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/user-deposit-withdrawal/p-3eda2d99.entry.js +1 -0
- package/dist/user-deposit-withdrawal/user-deposit-withdrawal.esm.js +1 -1
- package/package.json +1 -1
- package/dist/user-deposit-withdrawal/p-7e65ac31.entry.js +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/user-deposit-withdrawal/.stencil/packages/user-deposit-withdrawal/stencil.config.d.ts +0 -0
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -57,6 +57,14 @@ const UserDepositWithdrawal = class {
|
|
|
57
57
|
*/
|
|
58
58
|
this.clientStylingUrl = '';
|
|
59
59
|
/*
|
|
60
|
+
* Operator selected currency
|
|
61
|
+
*/
|
|
62
|
+
this.currency = '';
|
|
63
|
+
/*
|
|
64
|
+
* Display bonus dropdown
|
|
65
|
+
*/
|
|
66
|
+
this.showBonusSelectionInput = 'true';
|
|
67
|
+
/*
|
|
60
68
|
* State of deposit - short cashier enabled or not
|
|
61
69
|
*/
|
|
62
70
|
this.isShortCashier = 'false';
|
|
@@ -131,7 +139,9 @@ const UserDepositWithdrawal = class {
|
|
|
131
139
|
FailUrl: this.failUrl,
|
|
132
140
|
Language: this.language,
|
|
133
141
|
productType: this.productType,
|
|
134
|
-
isShortCashier: this.isShortCashier
|
|
142
|
+
isShortCashier: this.isShortCashier,
|
|
143
|
+
currency: this.currency,
|
|
144
|
+
showBonusSelectionInput: this.showBonusSelectionInput
|
|
135
145
|
};
|
|
136
146
|
try {
|
|
137
147
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -13,6 +13,14 @@ export class UserDepositWithdrawal {
|
|
|
13
13
|
*/
|
|
14
14
|
this.clientStylingUrl = '';
|
|
15
15
|
/*
|
|
16
|
+
* Operator selected currency
|
|
17
|
+
*/
|
|
18
|
+
this.currency = '';
|
|
19
|
+
/*
|
|
20
|
+
* Display bonus dropdown
|
|
21
|
+
*/
|
|
22
|
+
this.showBonusSelectionInput = 'true';
|
|
23
|
+
/*
|
|
16
24
|
* State of deposit - short cashier enabled or not
|
|
17
25
|
*/
|
|
18
26
|
this.isShortCashier = 'false';
|
|
@@ -97,7 +105,9 @@ export class UserDepositWithdrawal {
|
|
|
97
105
|
FailUrl: this.failUrl,
|
|
98
106
|
Language: this.language,
|
|
99
107
|
productType: this.productType,
|
|
100
|
-
isShortCashier: this.isShortCashier
|
|
108
|
+
isShortCashier: this.isShortCashier,
|
|
109
|
+
currency: this.currency,
|
|
110
|
+
showBonusSelectionInput: this.showBonusSelectionInput
|
|
101
111
|
};
|
|
102
112
|
try {
|
|
103
113
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -441,6 +451,42 @@ export class UserDepositWithdrawal {
|
|
|
441
451
|
"attribute": "deposit-url",
|
|
442
452
|
"reflect": true
|
|
443
453
|
},
|
|
454
|
+
"currency": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"mutable": false,
|
|
457
|
+
"complexType": {
|
|
458
|
+
"original": "string",
|
|
459
|
+
"resolved": "string",
|
|
460
|
+
"references": {}
|
|
461
|
+
},
|
|
462
|
+
"required": false,
|
|
463
|
+
"optional": false,
|
|
464
|
+
"docs": {
|
|
465
|
+
"tags": [],
|
|
466
|
+
"text": ""
|
|
467
|
+
},
|
|
468
|
+
"attribute": "currency",
|
|
469
|
+
"reflect": true,
|
|
470
|
+
"defaultValue": "''"
|
|
471
|
+
},
|
|
472
|
+
"showBonusSelectionInput": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"mutable": false,
|
|
475
|
+
"complexType": {
|
|
476
|
+
"original": "string",
|
|
477
|
+
"resolved": "string",
|
|
478
|
+
"references": {}
|
|
479
|
+
},
|
|
480
|
+
"required": false,
|
|
481
|
+
"optional": false,
|
|
482
|
+
"docs": {
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": ""
|
|
485
|
+
},
|
|
486
|
+
"attribute": "show-bonus-selection-input",
|
|
487
|
+
"reflect": true,
|
|
488
|
+
"defaultValue": "'true'"
|
|
489
|
+
},
|
|
444
490
|
"isShortCashier": {
|
|
445
491
|
"type": "string",
|
|
446
492
|
"mutable": false,
|
|
@@ -55,6 +55,14 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
55
55
|
*/
|
|
56
56
|
this.clientStylingUrl = '';
|
|
57
57
|
/*
|
|
58
|
+
* Operator selected currency
|
|
59
|
+
*/
|
|
60
|
+
this.currency = '';
|
|
61
|
+
/*
|
|
62
|
+
* Display bonus dropdown
|
|
63
|
+
*/
|
|
64
|
+
this.showBonusSelectionInput = 'true';
|
|
65
|
+
/*
|
|
58
66
|
* State of deposit - short cashier enabled or not
|
|
59
67
|
*/
|
|
60
68
|
this.isShortCashier = 'false';
|
|
@@ -129,7 +137,9 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
129
137
|
FailUrl: this.failUrl,
|
|
130
138
|
Language: this.language,
|
|
131
139
|
productType: this.productType,
|
|
132
|
-
isShortCashier: this.isShortCashier
|
|
140
|
+
isShortCashier: this.isShortCashier,
|
|
141
|
+
currency: this.currency,
|
|
142
|
+
showBonusSelectionInput: this.showBonusSelectionInput
|
|
133
143
|
};
|
|
134
144
|
try {
|
|
135
145
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -213,6 +223,8 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
213
223
|
"casinoUrl": [513, "casino-url"],
|
|
214
224
|
"contactUrl": [513, "contact-url"],
|
|
215
225
|
"depositUrl": [513, "deposit-url"],
|
|
226
|
+
"currency": [513],
|
|
227
|
+
"showBonusSelectionInput": [513, "show-bonus-selection-input"],
|
|
216
228
|
"isShortCashier": [513, "is-short-cashier"],
|
|
217
229
|
"homeUrl": [513, "home-url"],
|
|
218
230
|
"beforeRedirect": [16],
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -53,6 +53,14 @@ const UserDepositWithdrawal = class {
|
|
|
53
53
|
*/
|
|
54
54
|
this.clientStylingUrl = '';
|
|
55
55
|
/*
|
|
56
|
+
* Operator selected currency
|
|
57
|
+
*/
|
|
58
|
+
this.currency = '';
|
|
59
|
+
/*
|
|
60
|
+
* Display bonus dropdown
|
|
61
|
+
*/
|
|
62
|
+
this.showBonusSelectionInput = 'true';
|
|
63
|
+
/*
|
|
56
64
|
* State of deposit - short cashier enabled or not
|
|
57
65
|
*/
|
|
58
66
|
this.isShortCashier = 'false';
|
|
@@ -127,7 +135,9 @@ const UserDepositWithdrawal = class {
|
|
|
127
135
|
FailUrl: this.failUrl,
|
|
128
136
|
Language: this.language,
|
|
129
137
|
productType: this.productType,
|
|
130
|
-
isShortCashier: this.isShortCashier
|
|
138
|
+
isShortCashier: this.isShortCashier,
|
|
139
|
+
currency: this.currency,
|
|
140
|
+
showBonusSelectionInput: this.showBonusSelectionInput
|
|
131
141
|
};
|
|
132
142
|
try {
|
|
133
143
|
const url = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`;
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"currency":[513],"showBonusSelectionInput":[513,"show-bonus-selection-input"],"isShortCashier":[513,"is-short-cashier"],"homeUrl":[513,"home-url"],"beforeRedirect":[16],"limitStylingAppends":[32],"dynamicHeight":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -46,6 +46,8 @@ export declare class UserDepositWithdrawal {
|
|
|
46
46
|
casinoUrl: string;
|
|
47
47
|
contactUrl: string;
|
|
48
48
|
depositUrl: string;
|
|
49
|
+
currency: string;
|
|
50
|
+
showBonusSelectionInput: string;
|
|
49
51
|
isShortCashier: string;
|
|
50
52
|
homeUrl: string;
|
|
51
53
|
beforeRedirect: (params: RedirectCallbackArgs) => void;
|
|
@@ -21,6 +21,7 @@ export namespace Components {
|
|
|
21
21
|
*/
|
|
22
22
|
"clientStylingUrl": string;
|
|
23
23
|
"contactUrl": string;
|
|
24
|
+
"currency": string;
|
|
24
25
|
"depositUrl": string;
|
|
25
26
|
/**
|
|
26
27
|
* Endpoint
|
|
@@ -32,6 +33,7 @@ export namespace Components {
|
|
|
32
33
|
"language": string;
|
|
33
34
|
"productType": string;
|
|
34
35
|
"session": string;
|
|
36
|
+
"showBonusSelectionInput": string;
|
|
35
37
|
"sportsUrl": string;
|
|
36
38
|
"successUrl": string;
|
|
37
39
|
"type": 'deposit' | 'withdraw';
|
|
@@ -64,6 +66,7 @@ declare namespace LocalJSX {
|
|
|
64
66
|
*/
|
|
65
67
|
"clientStylingUrl"?: string;
|
|
66
68
|
"contactUrl"?: string;
|
|
69
|
+
"currency"?: string;
|
|
67
70
|
"depositUrl"?: string;
|
|
68
71
|
/**
|
|
69
72
|
* Endpoint
|
|
@@ -75,6 +78,7 @@ declare namespace LocalJSX {
|
|
|
75
78
|
"language"?: string;
|
|
76
79
|
"productType"?: string;
|
|
77
80
|
"session"?: string;
|
|
81
|
+
"showBonusSelectionInput"?: string;
|
|
78
82
|
"sportsUrl"?: string;
|
|
79
83
|
"successUrl"?: string;
|
|
80
84
|
"type": 'deposit' | 'withdraw';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as s}from"./p-086a6b5a.js";const e=["ro","en","fr","hr"],o={en:{Deposit:"Deposit",Withdraw:"Withdraw"},ro:{Deposit:"Depozit",Withdraw:"Retragere"},fr:{Deposit:"Deposit",Withdraw:"Withdraw"},hr:{Deposit:"Letét",Withdraw:"Visszavonás"}},n=()=>{},h=class{constructor(i){var s;t(this,i),this.clientStyling="",this.clientStylingUrl="",this.currency="",this.showBonusSelectionInput="true",this.isShortCashier="false",this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))}}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}toggleScreen(t){window.postMessage({type:"PlayerAccountMenuActive",isMobile:t},window.location.href)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i(s,null,i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"DepositWithdrawalWrapper",style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},i("div",null,this.isMobile&&!this.isShortCashier&&i("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},i("defs",null),i("g",{transform:"translate(-20 -158)"},i("g",{transform:"translate(20 158)"},i("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),i("h2",{class:"CategoryTitleMobile"},(t=>{const i=this.language;return o[void 0!==i&&e.includes(i)?i:"en"][t]})("Withdraw"===this.typeParameter?"Withdraw":"Deposit")))),i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType,isShortCashier:this.isShortCashier,currency:this.currency,showBonusSelectionInput:this.showBonusSelectionInput};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,s=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){const t=await s.text();throw new Error(t)}const e=await s.json();this.cashierInfoUrl=e.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,s,e,o,n,h,r;t.data["MMFE:setIFrameHeight"]&&"true"===this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(e=t.data)||void 0===e?void 0:e.redirect)&&this.doRedirect(null===(o=t.data)||void 0===o?void 0:o.redirect,this.sportsUrl),"mm-hc-casino"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,i){const s={reason:t,url:i,cancel:!1};this.beforeRedirect(s),s.cancel||(window.location.href=s.url?s.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"]}}};h.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n height: 100vh;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";export{h as user_deposit_withdrawal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,b as r}from"./p-086a6b5a.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((e=>r([["p-3eda2d99",[[1,"user-deposit-withdrawal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],type:[513],channel:[513],language:[513],productType:[513,"product-type"],userId:[513,"user-id"],session:[513],successUrl:[513,"success-url"],cancelUrl:[513,"cancel-url"],failUrl:[513,"fail-url"],sportsUrl:[513,"sports-url"],casinoUrl:[513,"casino-url"],contactUrl:[513,"contact-url"],depositUrl:[513,"deposit-url"],currency:[513],showBonusSelectionInput:[513,"show-bonus-selection-input"],isShortCashier:[513,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e}from"./p-086a6b5a.js";const s=["ro","en","fr","hr"],o={en:{Deposit:"Deposit",Withdraw:"Withdraw"},ro:{Deposit:"Depozit",Withdraw:"Retragere"},fr:{Deposit:"Deposit",Withdraw:"Withdraw"},hr:{Deposit:"Letét",Withdraw:"Visszavonás"}},n=()=>{},h=class{constructor(i){var e;t(this,i),this.clientStyling="",this.clientStylingUrl="",this.isShortCashier="false",this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((e=this.userAgent).toLowerCase().match(/android/i)||e.toLowerCase().match(/blackberry|bb/i)||e.toLowerCase().match(/iphone|ipad|ipod/i)||e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))}}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}toggleScreen(t){window.postMessage({type:"PlayerAccountMenuActive",isMobile:t},window.location.href)}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i(e,null,i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"DepositWithdrawalWrapper",style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},i("div",null,this.isMobile&&!this.isShortCashier&&i("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},i("defs",null),i("g",{transform:"translate(-20 -158)"},i("g",{transform:"translate(20 158)"},i("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),i("h2",{class:"CategoryTitleMobile"},(t=>{const i=this.language;return o[void 0!==i&&s.includes(i)?i:"en"][t]})("Withdraw"===this.typeParameter?"Withdraw":"Deposit")))),i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType,isShortCashier:this.isShortCashier};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,e=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const t=await e.text();throw new Error(t)}const s=await e.json();this.cashierInfoUrl=s.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,e,s,o,n,h,r;t.data["MMFE:setIFrameHeight"]&&"true"===this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(e=t.data)||void 0===e?void 0:e.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(null===(o=t.data)||void 0===o?void 0:o.redirect,this.sportsUrl),"mm-hc-casino"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,i){const e={reason:t,url:i,cancel:!1};this.beforeRedirect(e),e.cancel||(window.location.href=e.url?e.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"]}}};h.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.MenuReturnButton {\n font: inherit;\n color: var(--emfe-w-color-gray-300, #58586B);\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n}\n.MenuReturnButton svg {\n fill: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n.MenuReturnButton h2.CategoryTitleMobile {\n font-size: 16px;\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\n}\n\n.DepositWithdrawalWrapper {\n width: 100%;\n padding: 0;\n margin: 0;\n height: 100vh;\n}\n\n@container (max-width: 475px) {\n .DepositWithdrawalWrapper {\n height: 100vh;\n }\n}";export{h as user_deposit_withdrawal}
|