@everymatrix/temporary-consents 1.52.4 → 1.52.6

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.
@@ -13,6 +13,20 @@ let TRANSLATIONS = {
13
13
  acceptButton: 'Accept',
14
14
  loading: 'Please wait, loading...'
15
15
  },
16
+ 'en-us': {
17
+ title: 'Participation conditions',
18
+ description: 'Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.',
19
+ declineButton: 'Decline and log out',
20
+ acceptButton: 'Accept',
21
+ loading: 'Please wait, loading...'
22
+ },
23
+ ro: {
24
+ title: 'Condiții de participare',
25
+ description: 'Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.',
26
+ declineButton: 'Refuză și deloghează-te',
27
+ acceptButton: 'Acceptă',
28
+ loading: 'Vă rugăm să așteptați, se încarcă...'
29
+ },
16
30
  hr: {
17
31
  title: 'Uvjeti sudjelovanja',
18
32
  description: 'Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.',
@@ -33,6 +47,34 @@ let TRANSLATIONS = {
33
47
  'declineButton': 'Recusar e sair',
34
48
  'acceptButton': 'Aceitar',
35
49
  'Loading': 'Espere, por favor, Carregando...'
50
+ },
51
+ fr: {
52
+ title: 'Conditions de participation',
53
+ description: 'Important : Une vérification complète est requise pour pouvoir utiliser l\'ensemble de notre offre. Si la vérification n\'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.',
54
+ declineButton: 'Refuser et se déconnecter',
55
+ acceptButton: 'Accepter',
56
+ loading: 'Veuillez patienter, chargement en cours...'
57
+ },
58
+ de: {
59
+ title: 'Teilnahmebedingungen',
60
+ description: 'Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.',
61
+ declineButton: 'Ablehnen und ausloggen',
62
+ acceptButton: 'Akzeptieren',
63
+ loading: 'Bitte warten, wird geladen...'
64
+ },
65
+ es: {
66
+ title: 'Condiciones de participación',
67
+ description: 'Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.',
68
+ declineButton: 'Rechazar y cerrar sesión',
69
+ acceptButton: 'Aceptar',
70
+ loading: 'Por favor, espere, cargando...'
71
+ },
72
+ pt: {
73
+ title: 'Condições de participação',
74
+ description: 'Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.',
75
+ declineButton: 'Recusar e sair',
76
+ acceptButton: 'Aceitar',
77
+ loading: 'Por favor, aguarde, carregando...'
36
78
  }
37
79
  };
38
80
  const getTranslations = (url) => {
@@ -7,6 +7,20 @@ let TRANSLATIONS = {
7
7
  acceptButton: 'Accept',
8
8
  loading: 'Please wait, loading...'
9
9
  },
10
+ 'en-us': {
11
+ title: 'Participation conditions',
12
+ description: 'Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.',
13
+ declineButton: 'Decline and log out',
14
+ acceptButton: 'Accept',
15
+ loading: 'Please wait, loading...'
16
+ },
17
+ ro: {
18
+ title: 'Condiții de participare',
19
+ description: 'Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.',
20
+ declineButton: 'Refuză și deloghează-te',
21
+ acceptButton: 'Acceptă',
22
+ loading: 'Vă rugăm să așteptați, se încarcă...'
23
+ },
10
24
  hr: {
11
25
  title: 'Uvjeti sudjelovanja',
12
26
  description: 'Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.',
@@ -27,6 +41,34 @@ let TRANSLATIONS = {
27
41
  'declineButton': 'Recusar e sair',
28
42
  'acceptButton': 'Aceitar',
29
43
  'Loading': 'Espere, por favor, Carregando...'
44
+ },
45
+ fr: {
46
+ title: 'Conditions de participation',
47
+ description: 'Important : Une vérification complète est requise pour pouvoir utiliser l\'ensemble de notre offre. Si la vérification n\'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.',
48
+ declineButton: 'Refuser et se déconnecter',
49
+ acceptButton: 'Accepter',
50
+ loading: 'Veuillez patienter, chargement en cours...'
51
+ },
52
+ de: {
53
+ title: 'Teilnahmebedingungen',
54
+ description: 'Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.',
55
+ declineButton: 'Ablehnen und ausloggen',
56
+ acceptButton: 'Akzeptieren',
57
+ loading: 'Bitte warten, wird geladen...'
58
+ },
59
+ es: {
60
+ title: 'Condiciones de participación',
61
+ description: 'Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.',
62
+ declineButton: 'Rechazar y cerrar sesión',
63
+ acceptButton: 'Aceptar',
64
+ loading: 'Por favor, espere, cargando...'
65
+ },
66
+ pt: {
67
+ title: 'Condições de participação',
68
+ description: 'Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.',
69
+ declineButton: 'Recusar e sair',
70
+ acceptButton: 'Aceitar',
71
+ loading: 'Por favor, aguarde, carregando...'
30
72
  }
31
73
  };
32
74
  export const getTranslations = (url) => {
@@ -9,6 +9,20 @@ let TRANSLATIONS = {
9
9
  acceptButton: 'Accept',
10
10
  loading: 'Please wait, loading...'
11
11
  },
12
+ 'en-us': {
13
+ title: 'Participation conditions',
14
+ description: 'Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.',
15
+ declineButton: 'Decline and log out',
16
+ acceptButton: 'Accept',
17
+ loading: 'Please wait, loading...'
18
+ },
19
+ ro: {
20
+ title: 'Condiții de participare',
21
+ description: 'Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.',
22
+ declineButton: 'Refuză și deloghează-te',
23
+ acceptButton: 'Acceptă',
24
+ loading: 'Vă rugăm să așteptați, se încarcă...'
25
+ },
12
26
  hr: {
13
27
  title: 'Uvjeti sudjelovanja',
14
28
  description: 'Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.',
@@ -29,6 +43,34 @@ let TRANSLATIONS = {
29
43
  'declineButton': 'Recusar e sair',
30
44
  'acceptButton': 'Aceitar',
31
45
  'Loading': 'Espere, por favor, Carregando...'
46
+ },
47
+ fr: {
48
+ title: 'Conditions de participation',
49
+ description: 'Important : Une vérification complète est requise pour pouvoir utiliser l\'ensemble de notre offre. Si la vérification n\'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.',
50
+ declineButton: 'Refuser et se déconnecter',
51
+ acceptButton: 'Accepter',
52
+ loading: 'Veuillez patienter, chargement en cours...'
53
+ },
54
+ de: {
55
+ title: 'Teilnahmebedingungen',
56
+ description: 'Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.',
57
+ declineButton: 'Ablehnen und ausloggen',
58
+ acceptButton: 'Akzeptieren',
59
+ loading: 'Bitte warten, wird geladen...'
60
+ },
61
+ es: {
62
+ title: 'Condiciones de participación',
63
+ description: 'Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.',
64
+ declineButton: 'Rechazar y cerrar sesión',
65
+ acceptButton: 'Aceptar',
66
+ loading: 'Por favor, espere, cargando...'
67
+ },
68
+ pt: {
69
+ title: 'Condições de participação',
70
+ description: 'Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.',
71
+ declineButton: 'Recusar e sair',
72
+ acceptButton: 'Aceitar',
73
+ loading: 'Por favor, aguarde, carregando...'
32
74
  }
33
75
  };
34
76
  const getTranslations = (url) => {
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-d44ae3da.js";let i={en:{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},"en-us":{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},ro:{title:"Condiții de participare",description:"Important: Verificarea completă este necesară pentru a putea utiliza întreaga ofertă. Dacă verificarea nu este finalizată, retragerile nu sunt posibile, iar contul de pariuri va fi blocat în {daysUntilLockout} zile.",declineButton:"Refuză și deloghează-te",acceptButton:"Acceptă",loading:"Vă rugăm să așteptați, se încarcă..."},hr:{title:"Uvjeti sudjelovanja",description:"Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.",declineButton:"Odbijte i odjavite se",acceptButton:"Prihvatiti",loading:"Molimo pričekajte, učitavanje..."},"es-mx":{title:"Condiciones de participación",description:"Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.",declineButton:"Declinar y salir",acceptButton:"Aceptar",Loading:"Espere por favor, Cargando..."},"pt-br":{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.",declineButton:"Recusar e sair",acceptButton:"Aceitar",Loading:"Espere, por favor, Carregando..."},fr:{title:"Conditions de participation",description:"Important : Une vérification complète est requise pour pouvoir utiliser l'ensemble de notre offre. Si la vérification n'est pas effectuée, les retraits ne seront pas possibles et le compte de paris sera bloqué dans {daysUntilLockout} jours.",declineButton:"Refuser et se déconnecter",acceptButton:"Accepter",loading:"Veuillez patienter, chargement en cours..."},de:{title:"Teilnahmebedingungen",description:"Wichtig: Eine vollständige Verifizierung ist erforderlich, um unser gesamtes Angebot nutzen zu können. Wenn die Verifizierung nicht abgeschlossen wird, sind Auszahlungen nicht möglich und das Wettkonto wird in {daysUntilLockout} Tagen gesperrt.",declineButton:"Ablehnen und ausloggen",acceptButton:"Akzeptieren",loading:"Bitte warten, wird geladen..."},es:{title:"Condiciones de participación",description:"Importante: Se requiere una verificación completa para poder utilizar toda nuestra oferta. Si no se completa la verificación, no será posible realizar retiros y la cuenta de apuestas se bloqueará en {daysUntilLockout} días.",declineButton:"Rechazar y cerrar sesión",acceptButton:"Aceptar",loading:"Por favor, espere, cargando..."},pt:{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar toda a nossa oferta. Se a verificação não for concluída, não será possível realizar saques e a conta de apostas será bloqueada em {daysUntilLockout} dias.",declineButton:"Recusar e sair",acceptButton:"Aceitar",loading:"Por favor, aguarde, carregando..."}};const o=(e,t,o)=>{let n=i[void 0!==t&&t in i?t:"en"][e];if(void 0!==o)for(const[e,t]of Object.entries(o.values)){const i=new RegExp(`{${e}}`,"g");n=n.replace(i,t)}return n},n=class{constructor(t){e(this,t),this.isLoading=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.endpoint=void 0,this.userId=void 0,this.sessionId=void 0,this.daysUntilLockout=void 0,this.lang=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1}componentWillLoad(){const e=[];if(this.endpoint&&this.userId){const t=this.getConsents().then((e=>{this.temporaryAccountConsent=e.consents.some((e=>"temporaryaccountconsent"==e.tagCode))}));e.push(t)}if(this.translationUrl){const o=(t=this.translationUrl,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let o in t[e])i[e][o]=t[e][o]})),e(!0)}))})));e.push(o)}var t;return Promise.all(e)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json");const i={method:"GET",headers:t};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}setConsents(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.sessionId),t.append("Accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({consents:[{tagCode:"temporaryaccountconsent",note:"",status:1}]})};return new Promise(((t,o)=>{this.isLoading=!0,fetch(e.href,i).then((e=>e.json())).then((e=>{t(e)})).catch((e=>{console.error(e),o(e)})).finally((()=>{this.isLoading=!1}))}))}handleDecline(){window.postMessage({type:"TemporaryConsentsDeclined"},window.location.href)}handleAccept(){this.setConsents(),window.postMessage({type:"TemporaryConsentsAccepted"},window.location.href)}render(){if(this.temporaryAccountConsent)return this.isLoading?t("p",null,o("loading",this.lang)):t("div",{class:"TemporaryConsents",ref:e=>this.stylingContainer=e},t("h2",{class:"TemporaryConsentsTitle"}," ",o("title",this.lang)," "),t("p",{class:"TemporaryConsentsText"}," ",o("description",this.lang,{values:{daysUntilLockout:this.daysUntilLockout}})," "),t("div",{class:"TemporaryConsentsButtonsWrapper"},t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonDecline",onClick:()=>this.handleDecline()},o("declineButton",this.lang)),t("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonAccept",onClick:this.handleAccept},o("acceptButton",this.lang))))}};n.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";export{n as temporary_consents}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-d44ae3da.js";export{s as setNonce}from"./p-d44ae3da.js";import{g as a}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),t(n)})().then((async s=>(await a(),n([["p-a69a0b31",[[1,"temporary-consents",{endpoint:[513],userId:[513,"user-id"],sessionId:[513,"session-id"],daysUntilLockout:[513,"days-until-lockout"],lang:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],stylingAppends:[32]}]]]],s))));
1
+ import{p as t,b as n}from"./p-d44ae3da.js";export{s as setNonce}from"./p-d44ae3da.js";import{g as i}from"./p-e1255160.js";(()=>{const s=import.meta.url,n={};return""!==s&&(n.resourcesUrl=new URL(".",s).href),t(n)})().then((async s=>(await i(),n([["p-cc111f92",[[1,"temporary-consents",{endpoint:[513],userId:[513,"user-id"],sessionId:[513,"session-id"],daysUntilLockout:[513,"days-until-lockout"],lang:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],stylingAppends:[32]}]]]],s))));
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/temporary-consents",
3
- "version": "1.52.4",
3
+ "version": "1.52.6",
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}from"./p-d44ae3da.js";let o={en:{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},hr:{title:"Uvjeti sudjelovanja",description:"Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.",declineButton:"Odbijte i odjavite se",acceptButton:"Prihvatiti",loading:"Molimo pričekajte, učitavanje..."},"es-mx":{title:"Condiciones de participación",description:"Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.",declineButton:"Declinar y salir",acceptButton:"Aceptar",Loading:"Espere por favor, Cargando..."},"pt-br":{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.",declineButton:"Recusar e sair",acceptButton:"Aceitar",Loading:"Espere, por favor, Carregando..."}};const i=(t,e,i)=>{let n=o[void 0!==e&&e in o?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const o=new RegExp(`{${t}}`,"g");n=n.replace(o,e)}return n},n=class{constructor(e){t(this,e),this.isLoading=!1,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)}))},this.endpoint=void 0,this.userId=void 0,this.sessionId=void 0,this.daysUntilLockout=void 0,this.lang=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1}componentWillLoad(){const t=[];if(this.endpoint&&this.userId){const e=this.getConsents().then((t=>{this.temporaryAccountConsent=t.consents.some((t=>"temporaryaccountconsent"==t.tagCode))}));t.push(e)}if(this.translationUrl){const i=(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{o[t]||(o[t]={});for(let i in e[t])o[t][i]=e[t][i]})),t(!0)}))})));t.push(i)}var e;return Promise.all(t)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getConsents(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;e.append("X-SessionId",this.sessionId),e.append("Accept","application/json");const o={method:"GET",headers:e};return new Promise(((e,i)=>{this.isLoading=!0,fetch(t.href,o).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setConsents(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;e.append("X-SessionId",this.sessionId),e.append("Accept","application/json"),e.append("Content-Type","application/json");const o={method:"POST",headers:e,body:JSON.stringify({consents:[{tagCode:"temporaryaccountconsent",note:"",status:1}]})};return new Promise(((e,i)=>{this.isLoading=!0,fetch(t.href,o).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}handleDecline(){window.postMessage({type:"TemporaryConsentsDeclined"},window.location.href)}handleAccept(){this.setConsents(),window.postMessage({type:"TemporaryConsentsAccepted"},window.location.href)}render(){if(this.temporaryAccountConsent)return this.isLoading?e("p",null,i("loading",this.lang)):e("div",{class:"TemporaryConsents",ref:t=>this.stylingContainer=t},e("h2",{class:"TemporaryConsentsTitle"}," ",i("title",this.lang)," "),e("p",{class:"TemporaryConsentsText"}," ",i("description",this.lang,{values:{daysUntilLockout:this.daysUntilLockout}})," "),e("div",{class:"TemporaryConsentsButtonsWrapper"},e("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonDecline",onClick:()=>this.handleDecline()},i("declineButton",this.lang)),e("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonAccept",onClick:this.handleAccept},i("acceptButton",this.lang))))}};n.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";export{n as temporary_consents}
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;