@everymatrix/casino-collections-providers 1.0.3 → 1.0.4

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.
@@ -617,22 +617,22 @@ self.fetch.bind(self);
617
617
  var Or=function(t,e){return Or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Or(t,e)};function Ir(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Or(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Nr(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rr(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Mr(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}function Ur(t){return"function"==typeof t}function xr(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Gr=xr((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Dr(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Fr=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=Nr(i),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else i.remove(this);var l=this.initialTeardown;if(Ur(l))try{l()}catch(t){o=t instanceof Gr?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Nr(c),h=u.next();!h.done;h=u.next()){var f=h.value;try{jr(f)}catch(t){o=null!=o?o:[],t instanceof Gr?o=Mr(Mr([],Rr(o)),Rr(t.errors)):o.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}}if(o)throw new Gr(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)jr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Dr(e,t)},t.prototype.remove=function(e){var r=this._finalizers;r&&Dr(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),kr=Fr.EMPTY;function $r(t){return t instanceof Fr||t&&"closed"in t&&Ur(t.remove)&&Ur(t.add)&&Ur(t.unsubscribe)}function jr(t){Ur(t)?t():t.unsubscribe()}var Vr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Xr={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Xr.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,Mr([t,e],Rr(r))):setTimeout.apply(void 0,Mr([t,e],Rr(r)))},clearTimeout:function(t){var e=Xr.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function zr(){}var Kr=null;function Yr(t){if(Vr.useDeprecatedSynchronousErrorHandling){var e=!Kr;if(e&&(Kr={errorThrown:!1,error:null}),t(),e){var r=Kr,n=r.errorThrown,o=r.error;if(Kr=null,n)throw o}}else t()}var Zr=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,$r(e)&&e.add(r)):r.destination=en,r}return Ir(e,t),e.create=function(t,e,r){return new Qr(t,e,r)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Fr),Wr=Function.prototype.bind;function qr(t,e){return Wr.call(t,e)}var Jr=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){tn(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){tn(t)}else tn(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){tn(t)}},t}(),Qr=function(t){function e(e,r,n){var o,i,s=t.call(this)||this;Ur(e)||!e?o={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&Vr.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},o={next:e.next&&qr(e.next,i),error:e.error&&qr(e.error,i),complete:e.complete&&qr(e.complete,i)}):o=e;return s.destination=new Jr(o),s}return Ir(e,t),e}(Zr);function tn(t){var e;e=t,Xr.setTimeout((function(){throw e}))}var en={closed:!0,next:zr,error:function(t){throw t},complete:zr},rn="function"==typeof Symbol&&Symbol.observable||"@@observable";function nn(t){return t}function on(t){return 0===t.length?nn:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var sn=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,o=this,i=(n=t)&&n instanceof Zr||function(t){return t&&Ur(t.next)&&Ur(t.error)&&Ur(t.complete)}(n)&&$r(n)?t:new Qr(t,e,r);return Yr((function(){var t=o,e=t.operator,r=t.source;i.add(e?e.call(i,r):r?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=an(e))((function(e,n){var o=new Qr({next:function(e){try{t(e)}catch(t){n(t),o.unsubscribe()}},error:n,complete:e});r.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[rn]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return on(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=an(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function an(t){var e;return null!==(e=null!=t?t:Vr.Promise)&&void 0!==e?e:Promise}var ln=xr((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),cn=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Ir(e,t),e.prototype.lift=function(t){var e=new un(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ln},e.prototype.next=function(t){var e=this;Yr((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=Nr(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;Yr((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Yr((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this,n=r.hasError,o=r.isStopped,i=r.observers;return n||o?kr:(this.currentObservers=null,i.push(t),new Fr((function(){e.currentObservers=null,Dr(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,o=e.isStopped;r?t.error(n):o&&t.complete()},e.prototype.asObservable=function(){var t=new sn;return t.source=this,t},e.create=function(t,e){return new un(t,e)},e}(sn),un=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return Ir(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:kr},e}(cn),hn={now:function(){return(hn.delegate||Date).now()},delegate:void 0},fn=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=hn);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,r),o}return Ir(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,o=r._buffer,i=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(o.push(e),!i&&o.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!t.closed;o+=r?1:2)t.next(n[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!o){for(var s=r.now(),a=0,l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}},e}(cn);let pn=[],dn={};window.emWidgets={topic:(t,e=0)=>{if(-1==pn.indexOf(t)){let r=new fn(e);dn[t]=r,pn.push(t)}return dn[t]}};
618
618
  /* src/CasinoCollectionsProviders.svelte generated by Svelte v3.48.0 */
619
619
  function mn(t,e,r){const n=t.slice();return n[37]=e[r],n}function yn(t,e,r){const n=t.slice();return n[40]=e[r],n}
620
- // (139:4) {:else}
620
+ // (146:4) {:else}
621
621
  function bn(t){let e,r,o,i,s,a,l,c,E,_,T,w,A,B,S,H,P=/*$_*/t[7]("Translations.game")+"",C=/*type*/("vendor"==t[0]?/*$_*/t[7]("Translations.providers"):/*$_*/t[7]("Translations.collections"))+"",L=/*gameCategories*/t[2],O=[];for(let e=0;e<L.length;e+=1)O[e]=Tn(mn(t,L,e));return{c(){e=d("div"),r=d("div"),o=d("p"),i=m(P),s=y(),a=m(C),l=y(),c=d("div"),E=d("button"),E.innerHTML='<svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656"><path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(14.656 0) rotate(90)" fill="#fff"></path></svg>',_=y(),T=d("button"),T.innerHTML='<svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656"><path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(0 24.656) rotate(-90)" fill="#fff"></path></svg>',w=y(),A=d("div");for(let t=0;t<O.length;t+=1)O[t].c();g(o,"class","Title"),g(c,"class","ButtonsContainer"),g(r,"class","CategoriesHeader"),g(A,"class","CategoriesSlider"),g(e,"class",B="CasinoCollectionsProviders "+(/*mobile*/t[6]?"Mobile":""))},m(n,f){h(n,e,f),u(e,r),u(r,o),u(o,i),u(o,s),u(o,a),u(r,l),u(r,c),u(c,E),u(c,_),u(c,T),u(e,w),u(e,A);for(let t=0;t<O.length;t+=1)O[t].m(A,null);
622
622
  /*div2_binding*/t[21](A),S||(H=[b(E,"click",/*click_handler*/t[17]),b(T,"click",/*click_handler_1*/t[18])],S=!0)},p(t,r){if(/*$_*/128&r[0]&&P!==(P=/*$_*/t[7]("Translations.game")+"")&&v(i,P),/*type, $_*/129&r[0]&&C!==(C=/*type*/("vendor"==t[0]?/*$_*/t[7]("Translations.providers"):/*$_*/t[7]("Translations.collections"))+"")&&v(a,C),/*gameCategories, openCategory, openGame, titletype*/3078&r[0]){let e;for(L=/*gameCategories*/t[2],e=0;e<L.length;e+=1){const n=mn(t,L,e);O[e]?O[e].p(n,r):(O[e]=Tn(n),O[e].c(),O[e].m(A,null))}for(;e<O.length;e+=1)O[e].d(1);O.length=L.length}/*mobile*/64&r[0]&&B!==(B="CasinoCollectionsProviders "+(/*mobile*/t[6]?"Mobile":""))&&g(e,"class",B)},d(r){r&&f(e),p(O,r),
623
623
  /*div2_binding*/t[21](null),S=!1,n(H)}}}
624
- // (137:4) {#if isLoading}
624
+ // (144:4) {#if isLoading}
625
625
  function gn(e){let r;return{c(){r=d("p"),r.textContent="Loading, please wait ..."},m(t,e){h(t,r,e)},p:t,d(t){t&&f(r)}}}
626
- // (164:47)
626
+ // (171:47)
627
627
  function vn(t){let e,r,n=/*category*/t[37].name+"";return{c(){e=d("p"),r=m(n),g(e,"class","CategorySlideTitle")},m(t,n){h(t,e,n),u(e,r)},p(t,e){/*gameCategories*/4&e[0]&&n!==(n=/*category*/t[37].name+"")&&v(r,n)},d(t){t&&f(e)}}}
628
- // (162:16) {#if titletype == 'logo'}
628
+ // (169:16) {#if titletype == 'logo'}
629
629
  function En(t){let e,r,n;return{c(){e=d("img"),g(e,"class","CategorySlideLogo"),l(e.src,r=/*category*/t[37].icon)||g(e,"src",r),g(e,"alt",n=/*category*/t[37].name+" icon")},m(t,r){h(t,e,r)},p(t,o){/*gameCategories*/4&o[0]&&!l(e.src,r=/*category*/t[37].icon)&&g(e,"src",r),/*gameCategories*/4&o[0]&&n!==(n=/*category*/t[37].name+" icon")&&g(e,"alt",n)},d(t){t&&f(e)}}}
630
- // (169:16) {#each category.games as game}
630
+ // (176:16) {#each category.games as game}
631
631
  function _n(t){let e,r,n,o,i;function s(){/*click_handler_2*/
632
632
  return t[19](/*game*/t[40])}return{c(){e=d("img"),g(e,"class","CategorySlideGameImage"),l(e.src,r=/*game*/t[40].defaultThumbnail)||g(e,"src",r),g(e,"alt",n=/*game*/t[40].name)},m(t,r){var n;h(t,e,r),o||(i=b(e,"click",(n=s,function(t){
633
633
  // @ts-ignore
634
634
  return t.stopPropagation(),n.call(this,t)})),o=!0)},p(o,i){t=o,/*gameCategories*/4&i[0]&&!l(e.src,r=/*game*/t[40].defaultThumbnail)&&g(e,"src",r),/*gameCategories*/4&i[0]&&n!==(n=/*game*/t[40].name)&&g(e,"alt",n)},d(t){t&&f(e),o=!1,i()}}}
635
- // (158:10) {#each gameCategories as category}
635
+ // (165:10) {#each gameCategories as category}
636
636
  function Tn(t){let e,r,n,o,i,s,a,l,c;function m(t,e){/*titletype*/
637
637
  return"logo"==t[1]?En:/*titletype*/"title"==t[1]?vn:void 0}let v=m(t),_=v&&v(t),T=/*category*/t[37].games,w=[];for(let e=0;e<T.length;e+=1)w[e]=_n(yn(t,T,e));function A(){/*click_handler_3*/
638
638
  return t[20](/*category*/t[37])}return{c(){e=d("div"),r=d("div"),n=d("div"),_&&_.c(),o=y(),i=d("div");for(let t=0;t<w.length;t+=1)w[t].c();a=y(),g(n,"class","CategorySlideTopContainer"),g(i,"class","CategorySlideGameContainer"),g(r,"class",s="CategorySlide "+(/*category*/"vendor"==t[37]?.flag[0]?"CategorySlideNoHighlight":"")),E(r,"background-image","url("+/*category*/t[37]?.background+")"),g(e,"class","CategoriesSliderWrapper Animation")},m(t,s){h(t,e,s),u(e,r),u(r,n),_&&_.m(n,null),u(r,o),u(r,i);for(let t=0;t<w.length;t+=1)w[t].m(i,null);u(e,a),l||(c=b(r,"click",A),l=!0)},p(e,o){if(v===(v=m(t=e))&&_?_.p(t,o):(_&&_.d(1),_=v&&v(t),_&&(_.c(),_.m(n,null))),/*gameCategories, openGame*/1028&o[0]){let e;for(T=/*category*/t[37].games,e=0;e<T.length;e+=1){const r=yn(t,T,e);w[e]?w[e].p(r,o):(w[e]=_n(r),w[e].c(),w[e].m(i,null))}for(;e<w.length;e+=1)w[e].d(1);w.length=T.length}/*gameCategories*/4&o[0]&&s!==(s="CategorySlide "+(/*category*/"vendor"==t[37]?.flag[0]?"CategorySlideNoHighlight":""))&&g(r,"class",s),/*gameCategories*/4&o[0]&&E(r,"background-image","url("+/*category*/t[37]?.background+")")},d(t){t&&f(e),_&&_.d(),p(w,t),l=!1,c()}}}function wn(e){let r;function n(t,e){/*isLoading*/
@@ -646,7 +646,9 @@ l.forEach(((e,r)=>{e.style.transform=`translateX(${100*(t?r-t:r)}%)`})),l.map((t
646
646
  //needed for finding the beginning and end of the slider
647
647
  A=Math.round(s.offsetWidth/a)},C=()=>{
648
648
  //in order to go to a specific slide, position all the slides relative to one of them, one which is determined by sliderScrollLeft and sliderScrollRight
649
- H(_)},L=()=>{A>=T||(0===_?_=T-A:_-A<-1?_=0:_--,C())},O=()=>{A>=T||(_===T-A?_=0:T-A<_+1?_=T-A:_++,C())},I=(t,e,r)=>{window.postMessage({type:"OpenCollectionsProvidersGame",gameId:t,launchUrl:e,gameName:r},window.location.href)},N=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},R=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(S))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl)},t.$$.update=()=>{/*endpoint, datasource, lang*/28672&t.$$.dirty[0]&&f&&p&&d&&(()=>{const t=new URL(`${f}/v2/casino/groups/${p}`);t.searchParams.append("language",d),t.searchParams.append("expand","games"),fetch(t.href).then((t=>t.json())).then((t=>{r(5,E=!1);let e=t.items.filter((t=>t.flags==m));r(2,v=e.map((t=>({id:t.id,name:t.name,icon:t.icon,games:t.games.items.slice(0,4).map((t=>t)),background:t.background,flag:t.flags})))),T=v.length}))})(),/*gameCategories, categoriesSlider*/12&t.$$.dirty[0]&&
649
+ H(_)},L=()=>{A>=T||(0===_?_=T-A:_-A<-1?_=0:_--,C())},O=()=>{A>=T||(_===T-A?_=0:T-A<_+1?_=T-A:_++,C())},I=(t,e,r)=>{window.postMessage({type:"OpenCollectionsProvidersGame",gameId:t,launchUrl:e,gameName:r},window.location.href),
650
+ //Analytics event
651
+ "function"==typeof gtag&&gtag("event","OpenGame",{context:"CollectionsProviders",gameName:`${r}`})},N=t=>{window.postMessage({type:"OpenCollectionsProvidersCategory",categoryId:t},window.location.href)},R=()=>{var t;t=d,Ke.set(t)};w((()=>{r(6,h=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(S))}));return t.$$set=t=>{"endpoint"in t&&r(12,f=t.endpoint),"datasource"in t&&r(13,p=t.datasource),"lang"in t&&r(14,d=t.lang),"type"in t&&r(0,m=t.type),"titletype"in t&&r(1,y=t.titletype),"clientstyling"in t&&r(15,b=t.clientstyling),"clientstylingurl"in t&&r(16,g=t.clientstylingurl)},t.$$.update=()=>{/*endpoint, datasource, lang*/28672&t.$$.dirty[0]&&f&&p&&d&&(()=>{const t=new URL(`${f}/v2/casino/groups/${p}`);t.searchParams.append("language",d),t.searchParams.append("expand","games"),fetch(t.href).then((t=>t.json())).then((t=>{r(5,E=!1);let e=t.items.filter((t=>t.flags==m));r(2,v=e.map((t=>({id:t.id,name:t.name,icon:t.icon,games:t.games.items.slice(0,4).map((t=>t)),background:t.background,flag:t.flags})))),T=v.length}))})(),/*gameCategories, categoriesSlider*/12&t.$$.dirty[0]&&
650
652
  //making sure we have something to position, before trying to
651
653
  v&&s&&H(),/*lang*/16384&t.$$.dirty[0]&&d&&R(),/*clientstyling, customStylingContainer*/32784&t.$$.dirty[0]&&b&&u&&(()=>{let t=document.createElement("style");t.innerHTML=b,u.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/65552&t.$$.dirty[0]&&g&&u&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,u&&(setTimeout((()=>{u.appendChild(e)}),1),setTimeout((()=>{}),500))}))})()},[m,y,v,s,u,E,h,n,L,O,I,N,f,p,d,b,g,()=>L(),()=>O(),t=>I(t.gameId,t.launchUrl,t.name),t=>N(t.id),function(t){B[t?"unshift":"push"]((()=>{s=t,r(3,s)}))},function(t){B[t?"unshift":"push"]((()=>{u=t,r(4,u)}))}]}class Bn extends G{constructor(t){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;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoCollectionsProviders{background:var(--emfe-w-color-contrast, #07072A);width:100%;height:330px;margin:0 auto;margin-top:24px}.CategoriesHeader{display:flex;justify-content:space-between;height:70px}.CategoriesHeader .Title{color:var(--emfe-w-color-white, #FFFFFF);font-size:22px;font-weight:500}.CategoriesHeader .ButtonsContainer button{border:1px solid rgba(255, 255, 255, 0.2);border-radius:5px;background-color:rgba(0, 0, 25, 0.2);height:40px;width:40px;cursor:pointer}.CategoriesHeader .ButtonsContainer button:active{opacity:0.7}.CategoriesSlider{position:relative;height:230px;overflow:hidden}.CategoriesSliderWrapper{position:absolute;top:0;left:0}.CategoriesSlider .Animation{transition:transform 0.8s}.CategoriesSlider .CategorySlide{border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;height:200px;width:400px;margin-right:15px;background-size:cover}.CategoriesSlider .CategorySlide:not(.CategorySlideNoHighlight){background-color:#808080;background-blend-mode:multiply}.CategoriesSlider .CategorySlideTopContainer{height:100px;display:flex;align-items:center}.CategoriesSlider .CategorySlideLogo{max-height:100px}.CategoriesSlider .CategorySlideTitle{color:var(--emfe-w-color-white, #FFFFFF);font-size:18px;letter-spacing:1px}.CategoriesSlider .CategorySlideGameContainer{display:flex;justify-content:center;gap:3%;min-height:70px}.CategoriesSlider .CategorySlideGameImage{border-radius:10px;width:22%;height:55px;object-fit:cover}.Mobile.CasinoCollectionsProviders{padding:25px 10px}.Mobile .CategoriesSlider{overflow:auto;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none}.Mobile .CategoriesSlider::-webkit-scrollbar{display:none}.Mobile .CategorySlide{width:85vw;scroll-snap-align:start}.Mobile .ButtonsContainer{display:none}</style>",x(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},An,wn,i,{endpoint:12,datasource:13,lang:14,type:0,titletype:1,clientstyling:15,clientstylingurl:16},null,[-1,-1]),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["endpoint","datasource","lang","type","titletype","clientstyling","clientstylingurl"]}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),N()}get datasource(){return this.$$.ctx[13]}set datasource(t){this.$$set({datasource:t}),N()}get lang(){return this.$$.ctx[14]}set lang(t){this.$$set({lang:t}),N()}get type(){return this.$$.ctx[0]}set type(t){this.$$set({type:t}),N()}get titletype(){return this.$$.ctx[1]}set titletype(t){this.$$set({titletype:t}),N()}get clientstyling(){return this.$$.ctx[15]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[16]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}}return!customElements.get("casino-collections-providers")&&customElements.define("casino-collections-providers",Bn),Bn}));
652
654
  //# sourceMappingURL=casino-collections-providers.js.map