@everymatrix/casino-providers 1.11.1 → 1.12.1

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.
@@ -66,7 +66,7 @@ for(const e in this.$$.slotted)
66
66
  // @ts-ignore todo: improve typings
67
67
  this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,r){this[e]=r}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){M(this,1),this.$destroy=e}$on(t,r){
68
68
  // TODO should this delegate to addEventListener?
69
- if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const e=n.indexOf(r);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const D={en:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait...",games:"games"}},"zh-hk":{Translations:{popularProviders:"热门供应商",otherProviders:"其他供应商",loading:"加载请稍候...",games:"游戏"}},de:{Translations:{popularProviders:"Beliebte Anbieter",otherProviders:"Andere Anbieter",loading:"Es lädt, bitte warten...",games:"Spiele"}},it:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},fr:{Translations:{popularProviders:"Fournisseurs populaires",otherProviders:"Autres fournisseurs",loading:"Chargement, veuillez patienter...",games:"jeux"}},es:{Translations:{popularProviders:"Proveedores Populares",otherProviders:"Otros Proveedores",loading:"Cargando",games:"juegos"}},tr:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},ru:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},ro:{Translations:{popularProviders:"Furnizori de top",otherProviders:"Alti furnizori",loading:"Se incarca, te rugam asteapta…",games:"jocuri"}},hr:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},hu:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},pl:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},pt:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},sl:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},sr:{Translations:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}}},$=[];
69
+ if(!i(r))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const e=n.indexOf(r);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const D={en:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait...",games:"games"},"zh-hk":{popularProviders:"热门供应商",otherProviders:"其他供应商",loading:"加载请稍候...",games:"游戏"},de:{popularProviders:"Beliebte Anbieter",otherProviders:"Andere Anbieter",loading:"Es lädt, bitte warten...",games:"Spiele"},it:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},fr:{popularProviders:"Fournisseurs populaires",otherProviders:"Autres fournisseurs",loading:"Chargement, veuillez patienter...",games:"jeux"},es:{popularProviders:"Proveedores Populares",otherProviders:"Otros Proveedores",loading:"Cargando",games:"juegos"},tr:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},ru:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},ro:{popularProviders:"Furnizori de top",otherProviders:"Alti furnizori",loading:"Se incarca, te rugam asteapta…",games:"jocuri"},hr:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},hu:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},pl:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},pt:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},sl:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},sr:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"}},$=[];
70
70
  /**
71
71
  * Create a `Writable` store that allows both updating and reading by subscription.
72
72
  * @param {*=}value initial value
@@ -575,15 +575,15 @@ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
575
575
  /* src/CasinoProviders.svelte generated by Svelte v3.58.0 */
576
576
  function sr(e,t,r){const n=e.slice();return n[21]=t[r],n}function ar(e,t,r){const n=e.slice();return n[21]=t[r],n}
577
577
  // (78:4) {:else}
578
- function hr(e){let t,r,n,i,o,s,a,h,l=/*$_*/e[4]("Translations.popularProviders")+"",E=/*$_*/e[4]("Translations.otherProviders")+"",v=/*topProviders*/e[1],T=[];for(let t=0;t<v.length;t+=1)T[t]=ur(ar(e,v,t));let H=/*otherProviders*/e[2],P=[];for(let t=0;t<H.length;t+=1)P[t]=cr(sr(e,H,t));return{c(){t=m("h4"),r=g(l),n=d();for(let e=0;e<T.length;e+=1)T[e].c();i=d(),o=m("h4"),s=g(E),a=d();for(let e=0;e<P.length;e+=1)P[e].c();h=g(""),b(t,"class","ProviderTitle"),b(o,"class","ProviderTitle")},m(e,l){c(e,t,l),u(t,r),c(e,n,l);for(let t=0;t<T.length;t+=1)T[t]&&T[t].m(e,l);c(e,i,l),c(e,o,l),u(o,s),c(e,a,l);for(let t=0;t<P.length;t+=1)P[t]&&P[t].m(e,l);c(e,h,l)},p(e,t){if(/*$_*/16&t&&l!==(l=/*$_*/e[4]("Translations.popularProviders")+"")&&y(r,l),/*openGameProviderPage, topProviders, $_*/50&t){let r;for(v=/*topProviders*/e[1],r=0;r<v.length;r+=1){const n=ar(e,v,r);T[r]?T[r].p(n,t):(T[r]=ur(n),T[r].c(),T[r].m(i.parentNode,i))}for(;r<T.length;r+=1)T[r].d(1);T.length=v.length}if(/*$_*/16&t&&E!==(E=/*$_*/e[4]("Translations.otherProviders")+"")&&y(s,E),/*openGameProviderPage, otherProviders, $_*/52&t){let r;for(H=/*otherProviders*/e[2],r=0;r<H.length;r+=1){const n=sr(e,H,r);P[r]?P[r].p(n,t):(P[r]=cr(n),P[r].c(),P[r].m(h.parentNode,h))}for(;r<P.length;r+=1)P[r].d(1);P.length=H.length}},d(e){e&&p(t),e&&p(n),f(T,e),e&&p(i),e&&p(o),e&&p(a),f(P,e),e&&p(h)}}}
578
+ function hr(e){let t,r,n,i,o,s,a,h,l=/*$_*/e[4]("popularProviders")+"",E=/*$_*/e[4]("otherProviders")+"",v=/*topProviders*/e[1],T=[];for(let t=0;t<v.length;t+=1)T[t]=ur(ar(e,v,t));let H=/*otherProviders*/e[2],P=[];for(let t=0;t<H.length;t+=1)P[t]=cr(sr(e,H,t));return{c(){t=m("h4"),r=g(l),n=d();for(let e=0;e<T.length;e+=1)T[e].c();i=d(),o=m("h4"),s=g(E),a=d();for(let e=0;e<P.length;e+=1)P[e].c();h=g(""),b(t,"class","ProviderTitle"),b(o,"class","ProviderTitle")},m(e,l){c(e,t,l),u(t,r),c(e,n,l);for(let t=0;t<T.length;t+=1)T[t]&&T[t].m(e,l);c(e,i,l),c(e,o,l),u(o,s),c(e,a,l);for(let t=0;t<P.length;t+=1)P[t]&&P[t].m(e,l);c(e,h,l)},p(e,t){if(/*$_*/16&t&&l!==(l=/*$_*/e[4]("popularProviders")+"")&&y(r,l),/*openGameProviderPage, topProviders, $_*/50&t){let r;for(v=/*topProviders*/e[1],r=0;r<v.length;r+=1){const n=ar(e,v,r);T[r]?T[r].p(n,t):(T[r]=ur(n),T[r].c(),T[r].m(i.parentNode,i))}for(;r<T.length;r+=1)T[r].d(1);T.length=v.length}if(/*$_*/16&t&&E!==(E=/*$_*/e[4]("otherProviders")+"")&&y(s,E),/*openGameProviderPage, otherProviders, $_*/52&t){let r;for(H=/*otherProviders*/e[2],r=0;r<H.length;r+=1){const n=sr(e,H,r);P[r]?P[r].p(n,t):(P[r]=cr(n),P[r].c(),P[r].m(h.parentNode,h))}for(;r<P.length;r+=1)P[r].d(1);P.length=H.length}},d(e){e&&p(t),e&&p(n),f(T,e),e&&p(i),e&&p(o),e&&p(a),f(P,e),e&&p(h)}}}
579
579
  // (76:4) {#if isLoading === true}
580
- function lr(e){let t,r,n=/*$_*/e[4]("Translations.loading")+"";return{c(){t=m("p"),r=g(n),b(t,"class","Message")},m(e,n){c(e,t,n),u(t,r)},p(e,t){/*$_*/16&t&&n!==(n=/*$_*/e[4]("Translations.loading")+"")&&y(r,n)},d(e){e&&p(t)}}}
580
+ function lr(e){let t,r,n=/*$_*/e[4]("loading")+"";return{c(){t=m("p"),r=g(n),b(t,"class","Message")},m(e,n){c(e,t,n),u(t,r)},p(e,t){/*$_*/16&t&&n!==(n=/*$_*/e[4]("loading")+"")&&y(r,n)},d(e){e&&p(t)}}}
581
581
  // (80:6) {#each topProviders as provider}
582
- function ur(e){let t,r,n,i,o,s,a,l,f,v,T,H,P,_,B,A=/*provider*/e[21].name+"",S=/*provider*/e[21].games.count+"",L=/*$_*/e[4]("Translations.games")+"";function N(){/*click_handler*/
583
- return e[12](/*provider*/e[21])}return{c(){t=m("div"),r=m("img"),o=d(),s=m("div"),a=m("p"),l=g(A),f=d(),v=m("p"),T=g(S),H=d(),P=g(L),h(r.src,n=/*provider*/e[21].logo)||b(r,"src",n),b(r,"alt",i=/*provider*/e[21].name),b(r,"class","ProviderImage"),b(s,"class","ProviderTextContainer"),b(t,"class","Provider")},m(e,n){c(e,t,n),u(t,r),u(t,o),u(t,s),u(s,a),u(a,l),u(s,f),u(s,v),u(v,T),u(v,H),u(v,P),_||(B=E(t,"click",N),_=!0)},p(t,o){e=t,/*topProviders*/2&o&&!h(r.src,n=/*provider*/e[21].logo)&&b(r,"src",n),/*topProviders*/2&o&&i!==(i=/*provider*/e[21].name)&&b(r,"alt",i),/*topProviders*/2&o&&A!==(A=/*provider*/e[21].name+"")&&y(l,A),/*topProviders*/2&o&&S!==(S=/*provider*/e[21].games.count+"")&&y(T,S),/*$_*/16&o&&L!==(L=/*$_*/e[4]("Translations.games")+"")&&y(P,L)},d(e){e&&p(t),_=!1,B()}}}
582
+ function ur(e){let t,r,n,i,o,s,a,l,f,v,T,H,P,_,B,A=/*provider*/e[21].name+"",S=/*provider*/e[21].games.count+"",L=/*$_*/e[4]("games")+"";function N(){/*click_handler*/
583
+ return e[12](/*provider*/e[21])}return{c(){t=m("div"),r=m("img"),o=d(),s=m("div"),a=m("p"),l=g(A),f=d(),v=m("p"),T=g(S),H=d(),P=g(L),h(r.src,n=/*provider*/e[21].logo)||b(r,"src",n),b(r,"alt",i=/*provider*/e[21].name),b(r,"class","ProviderImage"),b(s,"class","ProviderTextContainer"),b(t,"class","Provider")},m(e,n){c(e,t,n),u(t,r),u(t,o),u(t,s),u(s,a),u(a,l),u(s,f),u(s,v),u(v,T),u(v,H),u(v,P),_||(B=E(t,"click",N),_=!0)},p(t,o){e=t,/*topProviders*/2&o&&!h(r.src,n=/*provider*/e[21].logo)&&b(r,"src",n),/*topProviders*/2&o&&i!==(i=/*provider*/e[21].name)&&b(r,"alt",i),/*topProviders*/2&o&&A!==(A=/*provider*/e[21].name+"")&&y(l,A),/*topProviders*/2&o&&S!==(S=/*provider*/e[21].games.count+"")&&y(T,S),/*$_*/16&o&&L!==(L=/*$_*/e[4]("games")+"")&&y(P,L)},d(e){e&&p(t),_=!1,B()}}}
584
584
  // (90:6) {#each otherProviders as provider}
585
- function cr(e){let t,r,n,i,o,s,a,l,f,v,T,H,P,_,B,A,S=/*provider*/e[21].name+"",L=/*provider*/e[21].games.count+"",N=/*$_*/e[4]("Translations.games")+"";function I(){/*click_handler_1*/
586
- return e[13](/*provider*/e[21])}return{c(){t=m("div"),r=m("img"),o=d(),s=m("div"),a=m("p"),l=g(S),f=d(),v=m("p"),T=g(L),H=d(),P=g(N),_=d(),h(r.src,n=/*provider*/e[21].logo)||b(r,"src",n),b(r,"alt",i=/*provider*/e[21].name),b(r,"class","ProviderImage"),b(s,"class","ProviderTextContainer"),b(t,"class","Provider")},m(e,n){c(e,t,n),u(t,r),u(t,o),u(t,s),u(s,a),u(a,l),u(s,f),u(s,v),u(v,T),u(v,H),u(v,P),u(t,_),B||(A=E(t,"click",I),B=!0)},p(t,o){e=t,/*otherProviders*/4&o&&!h(r.src,n=/*provider*/e[21].logo)&&b(r,"src",n),/*otherProviders*/4&o&&i!==(i=/*provider*/e[21].name)&&b(r,"alt",i),/*otherProviders*/4&o&&S!==(S=/*provider*/e[21].name+"")&&y(l,S),/*otherProviders*/4&o&&L!==(L=/*provider*/e[21].games.count+"")&&y(T,L),/*$_*/16&o&&N!==(N=/*$_*/e[4]("Translations.games")+"")&&y(P,N)},d(e){e&&p(t),B=!1,A()}}}function pr(t){let r;function n(e,t){/*isLoading*/
585
+ function cr(e){let t,r,n,i,o,s,a,l,f,v,T,H,P,_,B,A,S=/*provider*/e[21].name+"",L=/*provider*/e[21].games.count+"",N=/*$_*/e[4]("games")+"";function I(){/*click_handler_1*/
586
+ return e[13](/*provider*/e[21])}return{c(){t=m("div"),r=m("img"),o=d(),s=m("div"),a=m("p"),l=g(S),f=d(),v=m("p"),T=g(L),H=d(),P=g(N),_=d(),h(r.src,n=/*provider*/e[21].logo)||b(r,"src",n),b(r,"alt",i=/*provider*/e[21].name),b(r,"class","ProviderImage"),b(s,"class","ProviderTextContainer"),b(t,"class","Provider")},m(e,n){c(e,t,n),u(t,r),u(t,o),u(t,s),u(s,a),u(a,l),u(s,f),u(s,v),u(v,T),u(v,H),u(v,P),u(t,_),B||(A=E(t,"click",I),B=!0)},p(t,o){e=t,/*otherProviders*/4&o&&!h(r.src,n=/*provider*/e[21].logo)&&b(r,"src",n),/*otherProviders*/4&o&&i!==(i=/*provider*/e[21].name)&&b(r,"alt",i),/*otherProviders*/4&o&&S!==(S=/*provider*/e[21].name+"")&&y(l,S),/*otherProviders*/4&o&&L!==(L=/*provider*/e[21].games.count+"")&&y(T,L),/*$_*/16&o&&N!==(N=/*$_*/e[4]("games")+"")&&y(P,N)},d(e){e&&p(t),B=!1,A()}}}function pr(t){let r;function n(e,t){/*isLoading*/
587
587
  return!0===e[3]?lr:hr}let i=n(t),o=i(t);return{c(){r=m("div"),o.c(),this.c=e,b(r,"class","CasinoProviders")},m(e,n){c(e,r,n),o.m(r,null),
588
588
  /*div_binding*/t[14](r)},p(e,[t]){i===(i=n(e))&&o?o.p(e,t):(o.d(1),o=i(e),o&&(o.c(),o.m(r,null)))},i:e,o:e,d(e){e&&p(r),o.d(),
589
589
  /*div_binding*/t[14](null)}}}function fr(e,t,r){let n;var i,o;i=ir,o=e=>r(4,n=e),e.$$.on_destroy.push(l(i,o));let s,{endpoint:a=""}=t,{datasource:h=""}=t,{lang:u="en"}=t,{clientstyling:c=""}=t,{clientstylingurl:p=""}=t,{translationurl:f=""}=t,m=[],g=[],d=[],E=!1;Object.keys(D).forEach((e=>{or(e,D[e])}));const b=(e,t,r)=>{window.postMessage({type:"OpenGameProvider",providerId:e,providerName:t,providerLogo:r})},y=()=>{var e;e=u,Kt.set(e)};return e.$$set=e=>{"endpoint"in e&&r(6,a=e.endpoint),"datasource"in e&&r(7,h=e.datasource),"lang"in e&&r(8,u=e.lang),"clientstyling"in e&&r(9,c=e.clientstyling),"clientstylingurl"in e&&r(10,p=e.clientstylingurl),"translationurl"in e&&r(11,f=e.translationurl)},e.$$.update=()=>{/*endpoint, lang, datasource*/448&e.$$.dirty&&a&&u&&h&&(()=>{r(3,E=!0);const e=new URL(`${a}/casino/vendors`);e.searchParams.append("datasource",h),e.searchParams.append("language",u),e.searchParams.append("fields","id,name,displayName,subVendors,isTopVendor,logo,games"),fetch(e).then((e=>e.json())).then((e=>{r(3,E=!1),m=e.items.map((e=>e)),r(1,g=m.filter((e=>!0===e.isTopVendor))),r(2,d=m.filter((e=>!1===e.isTopVendor)));let t=[];t=m.flatMap((e=>e.subVendors)),d.push(...t.filter((e=>e.games.count>0)))}))})(),/*lang*/256&e.$$.dirty&&u&&y(),/*translationurl*/2048&e.$$.dirty&&f&&fetch(f).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{or(t,e[t])}))})).catch((e=>{console.log(e)})),/*clientstyling, customStylingContainer*/513&e.$$.dirty&&c&&s&&(()=>{let e=document.createElement("style");e.innerHTML=c,s.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/1025&e.$$.dirty&&p&&s&&(()=>{let e=new URL(p),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{s.appendChild(t)}),1)}))})()},[s,g,d,E,n,b,a,h,u,c,p,f,e=>b(e.id,e.name,e.logo),e=>b(e.id,e.name,e.logo),function(e){P[e?"unshift":"push"]((()=>{s=e,r(0,s)}))}]}F([Kt],(()=>er)),F([Kt],(()=>tr)),F([Kt],(()=>rr)),F([Kt,Nt],(()=>nr));class mr extends G{constructor(e){super();const t=document.createElement("style");t.textContent=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CasinoProviders{display:flex;flex-direction:column;gap:1rem;padding:10px 60px}.ProviderTitle{font-weight:500;position:relative;right:30px;margin:10px 0}.Provider{border-radius:7px;display:flex;align-items:center;gap:16px;max-width:300px}.ProviderTextContainer{display:flex;flex-direction:column;justify-content:center;gap:10px;font-size:15px}.ProviderTextContainer p:first-child{font-weight:600}.ProviderTextContainer p:last-child{color:#828282;font-weight:300}.ProviderImage{border-radius:4px;object-fit:contain;height:64px;width:64px;font-weight:100;border:0.5px solid #e4e2e2;overflow:hidden;object-fit:contain}.Message{font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}',this.shadowRoot.appendChild(t),U(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},fr,pr,o,{endpoint:6,datasource:7,lang:8,clientstyling:9,clientstylingurl:10,translationurl:11},null),e&&(e.target&&c(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["endpoint","datasource","lang","clientstyling","clientstylingurl","translationurl"]}get endpoint(){return this.$$.ctx[6]}set endpoint(e){this.$$set({endpoint:e}),C()}get datasource(){return this.$$.ctx[7]}set datasource(e){this.$$set({datasource:e}),C()}get lang(){return this.$$.ctx[8]}set lang(e){this.$$set({lang:e}),C()}get clientstyling(){return this.$$.ctx[9]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[10]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}get translationurl(){return this.$$.ctx[11]}set translationurl(e){this.$$set({translationurl:e}),C()}}return!customElements.get("casino-providers")&&customElements.define("casino-providers",mr),mr}));