@everymatrix/user-deposit-withdrawal 1.43.0 → 1.43.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.
@@ -148,10 +148,9 @@ const UserDepositWithdrawal = class {
148
148
  // end custom styling area
149
149
  }
150
150
  render() {
151
- return (index.h(index.Host, null, index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, index.h("div", null, (this.isMobile && !this.isShortCashier ?
151
+ return (index.h(index.Host, null, index.h("div", { ref: el => this.stylingContainer = el }, (!(this.isMobile && !this.isShortCashier) && (index.h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), index.h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, index.h("div", null, (this.isMobile && !this.isShortCashier ?
152
152
  index.h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, index.h("defs", null), index.h("g", { transform: "translate(-20 -158)" }, index.h("g", { transform: "translate(20 158)" }, index.h("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)" })))), index.h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))
153
- :
154
- index.h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), this.cashierInfoUrl ? index.h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : index.h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
153
+ : null)), this.cashierInfoUrl ? index.h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : index.h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
155
154
  }
156
155
  async loadWidget() {
157
156
  const requestObject = {
@@ -86,6 +86,7 @@ export class UserDepositWithdrawal {
86
86
  render() {
87
87
  return (h(Host, null,
88
88
  h("div", { ref: el => this.stylingContainer = el },
89
+ (!(this.isMobile && !this.isShortCashier) && (h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))),
89
90
  h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } },
90
91
  h("div", null, (this.isMobile && !this.isShortCashier ?
91
92
  h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) },
@@ -95,8 +96,7 @@ export class UserDepositWithdrawal {
95
96
  h("g", { transform: "translate(20 158)" },
96
97
  h("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)" })))),
97
98
  h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))
98
- :
99
- h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))),
99
+ : null)),
100
100
  this.cashierInfoUrl ? h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
101
101
  }
102
102
  async loadWidget() {
@@ -146,10 +146,9 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
146
146
  // end custom styling area
147
147
  }
148
148
  render() {
149
- return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier ?
149
+ return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier ?
150
150
  h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("defs", null), h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, h("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)" })))), h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))
151
- :
152
- h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), this.cashierInfoUrl ? h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
151
+ : null)), this.cashierInfoUrl ? h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
153
152
  }
154
153
  async loadWidget() {
155
154
  const requestObject = {
@@ -144,10 +144,9 @@ const UserDepositWithdrawal = class {
144
144
  // end custom styling area
145
145
  }
146
146
  render() {
147
- return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier ?
147
+ return (h(Host, null, h("div", { ref: el => this.stylingContainer = el }, (!(this.isMobile && !this.isShortCashier) && (h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), h("div", { class: `DepositWithdrawalWrapper ${this.isShortCashier ? 'ShortCashier' : ''}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? '30px' : '0' } }, h("div", null, (this.isMobile && !this.isShortCashier ?
148
148
  h("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, h("defs", null), h("g", { transform: "translate(-20 -158)" }, h("g", { transform: "translate(20 158)" }, h("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)" })))), h("h2", { class: "CategoryTitleMobile" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))
149
- :
150
- h("h2", { class: "CategoryTitle" }, translate(this.typeParameter === 'Withdraw' ? 'Withdraw' : 'Deposit', this.language)))), this.cashierInfoUrl ? h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
149
+ : null)), this.cashierInfoUrl ? h("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : h("h3", { class: "ErrorMessage" }, this.type === 'deposit' ? translate('denyDeposit', this.language) : translate('denyWithdrawal', this.language))))));
151
150
  }
152
151
  async loadWidget() {
153
152
  const requestObject = {
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as o}from"./p-4c4319e6.js";const r=["ro","en","fr","hr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate depost transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},ro:{Deposit:"Depozit",Withdraw:"Retragere",denyDeposit:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",denyWithdrawal:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},fr:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},hr:{Deposit:"Uplata",Withdraw:"Isplata",denyDeposit:"Obavještavamo Vas da trenutno nemate mogućnost uplata.",denyWithdrawal:"Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",notFoundErrorCode:"Not found error code",errorCode21122:"Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",errorCode21123:"Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"}},a=(t,e)=>{const o=e;return i[void 0!==o&&r.includes(o)?o:"en"][t]},n=()=>{},s=class{constructor(e){var o;t(this,e),this.clientStyling="",this.clientStylingUrl="",this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122"],this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),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 e(o,null,e("div",{ref:t=>this.stylingContainer=t},!(this.isMobile&&!this.isShortCashier)&&e("h2",{class:"CategoryTitle"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language)),e("div",{class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":""),style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},e("div",null,this.isMobile&&!this.isShortCashier?e("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},e("defs",null),e("g",{transform:"translate(-20 -158)"},e("g",{transform:"translate(20 158)"},e("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)"})))),e("h2",{class:"CategoryTitleMobile"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):null),this.cashierInfoUrl?e("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}):e("h3",{class:"ErrorMessage"},a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language)))))}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 e=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,o=await fetch(e,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){const t=await o.text();throw new Error(t)}const r=await o.json();if(r.CashierInfo)this.cashierInfoUrl=r.CashierInfo.Url;else{let t;if(r.ResponseMessage){let e=this.errorCodes.find((t=>r.ResponseMessage.includes(t)))||null;t=a(e?`errorCode${e}`:"notFoundErrorCode",this.language)}else t=a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:t}},window.location.href)}}catch(t){console.error(t)}}handleMessage(t){var e,o,r,i,a,n,s,d;"true"===t.data["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),t.data["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setQuickDepositHeight"].toString()+"px"),t.data["MMFE:setIFrameHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(e=t.data)||void 0===e?void 0:e.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(null===(i=t.data)||void 0===i?void 0:i.redirect,this.sportsUrl),"mm-hc-casino"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"!==(null===(s=t.data)||void 0===s?void 0:s.redirect)&&"mm-wm-hc-init-deposit-quick"!==(null===(d=t.data)||void 0===d?void 0:d.redirect)||(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,e){const o={reason:t,url:e,cancel:!1};this.beforeRedirect(o),o.cancel||(window.location.href=o.url?o.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"],currency:["watchLoadWidget"],showBonusSelectionInput:["watchLoadWidget"]}}};s.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";export{s as user_deposit_withdrawal}
@@ -1 +1 @@
1
- import{p as r,b as e}from"./p-4c4319e6.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),r(s)})().then((r=>e([["p-3bb8d4a8",[[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:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32],cashierInfoUrl:[32]}]]]],r)));
1
+ import{p as e,b as r}from"./p-4c4319e6.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((e=>r([["p-518ce9fb",[[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:[516,"is-short-cashier"],homeUrl:[513,"home-url"],beforeRedirect:[16],limitStylingAppends:[32],dynamicHeight:[32],cashierInfoUrl:[32]}]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-deposit-withdrawal",
3
- "version": "1.43.0",
3
+ "version": "1.43.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as o}from"./p-4c4319e6.js";const r=["ro","en","fr","hr"],i={en:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Please be informed that currently you are not allowed to initiate depost transactions.",denyWithdrawal:"Please be informed that currently you are not allowed to initiate withdrawal transactions.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},ro:{Deposit:"Depozit",Withdraw:"Retragere",denyDeposit:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",denyWithdrawal:"Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},fr:{Deposit:"Deposit",Withdraw:"Withdraw",denyDeposit:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",denyWithdrawal:"Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",notFoundErrorCode:"Not found error code",errorCode21122:"Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",errorCode21123:"Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"},hr:{Deposit:"Uplata",Withdraw:"Isplata",denyDeposit:"Obavještavamo Vas da trenutno nemate mogućnost uplata.",denyWithdrawal:"Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",notFoundErrorCode:"Not found error code",errorCode21122:"Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",errorCode21123:"Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"}},a=(t,e)=>{const o=e;return i[void 0!==o&&r.includes(o)?o:"en"][t]},n=()=>{},s=class{constructor(e){var o;t(this,e),this.clientStyling="",this.clientStylingUrl="",this.currency="",this.showBonusSelectionInput="true",this.isShortCashier=!1,this.beforeRedirect=n,this.limitStylingAppends=!1,this.bindedHandler=this.handleMessage.bind(this),this.userAgent=window.navigator.userAgent,this.isMobile=!!((o=this.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.errorCodes=["21123","21122"],this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),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 e(o,null,e("div",{ref:t=>this.stylingContainer=t},e("div",{class:"DepositWithdrawalWrapper "+(this.isShortCashier?"ShortCashier":""),style:{height:this.dynamicHeight,marginTop:this.isShortCashier?"30px":"0"}},e("div",null,this.isMobile&&!this.isShortCashier?e("div",{class:"MenuReturnButton",onClick:()=>this.toggleScreen(this.isMobile)},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},e("defs",null),e("g",{transform:"translate(-20 -158)"},e("g",{transform:"translate(20 158)"},e("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)"})))),e("h2",{class:"CategoryTitleMobile"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))):e("h2",{class:"CategoryTitle"},a("Withdraw"===this.typeParameter?"Withdraw":"Deposit",this.language))),this.cashierInfoUrl?e("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}):e("h3",{class:"ErrorMessage"},a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language)))))}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 e=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,o=await fetch(e,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){const t=await o.text();throw new Error(t)}const r=await o.json();if(r.CashierInfo)this.cashierInfoUrl=r.CashierInfo.Url;else{let t;if(r.ResponseMessage){let e=this.errorCodes.find((t=>r.ResponseMessage.includes(t)))||null;t=a(e?`errorCode${e}`:"notFoundErrorCode",this.language)}else t=a("deposit"===this.type?"denyDeposit":"denyWithdrawal",this.language);window.postMessage({type:"DenyDepositOrWithdrawal",data:{type:"error",message:t}},window.location.href)}}catch(t){console.error(t)}}handleMessage(t){var e,o,r,i,a,n,s,d;"true"===t.data["MMFE:openFullCashier"]&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),t.data["MMFE:setQuickDepositHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setQuickDepositHeight"].toString()+"px"),t.data["MMFE:setIFrameHeight"]&&this.isShortCashier&&(this.dynamicHeight=t.data["MMFE:setIFrameHeight"].toString()+"px"),"mm-hcback-to-merchant"===(null===(e=t.data)||void 0===e?void 0:e.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(r=t.data)||void 0===r?void 0:r.redirect)&&this.doRedirect(null===(i=t.data)||void 0===i?void 0:i.redirect,this.sportsUrl),"mm-hc-casino"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.contactUrl)),"mm-wm-hc-init-deposit"!==(null===(s=t.data)||void 0===s?void 0:s.redirect)&&"mm-wm-hc-init-deposit-quick"!==(null===(d=t.data)||void 0===d?void 0:d.redirect)||(window.postMessage({type:"CloseShortCashier"},window.location.href),this.doRedirect(window.location.href,this.depositUrl))}doRedirect(t,e){const o={reason:t,url:e,cancel:!1};this.beforeRedirect(o),o.cancel||(window.location.href=o.url?o.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"],isShortCashier:["watchLoadWidget"],currency:["watchLoadWidget"],showBonusSelectionInput:["watchLoadWidget"]}}};s.style=":host {\n font: inherit;\n display: block;\n height: 100%;\n overflow: hidden;\n}\n\n.CategoryTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emfe-w-pam-color-primary, var(--emfe-w-color-primary, #D0046C));\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.ErrorMessage {\n color: var(--emfe-w-pam-color-typography, var(--emfe-w-color-typography, #FFFFFF));\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}\n.ShortCashier.DepositWithdrawalWrapper {\n height: 500px;\n}\n.ShortCashier.CategoryTitle.CategoryTitle {\n margin-right: 20px;\n padding-top: 20px;\n color: ar(--emfe-w-color-black, #000000);\n}\n.ShortCashier .ErrorMessage {\n margin: auto;\n width: 90%;\n margin-top: 70px;\n text-align: center;\n color: var(--emfe-w-color-black, #000000);\n}";export{s as user_deposit_withdrawal}