@everymatrix/casino-tournaments-thumbnail-controller 0.0.192 → 0.0.196
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,function(){"use strict";function b(){}function h(t){return t()}function d(){return Object.create(null)}function y(t){t.forEach(h)}function p(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,...e){if(null==t)return b;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function H(t,e,r){t.$$.on_destroy.push(f(e,r))}function g(t){return t&&p(t.destroy)?t.destroy:b}function T(t,e){t.appendChild(e)}function _(t,e,r){t.insertBefore(e,r||null)}function x(t){t.parentNode.removeChild(t)}function m(e,r){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(r)}function A(t){return document.createElement(t)}function e(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function P(t){return document.createTextNode(t)}function S(){return P(" ")}function l(){return P("")}function C(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function L(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function v(t,e,r){e in t?t[e]=r:L(t,e,r)}function $(t,e){t.wholeText!==(e=""+e)&&(t.data=e)}function E(t,e,r,n){t.style.setProperty(e,r,n?"important":"")}function t(t,e,r){t.classList[r?"add":"remove"](e)}function n(t){const e={};for(const r of t)e[r.name]=r.value;return e}let w;function O(t){w=t}function X(t){!function(){if(!w)throw new Error("Function called outside component initialization");return w}().$$.on_mount.push(t)}const k=[],I=[],i=[],o=[],N=Promise.resolve();let R=!1;function D(t){i.push(t)}let s=!1;const a=new Set;function M(){if(!s){s=!0;do{for(let t=0;t<k.length;t+=1){var e=k[t];O(e),function(t){{var e;null!==t.fragment&&(t.update(),y(t.before_update),e=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(D))}}(e.$$)}for(O(null),k.length=0;I.length;)I.pop()();for(let t=0;t<i.length;t+=1){const r=i[t];a.has(r)||(a.add(r),r())}}while(i.length=0,k.length);for(;o.length;)o.pop()();R=!1,s=!1,a.clear()}}const U=new Set;function u(n,t,e,r,i,o,s=[-1]){var a,l=w;O(n);const u=n.$$={fragment:null,ctx:null,props:o,update:b,not_equal:i,bound:d(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:d(),dirty:s,skip_bound:!1};let c=!1;if(u.ctx=e?e(n,t.props||{},(t,e,...r)=>{r=r.length?r[0]:e;return u.ctx&&i(u.ctx[t],u.ctx[t]=r)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](r),c&&(r=t,-1===(t=n).$$.dirty[0]&&(k.push(t),R||(R=!0,N.then(M)),t.$$.dirty.fill(0)),t.$$.dirty[r/31|0]|=1<<r%31)),e}):[],u.update(),c=!0,y(u.before_update),u.fragment=!!r&&r(u.ctx),t.target){if(t.hydrate){const b=(r=t.target,Array.from(r.childNodes));u.fragment&&u.fragment.l(b),b.forEach(x)}else u.fragment&&u.fragment.c();t.intro&&(a=n.$$.fragment)&&a.i&&(U.delete(a),a.i(void 0)),function(e,t,r,n){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,r),n||D(()=>{var t=o.map(h).filter(p);s?s.push(...t):y(t),e.$$.on_mount=[]}),a.forEach(D)}(n,t.target,t.anchor,t.customElement),M()}O(l)}let c;"function"==typeof HTMLElement&&(c=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(h).filter(p);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){y(this.$$.on_disconnect)}$destroy(){!function(t){const e=t.$$;null!==e.fragment&&(y(e.on_destroy),e.fragment&&e.fragment.d(1),e.on_destroy=e.fragment=null,e.ctx=[])}(this),this.$destroy=b}$on(t,e){const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{var t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var F,j,B="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==B&&B,z="URLSearchParams"in B,G="Symbol"in B&&"iterator"in Symbol,V="FileReader"in B&&"Blob"in B&&function(){try{return new Blob,!0}catch(t){return!1}}(),Y="FormData"in B,W="ArrayBuffer"in B;function q(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function K(t){return t="string"!=typeof t?String(t):t}function Z(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return G&&(t[Symbol.iterator]=function(){return t}),t}function J(e){this.map={},e instanceof J?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function Q(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function tt(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function et(t){var e=new FileReader,r=tt(e);return e.readAsArrayBuffer(t),r}function rt(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function nt(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,(this._bodyInit=t)?"string"==typeof t?this._bodyText=t:V&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Y&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:z&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():W&&V&&t&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=rt(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):W&&(ArrayBuffer.prototype.isPrototypeOf(t)||j(t))?this._bodyArrayBuffer=rt(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):z&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},V&&(this.blob=function(){var t=Q(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Q(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(et)}),this.text=function(){var t,e,r=Q(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,r=tt(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Y&&(this.formData=function(){return this.text().then(st)}),this.json=function(){return this.text().then(JSON.parse)},this}W&&(F=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],j=ArrayBuffer.isView||function(t){return t&&-1<F.indexOf(Object.prototype.toString.call(t))}),J.prototype.append=function(t,e){t=q(t),e=K(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},J.prototype.delete=function(t){delete this.map[q(t)]},J.prototype.get=function(t){return t=q(t),this.has(t)?this.map[t]:null},J.prototype.has=function(t){return this.map.hasOwnProperty(q(t))},J.prototype.set=function(t,e){this.map[q(t)]=K(e)},J.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},J.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),Z(r)},J.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Z(e)},J.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),Z(r)},G&&(J.prototype[Symbol.iterator]=J.prototype.entries);var it=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ot(t,e){if(!(this instanceof ot))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n=(e=e||{}).body;if(t instanceof ot){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new J(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new J(e.headers)),this.method=(t=(r=e.method||this.method||"GET").toUpperCase(),-1<it.indexOf(t)?t:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n),"GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache||((e=/([?&])_=[^&]*/).test(this.url)?this.url=this.url.replace(e,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime())}function st(t){var r=new FormData;return t.trim().split("&").forEach(function(t){var e;t&&(t=(e=t.split("=")).shift().replace(/\+/g," "),e=e.join("=").replace(/\+/g," "),r.append(decodeURIComponent(t),decodeURIComponent(e)))}),r}function at(t,e){if(!(this instanceof at))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{},this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new J(e.headers),this.url=e.url||"",this._initBody(t)}ot.prototype.clone=function(){return new ot(this,{body:this._bodyInit})},nt.call(ot.prototype),nt.call(at.prototype),at.prototype.clone=function(){return new at(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new J(this.headers),url:this.url})},at.error=function(){var t=new at(null,{status:0,statusText:""});return t.type="error",t};var lt=[301,302,303,307,308];at.redirect=function(t,e){if(-1===lt.indexOf(e))throw new RangeError("Invalid status code");return new at(null,{status:e,headers:{location:t}})};var ut=B.DOMException;try{new ut}catch(b){(ut=function(t,e){this.message=t,this.name=e;t=Error(t);this.stack=t.stack}).prototype=Object.create(Error.prototype),ut.prototype.constructor=ut}function ct(n,s){return new Promise(function(i,t){var e=new ot(n,s);if(e.signal&&e.signal.aborted)return t(new ut("Aborted","AbortError"));var o=new XMLHttpRequest;function r(){o.abort()}o.onload=function(){var t,r,e={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",r=new J,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var e=t.split(":"),t=e.shift().trim();t&&(e=e.join(":").trim(),r.append(t,e))}),r)};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var n="response"in o?o.response:o.responseText;setTimeout(function(){i(new at(n,e))},0)},o.onerror=function(){setTimeout(function(){t(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){t(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){t(new ut("Aborted","AbortError"))},0)},o.open(e.method,function(e){try{return""===e&&B.location.href?B.location.href:e}catch(t){return e}}(e.url),!0),"include"===e.credentials?o.withCredentials=!0:"omit"===e.credentials&&(o.withCredentials=!1),"responseType"in o&&(V?o.responseType="blob":W&&e.headers.get("Content-Type")&&-1!==e.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!s||"object"!=typeof s.headers||s.headers instanceof J?e.headers.forEach(function(t,e){o.setRequestHeader(e,t)}):Object.getOwnPropertyNames(s.headers).forEach(function(t){o.setRequestHeader(t,K(s.headers[t]))}),e.signal&&(e.signal.addEventListener("abort",r),o.onreadystatechange=function(){4===o.readyState&&e.signal.removeEventListener("abort",r)}),o.send(void 0===e._bodyInit?null:e._bodyInit)})}ct.polyfill=!0,B.fetch||(B.fetch=ct,B.Headers=J,B.Request=ot,B.Response=at),self.fetch.bind(self);var ht=function(t,e){return(ht=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])})(t,e)};function dt(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}ht(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function pt(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{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ft(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function mt(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function gt(t){return"function"==typeof t}function yt(t){t=t(function(t){Error.call(t),t.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t}var bt=yt(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function vt(t,e){!t||0<=(e=t.indexOf(e))&&t.splice(e,1)}var Et=(Tt.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=pt(o),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 o.remove(this);o=this.initialTeardown;if(gt(o))try{o()}catch(t){i=t instanceof bt?t.errors:[t]}o=this._teardowns;if(o){this._teardowns=null;try{for(var l=pt(o),u=l.next();!u.done;u=l.next()){var c=u.value;try{xt(c)}catch(t){i=null!=i?i:[],t instanceof bt?i=mt(mt([],ft(i)),ft(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new bt(i)}},Tt.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)xt(t);else{if(t instanceof Tt){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._teardowns=null!==(e=this._teardowns)&&void 0!==e?e:[]).push(t)}},Tt.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},Tt.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},Tt.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},Tt.prototype.remove=function(t){var e=this._teardowns;e&&vt(e,t),t instanceof Tt&&t._removeParent(this)},Tt.EMPTY=((Ve=new Tt).closed=!0,Ve),Tt),wt=Et.EMPTY;function Tt(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}function _t(t){return t instanceof Et||t&&"closed"in t&>(t.remove)&>(t.add)&>(t.unsubscribe)}function xt(t){gt(t)?t():t.unsubscribe()}var At=void 0,Pt=!1,St=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return setTimeout.apply(void 0,mt([],ft(t)))};function Ct(){}function Lt(t){t()}var $t,Ot,kt=(dt(Rt,Ot=Et),Rt.create=function(t,e,r){return new It(t,e,r)},Rt.prototype.next=function(t){this.isStopped||this._next(t)},Rt.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},Rt.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Rt.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,Ot.prototype.unsubscribe.call(this),this.destination=null)},Rt.prototype._next=function(t){this.destination.next(t)},Rt.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},Rt.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},Rt),It=(dt(Nt,$t=kt),Nt);function Nt(t,e,r){var n,i,o=$t.call(this)||this;return gt(t)?i=t:t&&(i=t.next,e=t.error,r=t.complete,o&&Pt?(n=Object.create(t)).unsubscribe=function(){return o.unsubscribe()}:n=t,i=null==i?void 0:i.bind(n),e=null==e?void 0:e.bind(n),r=null==r?void 0:r.bind(n)),o.destination={next:i?Dt(i):Ct,error:Dt(null!=e?e:Mt),complete:r?Dt(r):Ct},o}function Rt(t){var e=Ot.call(this)||this;return e.isStopped=!1,t?_t(e.destination=t)&&t.add(e):e.destination=Ut,e}function Dt(n){return function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{n.apply(void 0,mt([],ft(t)))}catch(t){e=t,St(function(){throw e})}}}function Mt(t){throw t}var Ut={closed:!0,next:Ct,error:Mt,complete:Ct},Ft="function"==typeof Symbol&&Symbol.observable||"@@observable";function jt(t){return t}var Bt=(zt.prototype.lift=function(t){var e=new zt;return e.source=this,e.operator=t,e},zt.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof kt||n&>(n.next)&>(n.error)&>(n.complete)&&_t(n)?t:new It(t,e,r);return Lt(function(){var t=i.operator,e=i.source;o.add(t?t.call(o,e):e?i._subscribe(o):i._trySubscribe(o))}),o},zt.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},zt.prototype.forEach=function(n,t){var i=this;return new(t=Gt(t))(function(t,e){var r=i.subscribe(function(t){try{n(t)}catch(t){e(t),null==r||r.unsubscribe()}},e,t)})},zt.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},zt.prototype[Ft]=function(){return this},zt.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?jt:1===e.length?e[0]:function(t){return e.reduce(function(t,e){return e(t)},t)})(this)},zt.prototype.toPromise=function(t){var n=this;return new(t=Gt(t))(function(t,e){var r;n.subscribe(function(t){return r=t},function(t){return e(t)},function(){return t(r)})})},zt.create=function(t){return new zt(t)},zt);function zt(t){t&&(this._subscribe=t)}function Gt(t){return null!==(t=null!=t?t:At)&&void 0!==t?t:Promise}var Ht,Xt,Vt,Yt=yt(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Wt=(dt(te,Vt=Bt),te.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},te.prototype._throwIfClosed=function(){if(this.closed)throw new Yt},te.prototype.next=function(o){var s=this;Lt(function(){var e,t;if(s._throwIfClosed(),!s.isStopped){var r=s.observers.slice();try{for(var n=pt(r),i=n.next();!i.done;i=n.next())i.value.next(o)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}})},te.prototype.error=function(e){var r=this;Lt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var t=r.observers;t.length;)t.shift().error(e)}})},te.prototype.complete=function(){var e=this;Lt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},te.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(te.prototype,"observed",{get:function(){var t;return 0<(null===(t=this.observers)||void 0===t?void 0:t.length)},enumerable:!1,configurable:!0}),te.prototype._trySubscribe=function(t){return this._throwIfClosed(),Vt.prototype._trySubscribe.call(this,t)},te.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},te.prototype._innerSubscribe=function(t){var e=this.hasError,r=this.isStopped,n=this.observers;return e||r?wt:(n.push(t),new Et(function(){return vt(n,t)}))},te.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,r=this.thrownError,n=this.isStopped;e?t.error(r):n&&t.complete()},te.prototype.asObservable=function(){var t=new Bt;return t.source=this,t},te.create=function(t,e){return new qt(t,e)},te),qt=(dt(Qt,Xt=Wt),Qt.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)},Qt.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)},Qt.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)},Qt.prototype._subscribe=function(t){var e;return null!==(t=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==t?t:wt},Qt),Kt={now:function(){return(Kt.delegate||Date).now()},delegate:void 0},Zt=(dt(Jt,Ht=Wt),Jt.prototype.next=function(t){var e=this,r=e.isStopped,n=e._buffer,i=e._infiniteTimeWindow,o=e._timestampProvider,e=e._windowTime;r||(n.push(t),i||n.push(o.now()+e)),this._trimBuffer(),Ht.prototype.next.call(this,t)},Jt.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},Jt.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var o=e.now(),s=0,a=1;a<r.length&&r[a]<=o;a+=2)s=a;s&&r.splice(0,s+1)}},Jt);function Jt(t,e,r){void 0===t&&(t=1/0),void 0===e&&(e=1/0),void 0===r&&(r=Kt);var n=Ht.call(this)||this;return n._bufferSize=t,n._windowTime=e,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=e===1/0,n._bufferSize=Math.max(1,t),n._windowTime=Math.max(1,e),n}function Qt(t,e){var r=Xt.call(this)||this;return r.destination=t,r.source=e,r}function te(){var t=Vt.call(this)||this;return t.closed=!1,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}let ee=[],re={};const ne=[];function ie(n,i=b){let o;const s=[];function a(t){if(r(n,t)&&(n=t,o)){const t=!ne.length;for(let t=0;t<s.length;t+=1){const e=s[t];e[1](),ne.push(e,n)}if(t){for(let t=0;t<ne.length;t+=2)ne[t][0](ne[t+1]);ne.length=0}}}return{set:a,update:function(t){a(t(n))},subscribe:function(t,e=b){const r=[t,e];return s.push(r),1===s.length&&(o=i(a)||b),t(n),()=>{var t=s.indexOf(r);-1!==t&&s.splice(t,1),0===s.length&&(o(),o=null)}}}}function oe(t,a,e){const l=!Array.isArray(t),u=l?[t]:t,c=a.length<2;return{subscribe:ie(e,e=>{let r=!1;const n=[];let i=0,o=b;const s=()=>{var t;i||(o(),t=a(l?n[0]:n,e),c?e(t):o=p(t)?t:b)},t=u.map((t,e)=>f(t,t=>{n[e]=t,i&=~(1<<e),r&&s()},()=>{i|=1<<e}));return r=!0,s(),function(){y(t),o()}}).subscribe}}var se=function(t){return!(!t||"object"!=typeof t||(e=t,"[object RegExp]"===(t=Object.prototype.toString.call(e))||"[object Date]"===t||e.$$typeof===ae));var e},ae="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function le(t,e){return!1!==e.clone&&e.isMergeableObject(t)?pe(Array.isArray(t)?[]:{},t,e):t}function ue(t,e,r){return t.concat(e).map(function(t){return le(t,r)})}function ce(t){return Object.keys(t).concat((e=t,Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]));var e}function he(t,e){try{return e in t}catch(t){return!1}}function de(n,i,o){var s={};return o.isMergeableObject(n)&&ce(n).forEach(function(t){s[t]=le(n[t],o)}),ce(i).forEach(function(e){var t,r;(!he(t=n,r=e)||Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))&&(he(n,e)&&o.isMergeableObject(i[e])?s[e]=function(){if(!o.customMerge)return pe;var t=o.customMerge(e);return"function"==typeof t?t:pe}()(n[e],i[e],o):s[e]=le(i[e],o))}),s}function pe(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||ue,r.isMergeableObject=r.isMergeableObject||se,r.cloneUnlessOtherwiseSpecified=le;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):de(t,e,r):le(e,r)}pe.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,e){return pe(t,e,r)},{})};var fe=pe,me=function(t,e){return(me=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])})(t,e)};function ge(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}me(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var ye,be,ve,Ee=function(){return(Ee=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function we(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function Te(t){return t.type===be.literal}function _e(t){return t.type===be.number}function xe(t){return t.type===be.date}function Ae(t){return t.type===be.time}function Pe(t){return t.type===be.select}function Se(t){return t.type===be.plural}function Ce(t){return t.type===be.tag}function Le(t){return t&&"object"==typeof t&&t.type===ve.number}function $e(t){return t&&"object"==typeof t&&t.type===ve.dateTime}(Ye=ye=ye||{})[Ye.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",Ye[Ye.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",Ye[Ye.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",Ye[Ye.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",Ye[Ye.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",Ye[Ye.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",Ye[Ye.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",Ye[Ye.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",Ye[Ye.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",Ye[Ye.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",Ye[Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",Ye[Ye.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",Ye[Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",Ye[Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",Ye[Ye.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",Ye[Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",Ye[Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",Ye[Ye.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",Ye[Ye.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",Ye[Ye.INVALID_TAG=23]="INVALID_TAG",Ye[Ye.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",Ye[Ye.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",Ye[Ye.UNCLOSED_TAG=27]="UNCLOSED_TAG",(We=be=be||{})[We.literal=0]="literal",We[We.argument=1]="argument",We[We.number=2]="number",We[We.date=3]="date",We[We.time=4]="time",We[We.select=5]="select",We[We.plural=6]="plural",We[We.pound=7]="pound",We[We.tag=8]="tag",(qe=ve=ve||{})[qe.number=0]="number",qe[qe.dateTime=1]="dateTime";var Oe=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ke=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;var Ie,Ne=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Re=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,De=/^(@+)?(\+|#+)?$/g,Me=/(\*)(0+)|(#+)(0+)|(0+)/g,Ue=/^(0+)$/;function Fe(t){var n={};return t.replace(De,function(t,e,r){return"string"!=typeof r?(n.minimumSignificantDigits=e.length,n.maximumSignificantDigits=e.length):"+"===r?n.minimumSignificantDigits=e.length:"#"===e[0]?n.maximumSignificantDigits=e.length:(n.minimumSignificantDigits=e.length,n.maximumSignificantDigits=e.length+("string"==typeof r?r.length:0)),""}),n}function je(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Be(t){return je(t)||{}}function ze(t){for(var s={},e=0,r=t;e<r.length;e++){var n,i=r[e];switch(i.stem){case"percent":case"%":s.style="percent";continue;case"%x100":s.style="percent",s.scale=100;continue;case"currency":s.style="currency",s.currency=i.options[0];continue;case"group-off":case",_":s.useGrouping=!1;continue;case"precision-integer":case".":s.maximumFractionDigits=0;continue;case"measure-unit":case"unit":s.style="unit",s.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":s.notation="compact",s.compactDisplay="short";continue;case"compact-long":case"KK":s.notation="compact",s.compactDisplay="long";continue;case"scientific":s=Ee(Ee(Ee({},s),{notation:"scientific"}),i.options.reduce(function(t,e){return Ee(Ee({},t),Be(e))},{}));continue;case"engineering":s=Ee(Ee(Ee({},s),{notation:"engineering"}),i.options.reduce(function(t,e){return Ee(Ee({},t),Be(e))},{}));continue;case"notation-simple":s.notation="standard";continue;case"unit-width-narrow":s.currencyDisplay="narrowSymbol",s.unitDisplay="narrow";continue;case"unit-width-short":s.currencyDisplay="code",s.unitDisplay="short";continue;case"unit-width-full-name":s.currencyDisplay="name",s.unitDisplay="long";continue;case"unit-width-iso-code":s.currencyDisplay="symbol";continue;case"scale":s.scale=parseFloat(i.options[0]);continue;case"integer-width":if(1<i.options.length)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Me,function(t,e,r,n,i,o){if(e)s.minimumIntegerDigits=r.length;else{if(n&&i)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ue.test(i.stem))s.minimumIntegerDigits=i.stem.length;else if(Re.test(i.stem)){if(1<i.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Re,function(t,e,r,n,i,o){return"*"===r?s.minimumFractionDigits=e.length:n&&"#"===n[0]?s.maximumFractionDigits=n.length:i&&o?(s.minimumFractionDigits=i.length,s.maximumFractionDigits=i.length+o.length):(s.minimumFractionDigits=e.length,s.maximumFractionDigits=e.length),""}),i.options.length&&(s=Ee(Ee({},s),Fe(i.options[0])))}else De.test(i.stem)?s=Ee(Ee({},s),Fe(i.stem)):((n=je(i.stem))&&(s=Ee(Ee({},s),n)),(n=function(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Ue.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}(i.stem))&&(s=Ee(Ee({},s),n)))}return s}var Ge=new RegExp("^"+Oe.source+"*"),He=new RegExp(Oe.source+"*$");function Xe(t,e){return{start:t,end:e}}var Ve=!!String.prototype.startsWith,Ft=!!String.fromCodePoint,Wt=!!Object.fromEntries,Ye=!!String.prototype.codePointAt,We=!!String.prototype.trimStart,qe=!!String.prototype.trimEnd,Ke=Number.isSafeInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Oe=!0;try{Oe="a"===(null===(Ie=or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Ie?void 0:Ie[0])}catch(b){Oe=!1}var Ze,Je,Qe=Ve?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},tr=Ft?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",i=t.length,o=0;o<i;){if(1114111<(r=t[o++]))throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},er=Wt?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r],o=i[0],i=i[1];e[o]=i}return e},rr=Ye?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||r<=e)){var n,i=t.charCodeAt(e);return i<55296||56319<i||e+1===r||(n=t.charCodeAt(e+1))<56320||57343<n?i:n-56320+(i-55296<<10)+65536}},nr=We?function(t){return t.trimStart()}:function(t){return t.replace(Ge,"")},ir=qe?function(t){return t.trimEnd()}:function(t){return t.replace(He,"")};function or(t,e){return new RegExp(t,e)}Je=Oe?(Ze=or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),function(t,e){return Ze.lastIndex=e,null!==(t=Ze.exec(t)[1])&&void 0!==t?t:""}):function(t,e){for(var r,n=[];;){var i=rr(t,e);if(void 0===i||ur(i)||(33<=(r=i)&&r<=35||36===r||37<=r&&r<=39||40===r||41===r||42===r||43===r||44===r||45===r||46<=r&&r<=47||58<=r&&r<=59||60<=r&&r<=62||63<=r&&r<=64||91===r||92===r||93===r||94===r||96===r||123===r||124===r||125===r||126===r||161===r||162<=r&&r<=165||166===r||167===r||169===r||171===r||172===r||174===r||176===r||177===r||182===r||187===r||191===r||215===r||247===r||8208<=r&&r<=8213||8214<=r&&r<=8215||8216===r||8217===r||8218===r||8219<=r&&r<=8220||8221===r||8222===r||8223===r||8224<=r&&r<=8231||8240<=r&&r<=8248||8249===r||8250===r||8251<=r&&r<=8254||8257<=r&&r<=8259||8260===r||8261===r||8262===r||8263<=r&&r<=8273||8274===r||8275===r||8277<=r&&r<=8286||8592<=r&&r<=8596||8597<=r&&r<=8601||8602<=r&&r<=8603||8604<=r&&r<=8607||8608===r||8609<=r&&r<=8610||8611===r||8612<=r&&r<=8613||8614===r||8615<=r&&r<=8621||8622===r||8623<=r&&r<=8653||8654<=r&&r<=8655||8656<=r&&r<=8657||8658===r||8659===r||8660===r||8661<=r&&r<=8691||8692<=r&&r<=8959||8960<=r&&r<=8967||8968===r||8969===r||8970===r||8971===r||8972<=r&&r<=8991||8992<=r&&r<=8993||8994<=r&&r<=9e3||9001===r||9002===r||9003<=r&&r<=9083||9084===r||9085<=r&&r<=9114||9115<=r&&r<=9139||9140<=r&&r<=9179||9180<=r&&r<=9185||9186<=r&&r<=9254||9255<=r&&r<=9279||9280<=r&&r<=9290||9291<=r&&r<=9311||9472<=r&&r<=9654||9655===r||9656<=r&&r<=9664||9665===r||9666<=r&&r<=9719||9720<=r&&r<=9727||9728<=r&&r<=9838||9839===r||9840<=r&&r<=10087||10088===r||10089===r||10090===r||10091===r||10092===r||10093===r||10094===r||10095===r||10096===r||10097===r||10098===r||10099===r||10100===r||10101===r||10132<=r&&r<=10175||10176<=r&&r<=10180||10181===r||10182===r||10183<=r&&r<=10213||10214===r||10215===r||10216===r||10217===r||10218===r||10219===r||10220===r||10221===r||10222===r||10223===r||10224<=r&&r<=10239||10240<=r&&r<=10495||10496<=r&&r<=10626||10627===r||10628===r||10629===r||10630===r||10631===r||10632===r||10633===r||10634===r||10635===r||10636===r||10637===r||10638===r||10639===r||10640===r||10641===r||10642===r||10643===r||10644===r||10645===r||10646===r||10647===r||10648===r||10649<=r&&r<=10711||10712===r||10713===r||10714===r||10715===r||10716<=r&&r<=10747||10748===r||10749===r||10750<=r&&r<=11007||11008<=r&&r<=11055||11056<=r&&r<=11076||11077<=r&&r<=11078||11079<=r&&r<=11084||11085<=r&&r<=11123||11124<=r&&r<=11125||11126<=r&&r<=11157||11158===r||11159<=r&&r<=11263||11776<=r&&r<=11777||11778===r||11779===r||11780===r||11781===r||11782<=r&&r<=11784||11785===r||11786===r||11787===r||11788===r||11789===r||11790<=r&&r<=11798||11799===r||11800<=r&&r<=11801||11802===r||11803===r||11804===r||11805===r||11806<=r&&r<=11807||11808===r||11809===r||11810===r||11811===r||11812===r||11813===r||11814===r||11815===r||11816===r||11817===r||11818<=r&&r<=11822||11823===r||11824<=r&&r<=11833||11834<=r&&r<=11835||11836<=r&&r<=11839||11840===r||11841===r||11842===r||11843<=r&&r<=11855||11856<=r&&r<=11857||11858===r||11859<=r&&r<=11903||12289<=r&&r<=12291||12296===r||12297===r||12298===r||12299===r||12300===r||12301===r||12302===r||12303===r||12304===r||12305===r||12306<=r&&r<=12307||12308===r||12309===r||12310===r||12311===r||12312===r||12313===r||12314===r||12315===r||12316===r||12317===r||12318<=r&&r<=12319||12320===r||12336===r||64830===r||64831===r||65093<=r&&r<=65094))break;n.push(i),e+=65536<=i?2:1}return tr.apply(void 0,n)};var sr=(ar.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},ar.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var i,o=this.char();if(123===o){if((i=this.parseArgument(t,r)).err)return i;n.push(i.val)}else{if(125===o&&0<t)break;if(35!==o||"plural"!==e&&"selectordinal"!==e){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(ye.UNMATCHED_CLOSING_TAG,Xe(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&lr(this.peek()||0)){if((i=this.parseTag(t,e)).err)return i;n.push(i.val)}else{if((i=this.parseLiteral(t,e)).err)return i;n.push(i.val)}}else{o=this.clonePosition();this.bump(),n.push({type:be.pound,location:Xe(o,this.clonePosition())})}}}return{val:n,err:null}},ar.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:be.literal,value:"<"+n+"/>",location:Xe(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;t=i.val,e=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!lr(this.char()))return this.error(ye.INVALID_TAG,Xe(e,this.clonePosition()));i=this.clonePosition();return n!==this.parseTagName()?this.error(ye.UNMATCHED_CLOSING_TAG,Xe(i,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:be.tag,value:n,children:t,location:Xe(r,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,Xe(e,this.clonePosition())))}return this.error(ye.UNCLOSED_TAG,Xe(r,this.clonePosition()))}return this.error(ye.INVALID_TAG,Xe(r,this.clonePosition()))},ar.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||48<=t&&t<=57||95===t||97<=t&&t<=122||65<=t&&t<=90||183==t||192<=t&&t<=214||216<=t&&t<=246||248<=t&&t<=893||895<=t&&t<=8191||8204<=t&&t<=8205||8255<=t&&t<=8256||8304<=t&&t<=8591||11264<=t&&t<=12271||12289<=t&&t<=55295||63744<=t&&t<=64975||65008<=t&&t<=65533||65536<=t&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},ar.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(e);if(i)n+=i;else{i=this.tryParseUnquoted(t,e);if(i)n+=i;else{i=this.tryParseLeftAngleBracket();if(!i)break;n+=i}}}r=Xe(r,this.clonePosition());return{val:{type:be.literal,value:n,location:r},err:null}},ar.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(lr(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},ar.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(r);this.bump()}return tr.apply(void 0,e)},ar.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===e||"selectordinal"===e)||125===r&&0<t?null:(this.bump(),tr(r))},ar.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Xe(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ye.EMPTY_ARGUMENT,Xe(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(ye.MALFORMED_ARGUMENT,Xe(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Xe(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:be.argument,value:n,location:Xe(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Xe(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(ye.MALFORMED_ARGUMENT,Xe(r,this.clonePosition()))}},ar.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=Je(this.message,e),e=e+r.length;return this.bumpTo(e),{value:r,location:Xe(t,this.clonePosition())}},ar.prototype.parseArgumentOptions=function(t,e,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,Xe(o,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((d=this.parseSimpleArgStyleIfPossible()).err)return d;if(0===(h=ir(d.val)).length)return this.error(ye.EXPECT_ARGUMENT_STYLE,Xe(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Xe(u,this.clonePosition())}}if((p=this.tryParseArgumentClose(n)).err)return p;var c=Xe(n,this.clonePosition());if(l&&Qe(null==l?void 0:l.style,"::",0)){u=nr(l.style.slice(2));if("number"===s)return(d=this.parseNumberSkeletonFromString(u,l.styleLocation)).err?d:{val:{type:be.number,value:r,location:c,style:d.val},err:null};if(0===u.length)return this.error(ye.EXPECT_DATE_TIME_SKELETON,c);var h={type:ve.dateTime,pattern:u,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?(i={},u.replace(ke,function(t){var e=t.length;switch(t[0]){case"G":i.era=4===e?"long":5===e?"narrow":"short";break;case"y":i.year=2===e?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":i.month=["numeric","2-digit","short","long","narrow"][e-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":i.day=["numeric","2-digit"][e-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":i.weekday=4!==e&&5===e?"narrow":"short";break;case"e":if(e<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][e-4];break;case"c":if(e<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][e-4];break;case"a":i.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":i.hourCycle="h12",i.hour=["numeric","2-digit"][e-1];break;case"H":i.hourCycle="h23",i.hour=["numeric","2-digit"][e-1];break;case"K":i.hourCycle="h11",i.hour=["numeric","2-digit"][e-1];break;case"k":i.hourCycle="h24",i.hour=["numeric","2-digit"][e-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":i.minute=["numeric","2-digit"][e-1];break;case"s":i.second=["numeric","2-digit"][e-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":i.timeZoneName=e<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),i):{}};return{val:{type:"date"===s?be.date:be.time,value:r,location:c,style:h},err:null}}return{val:{type:"number"===s?be.number:"date"===s?be.date:be.time,value:r,location:c,style:null!==(c=null==l?void 0:l.style)&&void 0!==c?c:null},err:null};case"plural":case"selectordinal":case"select":l=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,Xe(l,Ee({},l)));this.bumpSpace();var d,c=this.parseIdentifierIfPossible(),l=0;if("select"!==s&&"offset"===c.value){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Xe(this.clonePosition(),this.clonePosition()));if(this.bumpSpace(),(d=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return d;this.bumpSpace(),c=this.parseIdentifierIfPossible(),l=d.val}c=this.tryParsePluralOrSelectOptions(t,s,e,c);if(c.err)return c;if((p=this.tryParseArgumentClose(n)).err)return p;var p=Xe(n,this.clonePosition());return"select"===s?{val:{type:be.select,value:r,options:er(c.val),location:p},err:null}:{val:{type:be.plural,value:r,options:er(c.val),offset:l,pluralType:"plural"===s?"cardinal":"ordinal",location:p},err:null};default:return this.error(ye.INVALID_ARGUMENT_TYPE,Xe(o,a))}},ar.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Xe(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},ar.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Xe(r,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(0<t))return{val:this.message.slice(e.offset,this.offset()),err:null};--t;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}},ar.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],r=0,n=t.split(Ne).filter(function(t){return 0<t.length});r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],i=i.slice(1),s=0,a=i;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");e.push({stem:o,options:i})}return e}(t)}catch(t){return this.error(ye.INVALID_NUMBER_SKELETON,e)}return{val:{type:ve.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?ze(r):{}},err:null}},ar.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){for(var i=!1,o=[],s=new Set,a=n.value,l=n.location;;){if(0===a.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var c=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;l=Xe(u,this.clonePosition()),a=this.message.slice(u.offset,this.offset())}if(s.has(a))return this.error("select"===e?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===a&&(i=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Xe(this.clonePosition(),this.clonePosition()));c=this.parseMessage(t+1,e,r);if(c.err)return c;u=this.tryParseArgumentClose(h);if(u.err)return u;o.push([a,{value:c.val,location:Xe(h,this.clonePosition())}]),s.add(a),this.bumpSpace(),a=(h=this.parseIdentifierIfPossible()).value,l=h.location}return 0===o.length?this.error("select"===e?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Xe(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(ye.MISSING_OTHER_CLAUSE,Xe(this.clonePosition(),this.clonePosition())):{val:o,err:null}},ar.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(48<=s&&s<=57))break;i=!0,o=10*o+(s-48),this.bump()}n=Xe(n,this.clonePosition());return i?Ke(o*=r)?{val:o,err:null}:this.error(e,n):this.error(t,n)},ar.prototype.offset=function(){return this.position.offset},ar.prototype.isEOF=function(){return this.offset()===this.message.length},ar.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},ar.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=rr(this.message,t);if(void 0===e)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return e},ar.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},ar.prototype.bump=function(){var t;this.isEOF()||(10===(t=this.char())?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2))},ar.prototype.bumpIf=function(t){if(Qe(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},ar.prototype.bumpUntil=function(t){var e=this.offset(),e=this.message.indexOf(t,e);return 0<=e?(this.bumpTo(e),!0):(this.bumpTo(this.message.length),!1)},ar.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(t<e)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},ar.prototype.bumpSpace=function(){for(;!this.isEOF()&&ur(this.char());)this.bump()},ar.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),t=this.message.charCodeAt(e+(65536<=t?2:1));return null!=t?t:null},ar);function ar(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}function lr(t){return 97<=t&&t<=122||65<=t&&t<=90}function ur(t){return 9<=t&&t<=13||32===t||133===t||8206<=t&&t<=8207||8232===t||8233===t}function cr(t,e){e=Ee({shouldParseSkeletons:!0,requiresOtherClause:!0},e=void 0===e?{}:e);var r=new sr(t,e).parse();if(r.err){t=SyntaxError(ye[r.err.kind]);throw t.location=r.err.location,t.originalMessage=r.err.message,t}return null!=e&&e.captureLocation||function r(t){t.forEach(function(t){if(delete t.location,Pe(t)||Se(t))for(var e in t.options)delete t.options[e].location,r(t.options[e].value);else _e(t)&&Le(t.style)||(xe(t)||Ae(t))&&$e(t.style)?delete t.style.location:Ce(t)&&r(t.children)})}(r.val),r.val}function hr(t,e){var r=e&&e.cache?e.cache:br,n=e&&e.serializer?e.serializer:mr;return(e&&e.strategy?e.strategy:function(t,e){return fr(t,this,1===t.length?dr:pr,e.cache.create(),e.serializer)})(t,{cache:r,serializer:n})}function dr(t,e,r,n){var i=null==n||"number"==typeof n||"boolean"==typeof n?n:r(n),r=e.get(i);return void 0===r&&(r=t.call(this,n),e.set(i,r)),r}function pr(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),r=e.get(i);return void 0===r&&(r=t.apply(this,n),e.set(i,r)),r}function fr(t,e,r,n,i){return r.bind(e,t,n,i)}var mr=function(){return JSON.stringify(arguments)};function gr(){this.cache=Object.create(null)}gr.prototype.has=function(t){return t in this.cache},gr.prototype.get=function(t){return this.cache[t]},gr.prototype.set=function(t,e){this.cache[t]=e};var yr,br={create:function(){return new gr}},vr={variadic:function(t,e){return fr(t,this,pr,e.cache.create(),e.serializer)},monadic:function(t,e){return fr(t,this,dr,e.cache.create(),e.serializer)}};(Oe=yr=yr||{}).MISSING_VALUE="MISSING_VALUE",Oe.INVALID_VALUE="INVALID_VALUE",Oe.MISSING_INTL_API="MISSING_INTL_API";var Er,wr,Tr,_r,xr,Ar=(ge(kr,xr=Error),kr.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},kr),Pr=(ge(Or,_r=Ar),Or),Sr=(ge($r,Tr=Ar),$r),Cr=(ge(Lr,wr=Ar),Lr);function Lr(t,e){return wr.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+e+'"',yr.MISSING_VALUE,e)||this}function $r(t,e,r){return Tr.call(this,'Value for "'+t+'" must be of type '+e,yr.INVALID_VALUE,r)||this}function Or(t,e,r,n){return _r.call(this,'Invalid values for "'+t+'": "'+e+'". Options are "'+Object.keys(r).join('", "')+'"',yr.INVALID_VALUE,n)||this}function kr(t,e,r){t=xr.call(this,t)||this;return t.code=e,t.originalMessage=r,t}function Ir(t,e,r,n,i,o,s){if(1===t.length&&Te(t[0]))return[{type:Er.literal,value:t[0].value}];for(var a=[],l=0,u=t;l<u.length;l++){var c=u[l];if(Te(c))a.push({type:Er.literal,value:c.value});else if(c.type===be.pound)"number"==typeof o&&a.push({type:Er.literal,value:r.getNumberFormat(e).format(o)});else{var h=c.value;if(!(i&&h in i))throw new Cr(h,s);var d=i[h];if(c.type===be.argument)d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?Er.literal:Er.object,value:d});else if(xe(c)){var p="string"==typeof c.style?n.date[c.style]:$e(c.style)?c.style.parsedOptions:void 0;a.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(d)})}else if(Ae(c))p="string"==typeof c.style?n.time[c.style]:$e(c.style)?c.style.parsedOptions:void 0,a.push({type:Er.literal,value:r.getDateTimeFormat(e,p).format(d)});else if(_e(c))(p="string"==typeof c.style?n.number[c.style]:Le(c.style)?c.style.parsedOptions:void 0)&&p.scale&&(d*=p.scale||1),a.push({type:Er.literal,value:r.getNumberFormat(e,p).format(d)});else{if(Ce(c)){var f=c.children,m=c.value,h=i[m];if("function"!=typeof h)throw new Sr(m,"function",s);f=h(Ir(f,e,r,n,i,o).map(function(t){return t.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(t){return{type:"string"==typeof t?Er.literal:Er.object,value:t}}))}if(Pe(c)){if(!(g=c.options[d]||c.options.other))throw new Pr(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ir(g.value,e,r,n,i))}else if(Se(c)){if(!(g=c.options["="+d])){if(!Intl.PluralRules)throw new Ar('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',yr.MISSING_INTL_API,s);var f=r.getPluralRules(e,{type:c.pluralType}).select(d-(c.offset||0)),g=c.options[f]||c.options.other}if(!g)throw new Pr(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ir(g.value,e,r,n,i,d-(c.offset||0)))}}}}return a.length<2?a:a.reduce(function(t,e){var r=t[t.length-1];return r&&r.type===Er.literal&&e.type===Er.literal?r.value+=e.value:t.push(e),t},[])}function Nr(r){return{create:function(){return{has:function(t){return t in r},get:function(t){return r[t]},set:function(t,e){r[t]=e}}}}}(Oe=Er=Er||{})[Oe.literal=0]="literal",Oe[Oe.object=1]="object";var Rr=(Object.defineProperty(Dr,"defaultLocale",{get:function(){return Dr.memoizedDefaultLocale||(Dr.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),Dr.memoizedDefaultLocale},enumerable:!1,configurable:!0}),Dr.memoizedDefaultLocale=null,Dr.__parse=cr,Dr.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Dr);function Dr(t,e,r,n){var i,o,s=this;if(void 0===e&&(e=Dr.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){t=s.formatToParts(t);if(1===t.length)return t[0].value;t=t.reduce(function(t,e){return t.length&&e.type===Er.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t},[]);return t.length<=1?t[0]||"":t},this.formatToParts=function(t){return Ir(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},"string"==typeof t){if(this.message=t,!Dr.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=Dr.__parse(t,{ignoreTag:null==n?void 0:n.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(i=Dr.formats,(o=r)?Object.keys(i).reduce(function(t,e){var r,n;return t[e]=(r=i[e],(n=o[e])?Ee(Ee(Ee({},r||{}),n||{}),Object.keys(r).reduce(function(t,e){return t[e]=Ee(Ee({},r[e]),n[e]||{}),t},{})):r),t},Ee({},i)):i),this.locales=e,this.formatters=n&&n.formatters||{getNumberFormat:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,we([void 0],e)))},{cache:Nr((n=void 0===(n=this.formatterCache)?{number:{},dateTime:{},pluralRules:{}}:n).number),strategy:vr.variadic}),getDateTimeFormat:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,we([void 0],e)))},{cache:Nr(n.dateTime),strategy:vr.variadic}),getPluralRules:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,we([void 0],e)))},{cache:Nr(n.pluralRules),strategy:vr.variadic})}}const Mr={},Ur=(e,r)=>{if(null!=r){if(r in Mr&&e in Mr[r])return Mr[r][e];var n,i,o=tn(r);for(let t=0;t<o.length;t++){var s=(n=o[t],i=e,Br(n)?function(t,e){if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(0<t){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(function(t){return Fr[t]||null}(n),i):null);if(s)return n=e,i=r,(s=s)&&(i in Mr||(Mr[i]={}),n in Mr[i]||(Mr[i][n]=s),s)}}};let Fr;const jr=ie({});function Br(t){return t in Fr}function zr(e,...r){delete Mr[e],jr.update(t=>(t[e]=fe.all([t[e]||{},...r]),t))}oe([jr],([t])=>Object.keys(t)),jr.subscribe(t=>Fr=t);const Gr={};function Hr(t){return Gr[t]}function Xr(t){return tn(t).some(t=>{return null===(t=Hr(t))||void 0===t?void 0:t.size})}const Vr={};function Yr(t){if(!Xr(t))return t in Vr?Vr[t]:void 0;const e=tn(t).map(t=>{var e=Hr(t);return[t,e?[...e]:[]]}).filter(([,t])=>0<t.length);return Vr[t]=Promise.all(e.map(([t,r])=>function(e){return Promise.all(r.map(t=>(function(t,e){Gr[t].delete(e),0===Gr[t].size&&delete Gr[t]}(e,t),t().then(t=>t.default||t)))).then(t=>zr(e,...t))}(t))).then(()=>Xr(t)?Yr(t):void delete Vr[t]),Vr[t]}function Wr(t,e){var r={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}const qr={fallbackLocale:null,initialLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,ignoreTag:!0};const Kr=ie(!1);let Zr;const Jr=ie(null);function Qr(t){return t.split("-").map((t,e,r)=>r.slice(0,e+1).join("-")).reverse()}function tn(t,e=qr.fallbackLocale){t=Qr(t);return e?[...new Set([...t,...Qr(e)])]:t}Jr.subscribe(t=>{Zr=t,"undefined"!=typeof window&&null!==t&&document.documentElement.setAttribute("lang",t)});const en=Jr.set;Jr.set=e=>{if(function(t){if(null!=t){var e=tn(t);for(let t=0;t<e.length;t++){var r=e[t];if(Br(r))return r}}}(e)&&Xr(e)){var{loadingDelay:r}=qr;let t;return"undefined"!=typeof window&&null!=Zr&&r?t=window.setTimeout(()=>Kr.set(!0),r):Kr.set(!0),Yr(e).then(()=>{en(e)}).finally(()=>{clearTimeout(t),Kr.set(!1)})}return en(e)},Jr.update=t=>en(t(Zr));const rn=r=>{const n=Object.create(null);return t=>{var e=JSON.stringify(t);return e in n?n[e]:n[e]=r(t)}},nn=(t,e)=>{var{formats:r}=qr;if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},on=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(t=nn("number",r)),new Intl.NumberFormat(e,t)}),sn=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?t=nn("date",r):0===Object.keys(t).length&&(t=nn("date","short")),new Intl.DateTimeFormat(e,t)}),an=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?t=nn("time",r):0===Object.keys(t).length&&(t=nn("time","short")),new Intl.DateTimeFormat(e,t)}),ln=rn((t,e=Zr)=>new Rr(t,e,qr.formats,{ignoreTag:qr.ignoreTag})),un=oe([Jr,jr],()=>(t,e={})=>{"object"==typeof t&&(t=(e=t).id);var{values:r,locale:n=Zr,default:i}=e;if(null==n)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let o=Ur(t,n);if(o){if("string"!=typeof o)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof o}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),o}else qr.warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${t}" was not found in "${tn(n).join('", "')}".${Xr(Zr)?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),o=i||t;if(!r)return o;let s=o;try{s=ln(o,n).format(r)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return s});oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return an(Object.assign({locale:e},t))})(e).format(t)),oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return sn(Object.assign({locale:e},t))})(e).format(t)),oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return on(Object.assign({locale:e},t))})(e).format(t)),oe([Jr,jr],()=>(t,e=Zr)=>Ur(t,e)),window.emWidgets={topic:(t,e=0)=>{return-1==ee.indexOf(t)&&(e=new Zt(e),re[t]=e,ee.push(t)),re[t]}};const cn=t=>t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC",hn={en:{tournamentsThController:{login:"Log in",register:"Register",details:"Details",enrolled:"Enrolled",join:"Join",joinerror:"There was an error joining the tournament - "}},tr:{tournamentsThController:{login:"Giriş",register:"Kayıt Ol",details:"Detaylar",enrolled:"Katıldın",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "}},el:{tournamentsThController:{login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",enrolled:"Εγγεγραμμένος",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά την διαδικασία εγγραφής στο τουρνουά - "}}},dn={en:{tournamentsThumbnail:{enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet counts: ",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"OnGoing",finished:"Finished",startingAt:"Starting at",mostRounds:"MostRounds"}},tr:{tournamentsThumbnail:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"BAŞLAMA SAATİ:",mostRounds:"MostRounds"}},el:{tournamentsThumbnail:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων: ",seegames:"Μπορείε να δεις τα παιχνίδια",here:"εδώ",all:"OΛΑ",scheduled:"ΠΡΟΓΡΑΜΜΑΤΙΣΜΕΝΑ",ongoing:"ΤΡΕΧΟΝΤΑ",finished:"ΟΛΟΚΛΗΡΩΜΕΝΑ",startingAt:"ΑΡΧΙΖΕΙ",mostRounds:"MostRounds"}}};function pn(r){let n,i,o,s;return{c(){n=A("div"),i=P(r[12]),L(n,"class","Status")},m(t,e){_(t,n,e),T(n,i),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4096&e&&$(i,t[12])},d(t){t&&x(n),o=!1,s()}}}function fn(t){let r,n=t[5]&&mn(t);return{c(){n&&n.c(),r=l()},m(t,e){n&&n.m(t,e),_(t,r,e)},p(t,e){t[5]?n?n.p(t,e):(n=mn(t),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&x(r)}}}function mn(t){let r,n,i=t[13]("tournamentsThumbnail.enrolled")+"";return{c(){r=A("div"),n=P(i),L(r,"class","Enrolled")},m(t,e){_(t,r,e),T(r,n)},p(t,e){8192&e&&i!==(i=t[13]("tournamentsThumbnail.enrolled")+"")&&$(n,i)},d(t){t&&x(r)}}}function gn(r){let n,i,o,s;return{c(){n=A("div"),L(n,"class",i="CardImg "+("Closing"==r[2]||"Closed"==r[2]?"CardImgFinished":"")),E(n,"background","url('https://i.stack.imgur.com/y9DpT.jpg') center no-repeat")},m(t,e){_(t,n,e),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4&e&&i!==(i="CardImg "+("Closing"==t[2]||"Closed"==t[2]?"CardImgFinished":""))&&L(n,"class",i)},d(t){t&&x(n),o=!1,s()}}}function yn(r){let n,i,o,s;return{c(){n=A("div"),L(n,"class",i="CardImg "+("Closing"==r[2]||"Closed"==r[2]?"CardImgFinished":"")),E(n,"background","url('"+r[4]+"')")},m(t,e){_(t,n,e),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4&e&&i!==(i="CardImg "+("Closing"==t[2]||"Closed"==t[2]?"CardImgFinished":""))&&L(n,"class",i),16&e&&E(n,"background","url('"+t[4]+"')")},d(t){t&&x(n),o=!1,s()}}}function bn(r){let n,i,o,s,a;return{c(){n=A("div"),i=P(r[10]),L(n,"class","Date")},m(t,e){_(t,n,e),T(n,i),s||(a=g(o=r[14].call(null,n,r[1])),s=!0)},p(t,e){1024&e&&$(i,t[10]),o&&p(o.update)&&2&e&&o.update.call(null,t[1])},d(t){t&&x(n),s=!1,a()}}}function vn(r){let n,i,o,s,a,l,u,c,h,d,p,f,m,g=r[13]("tournamentsThumbnail.scoreCriteria")+"",y=r[13]("tournamentsThumbnail.seegames")+"",b=r[13]("tournamentsThumbnail.here")+"";function v(t){return"BetCount"==t[6]?wn:En}let E=v(r),w=E(r);return{c(){n=A("div"),i=A("p"),o=P(g),s=P(":\n "),w.c(),a=S(),l=A("div"),u=A("p"),c=P(y),h=S(),d=A("a"),p=P(b),L(n,"class","ScoreCriteria"),L(d,"href",r[9]),L(d,"target","_blank"),L(l,"class","Games")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(i,s),w.m(i,null),_(t,a,e),_(t,l,e),T(l,u),T(u,c),T(u,h),T(u,d),T(d,p),f||(m=C(d,"click",r[20]),f=!0)},p(t,e){8192&e&&g!==(g=t[13]("tournamentsThumbnail.scoreCriteria")+"")&&$(o,g),E===(E=v(t))&&w?w.p(t,e):(w.d(1),w=E(t),w&&(w.c(),w.m(i,null))),8192&e&&y!==(y=t[13]("tournamentsThumbnail.seegames")+"")&&$(c,y),8192&e&&b!==(b=t[13]("tournamentsThumbnail.here")+"")&&$(p,b),512&e&&L(d,"href",t[9])},d(t){t&&x(n),w.d(),t&&x(a),t&&x(l),f=!1,m()}}}function En(t){let r;return{c(){r=P(t[6])},m(t,e){_(t,r,e)},p(t,e){64&e&&$(r,t[6])},d(t){t&&x(r)}}}function wn(t){let r,n,i,o,s,a,l=t[13]("tournamentsThumbnail.mostRounds")+"",u=t[13]("tournamentsThumbnail.minbet")+"";return{c(){r=P(l),n=P("\n ("),i=P(u),o=P(": "),s=P(t[7]),a=P(")")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),_(t,o,e),_(t,s,e),_(t,a,e)},p(t,e){8192&e&&l!==(l=t[13]("tournamentsThumbnail.mostRounds")+"")&&$(r,l),8192&e&&u!==(u=t[13]("tournamentsThumbnail.minbet")+"")&&$(i,u),128&e&&$(s,t[7])},d(t){t&&x(r),t&&x(n),t&&x(i),t&&x(o),t&&x(s),t&&x(a)}}}function Tn(t){let r,n,i,o,s,a,l,u,c,h=t[2]&&pn(t),d="true"==t[8]&&fn(t);function p(t){return t[4]?yn:gn}let f=p(t),m=f(t),g=t[1]&&bn(t),y=t[11]&&vn(t);return{c(){r=A("div"),h&&h.c(),n=S(),d&&d.c(),i=S(),m.c(),o=S(),s=A("div"),a=A("div"),l=P(t[0]),u=S(),g&&g.c(),c=S(),y&&y.c(),this.c=b,L(a,"class","Title"),L(s,"class","Details"),L(r,"class","Thumbnail")},m(t,e){_(t,r,e),h&&h.m(r,null),T(r,n),d&&d.m(r,null),T(r,i),m.m(r,null),T(r,o),T(r,s),T(s,a),T(a,l),T(s,u),g&&g.m(s,null),T(s,c),y&&y.m(s,null)},p(t,[e]){t[2]?h?h.p(t,e):(h=pn(t),h.c(),h.m(r,n)):h&&(h.d(1),h=null),"true"==t[8]?d?d.p(t,e):(d=fn(t),d.c(),d.m(r,i)):d&&(d.d(1),d=null),f===(f=p(t))&&m?m.p(t,e):(m.d(1),m=f(t),m&&(m.c(),m.m(r,o))),1&e&&$(l,t[0]),t[1]?g?g.p(t,e):(g=bn(t),g.c(),g.m(s,c)):g&&(g.d(1),g=null),t[11]?y?y.p(t,e):(y=vn(t),y.c(),y.m(s,null)):y&&(y.d(1),y=null)},i:b,o:b,d(t){t&&x(r),h&&h.d(),d&&d.d(),m.d(),g&&g.d(),y&&y.d()}}}function _n(t,e,i){let o;H(t,un,t=>i(13,o=t));let{session:r=""}=e,{userid:n=""}=e,{title:s=""}=e,{startdate:a=""}=e,{status:l=""}=e,{tourid:u=""}=e,{thumbnail:c=""}=e,{userenrolled:h=""}=e,{scorecriteria:d=""}=e,{minbetcount:p=""}=e,{showenrolled:f="false"}=e,{gameurl:m=""}=e,{lang:g="en"}=e,y,b=!1,v="";Object.keys(dn).forEach(t=>{zr(t,dn[t])});const E=t=>{t.data&&"SessionID"==t.data.type&&i(11,b=!0)},w=(t,e)=>{window.postMessage({type:"tournamentGamesClicked",tourId:e},window.location.href)};return X(()=>(window.addEventListener("message",E,!1),()=>{window.removeEventListener("message",E)})),t.$$set=t=>{"session"in t&&i(17,r=t.session),"userid"in t&&i(18,n=t.userid),"title"in t&&i(0,s=t.title),"startdate"in t&&i(1,a=t.startdate),"status"in t&&i(2,l=t.status),"tourid"in t&&i(3,u=t.tourid),"thumbnail"in t&&i(4,c=t.thumbnail),"userenrolled"in t&&i(5,h=t.userenrolled),"scorecriteria"in t&&i(6,d=t.scorecriteria),"minbetcount"in t&&i(7,p=t.minbetcount),"showenrolled"in t&&i(8,f=t.showenrolled),"gameurl"in t&&i(9,m=t.gameurl),"lang"in t&&i(19,g=t.lang)},t.$$.update=()=>{131072&t.$$.dirty&&r&&(0<r.length&&"false"!=r?i(11,b=!0):i(11,b=!1))},[s,a,l,u,c,h,d,p,f,m,"",b,v,o,()=>{let t=new Date(a),e=new Intl.DateTimeFormat(g,{month:"long"}).format(t),r=t.getDate(),n=t.toLocaleString(g,{hour:"numeric",minute:"numeric",hour12:!1});i(10,y=`${r} ${e}, `+o("tournamentsThumbnail.startingAt")+` ${n}`)},()=>{"Unstarted"==l&&i(12,v=o("tournamentsThumbnail.scheduled")),"Running"==l&&i(12,v=o("tournamentsThumbnail.ongoing")),"Closed"!=l&&"Closing"!=l||i(12,v=o("tournamentsThumbnail.finished"))},w,r,n,g,()=>w()]}customElements.get("casino-tournaments-thumbnail")||customElements.define("casino-tournaments-thumbnail",class extends c{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}a{color:#48952a;text-decoration:underline;cursor:pointer}.Thumbnail{position:relative}.Thumbnail .CardImg{height:300px;width:100%;background:url("https://breakthrough.org/wp-content/uploads/2018/10/default-placeholder-image.png");background-repeat:no-repeat;background-position:center;background-size:auto}.Thumbnail .CardImg.CardImgFinished{filter:grayscale(1)}.Thumbnail .Status{background:#000000;display:flex;justify-content:center;align-items:center;position:absolute;top:20px;right:20px;min-height:30px;padding:0 10px;font-size:12px;text-transform:uppercase;z-index:1}.Thumbnail .Enrolled{background:#2B2B5D;color:#aaaabe;display:flex;justify-content:center;align-items:center;position:absolute;top:20px;left:20px;min-height:30px;padding:0 10px;font-size:12px;text-transform:uppercase;z-index:1}.Thumbnail .Details{padding:10px 20px 0}.Thumbnail .Details .Title{font-size:18px;padding-bottom:10px}.Thumbnail .Details .Date{text-transform:uppercase;font-size:12px;padding-bottom:4px}.Thumbnail .Details .ScoreCriteria{font-size:12px;padding-bottom:4px}.Thumbnail .Details .Games{font-size:12px}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_n,Tn,r,{session:17,userid:18,title:0,startdate:1,status:2,tourid:3,thumbnail:4,userenrolled:5,scorecriteria:6,minbetcount:7,showenrolled:8,gameurl:9,lang:19}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["session","userid","title","startdate","status","tourid","thumbnail","userenrolled","scorecriteria","minbetcount","showenrolled","gameurl","lang"]}get session(){return this.$$.ctx[17]}set session(t){this.$set({session:t}),M()}get userid(){return this.$$.ctx[18]}set userid(t){this.$set({userid:t}),M()}get title(){return this.$$.ctx[0]}set title(t){this.$set({title:t}),M()}get startdate(){return this.$$.ctx[1]}set startdate(t){this.$set({startdate:t}),M()}get status(){return this.$$.ctx[2]}set status(t){this.$set({status:t}),M()}get tourid(){return this.$$.ctx[3]}set tourid(t){this.$set({tourid:t}),M()}get thumbnail(){return this.$$.ctx[4]}set thumbnail(t){this.$set({thumbnail:t}),M()}get userenrolled(){return this.$$.ctx[5]}set userenrolled(t){this.$set({userenrolled:t}),M()}get scorecriteria(){return this.$$.ctx[6]}set scorecriteria(t){this.$set({scorecriteria:t}),M()}get minbetcount(){return this.$$.ctx[7]}set minbetcount(t){this.$set({minbetcount:t}),M()}get showenrolled(){return this.$$.ctx[8]}set showenrolled(t){this.$set({showenrolled:t}),M()}get gameurl(){return this.$$.ctx[9]}set gameurl(t){this.$set({gameurl:t}),M()}get lang(){return this.$$.ctx[19]}set lang(t){this.$set({lang:t}),M()}});const xn={en:{tournamentsDuration:{finished:"Finished",starting:"Starting in ",days:"days",minutesleft:"minutes left",hoursleft:"hours left",daysleft:"days left"}},tr:{tournamentsDuration:{finished:"Sona ermiş",starting:"Başlamasına ",days:"gün",minutesleft:"dakika kaldı",hoursleft:"saat kaldı",daysleft:"gün kaldı"}},el:{tournamentsDuration:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",days:"ημέρες",minutesleft:"λεπτά απομένουν",hoursleft:"ώρες απομένουν",daysleft:"ημέρες απομένουν"}}};function An(r){let n,i,o,s,a,l,u,c,h,d;function p(t){return"Finished"==t[2]||"Closing"==t[2]||"Closed"==t[2]?Cn:0<t[6]?Sn:Pn}let f=p(r),m=f(r);return{c(){n=A("div"),i=A("div"),o=P(r[3]),s=S(),a=A("div"),l=P(r[4]),u=S(),c=A("div"),m.c(),L(i,"class","StartDate"),L(a,"class","EndDate"),L(n,"class","TournamentDates"),L(c,"class","ProgressBar")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(n,s),T(n,a),T(a,l),_(t,u,e),_(t,c,e),m.m(c,null),h||(d=[g(r[12].call(null,i)),g(r[13].call(null,a)),g(r[14].call(null,c))],h=!0)},p(t,e){8&e&&$(o,t[3]),16&e&&$(l,t[4]),f===(f=p(t))&&m?m.p(t,e):(m.d(1),m=f(t),m&&(m.c(),m.m(c,null)))},d(t){t&&x(n),t&&x(u),t&&x(c),m.d(),h=!1,y(d)}}}function Pn(t){let r,n,i,o=0<t[5]&&Ln(t);return{c(){r=A("div"),n=S(),o&&o.c(),i=l(),L(r,"class","ProgressBarFill"),E(r,"width",t[7]+"%")},m(t,e){_(t,r,e),_(t,n,e),o&&o.m(t,e),_(t,i,e)},p(t,e){128&e&&E(r,"width",t[7]+"%"),0<t[5]?o?o.p(t,e):(o=Ln(t),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d(t){t&&x(r),t&&x(n),o&&o.d(t),t&&x(i)}}}function Sn(t){let r,n,i,o,s,a,l,u,c=t[11]("tournamentsDuration.starting")+"",h=t[11]("tournamentsDuration.days")+"";return{c(){r=A("div"),n=S(),i=A("div"),o=P(c),s=S(),a=P(t[6]),l=S(),u=P(h),L(r,"class","ProgressBarFillStarting"),L(i,"class","Remaining")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),T(i,o),T(i,s),T(i,a),T(i,l),T(i,u)},p(t,e){2048&e&&c!==(c=t[11]("tournamentsDuration.starting")+"")&&$(o,c),64&e&&$(a,t[6]),2048&e&&h!==(h=t[11]("tournamentsDuration.days")+"")&&$(u,h)},d(t){t&&x(r),t&&x(n),t&&x(i)}}}function Cn(t){let r,n,i,o,s=t[11]("tournamentsDuration.finished")+"";return{c(){r=A("div"),n=S(),i=A("div"),o=P(s),L(r,"class","ProgressBarFillEnd"),L(i,"class","Finished")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),T(i,o)},p(t,e){2048&e&&s!==(s=t[11]("tournamentsDuration.finished")+"")&&$(o,s)},d(t){t&&x(r),t&&x(n),t&&x(i)}}}function Ln(t){let r,n,i,o=t[8]&&$n(t),s=t[9]&&On(t),a=t[10]&&kn(t);return{c(){o&&o.c(),r=S(),s&&s.c(),n=S(),a&&a.c(),i=l()},m(t,e){o&&o.m(t,e),_(t,r,e),s&&s.m(t,e),_(t,n,e),a&&a.m(t,e),_(t,i,e)},p(t,e){t[8]?o?o.p(t,e):(o=$n(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null),t[9]?s?s.p(t,e):(s=On(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[10]?a?a.p(t,e):(a=kn(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},d(t){o&&o.d(t),t&&x(r),s&&s.d(t),t&&x(n),a&&a.d(t),t&&x(i)}}}function $n(t){let r,n,i,o,s=t[11]("tournamentsDuration.minutesleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.minutesleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function On(t){let r,n,i,o,s=t[11]("tournamentsDuration.hoursleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.hoursleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function kn(t){let r,n,i,o,s=t[11]("tournamentsDuration.daysleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.daysleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function In(t){let r,n=t[0]&&t[1]&&An(t);return{c(){r=A("div"),n&&n.c(),this.c=b,L(r,"class","TournamentDuration")},m(t,e){_(t,r,e),n&&n.m(r,null)},p(t,[e]){t[0]&&t[1]?n?n.p(t,e):(n=An(t),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:b,o:b,d(t){t&&x(r),n&&n.d()}}}function Nn(t,e,n){let r;H(t,un,t=>n(11,r=t));let{startdate:i=""}=e,{enddate:o=""}=e,{status:s=""}=e,{lang:a="en"}=e,l,u,c,h,d,p,f,m=!1,g=!1,y=!1;Object.keys(xn).forEach(t=>{zr(t,xn[t])});const b=t=>{let e=new Date(t),r=new Intl.DateTimeFormat(a,{month:"long"}).format(e);return`${e.getDate()} ${r}, ${e.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${e.getUTCFullYear()}`},v=(t,e,r)=>{t=new Date(t),t=(new Date(e)-t)/6e4;return 1==r?t<60?(n(8,m=!0),Math.ceil(t)):t<1440?(n(9,g=!0),Math.ceil(t/60)):(n(10,y=!0),Math.ceil(t/1440)):Math.ceil(t/1440)};return t.$$set=t=>{"startdate"in t&&n(0,i=t.startdate),"enddate"in t&&n(1,o=t.enddate),"status"in t&&n(2,s=t.status),"lang"in t&&n(15,a=t.lang)},[i,o,s,"","","","","",m,g,y,r,()=>{n(3,l=b(new Date(i)))},()=>{n(4,u=b(new Date(o)))},()=>{c=v(i,o,!1),n(5,h=v(new Date,o,!0)),n(6,d=v(new Date,i,!1)),0<h&&(p=100/c,n(7,f=Math.floor((c-h)*p)))},a]}customElements.get("casino-tournaments-thumbnail-duration")||customElements.define("casino-tournaments-thumbnail-duration",class extends c{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:#58586B}.EndDate{font-size:11px;align-content:flex-end;color:#58586B}.ProgressBar{margin:5px 20px;height:8px;background:#fff}.ProgressBarFill{background-color:#48952a;height:8px}.ProgressBarFillEnd{background-color:#48952a;height:8px}.ProgressBarFillStarting{background-color:#58586B;height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:#1B9800}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},Nn,In,r,{startdate:0,enddate:1,status:2,lang:15}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["startdate","enddate","status","lang"]}get startdate(){return this.$$.ctx[0]}set startdate(t){this.$set({startdate:t}),M()}get enddate(){return this.$$.ctx[1]}set enddate(t){this.$set({enddate:t}),M()}get status(){return this.$$.ctx[2]}set status(t){this.$set({status:t}),M()}get lang(){return this.$$.ctx[15]}set lang(t){this.$set({lang:t}),M()}});const Rn={en:{tournamentsPrizes:{prizes:"Prizes",noprizes:"No available prizes"}},tr:{tournamentsPrizes:{prizes:"Ödüller",noprizes:"Geçerli ödül yok"}},el:{tournamentsPrizes:{prizes:"Έπαθλα",noprizes:"Μη διαθέσιμα έπαθλα"}}};function Dn(t,e,r){const n=t.slice();return n[4]=e[r],n[6]=r,n}function Mn(t,e,r){const n=t.slice();return n[7]=e[r],n[9]=r,n}function Un(e){let n,i=e[0],o=[];for(let t=0;t<i.length;t+=1)o[t]=Bn(Dn(e,i,t));let s=null;return i.length||(s=Fn(e)),{c(){n=A("div");for(let t=0;t<o.length;t+=1)o[t].c();s&&s.c(),L(n,"class","Prizes")},m(t,e){_(t,n,e);for(let t=0;t<o.length;t+=1)o[t].m(n,null);s&&s.m(n,null)},p(e,r){if(3&r){let t;for(i=e[0],t=0;t<i.length;t+=1){const s=Dn(e,i,t);o[t]?o[t].p(s,r):(o[t]=Bn(s),o[t].c(),o[t].m(n,null))}for(;t<o.length;t+=1)o[t].d(1);o.length=i.length,!i.length&&s?s.p(e,r):i.length?s&&(s.d(1),s=null):(s=Fn(e),s.c(),s.m(n,null))}},d(t){t&&x(n),m(o,t),s&&s.d()}}}function Fn(t){let r,n,i=t[1]("tournamentsPrizes.noprizes")+"";return{c(){r=A("p"),n=P(i)},m(t,e){_(t,r,e),T(r,n)},p(t,e){2&e&&i!==(i=t[1]("tournamentsPrizes.noprizes")+"")&&$(n,i)},d(t){t&&x(r)}}}function jn(t){let r,n,i,o,s,a,l,u=t[4].rank+t[9]+"",c=t[4].name+"";return{c(){r=A("div"),n=A("p"),i=A("span"),o=P(u),s=S(),a=P(c),l=S(),L(r,"class","Prize Prize"+t[6])},m(t,e){_(t,r,e),T(r,n),T(n,i),T(i,o),T(n,s),T(n,a),T(r,l)},p(t,e){1&e&&u!==(u=t[4].rank+t[9]+"")&&$(o,u),1&e&&c!==(c=t[4].name+"")&&$(a,c)},d(t){t&&x(r)}}}function Bn(e){let i,o={length:e[4].count},s=[];for(let t=0;t<o.length;t+=1)s[t]=jn(Mn(e,o,t));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();i=l()},m(e,r){for(let t=0;t<s.length;t+=1)s[t].m(e,r);_(e,i,r)},p(e,r){if(1&r){let t;for(o={length:e[4].count},t=0;t<o.length;t+=1){var n=Mn(e,o,t);s[t]?s[t].p(n,r):(s[t]=jn(n),s[t].c(),s[t].m(i.parentNode,i))}for(;t<s.length;t+=1)s[t].d(1);s.length=o.length}},d(t){m(s,t),t&&x(i)}}}function zn(t){let r,n,i,o,s,a,l,u,c,h,d=t[1]("tournamentsPrizes.prizes")+"",p=t[0]&&Un(t);return{c(){r=A("div"),n=e("svg"),i=e("defs"),o=e("style"),s=P(".a{fill:#fff;}"),a=e("path"),l=S(),u=A("p"),c=P(d),h=S(),p&&p.c(),this.c=b,L(a,"class","a"),L(a,"d","M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z"),L(a,"transform","translate(-5.999 -9.76)"),L(n,"xmlns","http://www.w3.org/2000/svg"),L(n,"width","30"),L(n,"height","27.454"),L(n,"viewBox","0 0 30 27.454"),L(u,"class","PrizesTitle"),L(r,"class","TournamentPrizes")},m(t,e){_(t,r,e),T(r,n),T(n,i),T(i,o),T(o,s),T(n,a),T(r,l),T(r,u),T(u,c),T(r,h),p&&p.m(r,null)},p(t,[e]){2&e&&d!==(d=t[1]("tournamentsPrizes.prizes")+"")&&$(c,d),t[0]?p?p.p(t,e):(p=Un(t),p.c(),p.m(r,null)):p&&(p.d(1),p=null)},i:b,o:b,d(t){t&&x(r),p&&p.d()}}}function Gn(t,e,r){let n;H(t,un,t=>r(1,n=t));let i,{tourid:o=""}=e;Object.keys(Rn).forEach(t=>{zr(t,Rn[t])});const s=t=>{t.data&&t.data.type==`TournamentPrizes_${o}`&&r(0,i=t.data.prizes)};return X(()=>(window.addEventListener("message",s,!1),()=>{window.removeEventListener("message",s)})),t.$$set=t=>{"tourid"in t&&r(2,o=t.tourid)},[i,n,o]}function Hn(t,e,r){const n=t.slice();return n[37]=e[r],n[39]=r,n}function Xn(r){let i,n,o,s,a,l,u,c,h=r[0],d=[];for(let t=0;t<h.length;t+=1)d[t]=Vn(Hn(r,h,t));return{c(){i=A("div"),i.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>',n=S(),o=A("main"),s=A("div");for(let t=0;t<d.length;t+=1)d[t].c();a=S(),l=A("div"),l.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>',L(i,"class","SliderNavButton"),t(i,"disabled",r[6]),L(s,"class","items"),E(s,"transform","translateX("+r[1]+"px)"),L(l,"class","SliderNavButton"),t(l,"disabled",r[7])},m(t,e){_(t,i,e),_(t,n,e),_(t,o,e),T(o,s);for(let t=0;t<d.length;t+=1)d[t].m(s,null);r[21](s),_(t,a,e),_(t,l,e),u||(c=[C(i,"click",r[17]),C(l,"click",r[22])],u=!0)},p(e,r){if(64&r[0]&&t(i,"disabled",e[6]),2841&r[0]){let t;for(h=e[0],t=0;t<h.length;t+=1){var n=Hn(e,h,t);d[t]?d[t].p(n,r):(d[t]=Vn(n),d[t].c(),d[t].m(s,null))}for(;t<d.length;t+=1)d[t].d(1);d.length=h.length}2&r[0]&&E(s,"transform","translateX("+e[1]+"px)"),128&r[0]&&t(l,"disabled",e[7])},d(t){t&&x(i),t&&x(n),t&&x(o),m(d,t),r[21](null),t&&x(a),t&&x(l),u=!1,y(c)}}}function Vn(r){let n,i,o,s,a,l,u,c,h,d,p,f;function m(){return r[18](r[37])}function g(){return r[19](r[39])}return{c(){n=A("div"),i=A("span"),o=P("Play now"),a=S(),l=A("img"),d=S(),L(i,"class",s="PlayNowButton "+(r[3]&&r[4]==r[39]?"itemHover":"")),l.src!==(u=r[37].thumbnail)&&L(l,"src",u),L(l,"width","132px"),L(l,"height","100px"),L(l,"alt",c=r[37].name),L(l,"title",h=r[37].name),L(n,"class","item")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(n,a),T(n,l),T(n,d),p||(f=[C(n,"click",m),C(n,"mouseenter",g),C(n,"mouseleave",r[20])],p=!0)},p(t,e){r=t,24&e[0]&&s!==(s="PlayNowButton "+(r[3]&&r[4]==r[39]?"itemHover":""))&&L(i,"class",s),1&e[0]&&l.src!==(u=r[37].thumbnail)&&L(l,"src",u),1&e[0]&&c!==(c=r[37].name)&&L(l,"alt",c),1&e[0]&&h!==(h=r[37].name)&&L(l,"title",h)},d(t){t&&x(n),p=!1,y(f)}}}function Yn(r){let n,i=r[0]&&Xn(r);return{c(){n=A("div"),i&&i.c(),this.c=b,L(n,"class","TournamentsGamesSlider")},m(t,e){_(t,n,e),i&&i.m(n,null),r[23](n)},p(t,e){t[0]?i?i.p(t,e):(i=Xn(t),i.c(),i.m(n,null)):i&&(i.d(1),i=null)},i:b,o:b,d(t){t&&x(n),i&&i.d(),r[23](null)}}}function Wn(t,e,r){let n,i,o,s,a,l,{tournamenturl:u=""}=e,{scrollby:c="3"}=e,{pagfactor:h="175"}=e,{lang:d=""}=e,p=window.navigator.userAgent,f=[],m=0,g=null,y=null,b=!1,v=0;const E=t=>{r(3,b=!0),r(4,a=t)},w=()=>{r(3,b=!1),r(4,a=-1)},T=t=>{t=(t.touches||t.originalEvent.touches)[0];g=t.clientX,y=t.clientY},_=t=>{var e;g&&y&&(e=t.touches[0].clientX,t=t.touches[0].clientY,e=g-e,t=y-t,Math.abs(e)>Math.abs(t)&&x(0<e?1:-1),g=null,y=null)},x=t=>{0<t&&!i?(r(1,m-=o),r(1,m=m<v?v:m)):t<0&&!n&&(r(1,m+=o),r(1,m=0<m?0:m))},A=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)};return X(()=>(o=parseInt(c,10)*parseInt(h,10),()=>{s.removeEventListener("touchstart",T),s.removeEventListener("touchmove",_)})),t.$$set=t=>{"tournamenturl"in t&&r(13,u=t.tournamenturl),"scrollby"in t&&r(14,c=t.scrollby),"pagfactor"in t&&r(12,h=t.pagfactor),"lang"in t&&r(15,d=t.lang)},t.$$.update=()=>{2&t.$$.dirty[0]&&r(6,n=0===m),65538&t.$$.dirty[0]&&r(7,i=m<=v),8192&t.$$.dirty[0]&&u&&(()=>{let t=new URL(u),e=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=30,offset=${m})`),t.searchParams.append("fields","games(id,name,thumbnail)"),t.searchParams.append("language",d),t.searchParams.append("platform",cn(p)),fetch(t,{method:"GET",headers:e}).then(t=>t.json()).then(t=>{r(0,f=t.item.games.items),t.item.games.total})})(),4&t.$$.dirty[0]&&s&&(s.addEventListener("touchstart",T,{passive:!0}),s.addEventListener("touchmove",_,{passive:!0})),1&t.$$.dirty[0]&&f.length&&setTimeout(()=>{r(16,v=-1*(l.scrollWidth-l.clientWidth)),r(12,h=new String(l.scrollWidth/f.length)),o=parseInt(c,10)*parseFloat(h,2).toFixed(2)},1e3)},r(1,m=0),[f,m,s,b,a,l,n,i,E,w,x,A,h,u,c,d,v,()=>x(-1),t=>A(t),t=>E(t),()=>w(),function(t){I[t?"unshift":"push"](()=>{l=t,r(5,l)})},()=>x(1),function(t){I[t?"unshift":"push"](()=>{s=t,r(2,s)})}]}function qn(t){let r,n,i,o,s,a,l,u,c=t[9]&&Zn(t);function h(t){return t[9]?"Closed"!=t[17]&&"Closing"!=t[17]?ti:"true"==t[3]?Qn:void 0:ei}let d=h(t),p=d&&d(t),f=t[12]&&li(t),m="true"==t[4]&&ui(t);return{c(){r=A("div"),n=A("casino-tournaments-thumbnail"),i=S(),c&&c.c(),o=S(),s=A("div"),p&&p.c(),a=S(),f&&f.c(),l=S(),m&&m.c(),v(n,"session",t[0]),v(n,"userid",t[1]),v(n,"title",t[14]),v(n,"status",t[17]),v(n,"startdate",t[15]),v(n,"tourid",t[18]),v(n,"scorecriteria",t[21]),v(n,"minbetcount",t[22]),v(n,"thumbnail",t[19]),v(n,"userenrolled",t[20]),v(n,"showenrolled",t[5]),v(n,"gameurl",t[24]),v(n,"lang",t[8]),L(s,"class","TournamentButtons"),L(r,"class",u="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))},m(t,e){_(t,r,e),T(r,n),T(r,i),c&&c.m(r,null),T(r,o),T(r,s),p&&p.m(s,null),T(r,a),f&&f.m(r,null),T(r,l),m&&m.m(r,null)},p(t,e){1&e[0]&&v(n,"session",t[0]),2&e[0]&&v(n,"userid",t[1]),16384&e[0]&&v(n,"title",t[14]),131072&e[0]&&v(n,"status",t[17]),32768&e[0]&&v(n,"startdate",t[15]),262144&e[0]&&v(n,"tourid",t[18]),2097152&e[0]&&v(n,"scorecriteria",t[21]),4194304&e[0]&&v(n,"minbetcount",t[22]),524288&e[0]&&v(n,"thumbnail",t[19]),1048576&e[0]&&v(n,"userenrolled",t[20]),32&e[0]&&v(n,"showenrolled",t[5]),16777216&e[0]&&v(n,"gameurl",t[24]),256&e[0]&&v(n,"lang",t[8]),t[9]?c?c.p(t,e):(c=Zn(t),c.c(),c.m(r,o)):c&&(c.d(1),c=null),d===(d=h(t))&&p?p.p(t,e):(p&&p.d(1),p=d&&d(t),p&&(p.c(),p.m(s,null))),t[12]?f?f.p(t,e):(f=li(t),f.c(),f.m(r,l)):f&&(f.d(1),f=null),"true"==t[4]?m?m.p(t,e):(m=ui(t),m.c(),m.m(r,null)):m&&(m.d(1),m=null),192&e[0]&&u!==(u="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))&&L(r,"class",u)},d(t){t&&x(r),c&&c.d(),p&&p.d(),f&&f.d(),m&&m.d()}}}function Kn(t){let r,n,i;return{c(){r=A("div"),n=A("div"),n.innerHTML='<div class="ph-col-12"><div class="ph-picture"></div> \n <div class="ph-row"><div class="ph-col-6 big"></div> \n <div class="ph-col-4 empty big"></div> \n <div class="ph-col-4"></div> \n <div class="ph-col-8 empty"></div> \n <div class="ph-col-6"></div> \n <div class="ph-col-6 empty"></div> \n <div class="ph-col-12"></div></div></div>',L(n,"class","ph-item"),L(r,"class",i="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))},m(t,e){_(t,r,e),T(r,n)},p(t,e){192&e[0]&&i!==(i="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))&&L(r,"class",i)},d(t){t&&x(r)}}}function Zn(t){let r,n,i=t[18]&&Jn(t);return{c(){i&&i.c(),r=S(),n=A("casino-tournaments-thumbnail-duration"),v(n,"status",t[17]),v(n,"startdate",t[15]),v(n,"lang",t[8]),v(n,"enddate",t[16])},m(t,e){i&&i.m(t,e),_(t,r,e),_(t,n,e)},p(t,e){t[18]?i?i.p(t,e):(i=Jn(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null),131072&e[0]&&v(n,"status",t[17]),32768&e[0]&&v(n,"startdate",t[15]),256&e[0]&&v(n,"lang",t[8]),65536&e[0]&&v(n,"enddate",t[16])},d(t){i&&i.d(t),t&&x(r),t&&x(n)}}}function Jn(r){let n,i,o,s;return{c(){n=A("casino-tournaments-thumbnail-prizes"),v(n,"tourid",r[18])},m(t,e){_(t,n,e),o||(s=g(i=r[30].call(null,n,r[18])),o=!0)},p(t,e){262144&e[0]&&v(n,"tourid",t[18]),i&&p(i.update)&&262144&e[0]&&i.update.call(null,t[18])},d(t){t&&x(n),o=!1,s()}}}function Qn(r){let n,i,o,s,a=r[25]("tournamentsThController.details")+"";return{c(){n=A("button"),i=P(a),L(n,"class","DetailsLargeButton")},m(t,e){_(t,n,e),T(n,i),o||(s=C(n,"click",r[41]),o=!0)},p(t,e){33554432&e[0]&&a!==(a=t[25]("tournamentsThController.details")+"")&&$(i,a)},d(t){t&&x(n),o=!1,s()}}}function ti(t){let r,n,i="true"==t[3]&&ri(t);function o(t){return 1==t[20]?ii:ni}let s=o(t),a=s(t);return{c(){i&&i.c(),r=S(),a.c(),n=l()},m(t,e){i&&i.m(t,e),_(t,r,e),a.m(t,e),_(t,n,e)},p(t,e){"true"==t[3]?i?i.p(t,e):(i=ri(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null),s===(s=o(t))&&a?a.p(t,e):(a.d(1),a=s(t),a&&(a.c(),a.m(n.parentNode,n)))},d(t){i&&i.d(t),t&&x(r),a.d(t),t&&x(n)}}}function ei(r){let n,i,o,s,a,l,u,c=r[25]("tournamentsThController.login")+"",h=r[25]("tournamentsThController.register")+"";return{c(){n=A("button"),i=P(c),o=S(),s=A("button"),a=P(h),L(n,"class","LoginButton"),L(s,"class","RegisterButton")},m(t,e){_(t,n,e),T(n,i),_(t,o,e),_(t,s,e),T(s,a),l||(u=[C(n,"click",r[37]),C(s,"click",r[38])],l=!0)},p(t,e){33554432&e[0]&&c!==(c=t[25]("tournamentsThController.login")+"")&&$(i,c),33554432&e[0]&&h!==(h=t[25]("tournamentsThController.register")+"")&&$(a,h)},d(t){t&&x(n),t&&x(o),t&&x(s),l=!1,y(u)}}}function ri(r){let n,i,o,s,a=r[25]("tournamentsThController.details")+"";return{c(){n=A("button"),i=P(a),L(n,"class","DetailsButton")},m(t,e){_(t,n,e),T(n,i),o||(s=C(n,"click",r[39]),o=!0)},p(t,e){33554432&e[0]&&a!==(a=t[25]("tournamentsThController.details")+"")&&$(i,a)},d(t){t&&x(n),o=!1,s()}}}function ni(r){let n,i,o,s;function a(t){return 1==t[11]?si:oi}let l=a(r),u=l(r);return{c(){n=A("button"),u.c(),L(n,"class",i="JoinButton "+(r[7]?"JoinButtonFullSize":"")),n.disabled=r[12]},m(t,e){_(t,n,e),u.m(n,null),o||(s=C(n,"click",r[40]),o=!0)},p(t,e){l===(l=a(t))&&u?u.p(t,e):(u.d(1),u=l(t),u&&(u.c(),u.m(n,null))),128&e[0]&&i!==(i="JoinButton "+(t[7]?"JoinButtonFullSize":""))&&L(n,"class",i),4096&e[0]&&(n.disabled=t[12])},d(t){t&&x(n),u.d(),o=!1,s()}}}function ii(t){let r,n="true"==t[3]&&ai(t);return{c(){n&&n.c(),r=l()},m(t,e){n&&n.m(t,e),_(t,r,e)},p(t,e){"true"==t[3]?n?n.p(t,e):(n=ai(t),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&x(r)}}}function oi(t){let r,n,i,o,s,a,l,u,c,h=t[25]("tournamentsThController.join")+"";return{c(){r=A("span"),n=P(h),i=S(),o=e("svg"),s=e("defs"),a=e("style"),l=P(".a{fill:#fff;}"),u=e("g"),c=e("path"),L(c,"class","a"),L(c,"d","M13,0,10.636,2.364l8.948,8.948H0v3.377H19.584l-8.948,8.948L13,26,26,13Z"),L(c,"transform","translate(26 26) rotate(180)"),L(u,"transform","translate(26 26) rotate(180)"),L(o,"xmlns","http://www.w3.org/2000/svg"),L(o,"width","26"),L(o,"height","26"),L(o,"viewBox","0 0 26 26")},m(t,e){_(t,r,e),T(r,n),_(t,i,e),_(t,o,e),T(o,s),T(s,a),T(a,l),T(o,u),T(u,c)},p(t,e){33554432&e[0]&&h!==(h=t[25]("tournamentsThController.join")+"")&&$(n,h)},d(t){t&&x(r),t&&x(i),t&&x(o)}}}function si(t){let r,n;return{c(){r=e("svg"),n=e("circle"),L(n,"cx","20"),L(n,"cy","20"),L(n,"r","18"),L(r,"class","spinner")},m(t,e){_(t,r,e),T(r,n)},p:b,d(t){t&&x(r)}}}function ai(t){let r,n,i=t[25]("tournamentsThController.enrolled")+"";return{c(){r=A("button"),n=P(i),L(r,"class","EnrolledButton"),r.disabled=!0},m(t,e){_(t,r,e),T(r,n)},p(t,e){33554432&e[0]&&i!==(i=t[25]("tournamentsThController.enrolled")+"")&&$(n,i)},d(t){t&&x(r)}}}function li(t){let r,n,i,o,s=t[25]("tournamentsThController.joinerror")+"";return{c(){r=A("span"),n=P(s),i=S(),o=P(t[13]),L(r,"class","ErrorText")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){33554432&e[0]&&s!==(s=t[25]("tournamentsThController.joinerror")+"")&&$(n,s),8192&e[0]&&$(o,t[13])},d(t){t&&x(r)}}}function ui(t){let r;return{c(){r=A("casino-tournaments-thumbnail-games-slider"),v(r,"tournamenturl",t[2]),v(r,"lang",t[8]),v(r,"scrollby","2")},m(t,e){_(t,r,e)},p(t,e){4&e[0]&&v(r,"tournamenturl",t[2]),256&e[0]&&v(r,"lang",t[8])},d(t){t&&x(r)}}}function ci(t){let r;function n(t){return t[10]?Kn:qn}let i=n(t),o=i(t);return{c(){o.c(),r=l(),this.c=b},m(t,e){o.m(t,e),_(t,r,e)},p(t,e){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r.parentNode,r)))},i:b,o:b,d(t){o.d(t),t&&x(r)}}}function hi(t,e,o){let r;H(t,un,t=>o(25,r=t));let n,i,s,a,l,u,c,h,d,{session:p=""}=e,{userid:f=""}=e,{tournamenturl:m=""}=e,{endpoint:g=""}=e,{showdetails:y=""}=e,{showslider:b=""}=e,{showenrolled:v=""}=e,{maxwidth:E=""}=e,{fullsize:w=""}=e,{lang:T=""}=e,{loginevent:_=""}=e,{registerevent:x=""}=e,{loginurl:A=""}=e,{registerurl:P=""}=e,{currency:S=""}=e,C=!1,L="",$=!0,O=window.navigator.userAgent,k=!1,I=!1,N="There was an error while trying to join the tournament",R=[],D=[],M="#";Object.keys(hn).forEach(t=>{zr(t,hn[t])});const U=t=>{t.data&&"UserSessionID"==t.data.type&&(o(9,C=!0),L=t.data.session)},F=()=>{_&&window.postMessage({type:_},window.location.href),A&&(window.location=A)},j=()=>{x&&window.postMessage({type:x},window.location.href),P&&(window.location=P)},B=t=>{window.postMessage({type:"TournamentDetailsClicked",tournamentId:t,showLeaderboard:"Ongoing"===a},window.location.href)},z=(t,e)=>{window.postMessage({type:"TournamentJoinRequest",tournamentId:t},window.location.href),o(11,k=!0);let r=new URL(`${g}/bonus/claim`),n=new Headers,i={};r.searchParams.append("language",T),n.append("platform",cn(O)),n.append("Content-Type","application/json"),n.append("X-SessionID",L),e&&1<=e.length&&(i={language:T,bonusCode:e[0].code,currency:S});e={method:"PUT",headers:n,body:JSON.stringify(i)};fetch(r,e).then(t=>t.json()).then(t=>{1==t.success?(o(11,k=!1),o(20,c=!0)):(o(11,k=!1),o(13,N=t.errorMessage),o(12,I=!0))},t=>{o(11,k=!1),o(12,I=!0)})},G=t=>{o(10,$=!0);let e=new URL(t),r=new Headers;e.searchParams.append("language",T),r.append("platform",cn(O)),C&&r.append("X-SessionID",L),fetch(e,{method:"GET",headers:r}).then(t=>t.json()).then(t=>{o(10,$=!1),t=t.item,o(14,n=t.nameOrTitle),o(15,i=t.startTime),o(16,s=t.endTime),o(17,a=t.state),o(18,l=t.id),o(19,u=t.thumbnail),o(20,c=t.playerEnrolled||!1),o(21,h=t.scoreCriteria),o(22,d=t.minBetCount),R=t.prizes,o(23,D=t.wallets||[]),o(24,M=t.termsUrl||"#")})};return X(()=>(o(10,$=!1),window.addEventListener("message",U,!1),()=>{window.removeEventListener("message",U)})),t.$$set=t=>{"session"in t&&o(0,p=t.session),"userid"in t&&o(1,f=t.userid),"tournamenturl"in t&&o(2,m=t.tournamenturl),"endpoint"in t&&o(31,g=t.endpoint),"showdetails"in t&&o(3,y=t.showdetails),"showslider"in t&&o(4,b=t.showslider),"showenrolled"in t&&o(5,v=t.showenrolled),"maxwidth"in t&&o(6,E=t.maxwidth),"fullsize"in t&&o(7,w=t.fullsize),"lang"in t&&o(8,T=t.lang),"loginevent"in t&&o(32,_=t.loginevent),"registerevent"in t&&o(33,x=t.registerevent),"loginurl"in t&&o(34,A=t.loginurl),"registerurl"in t&&o(35,P=t.registerurl),"currency"in t&&o(36,S=t.currency)},t.$$.update=()=>{1&t.$$.dirty[0]&&p&&(0<p.length&&"false"!=p?(L=p,o(9,C=!0)):o(9,C=!1)),260&t.$$.dirty[0]&&m&&T&&(o(10,$=!0),G(m))},[p,f,m,y,b,v,E,w,T,C,$,k,I,N,n,i,s,a,l,u,c,h,d,D,M,r,F,j,B,z,(t,e)=>{window.postMessage({type:`TournamentPrizes_${e}`,prizes:R},window.location.href)},g,_,x,A,P,S,()=>F(),()=>j(),()=>B(l),()=>z(l,D),()=>B(l)]}customElements.get("casino-tournaments-thumbnail-prizes")||customElements.define("casino-tournaments-thumbnail-prizes",class extends c{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}span{color:#c3c3c3}.TournamentPrizes{font-size:11px;margin-left:20px;margin-right:20px;display:flex;gap:5px}.PrizesTitle{padding-top:8px}.Prizes{padding-left:20px;flex-wrap:wrap;display:flex;gap:20px;width:100%;min-height:50px;padding-top:8px}.Prize{flex-grow:1;color:#58586B}.Prize.Prize0 span{color:#FECF00}.Prize.Prize1 span{color:#D9B206}.Prize.Prize2 span{color:#9B8007}.Prize p{color:#FFF}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},Gn,zn,r,{tourid:2}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["tourid"]}get tourid(){return this.$$.ctx[2]}set tourid(t){this.$set({tourid:t}),M()}}),customElements.get("casino-tournaments-thumbnail-games-slider")||customElements.define("casino-tournaments-thumbnail-games-slider",class extends c{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}.TournamentsGamesSlider{background:#0a0c19;color:#fff;display:flex;justify-content:center}.disabled{color:#3B3C47}.SliderNavButton{background:#0a0c19;border:0px;width:25px;align-items:center;justify-content:center}main{width:95%;overflow:hidden}.items{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.item{min-width:119px;height:96px;margin:0 4px;background-color:#ef4322;color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton{position:absolute;background:#28a745;display:block;box-sizing:border-box;padding:0.8rem .5rem;color:#fff;text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity .4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.itemHover{opacity:1}.items .item:first-child{margin-left:0}.items .item:last-child{margin-right:0}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},Wn,Yn,r,{tournamenturl:13,scrollby:14,pagfactor:12,lang:15},[-1,-1]),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["tournamenturl","scrollby","pagfactor","lang"]}get tournamenturl(){return this.$$.ctx[13]}set tournamenturl(t){this.$set({tournamenturl:t}),M()}get scrollby(){return this.$$.ctx[14]}set scrollby(t){this.$set({scrollby:t}),M()}get pagfactor(){return this.$$.ctx[12]}set pagfactor(t){this.$set({pagfactor:t}),M()}get lang(){return this.$$.ctx[15]}set lang(t){this.$set({lang:t}),M()}});class di extends c{constructor(t){super(),this.shadowRoot.innerHTML='<style>*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:"Helvetica Neue", "Helvetica", sans-serif}button{cursor:pointer}.TournamentCard{position:relative;background:#0A0B19;color:#fff;border:solid 1px #30313c;gap:20px;display:flex;flex-direction:column;padding-bottom:20px;margin:0 auto}.CardFullSize{width:100%}.CardMaxWidth{max-width:600px}.TournamentButtons{display:flex;justify-content:center;gap:20px;margin:0 20px}.LoginButton{background:#0A0B19;width:50%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:18px}.LoginButton:hover{opacity:0.7}.RegisterButton{background:#0A0B19;width:50%;height:60px;text-align:center;color:#48952a;border:solid #48952a 1px;text-transform:uppercase;font-size:18px}.RegisterButton:hover{opacity:0.7}.DetailsButton{background:#0A0B19;width:40%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:18px}.DetailsButton:hover{opacity:0.7}.DetailsLargeButton{background:#0A0B19;width:100%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:16px}.DetailsLargeButton:hover{opacity:0.7}.EnrolledButton{background:#2a2c5a;width:60%;height:60px;text-align:center;color:#aaaabe;border:0;text-transform:uppercase;font-size:18px;cursor:default}.JoinButton{background:#48952a;width:60%;height:60px;text-align:center;color:#fff;border:solid #48952a 1px;text-transform:uppercase;display:flex;justify-content:center;align-items:center;gap:20px;font-size:18px}.JoinButton:hover{opacity:0.7}.JoinButton:disabled{cursor:default;opacity:0.7}.JoinButtonFullSize{width:100%}.ErrorText{margin:0 20px;color:red;font-size:14px;font-weight:bold}.ph-item{position:relative;display:flex;flex-wrap:wrap;margin-bottom:30px;padding:30px 15px 15px 15px;overflow:hidden;direction:ltr;background-color:#0A0B19;border:1px solid black;border-radius:2px}.ph-item,.ph-item *,.ph-item ::after,.ph-item ::before{box-sizing:border-box}.ph-item::before{position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;background:linear-gradient(to right, rgba(10, 11, 25, 0) 46%, rgba(10, 11, 25, 0.35) 50%, rgba(10, 11, 25, 0) 54%) 50% 50%;animation:phAnimation 0.8s linear infinite;content:" ";pointer-events:none}.ph-item>*{display:flex;flex:1 1 auto;flex-flow:column;margin-bottom:15px;padding-right:15px;padding-left:15px}.ph-row{display:flex;flex-wrap:wrap;margin-top:-7.5px}.ph-row div{height:10px;margin-top:7.5px;background-color:#ced4da}.ph-row .big{height:20px}.ph-row .empty{background-color:rgba(10, 11, 25, 0)}.ph-col-4{flex:0 0 33.33333%}.ph-col-6{flex:0 0 50%}.ph-col-8{flex:0 0 66.66667%}.ph-col-12{flex:0 0 100%}[class*="ph-col"]{direction:ltr}[class*="ph-col"]>*+.ph-row{margin-top:0}[class*="ph-col"]>*+*{margin-top:7.5px}.ph-picture{width:100%;height:120px;background-color:#ced4da}@keyframes phAnimation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}svg.spinner{width:40px;height:40px;x:0px;y:0px;viewBox:0 0 40 40}svg.spinner circle{fill:transparent;stroke:#212121;stroke-width:4;stroke-linecap:round;stroke-dasharray:125.6;-webkit-transform-origin:20px 20px 0;-moz-transform-origin:20px 20px 0;-ms-transform-origin:20px 20px 0;-o-transform-origin:20px 20px 0;transform-origin:20px 20px 0;-webkit-animation:spinner 2s linear infinite;-moz-animation:spinner 2s linear infinite;-ms-animation:spinner 2s linear infinite;-o-animation:spinner 2s linear infinite;animation:spinner 2s linear infinite}@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-webkit-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-webkit-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-moz-keyframes spinner{0%{-moz-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-moz-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-moz-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-ms-keyframes spinner{0%{-ms-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-ms-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-ms-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-o-keyframes spinner{0%{-o-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-o-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-o-transform:rotate(1080deg);stroke-dashoffset:26.4}}@keyframes spinner{0%{transform:rotate(0deg);stroke-dashoffset:26.4}50%{transform:rotate(720deg);stroke-dashoffset:125.6}100%{transform:rotate(1080deg);stroke-dashoffset:26.4}}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},hi,ci,r,{session:0,userid:1,tournamenturl:2,endpoint:31,showdetails:3,showslider:4,showenrolled:5,maxwidth:6,fullsize:7,lang:8,loginevent:32,registerevent:33,loginurl:34,registerurl:35,currency:36},[-1,-1]),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["session","userid","tournamenturl","endpoint","showdetails","showslider","showenrolled","maxwidth","fullsize","lang","loginevent","registerevent","loginurl","registerurl","currency"]}get session(){return this.$$.ctx[0]}set session(t){this.$set({session:t}),M()}get userid(){return this.$$.ctx[1]}set userid(t){this.$set({userid:t}),M()}get tournamenturl(){return this.$$.ctx[2]}set tournamenturl(t){this.$set({tournamenturl:t}),M()}get endpoint(){return this.$$.ctx[31]}set endpoint(t){this.$set({endpoint:t}),M()}get showdetails(){return this.$$.ctx[3]}set showdetails(t){this.$set({showdetails:t}),M()}get showslider(){return this.$$.ctx[4]}set showslider(t){this.$set({showslider:t}),M()}get showenrolled(){return this.$$.ctx[5]}set showenrolled(t){this.$set({showenrolled:t}),M()}get maxwidth(){return this.$$.ctx[6]}set maxwidth(t){this.$set({maxwidth:t}),M()}get fullsize(){return this.$$.ctx[7]}set fullsize(t){this.$set({fullsize:t}),M()}get lang(){return this.$$.ctx[8]}set lang(t){this.$set({lang:t}),M()}get loginevent(){return this.$$.ctx[32]}set loginevent(t){this.$set({loginevent:t}),M()}get registerevent(){return this.$$.ctx[33]}set registerevent(t){this.$set({registerevent:t}),M()}get loginurl(){return this.$$.ctx[34]}set loginurl(t){this.$set({loginurl:t}),M()}get registerurl(){return this.$$.ctx[35]}set registerurl(t){this.$set({registerurl:t}),M()}get currency(){return this.$$.ctx[36]}set currency(t){this.$set({currency:t}),M()}}return customElements.get("casino-tournaments-thumbnail-controller")||customElements.define("casino-tournaments-thumbnail-controller",di),di});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,function(){"use strict";function b(){}function h(t){return t()}function p(){return Object.create(null)}function y(t){t.forEach(h)}function d(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function f(t,...e){if(null==t)return b;const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function V(t,e,r){t.$$.on_destroy.push(f(e,r))}function g(t){return t&&d(t.destroy)?t.destroy:b}function T(t,e){t.appendChild(e)}function _(t,e,r){t.insertBefore(e,r||null)}function x(t){t.parentNode.removeChild(t)}function m(e,r){for(let t=0;t<e.length;t+=1)e[t]&&e[t].d(r)}function A(t){return document.createElement(t)}function e(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function P(t){return document.createTextNode(t)}function S(){return P(" ")}function l(){return P("")}function C(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function L(t,e,r){null==r?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function v(t,e,r){e in t?t[e]=r:L(t,e,r)}function $(t,e){t.wholeText!==(e=""+e)&&(t.data=e)}function E(t,e,r,n){t.style.setProperty(e,r,n?"important":"")}function t(t,e,r){t.classList[r?"add":"remove"](e)}function n(t){const e={};for(const r of t)e[r.name]=r.value;return e}let w;function O(t){w=t}function X(t){!function(){if(!w)throw new Error("Function called outside component initialization");return w}().$$.on_mount.push(t)}const I=[],R=[],i=[],o=[],k=Promise.resolve();let N=!1;function D(t){i.push(t)}let s=!1;const a=new Set;function M(){if(!s){s=!0;do{for(let t=0;t<I.length;t+=1){var e=I[t];O(e),function(t){{var e;null!==t.fragment&&(t.update(),y(t.before_update),e=t.dirty,t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(D))}}(e.$$)}for(O(null),I.length=0;R.length;)R.pop()();for(let t=0;t<i.length;t+=1){const r=i[t];a.has(r)||(a.add(r),r())}}while(i.length=0,I.length);for(;o.length;)o.pop()();N=!1,s=!1,a.clear()}}const U=new Set;function u(n,t,e,r,i,o,s=[-1]){var a,l=w;O(n);const u=n.$$={fragment:null,ctx:null,props:o,update:b,not_equal:i,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:p(),dirty:s,skip_bound:!1};let c=!1;if(u.ctx=e?e(n,t.props||{},(t,e,...r)=>{r=r.length?r[0]:e;return u.ctx&&i(u.ctx[t],u.ctx[t]=r)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](r),c&&(r=t,-1===(t=n).$$.dirty[0]&&(I.push(t),N||(N=!0,k.then(M)),t.$$.dirty.fill(0)),t.$$.dirty[r/31|0]|=1<<r%31)),e}):[],u.update(),c=!0,y(u.before_update),u.fragment=!!r&&r(u.ctx),t.target){if(t.hydrate){const b=(r=t.target,Array.from(r.childNodes));u.fragment&&u.fragment.l(b),b.forEach(x)}else u.fragment&&u.fragment.c();t.intro&&(a=n.$$.fragment)&&a.i&&(U.delete(a),a.i(void 0)),function(e,t,r,n){const{fragment:i,on_mount:o,on_destroy:s,after_update:a}=e.$$;i&&i.m(t,r),n||D(()=>{var t=o.map(h).filter(d);s?s.push(...t):y(t),e.$$.on_mount=[]}),a.forEach(D)}(n,t.target,t.anchor,t.customElement),M()}O(l)}let c;"function"==typeof HTMLElement&&(c=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(h).filter(d);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,r){this[t]=r}disconnectedCallback(){y(this.$$.on_disconnect)}$destroy(){!function(t){const e=t.$$;null!==e.fragment&&(y(e.on_destroy),e.fragment&&e.fragment.d(1),e.on_destroy=e.fragment=null,e.ctx=[])}(this),this.$destroy=b}$on(t,e){const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{var t=r.indexOf(e);-1!==t&&r.splice(t,1)}}$set(t){this.$$set&&0!==Object.keys(t).length&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var j,F,B="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==B&&B,z="URLSearchParams"in B,G="Symbol"in B&&"iterator"in Symbol,H="FileReader"in B&&"Blob"in B&&function(){try{return new Blob,!0}catch(t){return!1}}(),Y="FormData"in B,W="ArrayBuffer"in B;function q(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function K(t){return t="string"!=typeof t?String(t):t}function Z(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return G&&(t[Symbol.iterator]=function(){return t}),t}function J(e){this.map={},e instanceof J?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function Q(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function tt(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function et(t){var e=new FileReader,r=tt(e);return e.readAsArrayBuffer(t),r}function rt(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function nt(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,(this._bodyInit=t)?"string"==typeof t?this._bodyText=t:H&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Y&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:z&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():W&&H&&t&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=rt(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):W&&(ArrayBuffer.prototype.isPrototypeOf(t)||F(t))?this._bodyArrayBuffer=rt(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):z&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},H&&(this.blob=function(){var t=Q(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Q(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(et)}),this.text=function(){var t,e,r=Q(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,r=tt(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Y&&(this.formData=function(){return this.text().then(st)}),this.json=function(){return this.text().then(JSON.parse)},this}W&&(j=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(t){return t&&-1<j.indexOf(Object.prototype.toString.call(t))}),J.prototype.append=function(t,e){t=q(t),e=K(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},J.prototype.delete=function(t){delete this.map[q(t)]},J.prototype.get=function(t){return t=q(t),this.has(t)?this.map[t]:null},J.prototype.has=function(t){return this.map.hasOwnProperty(q(t))},J.prototype.set=function(t,e){this.map[q(t)]=K(e)},J.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},J.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),Z(r)},J.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Z(e)},J.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),Z(r)},G&&(J.prototype[Symbol.iterator]=J.prototype.entries);var it=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ot(t,e){if(!(this instanceof ot))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n=(e=e||{}).body;if(t instanceof ot){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new J(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new J(e.headers)),this.method=(t=(r=e.method||this.method||"GET").toUpperCase(),-1<it.indexOf(t)?t:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n),"GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache||((e=/([?&])_=[^&]*/).test(this.url)?this.url=this.url.replace(e,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime())}function st(t){var r=new FormData;return t.trim().split("&").forEach(function(t){var e;t&&(t=(e=t.split("=")).shift().replace(/\+/g," "),e=e.join("=").replace(/\+/g," "),r.append(decodeURIComponent(t),decodeURIComponent(e)))}),r}function at(t,e){if(!(this instanceof at))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{},this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new J(e.headers),this.url=e.url||"",this._initBody(t)}ot.prototype.clone=function(){return new ot(this,{body:this._bodyInit})},nt.call(ot.prototype),nt.call(at.prototype),at.prototype.clone=function(){return new at(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new J(this.headers),url:this.url})},at.error=function(){var t=new at(null,{status:0,statusText:""});return t.type="error",t};var lt=[301,302,303,307,308];at.redirect=function(t,e){if(-1===lt.indexOf(e))throw new RangeError("Invalid status code");return new at(null,{status:e,headers:{location:t}})};var ut=B.DOMException;try{new ut}catch(b){(ut=function(t,e){this.message=t,this.name=e;t=Error(t);this.stack=t.stack}).prototype=Object.create(Error.prototype),ut.prototype.constructor=ut}function ct(n,s){return new Promise(function(i,t){var e=new ot(n,s);if(e.signal&&e.signal.aborted)return t(new ut("Aborted","AbortError"));var o=new XMLHttpRequest;function r(){o.abort()}o.onload=function(){var t,r,e={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",r=new J,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var e=t.split(":"),t=e.shift().trim();t&&(e=e.join(":").trim(),r.append(t,e))}),r)};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var n="response"in o?o.response:o.responseText;setTimeout(function(){i(new at(n,e))},0)},o.onerror=function(){setTimeout(function(){t(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){t(new TypeError("Network request failed"))},0)},o.onabort=function(){setTimeout(function(){t(new ut("Aborted","AbortError"))},0)},o.open(e.method,function(e){try{return""===e&&B.location.href?B.location.href:e}catch(t){return e}}(e.url),!0),"include"===e.credentials?o.withCredentials=!0:"omit"===e.credentials&&(o.withCredentials=!1),"responseType"in o&&(H?o.responseType="blob":W&&e.headers.get("Content-Type")&&-1!==e.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!s||"object"!=typeof s.headers||s.headers instanceof J?e.headers.forEach(function(t,e){o.setRequestHeader(e,t)}):Object.getOwnPropertyNames(s.headers).forEach(function(t){o.setRequestHeader(t,K(s.headers[t]))}),e.signal&&(e.signal.addEventListener("abort",r),o.onreadystatechange=function(){4===o.readyState&&e.signal.removeEventListener("abort",r)}),o.send(void 0===e._bodyInit?null:e._bodyInit)})}ct.polyfill=!0,B.fetch||(B.fetch=ct,B.Headers=J,B.Request=ot,B.Response=at),self.fetch.bind(self);var ht=function(t,e){return(ht=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])})(t,e)};function pt(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}ht(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function dt(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{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ft(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function mt(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function gt(t){return"function"==typeof t}function yt(t){t=t(function(t){Error.call(t),t.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t}var bt=yt(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function vt(t,e){!t||0<=(e=t.indexOf(e))&&t.splice(e,1)}var Et=(Tt.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=dt(o),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 o.remove(this);o=this.initialTeardown;if(gt(o))try{o()}catch(t){i=t instanceof bt?t.errors:[t]}o=this._teardowns;if(o){this._teardowns=null;try{for(var l=dt(o),u=l.next();!u.done;u=l.next()){var c=u.value;try{xt(c)}catch(t){i=null!=i?i:[],t instanceof bt?i=mt(mt([],ft(i)),ft(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new bt(i)}},Tt.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)xt(t);else{if(t instanceof Tt){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._teardowns=null!==(e=this._teardowns)&&void 0!==e?e:[]).push(t)}},Tt.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},Tt.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},Tt.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&vt(e,t)},Tt.prototype.remove=function(t){var e=this._teardowns;e&&vt(e,t),t instanceof Tt&&t._removeParent(this)},Tt.EMPTY=((Xe=new Tt).closed=!0,Xe),Tt),wt=Et.EMPTY;function Tt(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}function _t(t){return t instanceof Et||t&&"closed"in t&>(t.remove)&>(t.add)&>(t.unsubscribe)}function xt(t){gt(t)?t():t.unsubscribe()}var At=void 0,Pt=!1,St=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return setTimeout.apply(void 0,mt([],ft(t)))};function Ct(){}function Lt(t){t()}var $t,Ot,It=(pt(Nt,Ot=Et),Nt.create=function(t,e,r){return new Rt(t,e,r)},Nt.prototype.next=function(t){this.isStopped||this._next(t)},Nt.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},Nt.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},Nt.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,Ot.prototype.unsubscribe.call(this),this.destination=null)},Nt.prototype._next=function(t){this.destination.next(t)},Nt.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},Nt.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},Nt),Rt=(pt(kt,$t=It),kt);function kt(t,e,r){var n,i,o=$t.call(this)||this;return gt(t)?i=t:t&&(i=t.next,e=t.error,r=t.complete,o&&Pt?(n=Object.create(t)).unsubscribe=function(){return o.unsubscribe()}:n=t,i=null==i?void 0:i.bind(n),e=null==e?void 0:e.bind(n),r=null==r?void 0:r.bind(n)),o.destination={next:i?Dt(i):Ct,error:Dt(null!=e?e:Mt),complete:r?Dt(r):Ct},o}function Nt(t){var e=Ot.call(this)||this;return e.isStopped=!1,t?_t(e.destination=t)&&t.add(e):e.destination=Ut,e}function Dt(n){return function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{n.apply(void 0,mt([],ft(t)))}catch(t){e=t,St(function(){throw e})}}}function Mt(t){throw t}var Ut={closed:!0,next:Ct,error:Mt,complete:Ct},jt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ft(t){return t}var Bt=(zt.prototype.lift=function(t){var e=new zt;return e.source=this,e.operator=t,e},zt.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof It||n&>(n.next)&>(n.error)&>(n.complete)&&_t(n)?t:new Rt(t,e,r);return Lt(function(){var t=i.operator,e=i.source;o.add(t?t.call(o,e):e?i._subscribe(o):i._trySubscribe(o))}),o},zt.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},zt.prototype.forEach=function(n,t){var i=this;return new(t=Gt(t))(function(t,e){var r=i.subscribe(function(t){try{n(t)}catch(t){e(t),null==r||r.unsubscribe()}},e,t)})},zt.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},zt.prototype[jt]=function(){return this},zt.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?Ft:1===e.length?e[0]:function(t){return e.reduce(function(t,e){return e(t)},t)})(this)},zt.prototype.toPromise=function(t){var n=this;return new(t=Gt(t))(function(t,e){var r;n.subscribe(function(t){return r=t},function(t){return e(t)},function(){return t(r)})})},zt.create=function(t){return new zt(t)},zt);function zt(t){t&&(this._subscribe=t)}function Gt(t){return null!==(t=null!=t?t:At)&&void 0!==t?t:Promise}var Ht,Vt,Xt,Yt=yt(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Wt=(pt(te,Xt=Bt),te.prototype.lift=function(t){var e=new qt(this,this);return e.operator=t,e},te.prototype._throwIfClosed=function(){if(this.closed)throw new Yt},te.prototype.next=function(o){var s=this;Lt(function(){var e,t;if(s._throwIfClosed(),!s.isStopped){var r=s.observers.slice();try{for(var n=dt(r),i=n.next();!i.done;i=n.next())i.value.next(o)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}})},te.prototype.error=function(e){var r=this;Lt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var t=r.observers;t.length;)t.shift().error(e)}})},te.prototype.complete=function(){var e=this;Lt(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},te.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(te.prototype,"observed",{get:function(){var t;return 0<(null===(t=this.observers)||void 0===t?void 0:t.length)},enumerable:!1,configurable:!0}),te.prototype._trySubscribe=function(t){return this._throwIfClosed(),Xt.prototype._trySubscribe.call(this,t)},te.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},te.prototype._innerSubscribe=function(t){var e=this.hasError,r=this.isStopped,n=this.observers;return e||r?wt:(n.push(t),new Et(function(){return vt(n,t)}))},te.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,r=this.thrownError,n=this.isStopped;e?t.error(r):n&&t.complete()},te.prototype.asObservable=function(){var t=new Bt;return t.source=this,t},te.create=function(t,e){return new qt(t,e)},te),qt=(pt(Qt,Vt=Wt),Qt.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)},Qt.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)},Qt.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)},Qt.prototype._subscribe=function(t){var e;return null!==(t=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==t?t:wt},Qt),Kt={now:function(){return(Kt.delegate||Date).now()},delegate:void 0},Zt=(pt(Jt,Ht=Wt),Jt.prototype.next=function(t){var e=this,r=e.isStopped,n=e._buffer,i=e._infiniteTimeWindow,o=e._timestampProvider,e=e._windowTime;r||(n.push(t),i||n.push(o.now()+e)),this._trimBuffer(),Ht.prototype.next.call(this,t)},Jt.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},Jt.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var o=e.now(),s=0,a=1;a<r.length&&r[a]<=o;a+=2)s=a;s&&r.splice(0,s+1)}},Jt);function Jt(t,e,r){void 0===t&&(t=1/0),void 0===e&&(e=1/0),void 0===r&&(r=Kt);var n=Ht.call(this)||this;return n._bufferSize=t,n._windowTime=e,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=e===1/0,n._bufferSize=Math.max(1,t),n._windowTime=Math.max(1,e),n}function Qt(t,e){var r=Vt.call(this)||this;return r.destination=t,r.source=e,r}function te(){var t=Xt.call(this)||this;return t.closed=!1,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}let ee=[],re={};const ne=[];function ie(n,i=b){let o;const s=[];function a(t){if(r(n,t)&&(n=t,o)){const t=!ne.length;for(let t=0;t<s.length;t+=1){const e=s[t];e[1](),ne.push(e,n)}if(t){for(let t=0;t<ne.length;t+=2)ne[t][0](ne[t+1]);ne.length=0}}}return{set:a,update:function(t){a(t(n))},subscribe:function(t,e=b){const r=[t,e];return s.push(r),1===s.length&&(o=i(a)||b),t(n),()=>{var t=s.indexOf(r);-1!==t&&s.splice(t,1),0===s.length&&(o(),o=null)}}}}function oe(t,a,e){const l=!Array.isArray(t),u=l?[t]:t,c=a.length<2;return{subscribe:ie(e,e=>{let r=!1;const n=[];let i=0,o=b;const s=()=>{var t;i||(o(),t=a(l?n[0]:n,e),c?e(t):o=d(t)?t:b)},t=u.map((t,e)=>f(t,t=>{n[e]=t,i&=~(1<<e),r&&s()},()=>{i|=1<<e}));return r=!0,s(),function(){y(t),o()}}).subscribe}}var se=function(t){return!(!t||"object"!=typeof t||(e=t,"[object RegExp]"===(t=Object.prototype.toString.call(e))||"[object Date]"===t||e.$$typeof===ae));var e},ae="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function le(t,e){return!1!==e.clone&&e.isMergeableObject(t)?de(Array.isArray(t)?[]:{},t,e):t}function ue(t,e,r){return t.concat(e).map(function(t){return le(t,r)})}function ce(t){return Object.keys(t).concat((e=t,Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]));var e}function he(t,e){try{return e in t}catch(t){return!1}}function pe(n,i,o){var s={};return o.isMergeableObject(n)&&ce(n).forEach(function(t){s[t]=le(n[t],o)}),ce(i).forEach(function(e){var t,r;(!he(t=n,r=e)||Object.hasOwnProperty.call(t,r)&&Object.propertyIsEnumerable.call(t,r))&&(he(n,e)&&o.isMergeableObject(i[e])?s[e]=function(){if(!o.customMerge)return de;var t=o.customMerge(e);return"function"==typeof t?t:de}()(n[e],i[e],o):s[e]=le(i[e],o))}),s}function de(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||ue,r.isMergeableObject=r.isMergeableObject||se,r.cloneUnlessOtherwiseSpecified=le;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):pe(t,e,r):le(e,r)}de.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,e){return de(t,e,r)},{})};var fe=de,me=function(t,e){return(me=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])})(t,e)};function ge(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}me(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var ye,be,ve,Ee=function(){return(Ee=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function we(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function Te(t){return t.type===be.literal}function _e(t){return t.type===be.number}function xe(t){return t.type===be.date}function Ae(t){return t.type===be.time}function Pe(t){return t.type===be.select}function Se(t){return t.type===be.plural}function Ce(t){return t.type===be.tag}function Le(t){return t&&"object"==typeof t&&t.type===ve.number}function $e(t){return t&&"object"==typeof t&&t.type===ve.dateTime}(Ye=ye=ye||{})[Ye.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",Ye[Ye.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",Ye[Ye.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",Ye[Ye.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",Ye[Ye.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",Ye[Ye.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",Ye[Ye.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",Ye[Ye.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",Ye[Ye.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",Ye[Ye.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",Ye[Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",Ye[Ye.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",Ye[Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",Ye[Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",Ye[Ye.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",Ye[Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",Ye[Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",Ye[Ye.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",Ye[Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",Ye[Ye.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",Ye[Ye.INVALID_TAG=23]="INVALID_TAG",Ye[Ye.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",Ye[Ye.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",Ye[Ye.UNCLOSED_TAG=27]="UNCLOSED_TAG",(We=be=be||{})[We.literal=0]="literal",We[We.argument=1]="argument",We[We.number=2]="number",We[We.date=3]="date",We[We.time=4]="time",We[We.select=5]="select",We[We.plural=6]="plural",We[We.pound=7]="pound",We[We.tag=8]="tag",(qe=ve=ve||{})[qe.number=0]="number",qe[qe.dateTime=1]="dateTime";var Oe=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ie=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;var Re,ke=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Ne=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,De=/^(@+)?(\+|#+)?$/g,Me=/(\*)(0+)|(#+)(0+)|(0+)/g,Ue=/^(0+)$/;function je(t){var n={};return t.replace(De,function(t,e,r){return"string"!=typeof r?(n.minimumSignificantDigits=e.length,n.maximumSignificantDigits=e.length):"+"===r?n.minimumSignificantDigits=e.length:"#"===e[0]?n.maximumSignificantDigits=e.length:(n.minimumSignificantDigits=e.length,n.maximumSignificantDigits=e.length+("string"==typeof r?r.length:0)),""}),n}function Fe(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Be(t){return Fe(t)||{}}function ze(t){for(var s={},e=0,r=t;e<r.length;e++){var n,i=r[e];switch(i.stem){case"percent":case"%":s.style="percent";continue;case"%x100":s.style="percent",s.scale=100;continue;case"currency":s.style="currency",s.currency=i.options[0];continue;case"group-off":case",_":s.useGrouping=!1;continue;case"precision-integer":case".":s.maximumFractionDigits=0;continue;case"measure-unit":case"unit":s.style="unit",s.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":s.notation="compact",s.compactDisplay="short";continue;case"compact-long":case"KK":s.notation="compact",s.compactDisplay="long";continue;case"scientific":s=Ee(Ee(Ee({},s),{notation:"scientific"}),i.options.reduce(function(t,e){return Ee(Ee({},t),Be(e))},{}));continue;case"engineering":s=Ee(Ee(Ee({},s),{notation:"engineering"}),i.options.reduce(function(t,e){return Ee(Ee({},t),Be(e))},{}));continue;case"notation-simple":s.notation="standard";continue;case"unit-width-narrow":s.currencyDisplay="narrowSymbol",s.unitDisplay="narrow";continue;case"unit-width-short":s.currencyDisplay="code",s.unitDisplay="short";continue;case"unit-width-full-name":s.currencyDisplay="name",s.unitDisplay="long";continue;case"unit-width-iso-code":s.currencyDisplay="symbol";continue;case"scale":s.scale=parseFloat(i.options[0]);continue;case"integer-width":if(1<i.options.length)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Me,function(t,e,r,n,i,o){if(e)s.minimumIntegerDigits=r.length;else{if(n&&i)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ue.test(i.stem))s.minimumIntegerDigits=i.stem.length;else if(Ne.test(i.stem)){if(1<i.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ne,function(t,e,r,n,i,o){return"*"===r?s.minimumFractionDigits=e.length:n&&"#"===n[0]?s.maximumFractionDigits=n.length:i&&o?(s.minimumFractionDigits=i.length,s.maximumFractionDigits=i.length+o.length):(s.minimumFractionDigits=e.length,s.maximumFractionDigits=e.length),""}),i.options.length&&(s=Ee(Ee({},s),je(i.options[0])))}else De.test(i.stem)?s=Ee(Ee({},s),je(i.stem)):((n=Fe(i.stem))&&(s=Ee(Ee({},s),n)),(n=function(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var r=t.slice(0,2);if("+!"===r?(e.signDisplay="always",t=t.slice(2)):"+?"===r&&(e.signDisplay="exceptZero",t=t.slice(2)),!Ue.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}(i.stem))&&(s=Ee(Ee({},s),n)))}return s}var Ge=new RegExp("^"+Oe.source+"*"),He=new RegExp(Oe.source+"*$");function Ve(t,e){return{start:t,end:e}}var Xe=!!String.prototype.startsWith,jt=!!String.fromCodePoint,Wt=!!Object.fromEntries,Ye=!!String.prototype.codePointAt,We=!!String.prototype.trimStart,qe=!!String.prototype.trimEnd,Ke=Number.isSafeInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Oe=!0;try{Oe="a"===(null===(Re=or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Re?void 0:Re[0])}catch(b){Oe=!1}var Ze,Je,Qe=Xe?function(t,e,r){return t.startsWith(e,r)}:function(t,e,r){return t.slice(r,r+e.length)===e},tr=jt?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n="",i=t.length,o=0;o<i;){if(1114111<(r=t[o++]))throw RangeError(r+" is not a valid code point");n+=r<65536?String.fromCharCode(r):String.fromCharCode(55296+((r-=65536)>>10),r%1024+56320)}return n},er=Wt?Object.fromEntries:function(t){for(var e={},r=0,n=t;r<n.length;r++){var i=n[r],o=i[0],i=i[1];e[o]=i}return e},rr=Ye?function(t,e){return t.codePointAt(e)}:function(t,e){var r=t.length;if(!(e<0||r<=e)){var n,i=t.charCodeAt(e);return i<55296||56319<i||e+1===r||(n=t.charCodeAt(e+1))<56320||57343<n?i:n-56320+(i-55296<<10)+65536}},nr=We?function(t){return t.trimStart()}:function(t){return t.replace(Ge,"")},ir=qe?function(t){return t.trimEnd()}:function(t){return t.replace(He,"")};function or(t,e){return new RegExp(t,e)}Je=Oe?(Ze=or("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),function(t,e){return Ze.lastIndex=e,null!==(t=Ze.exec(t)[1])&&void 0!==t?t:""}):function(t,e){for(var r,n=[];;){var i=rr(t,e);if(void 0===i||ur(i)||(33<=(r=i)&&r<=35||36===r||37<=r&&r<=39||40===r||41===r||42===r||43===r||44===r||45===r||46<=r&&r<=47||58<=r&&r<=59||60<=r&&r<=62||63<=r&&r<=64||91===r||92===r||93===r||94===r||96===r||123===r||124===r||125===r||126===r||161===r||162<=r&&r<=165||166===r||167===r||169===r||171===r||172===r||174===r||176===r||177===r||182===r||187===r||191===r||215===r||247===r||8208<=r&&r<=8213||8214<=r&&r<=8215||8216===r||8217===r||8218===r||8219<=r&&r<=8220||8221===r||8222===r||8223===r||8224<=r&&r<=8231||8240<=r&&r<=8248||8249===r||8250===r||8251<=r&&r<=8254||8257<=r&&r<=8259||8260===r||8261===r||8262===r||8263<=r&&r<=8273||8274===r||8275===r||8277<=r&&r<=8286||8592<=r&&r<=8596||8597<=r&&r<=8601||8602<=r&&r<=8603||8604<=r&&r<=8607||8608===r||8609<=r&&r<=8610||8611===r||8612<=r&&r<=8613||8614===r||8615<=r&&r<=8621||8622===r||8623<=r&&r<=8653||8654<=r&&r<=8655||8656<=r&&r<=8657||8658===r||8659===r||8660===r||8661<=r&&r<=8691||8692<=r&&r<=8959||8960<=r&&r<=8967||8968===r||8969===r||8970===r||8971===r||8972<=r&&r<=8991||8992<=r&&r<=8993||8994<=r&&r<=9e3||9001===r||9002===r||9003<=r&&r<=9083||9084===r||9085<=r&&r<=9114||9115<=r&&r<=9139||9140<=r&&r<=9179||9180<=r&&r<=9185||9186<=r&&r<=9254||9255<=r&&r<=9279||9280<=r&&r<=9290||9291<=r&&r<=9311||9472<=r&&r<=9654||9655===r||9656<=r&&r<=9664||9665===r||9666<=r&&r<=9719||9720<=r&&r<=9727||9728<=r&&r<=9838||9839===r||9840<=r&&r<=10087||10088===r||10089===r||10090===r||10091===r||10092===r||10093===r||10094===r||10095===r||10096===r||10097===r||10098===r||10099===r||10100===r||10101===r||10132<=r&&r<=10175||10176<=r&&r<=10180||10181===r||10182===r||10183<=r&&r<=10213||10214===r||10215===r||10216===r||10217===r||10218===r||10219===r||10220===r||10221===r||10222===r||10223===r||10224<=r&&r<=10239||10240<=r&&r<=10495||10496<=r&&r<=10626||10627===r||10628===r||10629===r||10630===r||10631===r||10632===r||10633===r||10634===r||10635===r||10636===r||10637===r||10638===r||10639===r||10640===r||10641===r||10642===r||10643===r||10644===r||10645===r||10646===r||10647===r||10648===r||10649<=r&&r<=10711||10712===r||10713===r||10714===r||10715===r||10716<=r&&r<=10747||10748===r||10749===r||10750<=r&&r<=11007||11008<=r&&r<=11055||11056<=r&&r<=11076||11077<=r&&r<=11078||11079<=r&&r<=11084||11085<=r&&r<=11123||11124<=r&&r<=11125||11126<=r&&r<=11157||11158===r||11159<=r&&r<=11263||11776<=r&&r<=11777||11778===r||11779===r||11780===r||11781===r||11782<=r&&r<=11784||11785===r||11786===r||11787===r||11788===r||11789===r||11790<=r&&r<=11798||11799===r||11800<=r&&r<=11801||11802===r||11803===r||11804===r||11805===r||11806<=r&&r<=11807||11808===r||11809===r||11810===r||11811===r||11812===r||11813===r||11814===r||11815===r||11816===r||11817===r||11818<=r&&r<=11822||11823===r||11824<=r&&r<=11833||11834<=r&&r<=11835||11836<=r&&r<=11839||11840===r||11841===r||11842===r||11843<=r&&r<=11855||11856<=r&&r<=11857||11858===r||11859<=r&&r<=11903||12289<=r&&r<=12291||12296===r||12297===r||12298===r||12299===r||12300===r||12301===r||12302===r||12303===r||12304===r||12305===r||12306<=r&&r<=12307||12308===r||12309===r||12310===r||12311===r||12312===r||12313===r||12314===r||12315===r||12316===r||12317===r||12318<=r&&r<=12319||12320===r||12336===r||64830===r||64831===r||65093<=r&&r<=65094))break;n.push(i),e+=65536<=i?2:1}return tr.apply(void 0,n)};var sr=(ar.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},ar.prototype.parseMessage=function(t,e,r){for(var n=[];!this.isEOF();){var i,o=this.char();if(123===o){if((i=this.parseArgument(t,r)).err)return i;n.push(i.val)}else{if(125===o&&0<t)break;if(35!==o||"plural"!==e&&"selectordinal"!==e){if(60===o&&!this.ignoreTag&&47===this.peek()){if(r)break;return this.error(ye.UNMATCHED_CLOSING_TAG,Ve(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&lr(this.peek()||0)){if((i=this.parseTag(t,e)).err)return i;n.push(i.val)}else{if((i=this.parseLiteral(t,e)).err)return i;n.push(i.val)}}else{o=this.clonePosition();this.bump(),n.push({type:be.pound,location:Ve(o,this.clonePosition())})}}}return{val:n,err:null}},ar.prototype.parseTag=function(t,e){var r=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:be.literal,value:"<"+n+"/>",location:Ve(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;t=i.val,e=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!lr(this.char()))return this.error(ye.INVALID_TAG,Ve(e,this.clonePosition()));i=this.clonePosition();return n!==this.parseTagName()?this.error(ye.UNMATCHED_CLOSING_TAG,Ve(i,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:be.tag,value:n,children:t,location:Ve(r,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,Ve(e,this.clonePosition())))}return this.error(ye.UNCLOSED_TAG,Ve(r,this.clonePosition()))}return this.error(ye.INVALID_TAG,Ve(r,this.clonePosition()))},ar.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||48<=t&&t<=57||95===t||97<=t&&t<=122||65<=t&&t<=90||183==t||192<=t&&t<=214||216<=t&&t<=246||248<=t&&t<=893||895<=t&&t<=8191||8204<=t&&t<=8205||8255<=t&&t<=8256||8304<=t&&t<=8591||11264<=t&&t<=12271||12289<=t&&t<=55295||63744<=t&&t<=64975||65008<=t&&t<=65533||65536<=t&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},ar.prototype.parseLiteral=function(t,e){for(var r=this.clonePosition(),n="";;){var i=this.tryParseQuote(e);if(i)n+=i;else{i=this.tryParseUnquoted(t,e);if(i)n+=i;else{i=this.tryParseLeftAngleBracket();if(!i)break;n+=i}}}r=Ve(r,this.clonePosition());return{val:{type:be.literal,value:n,location:r},err:null}},ar.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(lr(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},ar.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(39===r){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(r);this.bump()}return tr.apply(void 0,e)},ar.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var r=this.char();return 60===r||123===r||35===r&&("plural"===e||"selectordinal"===e)||125===r&&0<t?null:(this.bump(),tr(r))},ar.prototype.parseArgument=function(t,e){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ye.EMPTY_ARGUMENT,Ve(r,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(ye.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:be.argument,value:n,location:Ve(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition())):this.parseArgumentOptions(t,e,n,r);default:return this.error(ye.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()))}},ar.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),r=Je(this.message,e),e=e+r.length;return this.bumpTo(e),{value:r,location:Ve(t,this.clonePosition())}},ar.prototype.parseArgumentOptions=function(t,e,r,n){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,Ve(o,a));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((p=this.parseSimpleArgStyleIfPossible()).err)return p;if(0===(h=ir(p.val)).length)return this.error(ye.EXPECT_ARGUMENT_STYLE,Ve(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Ve(u,this.clonePosition())}}if((d=this.tryParseArgumentClose(n)).err)return d;var c=Ve(n,this.clonePosition());if(l&&Qe(null==l?void 0:l.style,"::",0)){u=nr(l.style.slice(2));if("number"===s)return(p=this.parseNumberSkeletonFromString(u,l.styleLocation)).err?p:{val:{type:be.number,value:r,location:c,style:p.val},err:null};if(0===u.length)return this.error(ye.EXPECT_DATE_TIME_SKELETON,c);var h={type:ve.dateTime,pattern:u,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?(i={},u.replace(Ie,function(t){var e=t.length;switch(t[0]){case"G":i.era=4===e?"long":5===e?"narrow":"short";break;case"y":i.year=2===e?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":i.month=["numeric","2-digit","short","long","narrow"][e-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":i.day=["numeric","2-digit"][e-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":i.weekday=4!==e&&5===e?"narrow":"short";break;case"e":if(e<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][e-4];break;case"c":if(e<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");i.weekday=["short","long","narrow","short"][e-4];break;case"a":i.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":i.hourCycle="h12",i.hour=["numeric","2-digit"][e-1];break;case"H":i.hourCycle="h23",i.hour=["numeric","2-digit"][e-1];break;case"K":i.hourCycle="h11",i.hour=["numeric","2-digit"][e-1];break;case"k":i.hourCycle="h24",i.hour=["numeric","2-digit"][e-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":i.minute=["numeric","2-digit"][e-1];break;case"s":i.second=["numeric","2-digit"][e-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":i.timeZoneName=e<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),i):{}};return{val:{type:"date"===s?be.date:be.time,value:r,location:c,style:h},err:null}}return{val:{type:"number"===s?be.number:"date"===s?be.date:be.time,value:r,location:c,style:null!==(c=null==l?void 0:l.style)&&void 0!==c?c:null},err:null};case"plural":case"selectordinal":case"select":l=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,Ve(l,Ee({},l)));this.bumpSpace();var p,c=this.parseIdentifierIfPossible(),l=0;if("select"!==s&&"offset"===c.value){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ve(this.clonePosition(),this.clonePosition()));if(this.bumpSpace(),(p=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return p;this.bumpSpace(),c=this.parseIdentifierIfPossible(),l=p.val}c=this.tryParsePluralOrSelectOptions(t,s,e,c);if(c.err)return c;if((d=this.tryParseArgumentClose(n)).err)return d;var d=Ve(n,this.clonePosition());return"select"===s?{val:{type:be.select,value:r,options:er(c.val),location:d},err:null}:{val:{type:be.plural,value:r,options:er(c.val),offset:l,pluralType:"plural"===s?"cardinal":"ordinal",location:d},err:null};default:return this.error(ye.INVALID_ARGUMENT_TYPE,Ve(o,a))}},ar.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},ar.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ve(r,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(0<t))return{val:this.message.slice(e.offset,this.offset()),err:null};--t;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}},ar.prototype.parseNumberSkeletonFromString=function(t,e){var r=[];try{r=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],r=0,n=t.split(ke).filter(function(t){return 0<t.length});r<n.length;r++){var i=n[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],i=i.slice(1),s=0,a=i;s<a.length;s++)if(0===a[s].length)throw new Error("Invalid number skeleton");e.push({stem:o,options:i})}return e}(t)}catch(t){return this.error(ye.INVALID_NUMBER_SKELETON,e)}return{val:{type:ve.number,tokens:r,location:e,parsedOptions:this.shouldParseSkeletons?ze(r):{}},err:null}},ar.prototype.tryParsePluralOrSelectOptions=function(t,e,r,n){for(var i=!1,o=[],s=new Set,a=n.value,l=n.location;;){if(0===a.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var c=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;l=Ve(u,this.clonePosition()),a=this.message.slice(u.offset,this.offset())}if(s.has(a))return this.error("select"===e?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===a&&(i=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ve(this.clonePosition(),this.clonePosition()));c=this.parseMessage(t+1,e,r);if(c.err)return c;u=this.tryParseArgumentClose(h);if(u.err)return u;o.push([a,{value:c.val,location:Ve(h,this.clonePosition())}]),s.add(a),this.bumpSpace(),a=(h=this.parseIdentifierIfPossible()).value,l=h.location}return 0===o.length?this.error("select"===e?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ve(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(ye.MISSING_OTHER_CLAUSE,Ve(this.clonePosition(),this.clonePosition())):{val:o,err:null}},ar.prototype.tryParseDecimalInteger=function(t,e){var r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(48<=s&&s<=57))break;i=!0,o=10*o+(s-48),this.bump()}n=Ve(n,this.clonePosition());return i?Ke(o*=r)?{val:o,err:null}:this.error(e,n):this.error(t,n)},ar.prototype.offset=function(){return this.position.offset},ar.prototype.isEOF=function(){return this.offset()===this.message.length},ar.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},ar.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=rr(this.message,t);if(void 0===e)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return e},ar.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},ar.prototype.bump=function(){var t;this.isEOF()||(10===(t=this.char())?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2))},ar.prototype.bumpIf=function(t){if(Qe(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},ar.prototype.bumpUntil=function(t){var e=this.offset(),e=this.message.indexOf(t,e);return 0<=e?(this.bumpTo(e),!0):(this.bumpTo(this.message.length),!1)},ar.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(t<e)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},ar.prototype.bumpSpace=function(){for(;!this.isEOF()&&ur(this.char());)this.bump()},ar.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),t=this.message.charCodeAt(e+(65536<=t?2:1));return null!=t?t:null},ar);function ar(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}function lr(t){return 97<=t&&t<=122||65<=t&&t<=90}function ur(t){return 9<=t&&t<=13||32===t||133===t||8206<=t&&t<=8207||8232===t||8233===t}function cr(t,e){e=Ee({shouldParseSkeletons:!0,requiresOtherClause:!0},e=void 0===e?{}:e);var r=new sr(t,e).parse();if(r.err){t=SyntaxError(ye[r.err.kind]);throw t.location=r.err.location,t.originalMessage=r.err.message,t}return null!=e&&e.captureLocation||function r(t){t.forEach(function(t){if(delete t.location,Pe(t)||Se(t))for(var e in t.options)delete t.options[e].location,r(t.options[e].value);else _e(t)&&Le(t.style)||(xe(t)||Ae(t))&&$e(t.style)?delete t.style.location:Ce(t)&&r(t.children)})}(r.val),r.val}function hr(t,e){var r=e&&e.cache?e.cache:br,n=e&&e.serializer?e.serializer:mr;return(e&&e.strategy?e.strategy:function(t,e){return fr(t,this,1===t.length?pr:dr,e.cache.create(),e.serializer)})(t,{cache:r,serializer:n})}function pr(t,e,r,n){var i=null==n||"number"==typeof n||"boolean"==typeof n?n:r(n),r=e.get(i);return void 0===r&&(r=t.call(this,n),e.set(i,r)),r}function dr(t,e,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),r=e.get(i);return void 0===r&&(r=t.apply(this,n),e.set(i,r)),r}function fr(t,e,r,n,i){return r.bind(e,t,n,i)}var mr=function(){return JSON.stringify(arguments)};function gr(){this.cache=Object.create(null)}gr.prototype.has=function(t){return t in this.cache},gr.prototype.get=function(t){return this.cache[t]},gr.prototype.set=function(t,e){this.cache[t]=e};var yr,br={create:function(){return new gr}},vr={variadic:function(t,e){return fr(t,this,dr,e.cache.create(),e.serializer)},monadic:function(t,e){return fr(t,this,pr,e.cache.create(),e.serializer)}};(Oe=yr=yr||{}).MISSING_VALUE="MISSING_VALUE",Oe.INVALID_VALUE="INVALID_VALUE",Oe.MISSING_INTL_API="MISSING_INTL_API";var Er,wr,Tr,_r,xr,Ar=(ge(Ir,xr=Error),Ir.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},Ir),Pr=(ge(Or,_r=Ar),Or),Sr=(ge($r,Tr=Ar),$r),Cr=(ge(Lr,wr=Ar),Lr);function Lr(t,e){return wr.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+e+'"',yr.MISSING_VALUE,e)||this}function $r(t,e,r){return Tr.call(this,'Value for "'+t+'" must be of type '+e,yr.INVALID_VALUE,r)||this}function Or(t,e,r,n){return _r.call(this,'Invalid values for "'+t+'": "'+e+'". Options are "'+Object.keys(r).join('", "')+'"',yr.INVALID_VALUE,n)||this}function Ir(t,e,r){t=xr.call(this,t)||this;return t.code=e,t.originalMessage=r,t}function Rr(t,e,r,n,i,o,s){if(1===t.length&&Te(t[0]))return[{type:Er.literal,value:t[0].value}];for(var a=[],l=0,u=t;l<u.length;l++){var c=u[l];if(Te(c))a.push({type:Er.literal,value:c.value});else if(c.type===be.pound)"number"==typeof o&&a.push({type:Er.literal,value:r.getNumberFormat(e).format(o)});else{var h=c.value;if(!(i&&h in i))throw new Cr(h,s);var p=i[h];if(c.type===be.argument)p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?Er.literal:Er.object,value:p});else if(xe(c)){var d="string"==typeof c.style?n.date[c.style]:$e(c.style)?c.style.parsedOptions:void 0;a.push({type:Er.literal,value:r.getDateTimeFormat(e,d).format(p)})}else if(Ae(c))d="string"==typeof c.style?n.time[c.style]:$e(c.style)?c.style.parsedOptions:void 0,a.push({type:Er.literal,value:r.getDateTimeFormat(e,d).format(p)});else if(_e(c))(d="string"==typeof c.style?n.number[c.style]:Le(c.style)?c.style.parsedOptions:void 0)&&d.scale&&(p*=d.scale||1),a.push({type:Er.literal,value:r.getNumberFormat(e,d).format(p)});else{if(Ce(c)){var f=c.children,m=c.value,h=i[m];if("function"!=typeof h)throw new Sr(m,"function",s);f=h(Rr(f,e,r,n,i,o).map(function(t){return t.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(t){return{type:"string"==typeof t?Er.literal:Er.object,value:t}}))}if(Pe(c)){if(!(g=c.options[p]||c.options.other))throw new Pr(c.value,p,Object.keys(c.options),s);a.push.apply(a,Rr(g.value,e,r,n,i))}else if(Se(c)){if(!(g=c.options["="+p])){if(!Intl.PluralRules)throw new Ar('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',yr.MISSING_INTL_API,s);var f=r.getPluralRules(e,{type:c.pluralType}).select(p-(c.offset||0)),g=c.options[f]||c.options.other}if(!g)throw new Pr(c.value,p,Object.keys(c.options),s);a.push.apply(a,Rr(g.value,e,r,n,i,p-(c.offset||0)))}}}}return a.length<2?a:a.reduce(function(t,e){var r=t[t.length-1];return r&&r.type===Er.literal&&e.type===Er.literal?r.value+=e.value:t.push(e),t},[])}function kr(r){return{create:function(){return{has:function(t){return t in r},get:function(t){return r[t]},set:function(t,e){r[t]=e}}}}}(Oe=Er=Er||{})[Oe.literal=0]="literal",Oe[Oe.object=1]="object";var Nr=(Object.defineProperty(Dr,"defaultLocale",{get:function(){return Dr.memoizedDefaultLocale||(Dr.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),Dr.memoizedDefaultLocale},enumerable:!1,configurable:!0}),Dr.memoizedDefaultLocale=null,Dr.__parse=cr,Dr.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Dr);function Dr(t,e,r,n){var i,o,s=this;if(void 0===e&&(e=Dr.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){t=s.formatToParts(t);if(1===t.length)return t[0].value;t=t.reduce(function(t,e){return t.length&&e.type===Er.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t},[]);return t.length<=1?t[0]||"":t},this.formatToParts=function(t){return Rr(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},"string"==typeof t){if(this.message=t,!Dr.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=Dr.__parse(t,{ignoreTag:null==n?void 0:n.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(i=Dr.formats,(o=r)?Object.keys(i).reduce(function(t,e){var r,n;return t[e]=(r=i[e],(n=o[e])?Ee(Ee(Ee({},r||{}),n||{}),Object.keys(r).reduce(function(t,e){return t[e]=Ee(Ee({},r[e]),n[e]||{}),t},{})):r),t},Ee({},i)):i),this.locales=e,this.formatters=n&&n.formatters||{getNumberFormat:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,we([void 0],e)))},{cache:kr((n=void 0===(n=this.formatterCache)?{number:{},dateTime:{},pluralRules:{}}:n).number),strategy:vr.variadic}),getDateTimeFormat:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,we([void 0],e)))},{cache:kr(n.dateTime),strategy:vr.variadic}),getPluralRules:hr(function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,we([void 0],e)))},{cache:kr(n.pluralRules),strategy:vr.variadic})}}const Mr={},Ur=(e,r)=>{if(null!=r){if(r in Mr&&e in Mr[r])return Mr[r][e];var n,i,o=tn(r);for(let t=0;t<o.length;t++){var s=(n=o[t],i=e,Br(n)?function(t,e){if(e in t)return t[e];const r=e.split(".");let n=t;for(let t=0;t<r.length;t++)if("object"==typeof n){if(0<t){const e=r.slice(t,r.length).join(".");if(e in n){n=n[e];break}}n=n[r[t]]}else n=void 0;return n}(function(t){return jr[t]||null}(n),i):null);if(s)return n=e,i=r,(s=s)&&(i in Mr||(Mr[i]={}),n in Mr[i]||(Mr[i][n]=s),s)}}};let jr;const Fr=ie({});function Br(t){return t in jr}function zr(e,...r){delete Mr[e],Fr.update(t=>(t[e]=fe.all([t[e]||{},...r]),t))}oe([Fr],([t])=>Object.keys(t)),Fr.subscribe(t=>jr=t);const Gr={};function Hr(t){return Gr[t]}function Vr(t){return tn(t).some(t=>{return null===(t=Hr(t))||void 0===t?void 0:t.size})}const Xr={};function Yr(t){if(!Vr(t))return t in Xr?Xr[t]:void 0;const e=tn(t).map(t=>{var e=Hr(t);return[t,e?[...e]:[]]}).filter(([,t])=>0<t.length);return Xr[t]=Promise.all(e.map(([t,r])=>function(e){return Promise.all(r.map(t=>(function(t,e){Gr[t].delete(e),0===Gr[t].size&&delete Gr[t]}(e,t),t().then(t=>t.default||t)))).then(t=>zr(e,...t))}(t))).then(()=>Vr(t)?Yr(t):void delete Xr[t]),Xr[t]}function Wr(t,e){var r={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}const qr={fallbackLocale:null,initialLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,ignoreTag:!0};const Kr=ie(!1);let Zr;const Jr=ie(null);function Qr(t){return t.split("-").map((t,e,r)=>r.slice(0,e+1).join("-")).reverse()}function tn(t,e=qr.fallbackLocale){t=Qr(t);return e?[...new Set([...t,...Qr(e)])]:t}Jr.subscribe(t=>{Zr=t,"undefined"!=typeof window&&null!==t&&document.documentElement.setAttribute("lang",t)});const en=Jr.set;Jr.set=e=>{if(function(t){if(null!=t){var e=tn(t);for(let t=0;t<e.length;t++){var r=e[t];if(Br(r))return r}}}(e)&&Vr(e)){var{loadingDelay:r}=qr;let t;return"undefined"!=typeof window&&null!=Zr&&r?t=window.setTimeout(()=>Kr.set(!0),r):Kr.set(!0),Yr(e).then(()=>{en(e)}).finally(()=>{clearTimeout(t),Kr.set(!1)})}return en(e)},Jr.update=t=>en(t(Zr));const rn=r=>{const n=Object.create(null);return t=>{var e=JSON.stringify(t);return e in n?n[e]:n[e]=r(t)}},nn=(t,e)=>{var{formats:r}=qr;if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},on=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(t=nn("number",r)),new Intl.NumberFormat(e,t)}),sn=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?t=nn("date",r):0===Object.keys(t).length&&(t=nn("date","short")),new Intl.DateTimeFormat(e,t)}),an=rn(t=>{var{locale:e,format:r}=t,t=Wr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?t=nn("time",r):0===Object.keys(t).length&&(t=nn("time","short")),new Intl.DateTimeFormat(e,t)}),ln=rn((t,e=Zr)=>new Nr(t,e,qr.formats,{ignoreTag:qr.ignoreTag})),un=oe([Jr,Fr],()=>(t,e={})=>{"object"==typeof t&&(t=(e=t).id);var{values:r,locale:n=Zr,default:i}=e;if(null==n)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let o=Ur(t,n);if(o){if("string"!=typeof o)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof o}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),o}else qr.warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${t}" was not found in "${tn(n).join('", "')}".${Vr(Zr)?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),o=i||t;if(!r)return o;let s=o;try{s=ln(o,n).format(r)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return s});oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return an(Object.assign({locale:e},t))})(e).format(t)),oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return sn(Object.assign({locale:e},t))})(e).format(t)),oe([Jr],()=>(t,e)=>((t={})=>{var{locale:e=Zr}=t,t=Wr(t,["locale"]);return on(Object.assign({locale:e},t))})(e).format(t)),oe([Jr,Fr],()=>(t,e=Zr)=>Ur(t,e)),window.emWidgets={topic:(t,e=0)=>{return-1==ee.indexOf(t)&&(e=new Zt(e),re[t]=e,ee.push(t)),re[t]}};const cn=t=>t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC",hn={en:{tournamentsThController:{login:"Log in",register:"Register",details:"Details",enrolled:"Enrolled",join:"Join",joinerror:"There was an error joining the tournament - "}},tr:{tournamentsThController:{login:"Giriş",register:"Kayıt Ol",details:"Detaylar",enrolled:"Katıldın",join:"Katıl",joinerror:"Turnuvaya katılım ile ilgili bir hata oluştu - "}},el:{tournamentsThController:{login:"Είσοδος",register:"Εγγραφή",details:"Λεπτομέρειες",enrolled:"Εγγεγραμμένος",join:"Συμμετοχή",joinerror:"Παρουσιάστηκε σφάλμα κατά την διαδικασία εγγραφής στο τουρνουά - "}}},pn={en:{tournamentsThumbnail:{enrolled:"Enrolled",scoreCriteria:"Score Criteria",minbet:"min bet counts: ",seegames:"You can see the games",here:"here",scheduled:"Scheduled",ongoing:"OnGoing",finished:"Finished",startingAt:"Starting at",mostRounds:"MostRounds"}},tr:{tournamentsThumbnail:{enrolled:"Katıldın",scoreCriteria:"Skor kriteri",minbet:"en düşük bahis sayısı",seegames:"Turnuvadaki oyunları görmek için",here:"tıklayın",scheduled:"Planlanmış",ongoing:"Devam Eden",finished:"Sona Ermiş",startingAt:"BAŞLAMA SAATİ:",mostRounds:"MostRounds"}},el:{tournamentsThumbnail:{enrolled:"Εγγεγραμμένος",scoreCriteria:"Κριτήρια Σκορ",minbet:"Ελάχιστος αριθμός πονταρισμάτων: ",seegames:"Μπορείε να δεις τα παιχνίδια",here:"εδώ",all:"OΛΑ",scheduled:"ΠΡΟΓΡΑΜΜΑΤΙΣΜΕΝΑ",ongoing:"ΤΡΕΧΟΝΤΑ",finished:"ΟΛΟΚΛΗΡΩΜΕΝΑ",startingAt:"ΑΡΧΙΖΕΙ",mostRounds:"MostRounds"}}};function dn(r){let n,i,o,s;return{c(){n=A("div"),i=P(r[12]),L(n,"class","Status")},m(t,e){_(t,n,e),T(n,i),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4096&e&&$(i,t[12])},d(t){t&&x(n),o=!1,s()}}}function fn(t){let r,n=t[5]&&mn(t);return{c(){n&&n.c(),r=l()},m(t,e){n&&n.m(t,e),_(t,r,e)},p(t,e){t[5]?n?n.p(t,e):(n=mn(t),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&x(r)}}}function mn(t){let r,n,i=t[13]("tournamentsThumbnail.enrolled")+"";return{c(){r=A("div"),n=P(i),L(r,"class","Enrolled")},m(t,e){_(t,r,e),T(r,n)},p(t,e){8192&e&&i!==(i=t[13]("tournamentsThumbnail.enrolled")+"")&&$(n,i)},d(t){t&&x(r)}}}function gn(r){let n,i,o,s;return{c(){n=A("div"),L(n,"class",i="CardImg "+("Closing"==r[2]||"Closed"==r[2]?"CardImgFinished":"")),E(n,"background","url('https://i.stack.imgur.com/y9DpT.jpg') center no-repeat")},m(t,e){_(t,n,e),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4&e&&i!==(i="CardImg "+("Closing"==t[2]||"Closed"==t[2]?"CardImgFinished":""))&&L(n,"class",i)},d(t){t&&x(n),o=!1,s()}}}function yn(r){let n,i,o,s;return{c(){n=A("div"),L(n,"class",i="CardImg "+("Closing"==r[2]||"Closed"==r[2]?"CardImgFinished":"")),E(n,"background","url('"+r[4]+"')")},m(t,e){_(t,n,e),o||(s=g(r[15].call(null,n)),o=!0)},p(t,e){4&e&&i!==(i="CardImg "+("Closing"==t[2]||"Closed"==t[2]?"CardImgFinished":""))&&L(n,"class",i),16&e&&E(n,"background","url('"+t[4]+"')")},d(t){t&&x(n),o=!1,s()}}}function bn(r){let n,i,o,s,a;return{c(){n=A("div"),i=P(r[10]),L(n,"class","Date")},m(t,e){_(t,n,e),T(n,i),s||(a=g(o=r[14].call(null,n,r[1])),s=!0)},p(t,e){1024&e&&$(i,t[10]),o&&d(o.update)&&2&e&&o.update.call(null,t[1])},d(t){t&&x(n),s=!1,a()}}}function vn(r){let n,i,o,s,a,l,u,c,h,p,d,f,m,g=r[13]("tournamentsThumbnail.scoreCriteria")+"",y=r[13]("tournamentsThumbnail.seegames")+"",b=r[13]("tournamentsThumbnail.here")+"";function v(t){return"BetCount"==t[6]?wn:En}let E=v(r),w=E(r);return{c(){n=A("div"),i=A("p"),o=P(g),s=P(":\n "),w.c(),a=S(),l=A("div"),u=A("p"),c=P(y),h=S(),p=A("a"),d=P(b),L(n,"class","ScoreCriteria"),L(p,"href",r[9]),L(p,"target","_blank"),L(l,"class","Games")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(i,s),w.m(i,null),_(t,a,e),_(t,l,e),T(l,u),T(u,c),T(u,h),T(u,p),T(p,d),f||(m=C(p,"click",r[20]),f=!0)},p(t,e){8192&e&&g!==(g=t[13]("tournamentsThumbnail.scoreCriteria")+"")&&$(o,g),E===(E=v(t))&&w?w.p(t,e):(w.d(1),w=E(t),w&&(w.c(),w.m(i,null))),8192&e&&y!==(y=t[13]("tournamentsThumbnail.seegames")+"")&&$(c,y),8192&e&&b!==(b=t[13]("tournamentsThumbnail.here")+"")&&$(d,b),512&e&&L(p,"href",t[9])},d(t){t&&x(n),w.d(),t&&x(a),t&&x(l),f=!1,m()}}}function En(t){let r;return{c(){r=P(t[6])},m(t,e){_(t,r,e)},p(t,e){64&e&&$(r,t[6])},d(t){t&&x(r)}}}function wn(t){let r,n,i,o,s,a,l=t[13]("tournamentsThumbnail.mostRounds")+"",u=t[13]("tournamentsThumbnail.minbet")+"";return{c(){r=P(l),n=P("\n ("),i=P(u),o=P(": "),s=P(t[7]),a=P(")")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),_(t,o,e),_(t,s,e),_(t,a,e)},p(t,e){8192&e&&l!==(l=t[13]("tournamentsThumbnail.mostRounds")+"")&&$(r,l),8192&e&&u!==(u=t[13]("tournamentsThumbnail.minbet")+"")&&$(i,u),128&e&&$(s,t[7])},d(t){t&&x(r),t&&x(n),t&&x(i),t&&x(o),t&&x(s),t&&x(a)}}}function Tn(t){let r,n,i,o,s,a,l,u,c,h=t[2]&&dn(t),p="true"==t[8]&&fn(t);function d(t){return t[4]?yn:gn}let f=d(t),m=f(t),g=t[1]&&bn(t),y=t[11]&&vn(t);return{c(){r=A("div"),h&&h.c(),n=S(),p&&p.c(),i=S(),m.c(),o=S(),s=A("div"),a=A("div"),l=P(t[0]),u=S(),g&&g.c(),c=S(),y&&y.c(),this.c=b,L(a,"class","Title"),L(s,"class","Details"),L(r,"class","Thumbnail")},m(t,e){_(t,r,e),h&&h.m(r,null),T(r,n),p&&p.m(r,null),T(r,i),m.m(r,null),T(r,o),T(r,s),T(s,a),T(a,l),T(s,u),g&&g.m(s,null),T(s,c),y&&y.m(s,null)},p(t,[e]){t[2]?h?h.p(t,e):(h=dn(t),h.c(),h.m(r,n)):h&&(h.d(1),h=null),"true"==t[8]?p?p.p(t,e):(p=fn(t),p.c(),p.m(r,i)):p&&(p.d(1),p=null),f===(f=d(t))&&m?m.p(t,e):(m.d(1),m=f(t),m&&(m.c(),m.m(r,o))),1&e&&$(l,t[0]),t[1]?g?g.p(t,e):(g=bn(t),g.c(),g.m(s,c)):g&&(g.d(1),g=null),t[11]?y?y.p(t,e):(y=vn(t),y.c(),y.m(s,null)):y&&(y.d(1),y=null)},i:b,o:b,d(t){t&&x(r),h&&h.d(),p&&p.d(),m.d(),g&&g.d(),y&&y.d()}}}function _n(t,e,i){let o;V(t,un,t=>i(13,o=t));let{session:r=""}=e,{userid:n=""}=e,{title:s=""}=e,{startdate:a=""}=e,{status:l=""}=e,{tourid:u=""}=e,{thumbnail:c=""}=e,{userenrolled:h=""}=e,{scorecriteria:p=""}=e,{minbetcount:d=""}=e,{showenrolled:f="false"}=e,{gameurl:m=""}=e,{lang:g="en"}=e,y,b=!1,v="";Object.keys(pn).forEach(t=>{zr(t,pn[t])});const E=t=>{t.data&&"SessionID"==t.data.type&&i(11,b=!0)},w=(t,e)=>{window.postMessage({type:"tournamentGamesClicked",tourId:e},window.location.href)};return X(()=>(window.addEventListener("message",E,!1),()=>{window.removeEventListener("message",E)})),t.$$set=t=>{"session"in t&&i(17,r=t.session),"userid"in t&&i(18,n=t.userid),"title"in t&&i(0,s=t.title),"startdate"in t&&i(1,a=t.startdate),"status"in t&&i(2,l=t.status),"tourid"in t&&i(3,u=t.tourid),"thumbnail"in t&&i(4,c=t.thumbnail),"userenrolled"in t&&i(5,h=t.userenrolled),"scorecriteria"in t&&i(6,p=t.scorecriteria),"minbetcount"in t&&i(7,d=t.minbetcount),"showenrolled"in t&&i(8,f=t.showenrolled),"gameurl"in t&&i(9,m=t.gameurl),"lang"in t&&i(19,g=t.lang)},t.$$.update=()=>{131072&t.$$.dirty&&r&&(0<r.length&&"false"!=r?i(11,b=!0):i(11,b=!1))},[s,a,l,u,c,h,p,d,f,m,"",b,v,o,()=>{let t=new Date(a),e=new Intl.DateTimeFormat(g,{month:"long"}).format(t),r=t.getDate(),n=t.toLocaleString(g,{hour:"numeric",minute:"numeric",hour12:!1});i(10,y=`${r} ${e}, `+o("tournamentsThumbnail.startingAt")+` ${n}`)},()=>{"Unstarted"==l&&i(12,v=o("tournamentsThumbnail.scheduled")),"Running"==l&&i(12,v=o("tournamentsThumbnail.ongoing")),"Closed"!=l&&"Closing"!=l||i(12,v=o("tournamentsThumbnail.finished"))},w,r,n,g,()=>w()]}customElements.get("casino-tournaments-thumbnail")||customElements.define("casino-tournaments-thumbnail",class extends c{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}a{color:#48952a;text-decoration:underline;cursor:pointer}.Thumbnail{position:relative}.Thumbnail .CardImg{height:300px;width:100%;background:url(\"https://breakthrough.org/wp-content/uploads/2018/10/default-placeholder-image.png\");background-repeat:no-repeat;background-position:center;background-size:auto}.Thumbnail .CardImg.CardImgFinished{filter:grayscale(1)}.Thumbnail .Status{background:#000000;display:flex;justify-content:center;align-items:center;position:absolute;top:20px;right:20px;min-height:30px;padding:0 10px;font-size:12px;text-transform:uppercase;z-index:1}.Thumbnail .Enrolled{background:#2B2B5D;color:#aaaabe;display:flex;justify-content:center;align-items:center;position:absolute;top:20px;left:20px;min-height:30px;padding:0 10px;font-size:12px;text-transform:uppercase;z-index:1}.Thumbnail .Details{padding:10px 20px 0}.Thumbnail .Details .Title{font-size:18px;padding-bottom:10px}.Thumbnail .Details .Date{text-transform:uppercase;font-size:12px;padding-bottom:4px}.Thumbnail .Details .ScoreCriteria{font-size:12px;padding-bottom:4px}.Thumbnail .Details .Games{font-size:12px}</style>",u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},_n,Tn,r,{session:17,userid:18,title:0,startdate:1,status:2,tourid:3,thumbnail:4,userenrolled:5,scorecriteria:6,minbetcount:7,showenrolled:8,gameurl:9,lang:19}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["session","userid","title","startdate","status","tourid","thumbnail","userenrolled","scorecriteria","minbetcount","showenrolled","gameurl","lang"]}get session(){return this.$$.ctx[17]}set session(t){this.$set({session:t}),M()}get userid(){return this.$$.ctx[18]}set userid(t){this.$set({userid:t}),M()}get title(){return this.$$.ctx[0]}set title(t){this.$set({title:t}),M()}get startdate(){return this.$$.ctx[1]}set startdate(t){this.$set({startdate:t}),M()}get status(){return this.$$.ctx[2]}set status(t){this.$set({status:t}),M()}get tourid(){return this.$$.ctx[3]}set tourid(t){this.$set({tourid:t}),M()}get thumbnail(){return this.$$.ctx[4]}set thumbnail(t){this.$set({thumbnail:t}),M()}get userenrolled(){return this.$$.ctx[5]}set userenrolled(t){this.$set({userenrolled:t}),M()}get scorecriteria(){return this.$$.ctx[6]}set scorecriteria(t){this.$set({scorecriteria:t}),M()}get minbetcount(){return this.$$.ctx[7]}set minbetcount(t){this.$set({minbetcount:t}),M()}get showenrolled(){return this.$$.ctx[8]}set showenrolled(t){this.$set({showenrolled:t}),M()}get gameurl(){return this.$$.ctx[9]}set gameurl(t){this.$set({gameurl:t}),M()}get lang(){return this.$$.ctx[19]}set lang(t){this.$set({lang:t}),M()}});const xn={en:{tournamentsDuration:{finished:"Finished",starting:"Starting in ",days:"days",minutesleft:"minutes left",hoursleft:"hours left",daysleft:"days left"}},tr:{tournamentsDuration:{finished:"Sona ermiş",starting:"Başlamasına ",days:"gün",minutesleft:"dakika kaldı",hoursleft:"saat kaldı",daysleft:"gün kaldı"}},el:{tournamentsDuration:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",days:"ημέρες",minutesleft:"λεπτά απομένουν",hoursleft:"ώρες απομένουν",daysleft:"ημέρες απομένουν"}}};function An(r){let n,i,o,s,a,l,u,c,h,p;function d(t){return"Finished"==t[2]||"Closing"==t[2]||"Closed"==t[2]?Cn:0<t[6]?Sn:Pn}let f=d(r),m=f(r);return{c(){n=A("div"),i=A("div"),o=P(r[3]),s=S(),a=A("div"),l=P(r[4]),u=S(),c=A("div"),m.c(),L(i,"class","StartDate"),L(a,"class","EndDate"),L(n,"class","TournamentDates"),L(c,"class","ProgressBar")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(n,s),T(n,a),T(a,l),_(t,u,e),_(t,c,e),m.m(c,null),h||(p=[g(r[12].call(null,i)),g(r[13].call(null,a)),g(r[14].call(null,c))],h=!0)},p(t,e){8&e&&$(o,t[3]),16&e&&$(l,t[4]),f===(f=d(t))&&m?m.p(t,e):(m.d(1),m=f(t),m&&(m.c(),m.m(c,null)))},d(t){t&&x(n),t&&x(u),t&&x(c),m.d(),h=!1,y(p)}}}function Pn(t){let r,n,i,o=0<t[5]&&Ln(t);return{c(){r=A("div"),n=S(),o&&o.c(),i=l(),L(r,"class","ProgressBarFill"),E(r,"width",t[7]+"%")},m(t,e){_(t,r,e),_(t,n,e),o&&o.m(t,e),_(t,i,e)},p(t,e){128&e&&E(r,"width",t[7]+"%"),0<t[5]?o?o.p(t,e):(o=Ln(t),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d(t){t&&x(r),t&&x(n),o&&o.d(t),t&&x(i)}}}function Sn(t){let r,n,i,o,s,a,l,u,c=t[11]("tournamentsDuration.starting")+"",h=t[11]("tournamentsDuration.days")+"";return{c(){r=A("div"),n=S(),i=A("div"),o=P(c),s=S(),a=P(t[6]),l=S(),u=P(h),L(r,"class","ProgressBarFillStarting"),L(i,"class","Remaining")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),T(i,o),T(i,s),T(i,a),T(i,l),T(i,u)},p(t,e){2048&e&&c!==(c=t[11]("tournamentsDuration.starting")+"")&&$(o,c),64&e&&$(a,t[6]),2048&e&&h!==(h=t[11]("tournamentsDuration.days")+"")&&$(u,h)},d(t){t&&x(r),t&&x(n),t&&x(i)}}}function Cn(t){let r,n,i,o,s=t[11]("tournamentsDuration.finished")+"";return{c(){r=A("div"),n=S(),i=A("div"),o=P(s),L(r,"class","ProgressBarFillEnd"),L(i,"class","Finished")},m(t,e){_(t,r,e),_(t,n,e),_(t,i,e),T(i,o)},p(t,e){2048&e&&s!==(s=t[11]("tournamentsDuration.finished")+"")&&$(o,s)},d(t){t&&x(r),t&&x(n),t&&x(i)}}}function Ln(t){let r,n,i,o=t[8]&&$n(t),s=t[9]&&On(t),a=t[10]&&In(t);return{c(){o&&o.c(),r=S(),s&&s.c(),n=S(),a&&a.c(),i=l()},m(t,e){o&&o.m(t,e),_(t,r,e),s&&s.m(t,e),_(t,n,e),a&&a.m(t,e),_(t,i,e)},p(t,e){t[8]?o?o.p(t,e):(o=$n(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null),t[9]?s?s.p(t,e):(s=On(t),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null),t[10]?a?a.p(t,e):(a=In(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},d(t){o&&o.d(t),t&&x(r),s&&s.d(t),t&&x(n),a&&a.d(t),t&&x(i)}}}function $n(t){let r,n,i,o,s=t[11]("tournamentsDuration.minutesleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.minutesleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function On(t){let r,n,i,o,s=t[11]("tournamentsDuration.hoursleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.hoursleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function In(t){let r,n,i,o,s=t[11]("tournamentsDuration.daysleft")+"";return{c(){r=A("div"),n=P(t[5]),i=S(),o=P(s),L(r,"class","Remaining")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){32&e&&$(n,t[5]),2048&e&&s!==(s=t[11]("tournamentsDuration.daysleft")+"")&&$(o,s)},d(t){t&&x(r)}}}function Rn(t){let r,n=t[0]&&t[1]&&An(t);return{c(){r=A("div"),n&&n.c(),this.c=b,L(r,"class","TournamentDuration")},m(t,e){_(t,r,e),n&&n.m(r,null)},p(t,[e]){t[0]&&t[1]?n?n.p(t,e):(n=An(t),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:b,o:b,d(t){t&&x(r),n&&n.d()}}}function kn(t,e,n){let r;V(t,un,t=>n(11,r=t));let{startdate:i=""}=e,{enddate:o=""}=e,{status:s=""}=e,{lang:a="en"}=e,l,u,c,h,p,d,f,m=!1,g=!1,y=!1;Object.keys(xn).forEach(t=>{zr(t,xn[t])});const b=t=>{let e=new Date(t),r=new Intl.DateTimeFormat(a,{month:"long"}).format(e);return`${e.getDate()} ${r}, ${e.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${e.getUTCFullYear()}`},v=(t,e,r)=>{t=new Date(t),t=(new Date(e)-t)/6e4;return 1==r?t<60?(n(8,m=!0),Math.ceil(t)):t<1440?(n(9,g=!0),Math.ceil(t/60)):(n(10,y=!0),Math.ceil(t/1440)):Math.ceil(t/1440)};return t.$$set=t=>{"startdate"in t&&n(0,i=t.startdate),"enddate"in t&&n(1,o=t.enddate),"status"in t&&n(2,s=t.status),"lang"in t&&n(15,a=t.lang)},[i,o,s,"","","","","",m,g,y,r,()=>{n(3,l=b(new Date(i)))},()=>{n(4,u=b(new Date(o)))},()=>{c=v(i,o,!1),n(5,h=v(new Date,o,!0)),n(6,p=v(new Date,i,!1)),0<h&&(d=100/c,n(7,f=Math.floor((c-h)*d)))},a]}customElements.get("casino-tournaments-thumbnail-duration")||customElements.define("casino-tournaments-thumbnail-duration",class extends c{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}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:#58586B}.EndDate{font-size:11px;align-content:flex-end;color:#58586B}.ProgressBar{margin:5px 20px;height:8px;background:#fff}.ProgressBarFill{background-color:#48952a;height:8px}.ProgressBarFillEnd{background-color:#48952a;height:8px}.ProgressBarFillStarting{background-color:#58586B;height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:#1B9800}</style>",u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},kn,Rn,r,{startdate:0,enddate:1,status:2,lang:15}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["startdate","enddate","status","lang"]}get startdate(){return this.$$.ctx[0]}set startdate(t){this.$set({startdate:t}),M()}get enddate(){return this.$$.ctx[1]}set enddate(t){this.$set({enddate:t}),M()}get status(){return this.$$.ctx[2]}set status(t){this.$set({status:t}),M()}get lang(){return this.$$.ctx[15]}set lang(t){this.$set({lang:t}),M()}});const Nn={en:{tournamentsPrizes:{prizes:"Prizes",noprizes:"No available prizes"}},tr:{tournamentsPrizes:{prizes:"Ödüller",noprizes:"Geçerli ödül yok"}},el:{tournamentsPrizes:{prizes:"Έπαθλα",noprizes:"Μη διαθέσιμα έπαθλα"}}};function Dn(t,e,r){const n=t.slice();return n[4]=e[r],n[6]=r,n}function Mn(t,e,r){const n=t.slice();return n[7]=e[r],n[9]=r,n}function Un(e){let n,i=e[0],o=[];for(let t=0;t<i.length;t+=1)o[t]=Bn(Dn(e,i,t));let s=null;return i.length||(s=jn(e)),{c(){n=A("div");for(let t=0;t<o.length;t+=1)o[t].c();s&&s.c(),L(n,"class","Prizes")},m(t,e){_(t,n,e);for(let t=0;t<o.length;t+=1)o[t].m(n,null);s&&s.m(n,null)},p(e,r){if(3&r){let t;for(i=e[0],t=0;t<i.length;t+=1){const s=Dn(e,i,t);o[t]?o[t].p(s,r):(o[t]=Bn(s),o[t].c(),o[t].m(n,null))}for(;t<o.length;t+=1)o[t].d(1);o.length=i.length,!i.length&&s?s.p(e,r):i.length?s&&(s.d(1),s=null):(s=jn(e),s.c(),s.m(n,null))}},d(t){t&&x(n),m(o,t),s&&s.d()}}}function jn(t){let r,n,i=t[1]("tournamentsPrizes.noprizes")+"";return{c(){r=A("p"),n=P(i)},m(t,e){_(t,r,e),T(r,n)},p(t,e){2&e&&i!==(i=t[1]("tournamentsPrizes.noprizes")+"")&&$(n,i)},d(t){t&&x(r)}}}function Fn(t){let r,n,i,o,s,a,l,u=t[4].rank+t[9]+"",c=t[4].name+"";return{c(){r=A("div"),n=A("p"),i=A("span"),o=P(u),s=S(),a=P(c),l=S(),L(r,"class","Prize Prize"+t[6])},m(t,e){_(t,r,e),T(r,n),T(n,i),T(i,o),T(n,s),T(n,a),T(r,l)},p(t,e){1&e&&u!==(u=t[4].rank+t[9]+"")&&$(o,u),1&e&&c!==(c=t[4].name+"")&&$(a,c)},d(t){t&&x(r)}}}function Bn(e){let i,o={length:e[4].count},s=[];for(let t=0;t<o.length;t+=1)s[t]=Fn(Mn(e,o,t));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();i=l()},m(e,r){for(let t=0;t<s.length;t+=1)s[t].m(e,r);_(e,i,r)},p(e,r){if(1&r){let t;for(o={length:e[4].count},t=0;t<o.length;t+=1){var n=Mn(e,o,t);s[t]?s[t].p(n,r):(s[t]=Fn(n),s[t].c(),s[t].m(i.parentNode,i))}for(;t<s.length;t+=1)s[t].d(1);s.length=o.length}},d(t){m(s,t),t&&x(i)}}}function zn(t){let r,n,i,o,s,a,l,u,c,h,p=t[1]("tournamentsPrizes.prizes")+"",d=t[0]&&Un(t);return{c(){r=A("div"),n=e("svg"),i=e("defs"),o=e("style"),s=P(".a{fill:#fff;}"),a=e("path"),l=S(),u=A("p"),c=P(p),h=S(),d&&d.c(),this.c=b,L(a,"class","a"),L(a,"d","M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z"),L(a,"transform","translate(-5.999 -9.76)"),L(n,"xmlns","http://www.w3.org/2000/svg"),L(n,"width","30"),L(n,"height","27.454"),L(n,"viewBox","0 0 30 27.454"),L(u,"class","PrizesTitle"),L(r,"class","TournamentPrizes")},m(t,e){_(t,r,e),T(r,n),T(n,i),T(i,o),T(o,s),T(n,a),T(r,l),T(r,u),T(u,c),T(r,h),d&&d.m(r,null)},p(t,[e]){2&e&&p!==(p=t[1]("tournamentsPrizes.prizes")+"")&&$(c,p),t[0]?d?d.p(t,e):(d=Un(t),d.c(),d.m(r,null)):d&&(d.d(1),d=null)},i:b,o:b,d(t){t&&x(r),d&&d.d()}}}function Gn(t,e,r){let n;V(t,un,t=>r(1,n=t));let i,{tourid:o=""}=e;Object.keys(Nn).forEach(t=>{zr(t,Nn[t])});const s=t=>{t.data&&t.data.type==`TournamentPrizes_${o}`&&r(0,i=t.data.prizes)};return X(()=>(window.addEventListener("message",s,!1),()=>{window.removeEventListener("message",s)})),t.$$set=t=>{"tourid"in t&&r(2,o=t.tourid)},[i,n,o]}function Hn(t,e,r){const n=t.slice();return n[37]=e[r],n[39]=r,n}function Vn(r){let i,n,o,s,a,l,u,c,h=r[0],p=[];for(let t=0;t<h.length;t+=1)p[t]=Xn(Hn(r,h,t));return{c(){i=A("div"),i.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>',n=S(),o=A("main"),s=A("div");for(let t=0;t<p.length;t+=1)p[t].c();a=S(),l=A("div"),l.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>',L(i,"class","SliderNavButton"),t(i,"disabled",r[6]),L(s,"class","items"),E(s,"transform","translateX("+r[1]+"px)"),L(l,"class","SliderNavButton"),t(l,"disabled",r[7])},m(t,e){_(t,i,e),_(t,n,e),_(t,o,e),T(o,s);for(let t=0;t<p.length;t+=1)p[t].m(s,null);r[21](s),_(t,a,e),_(t,l,e),u||(c=[C(i,"click",r[17]),C(l,"click",r[22])],u=!0)},p(e,r){if(64&r[0]&&t(i,"disabled",e[6]),2841&r[0]){let t;for(h=e[0],t=0;t<h.length;t+=1){var n=Hn(e,h,t);p[t]?p[t].p(n,r):(p[t]=Xn(n),p[t].c(),p[t].m(s,null))}for(;t<p.length;t+=1)p[t].d(1);p.length=h.length}2&r[0]&&E(s,"transform","translateX("+e[1]+"px)"),128&r[0]&&t(l,"disabled",e[7])},d(t){t&&x(i),t&&x(n),t&&x(o),m(p,t),r[21](null),t&&x(a),t&&x(l),u=!1,y(c)}}}function Xn(r){let n,i,o,s,a,l,u,c,h,p,d,f;function m(){return r[18](r[37])}function g(){return r[19](r[39])}return{c(){n=A("div"),i=A("span"),o=P("Play now"),a=S(),l=A("img"),p=S(),L(i,"class",s="PlayNowButton "+(r[3]&&r[4]==r[39]?"itemHover":"")),l.src!==(u=r[37].thumbnail)&&L(l,"src",u),L(l,"width","132px"),L(l,"height","100px"),L(l,"alt",c=r[37].name),L(l,"title",h=r[37].name),L(n,"class","item")},m(t,e){_(t,n,e),T(n,i),T(i,o),T(n,a),T(n,l),T(n,p),d||(f=[C(n,"click",m),C(n,"mouseenter",g),C(n,"mouseleave",r[20])],d=!0)},p(t,e){r=t,24&e[0]&&s!==(s="PlayNowButton "+(r[3]&&r[4]==r[39]?"itemHover":""))&&L(i,"class",s),1&e[0]&&l.src!==(u=r[37].thumbnail)&&L(l,"src",u),1&e[0]&&c!==(c=r[37].name)&&L(l,"alt",c),1&e[0]&&h!==(h=r[37].name)&&L(l,"title",h)},d(t){t&&x(n),d=!1,y(f)}}}function Yn(r){let n,i=r[0]&&Vn(r);return{c(){n=A("div"),i&&i.c(),this.c=b,L(n,"class","TournamentsGamesSlider")},m(t,e){_(t,n,e),i&&i.m(n,null),r[23](n)},p(t,e){t[0]?i?i.p(t,e):(i=Vn(t),i.c(),i.m(n,null)):i&&(i.d(1),i=null)},i:b,o:b,d(t){t&&x(n),i&&i.d(),r[23](null)}}}function Wn(t,e,r){let n,i,o,s,a,l,{tournamenturl:u=""}=e,{scrollby:c="3"}=e,{pagfactor:h="175"}=e,{lang:p=""}=e,d=window.navigator.userAgent,f=[],m=0,g=null,y=null,b=!1,v=0;const E=t=>{r(3,b=!0),r(4,a=t)},w=()=>{r(3,b=!1),r(4,a=-1)},T=t=>{t=(t.touches||t.originalEvent.touches)[0];g=t.clientX,y=t.clientY},_=t=>{var e;g&&y&&(e=t.touches[0].clientX,t=t.touches[0].clientY,e=g-e,t=y-t,Math.abs(e)>Math.abs(t)&&x(0<e?1:-1),g=null,y=null)},x=t=>{0<t&&!i?(r(1,m-=o),r(1,m=m<v?v:m)):t<0&&!n&&(r(1,m+=o),r(1,m=0<m?0:m))},A=t=>{window.postMessage({type:"TournamentGameAction",gameId:t.id,name:t.name},window.location.href)};return X(()=>(o=parseInt(c,10)*parseInt(h,10),()=>{s.removeEventListener("touchstart",T),s.removeEventListener("touchmove",_)})),t.$$set=t=>{"tournamenturl"in t&&r(13,u=t.tournamenturl),"scrollby"in t&&r(14,c=t.scrollby),"pagfactor"in t&&r(12,h=t.pagfactor),"lang"in t&&r(15,p=t.lang)},t.$$.update=()=>{2&t.$$.dirty[0]&&r(6,n=0===m),65538&t.$$.dirty[0]&&r(7,i=m<=v),8192&t.$$.dirty[0]&&u&&(()=>{let t=new URL(u),e=new Headers;t.searchParams.append("expand","games"),t.searchParams.append("pagination",`games(limit=30,offset=${m})`),t.searchParams.append("fields","games(id,name,thumbnail)"),t.searchParams.append("language",p),t.searchParams.append("platform",cn(d)),fetch(t,{method:"GET",headers:e}).then(t=>t.json()).then(t=>{r(0,f=t.item.games.items),t.item.games.total})})(),4&t.$$.dirty[0]&&s&&(s.addEventListener("touchstart",T,{passive:!0}),s.addEventListener("touchmove",_,{passive:!0})),1&t.$$.dirty[0]&&f.length&&setTimeout(()=>{r(16,v=-1*(l.scrollWidth-l.clientWidth)),r(12,h=new String(l.scrollWidth/f.length)),o=parseInt(c,10)*parseFloat(h,2).toFixed(2)},1e3)},r(1,m=0),[f,m,s,b,a,l,n,i,E,w,x,A,h,u,c,p,v,()=>x(-1),t=>A(t),t=>E(t),()=>w(),function(t){R[t?"unshift":"push"](()=>{l=t,r(5,l)})},()=>x(1),function(t){R[t?"unshift":"push"](()=>{s=t,r(2,s)})}]}function qn(t){let r,n,i,o,s,a,l,u,c=t[9]&&Zn(t);function h(t){return t[9]?"Closed"!=t[17]&&"Closing"!=t[17]?ti:"true"==t[3]?Qn:void 0:ei}let p=h(t),d=p&&p(t),f=t[12]&&li(t),m="true"==t[4]&&ui(t);return{c(){r=A("div"),n=A("casino-tournaments-thumbnail"),i=S(),c&&c.c(),o=S(),s=A("div"),d&&d.c(),a=S(),f&&f.c(),l=S(),m&&m.c(),v(n,"session",t[0]),v(n,"userid",t[1]),v(n,"title",t[14]),v(n,"status",t[17]),v(n,"startdate",t[15]),v(n,"tourid",t[18]),v(n,"scorecriteria",t[21]),v(n,"minbetcount",t[22]),v(n,"thumbnail",t[19]),v(n,"userenrolled",t[20]),v(n,"showenrolled",t[5]),v(n,"gameurl",t[24]),v(n,"lang",t[8]),L(s,"class","TournamentButtons"),L(r,"class",u="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))},m(t,e){_(t,r,e),T(r,n),T(r,i),c&&c.m(r,null),T(r,o),T(r,s),d&&d.m(s,null),T(r,a),f&&f.m(r,null),T(r,l),m&&m.m(r,null)},p(t,e){1&e[0]&&v(n,"session",t[0]),2&e[0]&&v(n,"userid",t[1]),16384&e[0]&&v(n,"title",t[14]),131072&e[0]&&v(n,"status",t[17]),32768&e[0]&&v(n,"startdate",t[15]),262144&e[0]&&v(n,"tourid",t[18]),2097152&e[0]&&v(n,"scorecriteria",t[21]),4194304&e[0]&&v(n,"minbetcount",t[22]),524288&e[0]&&v(n,"thumbnail",t[19]),1048576&e[0]&&v(n,"userenrolled",t[20]),32&e[0]&&v(n,"showenrolled",t[5]),16777216&e[0]&&v(n,"gameurl",t[24]),256&e[0]&&v(n,"lang",t[8]),t[9]?c?c.p(t,e):(c=Zn(t),c.c(),c.m(r,o)):c&&(c.d(1),c=null),p===(p=h(t))&&d?d.p(t,e):(d&&d.d(1),d=p&&p(t),d&&(d.c(),d.m(s,null))),t[12]?f?f.p(t,e):(f=li(t),f.c(),f.m(r,l)):f&&(f.d(1),f=null),"true"==t[4]?m?m.p(t,e):(m=ui(t),m.c(),m.m(r,null)):m&&(m.d(1),m=null),192&e[0]&&u!==(u="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))&&L(r,"class",u)},d(t){t&&x(r),c&&c.d(),d&&d.d(),f&&f.d(),m&&m.d()}}}function Kn(t){let r,n,i;return{c(){r=A("div"),n=A("div"),n.innerHTML='<div class="ph-col-12"><div class="ph-picture"></div> \n <div class="ph-row"><div class="ph-col-6 big"></div> \n <div class="ph-col-4 empty big"></div> \n <div class="ph-col-4"></div> \n <div class="ph-col-8 empty"></div> \n <div class="ph-col-6"></div> \n <div class="ph-col-6 empty"></div> \n <div class="ph-col-12"></div></div></div>',L(n,"class","ph-item"),L(r,"class",i="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))},m(t,e){_(t,r,e),T(r,n)},p(t,e){192&e[0]&&i!==(i="TournamentCard "+(t[6]?"CardMaxWidth":"")+(t[7]?"CardFullSize":""))&&L(r,"class",i)},d(t){t&&x(r)}}}function Zn(t){let r,n,i=t[18]&&Jn(t);return{c(){i&&i.c(),r=S(),n=A("casino-tournaments-thumbnail-duration"),v(n,"status",t[17]),v(n,"startdate",t[15]),v(n,"lang",t[8]),v(n,"enddate",t[16])},m(t,e){i&&i.m(t,e),_(t,r,e),_(t,n,e)},p(t,e){t[18]?i?i.p(t,e):(i=Jn(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null),131072&e[0]&&v(n,"status",t[17]),32768&e[0]&&v(n,"startdate",t[15]),256&e[0]&&v(n,"lang",t[8]),65536&e[0]&&v(n,"enddate",t[16])},d(t){i&&i.d(t),t&&x(r),t&&x(n)}}}function Jn(r){let n,i,o,s;return{c(){n=A("casino-tournaments-thumbnail-prizes"),v(n,"tourid",r[18])},m(t,e){_(t,n,e),o||(s=g(i=r[30].call(null,n,r[18])),o=!0)},p(t,e){262144&e[0]&&v(n,"tourid",t[18]),i&&d(i.update)&&262144&e[0]&&i.update.call(null,t[18])},d(t){t&&x(n),o=!1,s()}}}function Qn(r){let n,i,o,s,a=r[25]("tournamentsThController.details")+"";return{c(){n=A("button"),i=P(a),L(n,"class","DetailsLargeButton")},m(t,e){_(t,n,e),T(n,i),o||(s=C(n,"click",r[41]),o=!0)},p(t,e){33554432&e[0]&&a!==(a=t[25]("tournamentsThController.details")+"")&&$(i,a)},d(t){t&&x(n),o=!1,s()}}}function ti(t){let r,n,i="true"==t[3]&&ri(t);function o(t){return 1==t[20]?ii:ni}let s=o(t),a=s(t);return{c(){i&&i.c(),r=S(),a.c(),n=l()},m(t,e){i&&i.m(t,e),_(t,r,e),a.m(t,e),_(t,n,e)},p(t,e){"true"==t[3]?i?i.p(t,e):(i=ri(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null),s===(s=o(t))&&a?a.p(t,e):(a.d(1),a=s(t),a&&(a.c(),a.m(n.parentNode,n)))},d(t){i&&i.d(t),t&&x(r),a.d(t),t&&x(n)}}}function ei(r){let n,i,o,s,a,l,u,c=r[25]("tournamentsThController.login")+"",h=r[25]("tournamentsThController.register")+"";return{c(){n=A("button"),i=P(c),o=S(),s=A("button"),a=P(h),L(n,"class","LoginButton"),L(s,"class","RegisterButton")},m(t,e){_(t,n,e),T(n,i),_(t,o,e),_(t,s,e),T(s,a),l||(u=[C(n,"click",r[37]),C(s,"click",r[38])],l=!0)},p(t,e){33554432&e[0]&&c!==(c=t[25]("tournamentsThController.login")+"")&&$(i,c),33554432&e[0]&&h!==(h=t[25]("tournamentsThController.register")+"")&&$(a,h)},d(t){t&&x(n),t&&x(o),t&&x(s),l=!1,y(u)}}}function ri(r){let n,i,o,s,a=r[25]("tournamentsThController.details")+"";return{c(){n=A("button"),i=P(a),L(n,"class","DetailsButton")},m(t,e){_(t,n,e),T(n,i),o||(s=C(n,"click",r[39]),o=!0)},p(t,e){33554432&e[0]&&a!==(a=t[25]("tournamentsThController.details")+"")&&$(i,a)},d(t){t&&x(n),o=!1,s()}}}function ni(r){let n,i,o,s;function a(t){return 1==t[11]?si:oi}let l=a(r),u=l(r);return{c(){n=A("button"),u.c(),L(n,"class",i="JoinButton "+(r[7]?"JoinButtonFullSize":"")),n.disabled=r[12]},m(t,e){_(t,n,e),u.m(n,null),o||(s=C(n,"click",r[40]),o=!0)},p(t,e){l===(l=a(t))&&u?u.p(t,e):(u.d(1),u=l(t),u&&(u.c(),u.m(n,null))),128&e[0]&&i!==(i="JoinButton "+(t[7]?"JoinButtonFullSize":""))&&L(n,"class",i),4096&e[0]&&(n.disabled=t[12])},d(t){t&&x(n),u.d(),o=!1,s()}}}function ii(t){let r,n="true"==t[3]&&ai(t);return{c(){n&&n.c(),r=l()},m(t,e){n&&n.m(t,e),_(t,r,e)},p(t,e){"true"==t[3]?n?n.p(t,e):(n=ai(t),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&x(r)}}}function oi(t){let r,n,i,o,s,a,l,u,c,h=t[25]("tournamentsThController.join")+"";return{c(){r=A("span"),n=P(h),i=S(),o=e("svg"),s=e("defs"),a=e("style"),l=P(".a{fill:#fff;}"),u=e("g"),c=e("path"),L(c,"class","a"),L(c,"d","M13,0,10.636,2.364l8.948,8.948H0v3.377H19.584l-8.948,8.948L13,26,26,13Z"),L(c,"transform","translate(26 26) rotate(180)"),L(u,"transform","translate(26 26) rotate(180)"),L(o,"xmlns","http://www.w3.org/2000/svg"),L(o,"width","26"),L(o,"height","26"),L(o,"viewBox","0 0 26 26")},m(t,e){_(t,r,e),T(r,n),_(t,i,e),_(t,o,e),T(o,s),T(s,a),T(a,l),T(o,u),T(u,c)},p(t,e){33554432&e[0]&&h!==(h=t[25]("tournamentsThController.join")+"")&&$(n,h)},d(t){t&&x(r),t&&x(i),t&&x(o)}}}function si(t){let r,n;return{c(){r=e("svg"),n=e("circle"),L(n,"cx","20"),L(n,"cy","20"),L(n,"r","18"),L(r,"class","spinner")},m(t,e){_(t,r,e),T(r,n)},p:b,d(t){t&&x(r)}}}function ai(t){let r,n,i=t[25]("tournamentsThController.enrolled")+"";return{c(){r=A("button"),n=P(i),L(r,"class","EnrolledButton"),r.disabled=!0},m(t,e){_(t,r,e),T(r,n)},p(t,e){33554432&e[0]&&i!==(i=t[25]("tournamentsThController.enrolled")+"")&&$(n,i)},d(t){t&&x(r)}}}function li(t){let r,n,i,o,s=t[25]("tournamentsThController.joinerror")+"";return{c(){r=A("span"),n=P(s),i=S(),o=P(t[13]),L(r,"class","ErrorText")},m(t,e){_(t,r,e),T(r,n),T(r,i),T(r,o)},p(t,e){33554432&e[0]&&s!==(s=t[25]("tournamentsThController.joinerror")+"")&&$(n,s),8192&e[0]&&$(o,t[13])},d(t){t&&x(r)}}}function ui(t){let r;return{c(){r=A("casino-tournaments-thumbnail-games-slider"),v(r,"tournamenturl",t[2]),v(r,"lang",t[8]),v(r,"scrollby","2")},m(t,e){_(t,r,e)},p(t,e){4&e[0]&&v(r,"tournamenturl",t[2]),256&e[0]&&v(r,"lang",t[8])},d(t){t&&x(r)}}}function ci(t){let r;function n(t){return t[10]?Kn:qn}let i=n(t),o=i(t);return{c(){o.c(),r=l(),this.c=b},m(t,e){o.m(t,e),_(t,r,e)},p(t,e){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r.parentNode,r)))},i:b,o:b,d(t){o.d(t),t&&x(r)}}}function hi(t,e,o){let r;V(t,un,t=>o(25,r=t));let n,i,s,a,l,u,c,h,p,{session:d=""}=e,{userid:f=""}=e,{tournamenturl:m=""}=e,{endpoint:g=""}=e,{showdetails:y=""}=e,{showslider:b=""}=e,{showenrolled:v=""}=e,{maxwidth:E=""}=e,{fullsize:w=""}=e,{lang:T=""}=e,{loginevent:_=""}=e,{registerevent:x=""}=e,{loginurl:A=""}=e,{registerurl:P=""}=e,{currency:S=""}=e,C=!1,L="",$=!0,O=window.navigator.userAgent,I=!1,R=!1,k="There was an error while trying to join the tournament",N=[],D=[],M="#";Object.keys(hn).forEach(t=>{zr(t,hn[t])});const U=t=>{t.data&&"UserSessionID"==t.data.type&&(o(9,C=!0),L=t.data.session),"UpdateTournamentView"==t.data.type&&(t=t.data.tournamentData,l&&l!=t.id||G(t))},j=()=>{_&&window.postMessage({type:_},window.location.href),A&&(window.location=A)},F=()=>{x&&window.postMessage({type:x},window.location.href),P&&(window.location=P)},B=t=>{window.postMessage({type:"TournamentDetailsClicked",tournamentId:t,showLeaderboard:"Ongoing"===a},window.location.href)},z=(t,e)=>{window.postMessage({type:"TournamentJoinRequest",tournamentId:t},window.location.href),o(11,I=!0);let r=new URL(`${g}/bonus/claim`),n=new Headers,i={};r.searchParams.append("language",T),n.append("platform",cn(O)),n.append("Content-Type","application/json"),n.append("X-SessionID",L),e&&1<=e.length&&(i={language:T,bonusCode:e[0].code,currency:S});e={method:"PUT",headers:n,body:JSON.stringify(i)};fetch(r,e).then(t=>t.json()).then(t=>{1==t.success?(o(11,I=!1),o(20,c=!0)):(o(11,I=!1),o(13,k=t.errorMessage),o(12,R=!0))},t=>{o(11,I=!1),o(12,R=!0)})},G=t=>{o(14,n=t.nameOrTitle),o(15,i=t.startTime),o(16,s=t.endTime),o(17,a=t.state),o(18,l=t.id),o(19,u=t.thumbnail),o(20,c=t.playerEnrolled||!1),o(21,h=t.scoreCriteria),o(22,p=t.minBetCount),N=t.prizes,o(23,D=t.wallets||[]),o(24,M=t.termsUrl||"#")},H=()=>{o(10,$=!0),(t=>{o(10,$=!0);let e=new URL(t),r=new Headers;e.searchParams.append("language",T),r.append("platform",cn(O)),C&&r.append("X-SessionID",L),fetch(e,{method:"GET",headers:r}).then(t=>t.json()).then(t=>{o(10,$=!1),G(t.item)})})(m)};return X(()=>(o(10,$=!1),window.addEventListener("message",U,!1),()=>{window.removeEventListener("message",U)})),t.$$set=t=>{"session"in t&&o(0,d=t.session),"userid"in t&&o(1,f=t.userid),"tournamenturl"in t&&o(2,m=t.tournamenturl),"endpoint"in t&&o(31,g=t.endpoint),"showdetails"in t&&o(3,y=t.showdetails),"showslider"in t&&o(4,b=t.showslider),"showenrolled"in t&&o(5,v=t.showenrolled),"maxwidth"in t&&o(6,E=t.maxwidth),"fullsize"in t&&o(7,w=t.fullsize),"lang"in t&&o(8,T=t.lang),"loginevent"in t&&o(32,_=t.loginevent),"registerevent"in t&&o(33,x=t.registerevent),"loginurl"in t&&o(34,A=t.loginurl),"registerurl"in t&&o(35,P=t.registerurl),"currency"in t&&o(36,S=t.currency)},t.$$.update=()=>{1&t.$$.dirty[0]&&d&&(0<d.length&&"false"!=d?(L=d,o(9,C=!0)):o(9,C=!1)),260&t.$$.dirty[0]&&m&&T&&H()},[d,f,m,y,b,v,E,w,T,C,$,I,R,k,n,i,s,a,l,u,c,h,p,D,M,r,j,F,B,z,(t,e)=>{window.postMessage({type:`TournamentPrizes_${e}`,prizes:N},window.location.href)},g,_,x,A,P,S,()=>j(),()=>F(),()=>B(l),()=>z(l,D),()=>B(l)]}customElements.get("casino-tournaments-thumbnail-prizes")||customElements.define("casino-tournaments-thumbnail-prizes",class extends c{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}span{color:#c3c3c3}.TournamentPrizes{font-size:11px;margin-left:20px;margin-right:20px;display:flex;gap:5px}.PrizesTitle{padding-top:8px}.Prizes{padding-left:20px;flex-wrap:wrap;display:flex;gap:20px;width:100%;min-height:50px;padding-top:8px}.Prize{flex-grow:1;color:#58586B}.Prize.Prize0 span{color:#FECF00}.Prize.Prize1 span{color:#D9B206}.Prize.Prize2 span{color:#9B8007}.Prize p{color:#FFF}</style>",u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},Gn,zn,r,{tourid:2}),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["tourid"]}get tourid(){return this.$$.ctx[2]}set tourid(t){this.$set({tourid:t}),M()}}),customElements.get("casino-tournaments-thumbnail-games-slider")||customElements.define("casino-tournaments-thumbnail-games-slider",class extends c{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}.TournamentsGamesSlider{background:#0a0c19;color:#fff;display:flex;justify-content:center}.disabled{color:#3B3C47}.SliderNavButton{background:#0a0c19;border:0px;width:25px;display:flex;align-items:center;justify-content:center}.SliderNavButton svg{width:20px}main{width:95%;overflow:hidden}.items{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.item{min-width:119px;height:96px;margin:0 4px;background-color:#ef4322;color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton{position:absolute;background:#28a745;display:block;box-sizing:border-box;padding:0.8rem .5rem;color:#fff;text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity .4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.itemHover{opacity:1}.items .item:first-child{margin-left:0}.items .item:last-child{margin-right:0}</style>",u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},Wn,Yn,r,{tournamenturl:13,scrollby:14,pagfactor:12,lang:15},[-1,-1]),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["tournamenturl","scrollby","pagfactor","lang"]}get tournamenturl(){return this.$$.ctx[13]}set tournamenturl(t){this.$set({tournamenturl:t}),M()}get scrollby(){return this.$$.ctx[14]}set scrollby(t){this.$set({scrollby:t}),M()}get pagfactor(){return this.$$.ctx[12]}set pagfactor(t){this.$set({pagfactor:t}),M()}get lang(){return this.$$.ctx[15]}set lang(t){this.$set({lang:t}),M()}});class pi extends c{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}button{cursor:pointer}.TournamentCard{position:relative;background:#0A0B19;color:#fff;border:solid 1px #30313c;gap:20px;display:flex;flex-direction:column;padding-bottom:20px;margin:0 auto}.CardFullSize{width:100%}.CardMaxWidth{max-width:600px}.TournamentButtons{display:flex;justify-content:center;gap:20px;margin:0 20px}.LoginButton{background:#0A0B19;width:50%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:18px}.LoginButton:hover{opacity:0.7}.RegisterButton{background:#0A0B19;width:50%;height:60px;text-align:center;color:#48952a;border:solid #48952a 1px;text-transform:uppercase;font-size:18px}.RegisterButton:hover{opacity:0.7}.DetailsButton{background:#0A0B19;width:40%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:18px}.DetailsButton:hover{opacity:0.7}.DetailsLargeButton{background:#0A0B19;width:100%;height:60px;border:solid #fff 1px;text-align:center;color:#fff;text-transform:uppercase;font-size:16px}.DetailsLargeButton:hover{opacity:0.7}.EnrolledButton{background:#2a2c5a;width:60%;height:60px;text-align:center;color:#aaaabe;border:0;text-transform:uppercase;font-size:18px;cursor:default}.JoinButton{background:#48952a;width:60%;height:60px;text-align:center;color:#fff;border:solid #48952a 1px;text-transform:uppercase;display:flex;justify-content:center;align-items:center;gap:20px;font-size:18px}.JoinButton:hover{opacity:0.7}.JoinButton:disabled{cursor:default;opacity:0.7}.JoinButtonFullSize{width:100%}.ErrorText{margin:0 20px;color:red;font-size:14px;font-weight:bold}.ph-item{position:relative;display:flex;flex-wrap:wrap;margin-bottom:30px;padding:30px 15px 15px 15px;overflow:hidden;direction:ltr;background-color:#0A0B19;border:1px solid black;border-radius:2px}.ph-item,.ph-item *,.ph-item ::after,.ph-item ::before{box-sizing:border-box}.ph-item::before{position:absolute;top:0;right:0;bottom:0;left:50%;z-index:1;width:500%;margin-left:-250%;background:linear-gradient(to right, rgba(10, 11, 25, 0) 46%, rgba(10, 11, 25, 0.35) 50%, rgba(10, 11, 25, 0) 54%) 50% 50%;animation:phAnimation 0.8s linear infinite;content:" ";pointer-events:none}.ph-item>*{display:flex;flex:1 1 auto;flex-flow:column;margin-bottom:15px;padding-right:15px;padding-left:15px}.ph-row{display:flex;flex-wrap:wrap;margin-top:-7.5px}.ph-row div{height:10px;margin-top:7.5px;background-color:#ced4da}.ph-row .big{height:20px}.ph-row .empty{background-color:rgba(10, 11, 25, 0)}.ph-col-4{flex:0 0 33.33333%}.ph-col-6{flex:0 0 50%}.ph-col-8{flex:0 0 66.66667%}.ph-col-12{flex:0 0 100%}[class*="ph-col"]{direction:ltr}[class*="ph-col"]>*+.ph-row{margin-top:0}[class*="ph-col"]>*+*{margin-top:7.5px}.ph-picture{width:100%;height:120px;background-color:#ced4da}@keyframes phAnimation{0%{transform:translate3d(-30%, 0, 0)}100%{transform:translate3d(30%, 0, 0)}}svg.spinner{width:40px;height:40px;x:0px;y:0px;viewBox:0 0 40 40}svg.spinner circle{fill:transparent;stroke:#212121;stroke-width:4;stroke-linecap:round;stroke-dasharray:125.6;-webkit-transform-origin:20px 20px 0;-moz-transform-origin:20px 20px 0;-ms-transform-origin:20px 20px 0;-o-transform-origin:20px 20px 0;transform-origin:20px 20px 0;-webkit-animation:spinner 2s linear infinite;-moz-animation:spinner 2s linear infinite;-ms-animation:spinner 2s linear infinite;-o-animation:spinner 2s linear infinite;animation:spinner 2s linear infinite}@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-webkit-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-webkit-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-moz-keyframes spinner{0%{-moz-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-moz-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-moz-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-ms-keyframes spinner{0%{-ms-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-ms-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-ms-transform:rotate(1080deg);stroke-dashoffset:26.4}}@-o-keyframes spinner{0%{-o-transform:rotate(0deg);stroke-dashoffset:26.4}50%{-o-transform:rotate(720deg);stroke-dashoffset:125.6}100%{-o-transform:rotate(1080deg);stroke-dashoffset:26.4}}@keyframes spinner{0%{transform:rotate(0deg);stroke-dashoffset:26.4}50%{transform:rotate(720deg);stroke-dashoffset:125.6}100%{transform:rotate(1080deg);stroke-dashoffset:26.4}}</style>',u(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},hi,ci,r,{session:0,userid:1,tournamenturl:2,endpoint:31,showdetails:3,showslider:4,showenrolled:5,maxwidth:6,fullsize:7,lang:8,loginevent:32,registerevent:33,loginurl:34,registerurl:35,currency:36},[-1,-1]),t&&(t.target&&_(t.target,this,t.anchor),t.props&&(this.$set(t.props),M()))}static get observedAttributes(){return["session","userid","tournamenturl","endpoint","showdetails","showslider","showenrolled","maxwidth","fullsize","lang","loginevent","registerevent","loginurl","registerurl","currency"]}get session(){return this.$$.ctx[0]}set session(t){this.$set({session:t}),M()}get userid(){return this.$$.ctx[1]}set userid(t){this.$set({userid:t}),M()}get tournamenturl(){return this.$$.ctx[2]}set tournamenturl(t){this.$set({tournamenturl:t}),M()}get endpoint(){return this.$$.ctx[31]}set endpoint(t){this.$set({endpoint:t}),M()}get showdetails(){return this.$$.ctx[3]}set showdetails(t){this.$set({showdetails:t}),M()}get showslider(){return this.$$.ctx[4]}set showslider(t){this.$set({showslider:t}),M()}get showenrolled(){return this.$$.ctx[5]}set showenrolled(t){this.$set({showenrolled:t}),M()}get maxwidth(){return this.$$.ctx[6]}set maxwidth(t){this.$set({maxwidth:t}),M()}get fullsize(){return this.$$.ctx[7]}set fullsize(t){this.$set({fullsize:t}),M()}get lang(){return this.$$.ctx[8]}set lang(t){this.$set({lang:t}),M()}get loginevent(){return this.$$.ctx[32]}set loginevent(t){this.$set({loginevent:t}),M()}get registerevent(){return this.$$.ctx[33]}set registerevent(t){this.$set({registerevent:t}),M()}get loginurl(){return this.$$.ctx[34]}set loginurl(t){this.$set({loginurl:t}),M()}get registerurl(){return this.$$.ctx[35]}set registerurl(t){this.$set({registerurl:t}),M()}get currency(){return this.$$.ctx[36]}set currency(t){this.$set({currency:t}),M()}}return customElements.get("casino-tournaments-thumbnail-controller")||customElements.define("casino-tournaments-thumbnail-controller",pi),pi});
|
|
2
2
|
//# sourceMappingURL=casino-tournaments-thumbnail-controller.js.map
|