@everymatrix/casino-winners 0.0.349 → 0.0.353

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.
@@ -629,5 +629,5 @@ return e[11]?yn:bn}let i=n(t),o=i(t);return{c(){r=p("div"),o.c(),this.c=e},m(e,n
629
629
  /*div_binding*/t[35](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&&f(r),o.d(),
630
630
  /*div_binding*/t[35](null)}}}function En(e,t,r){let n;var i,o;i=ir,o=e=>r(13,n=e),e.$$.on_destroy.push(c(i,o));let s,a,u,l,h,{endpoint:f=""}=t,{session:p=""}=t,{periodrecent:d="Today"}=t,{periodtop:m="Last7Days"}=t,{numberusersrecent:b="20"}=t,{numberuserstop:y="20"}=t,{amountlimit:g="1"}=t,{lang:v="en"}=t,{isrecentavailable:E="true"}=t,{istopavailable:_="true"}=t,{defaultcurrency:w=""}=t,{clientstyling:A=""}=t,{clientstylingurl:H=""}=t,S=[],P=0,C=0,O=window.navigator.userAgent,L=!1,I=!0,x=!1;Object.keys(or).forEach((e=>{!function(e,t){Lt(e,t)}(e,or[e])}));const N=()=>{const e=new URL(`${f}/casino/${a}-winners`);e.searchParams.append("limit","recent"==a?b:y),e.searchParams.append("currencies",L?l:""),e.searchParams.append("period","recent"==a?d:m),e.searchParams.append("language",v),e.searchParams.append("amountLimit",g),fetch(e.href).then((e=>e.json())).then((e=>{r(5,S=[]),r(5,S=e.items.map((e=>e))),r(11,I=!1),
631
631
  // Stupid hacks 'cuz svelte is a pain in the ass sometimes
632
- setTimeout((()=>{G(),U()}))}))},M=e=>{a!==e&&(r(4,a=e),r(5,S=[]),N())},R=(e,t)=>{window.postMessage({type:"OpenCasinoWinnersGame",gameId:e,launchUrl:t})},U=e=>{[...s.children].forEach(((t,r)=>{t.style.transform=`translateX(${100*(e?r-e:r)}%)`})),"top"==a?setTimeout((()=>{r(12,x=!0)}),10):r(12,x=!1)},D=()=>{U(P)},G=()=>{r(6,C=Math.round(s.offsetWidth/300))},$=()=>{const e=S.length;C>=S.length||(0===P?P=e-C:P-C<0?P=0:P-=C,D())},F=()=>{const e=S.length;C>=S.length||(P===e-C?P=0:e-C<P+C?P=e-C:P+=C,D())},W=()=>{var e;e=v,Xt.set(e)},k=()=>{(function(e,t){return new Promise(((r,n)=>{let i=new Headers;i.append("X-SessionID",t),Or(`${e}/player/session/player`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>r(e))).catch((e=>n(e)))}))})(f,p).then((e=>{e.Guid,r(9,l=e.Currency),r(8,L=!0)}),(e=>{r(8,L=!1),console.error("err on session",e)}))};T((()=>{r(7,u=(e=>!!(e.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)))(O))}));return e.$$set=e=>{"endpoint"in e&&r(20,f=e.endpoint),"session"in e&&r(21,p=e.session),"periodrecent"in e&&r(22,d=e.periodrecent),"periodtop"in e&&r(23,m=e.periodtop),"numberusersrecent"in e&&r(24,b=e.numberusersrecent),"numberuserstop"in e&&r(25,y=e.numberuserstop),"amountlimit"in e&&r(19,g=e.amountlimit),"lang"in e&&r(26,v=e.lang),"isrecentavailable"in e&&r(0,E=e.isrecentavailable),"istopavailable"in e&&r(1,_=e.istopavailable),"defaultcurrency"in e&&r(2,w=e.defaultcurrency),"clientstyling"in e&&r(27,A=e.clientstyling),"clientstylingurl"in e&&r(28,H=e.clientstylingurl)},e.$$.update=()=>{/*isrecentavailable, istopavailable, periodrecent, periodtop, numberusersrecent, numberuserstop, amountlimit, lang*/130547715&e.$$.dirty[0]&&E&&_&&d&&m&&b&&y&&g&&v&&("false"==E?(r(4,a="top"),r(19,g="")):r(4,a="recent")),/*session, endpoint*/3145728&e.$$.dirty[0]&&p&&f&&k(),/*endpoint*/1048576&e.$$.dirty[0]&&f&&N(),/*lang*/67108864&e.$$.dirty[0]&&v&&W(),/*clientstyling*/134217728&e.$$.dirty[0]&&A&&(()=>{let e=document.createElement("style");e.innerHTML=A,h.appendChild(e)})(),/*clientstylingurl*/268435456&e.$$.dirty[0]&&H&&(()=>{let e=new URL(H),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,h&&(setTimeout((()=>{h.appendChild(t)}),1),setTimeout((()=>{}),500))}))})()},[E,_,w,s,a,S,C,u,L,l,h,I,x,n,M,e=>e.slice(0,2)+e.slice(2,-2).replace(/./g,"*")+e.slice(-2),R,$,F,g,f,p,d,m,b,y,v,A,H,()=>M("recent"),()=>M("top"),()=>$(),()=>F(),e=>R(e.gameId,e.gameModel.launchUrl),function(e){B[e?"unshift":"push"]((()=>{s=e,r(3,s)}))},function(e){B[e?"unshift":"push"]((()=>{h=e,r(10,h)}))}]}class _n extends U{constructor(e){super(),this.shadowRoot.innerHTML="<style>: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}.Off{display:none}.CasinoWinners{background-color:#050518;width:100%;max-width:1920px;height:335px;padding:50px 75px;margin:0 auto}.CasinoWinners.Mobile{padding:25px 10px;height:250px}.WinnersHeader{display:flex;justify-content:space-between}.SliderButton{border:1px solid #F6F6F62E;border-radius:5px;background:#D1D1D10D;height:40px;width:40px;box-shadow:0 2px #F6F6F62E}.SliderButton.SliderButton:active{transform:translateY(1px);box-shadow:0 0 #F6F6F62E}.WinnerButtonsContainer{display:flex;margin-bottom:42px}.WinnersButton{border:none;background:none;color:#ffffff;font-size:28px;font-weight:normal;margin-right:60px;cursor:pointer}.WinnersButton:hover{border-bottom:2px solid #D0046C;padding-bottom:10px}.WinnersButton:focus{color:#D0046C}.WinnersButton.Active{border-bottom:2px solid #D0046C;padding-bottom:10px;color:#D0046C}.WinnersSlider{display:flex;justify-content:flex-start;position:relative;height:160px;overflow:hidden}.CardWrapper{position:absolute;top:0;left:0}.CardWrapperAnimation{transition:transform 2s}.WinnerCard{border:1px solid #F6F6F62E;border-radius:5px;background-color:#D1D1D10D;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:4px;height:160px;width:270px;min-width:270px;margin-bottom:50px;margin-right:30px}.WinnerCard p:first-of-type{color:#828282;font-size:14px}.WinnerCard p:nth-child(3){text-align:center;color:#E6E6E6;font-size:14px;width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.WinnerCard p:nth-child(4){color:#E6E6E6;font-size:14px;text-align:center}.WinnerCard p:last-of-type{color:#D0046C;font-size:16px}.WinnersImage{border-radius:5px;height:53.33px;margin-bottom:10px;width:80px;cursor:pointer}.Mobile .WinnersHeader{justify-content:flex-start}.Mobile .WinnersButton{font-size:18px;white-space:nowrap;margin-right:40px}.Mobile .WinnersButton.Active{padding-bottom:4px}.Mobile .WinnersSlider{overflow:scroll;overflow-y:hidden;-ms-overflow-style:none;scrollbar-width:none}.Mobile .WinnersSlider::-webkit-scrollbar{display:none}.Mobile .SliderButton{display:none}.Mobile .WinnerCard{width:110px;height:140px;min-width:90px;margin-right:12px}.Mobile .WinnerCard p:first-of-type{font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;width:100px}.Mobile .WinnerCard p:nth-child(3){font-size:10px}.Mobile .WinnerCard p:nth-child(4){font-size:8px;font-weight:300;text-align:center}.Mobile .WinnerCard p:last-of-type{font-size:11px}.Mobile .WinnerButtonsContainer{margin-bottom:20px}</style>",R(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},En,vn,o,{endpoint:20,session:21,periodrecent:22,periodtop:23,numberusersrecent:24,numberuserstop:25,amountlimit:19,lang:26,isrecentavailable:0,istopavailable:1,defaultcurrency:2,clientstyling:27,clientstylingurl:28},null,[-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["endpoint","session","periodrecent","periodtop","numberusersrecent","numberuserstop","amountlimit","lang","isrecentavailable","istopavailable","defaultcurrency","clientstyling","clientstylingurl"]}get endpoint(){return this.$$.ctx[20]}set endpoint(e){this.$$set({endpoint:e}),I()}get session(){return this.$$.ctx[21]}set session(e){this.$$set({session:e}),I()}get periodrecent(){return this.$$.ctx[22]}set periodrecent(e){this.$$set({periodrecent:e}),I()}get periodtop(){return this.$$.ctx[23]}set periodtop(e){this.$$set({periodtop:e}),I()}get numberusersrecent(){return this.$$.ctx[24]}set numberusersrecent(e){this.$$set({numberusersrecent:e}),I()}get numberuserstop(){return this.$$.ctx[25]}set numberuserstop(e){this.$$set({numberuserstop:e}),I()}get amountlimit(){return this.$$.ctx[19]}set amountlimit(e){this.$$set({amountlimit:e}),I()}get lang(){return this.$$.ctx[26]}set lang(e){this.$$set({lang:e}),I()}get isrecentavailable(){return this.$$.ctx[0]}set isrecentavailable(e){this.$$set({isrecentavailable:e}),I()}get istopavailable(){return this.$$.ctx[1]}set istopavailable(e){this.$$set({istopavailable:e}),I()}get defaultcurrency(){return this.$$.ctx[2]}set defaultcurrency(e){this.$$set({defaultcurrency:e}),I()}get clientstyling(){return this.$$.ctx[27]}set clientstyling(e){this.$$set({clientstyling:e}),I()}get clientstylingurl(){return this.$$.ctx[28]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),I()}}return!customElements.get("casino-winners")&&customElements.define("casino-winners",_n),_n}));
632
+ setTimeout((()=>{G(),U()}))}))},M=e=>{a!==e&&(r(4,a=e),r(5,S=[]),N())},R=(e,t,r)=>{window.postMessage({type:"OpenCasinoWinnersGame",gameId:e,launchUrl:t,gameName:r})},U=e=>{[...s.children].forEach(((t,r)=>{t.style.transform=`translateX(${100*(e?r-e:r)}%)`})),"top"==a?setTimeout((()=>{r(12,x=!0)}),10):r(12,x=!1)},D=()=>{U(P)},G=()=>{r(6,C=Math.round(s.offsetWidth/300))},$=()=>{const e=S.length;C>=S.length||(0===P?P=e-C:P-C<0?P=0:P-=C,D())},F=()=>{const e=S.length;C>=S.length||(P===e-C?P=0:e-C<P+C?P=e-C:P+=C,D())},W=()=>{var e;e=v,Xt.set(e)},k=()=>{(function(e,t){return new Promise(((r,n)=>{let i=new Headers;i.append("X-SessionID",t),Or(`${e}/player/session/player`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>r(e))).catch((e=>n(e)))}))})(f,p).then((e=>{e.Guid,r(9,l=e.Currency),r(8,L=!0)}),(e=>{r(8,L=!1),console.error("err on session",e)}))};T((()=>{r(7,u=(e=>!!(e.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)))(O))}));return e.$$set=e=>{"endpoint"in e&&r(20,f=e.endpoint),"session"in e&&r(21,p=e.session),"periodrecent"in e&&r(22,d=e.periodrecent),"periodtop"in e&&r(23,m=e.periodtop),"numberusersrecent"in e&&r(24,b=e.numberusersrecent),"numberuserstop"in e&&r(25,y=e.numberuserstop),"amountlimit"in e&&r(19,g=e.amountlimit),"lang"in e&&r(26,v=e.lang),"isrecentavailable"in e&&r(0,E=e.isrecentavailable),"istopavailable"in e&&r(1,_=e.istopavailable),"defaultcurrency"in e&&r(2,w=e.defaultcurrency),"clientstyling"in e&&r(27,A=e.clientstyling),"clientstylingurl"in e&&r(28,H=e.clientstylingurl)},e.$$.update=()=>{/*isrecentavailable, istopavailable, periodrecent, periodtop, numberusersrecent, numberuserstop, amountlimit, lang*/130547715&e.$$.dirty[0]&&E&&_&&d&&m&&b&&y&&g&&v&&("false"==E?(r(4,a="top"),r(19,g="")):r(4,a="recent")),/*session, endpoint*/3145728&e.$$.dirty[0]&&p&&f&&k(),/*endpoint*/1048576&e.$$.dirty[0]&&f&&N(),/*lang*/67108864&e.$$.dirty[0]&&v&&W(),/*clientstyling*/134217728&e.$$.dirty[0]&&A&&(()=>{let e=document.createElement("style");e.innerHTML=A,h.appendChild(e)})(),/*clientstylingurl*/268435456&e.$$.dirty[0]&&H&&(()=>{let e=new URL(H),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,h&&(setTimeout((()=>{h.appendChild(t)}),1),setTimeout((()=>{}),500))}))})()},[E,_,w,s,a,S,C,u,L,l,h,I,x,n,M,e=>e.slice(0,2)+e.slice(2,-2).replace(/./g,"*")+e.slice(-2),R,$,F,g,f,p,d,m,b,y,v,A,H,()=>M("recent"),()=>M("top"),()=>$(),()=>F(),e=>R(e.gameId,e.gameModel.launchUrl,e.gameModel.name),function(e){B[e?"unshift":"push"]((()=>{s=e,r(3,s)}))},function(e){B[e?"unshift":"push"]((()=>{h=e,r(10,h)}))}]}class _n extends U{constructor(e){super(),this.shadowRoot.innerHTML="<style>: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}.Off{display:none}.CasinoWinners{background-color:#050518;width:100%;max-width:1920px;height:335px;padding:50px 75px;margin:0 auto}.CasinoWinners.Mobile{padding:25px 10px;height:250px}.WinnersHeader{display:flex;justify-content:space-between}.SliderButton{border:1px solid #F6F6F62E;border-radius:5px;background:#D1D1D10D;height:40px;width:40px;box-shadow:0 2px #F6F6F62E}.SliderButton.SliderButton:active{transform:translateY(1px);box-shadow:0 0 #F6F6F62E}.WinnerButtonsContainer{display:flex;margin-bottom:42px}.WinnersButton{border:none;background:none;color:#ffffff;font-size:28px;font-weight:normal;margin-right:60px;cursor:pointer}.WinnersButton:hover{border-bottom:2px solid #D0046C;padding-bottom:10px}.WinnersButton:focus{color:#D0046C}.WinnersButton.Active{border-bottom:2px solid #D0046C;padding-bottom:10px;color:#D0046C}.WinnersSlider{display:flex;justify-content:flex-start;position:relative;height:160px;overflow:hidden}.CardWrapper{position:absolute;top:0;left:0}.CardWrapperAnimation{transition:transform 2s}.WinnerCard{border:1px solid #F6F6F62E;border-radius:5px;background-color:#D1D1D10D;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:4px;height:160px;width:270px;min-width:270px;margin-bottom:50px;margin-right:30px}.WinnerCard p:first-of-type{color:#828282;font-size:14px}.WinnerCard p:nth-child(3){text-align:center;color:#E6E6E6;font-size:14px;width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.WinnerCard p:nth-child(4){color:#E6E6E6;font-size:14px;text-align:center}.WinnerCard p:last-of-type{color:#D0046C;font-size:16px}.WinnersImage{border-radius:5px;height:53.33px;margin-bottom:10px;width:80px;cursor:pointer}.Mobile .WinnersHeader{justify-content:flex-start}.Mobile .WinnersButton{font-size:18px;white-space:nowrap;margin-right:40px}.Mobile .WinnersButton.Active{padding-bottom:4px}.Mobile .WinnersSlider{overflow:scroll;overflow-y:hidden;-ms-overflow-style:none;scrollbar-width:none}.Mobile .WinnersSlider::-webkit-scrollbar{display:none}.Mobile .SliderButton{display:none}.Mobile .WinnerCard{width:110px;height:140px;min-width:90px;margin-right:12px}.Mobile .WinnerCard p:first-of-type{font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;width:100px}.Mobile .WinnerCard p:nth-child(3){font-size:10px}.Mobile .WinnerCard p:nth-child(4){font-size:8px;font-weight:300;text-align:center}.Mobile .WinnerCard p:last-of-type{font-size:11px}.Mobile .WinnerButtonsContainer{margin-bottom:20px}</style>",R(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},En,vn,o,{endpoint:20,session:21,periodrecent:22,periodtop:23,numberusersrecent:24,numberuserstop:25,amountlimit:19,lang:26,isrecentavailable:0,istopavailable:1,defaultcurrency:2,clientstyling:27,clientstylingurl:28},null,[-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["endpoint","session","periodrecent","periodtop","numberusersrecent","numberuserstop","amountlimit","lang","isrecentavailable","istopavailable","defaultcurrency","clientstyling","clientstylingurl"]}get endpoint(){return this.$$.ctx[20]}set endpoint(e){this.$$set({endpoint:e}),I()}get session(){return this.$$.ctx[21]}set session(e){this.$$set({session:e}),I()}get periodrecent(){return this.$$.ctx[22]}set periodrecent(e){this.$$set({periodrecent:e}),I()}get periodtop(){return this.$$.ctx[23]}set periodtop(e){this.$$set({periodtop:e}),I()}get numberusersrecent(){return this.$$.ctx[24]}set numberusersrecent(e){this.$$set({numberusersrecent:e}),I()}get numberuserstop(){return this.$$.ctx[25]}set numberuserstop(e){this.$$set({numberuserstop:e}),I()}get amountlimit(){return this.$$.ctx[19]}set amountlimit(e){this.$$set({amountlimit:e}),I()}get lang(){return this.$$.ctx[26]}set lang(e){this.$$set({lang:e}),I()}get isrecentavailable(){return this.$$.ctx[0]}set isrecentavailable(e){this.$$set({isrecentavailable:e}),I()}get istopavailable(){return this.$$.ctx[1]}set istopavailable(e){this.$$set({istopavailable:e}),I()}get defaultcurrency(){return this.$$.ctx[2]}set defaultcurrency(e){this.$$set({defaultcurrency:e}),I()}get clientstyling(){return this.$$.ctx[27]}set clientstyling(e){this.$$set({clientstyling:e}),I()}get clientstylingurl(){return this.$$.ctx[28]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),I()}}return!customElements.get("casino-winners")&&customElements.define("casino-winners",_n),_n}));
633
633
  //# sourceMappingURL=casino-winners.js.map