@everymatrix/lottery-game-page 1.86.26 → 1.86.28

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.
@@ -19,18 +19,18 @@ const A=globalThis,I=A.ShadowRoot&&(void 0===A.ShadyCSS||A.ShadyCSS.nativeShadow
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */,{is:E,defineProperty:F,getOwnPropertyDescriptor:j,getOwnPropertyNames:R,getOwnPropertySymbols:L,getPrototypeOf:W}=Object,$=globalThis,H=$.trustedTypes,G=H?H.emptyScript:"",U=$.reactiveElementPolyfillSupport,V={toAttribute(t,e){switch(e){case Boolean:t=t?G:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},q=(t,e)=>!E(t,e),Y={attribute:!0,type:String,converter:V,reflect:!1,useDefault:!1,hasChanged:q};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=$.litPropertyMetadata||($.litPropertyMetadata=new WeakMap);class J extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&F(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=j(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=W(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...R(t),...L(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(O(t))}else void 0!==t&&e.push(O(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return N(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:V).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:V;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,a=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:q)(a,e)||i.useDefault&&i.reflect&&a===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return S(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var K;J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,null==U||U({ReactiveElement:J}),(null!=(K=$.reactiveElementVersions)?K:$.reactiveElementVersions=[]).push("2.1.1");
22
+ */,{is:E,defineProperty:F,getOwnPropertyDescriptor:j,getOwnPropertyNames:R,getOwnPropertySymbols:L,getPrototypeOf:W}=Object,$=globalThis,H=$.trustedTypes,G=H?H.emptyScript:"",U=$.reactiveElementPolyfillSupport,V={toAttribute(t,e){switch(e){case Boolean:t=t?G:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},q=(t,e)=>!E(t,e),Y={attribute:!0,type:String,converter:V,reflect:!1,useDefault:!1,hasChanged:q};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=$.litPropertyMetadata||($.litPropertyMetadata=new WeakMap);let J=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&F(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=j(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=W(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...R(t),...L(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(O(t))}else void 0!==t&&e.push(O(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return N(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:V).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:V;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i,s=!1,o){var r,a;if(void 0!==t){const n=this.constructor;if(!1===s&&(o=this[t]),null!=i||(i=n.getPropertyOptions(t)),!((null!=(r=i.hasChanged)?r:q)(o,e)||i.useDefault&&i.reflect&&o===(null==(a=this._$Ej)?void 0:a.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return S(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}};var K;J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,null==U||U({ReactiveElement:J}),(null!=(K=$.reactiveElementVersions)?K:$.reactiveElementVersions=[]).push("2.1.2");
23
23
  /**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
27
  */
28
- const Z=globalThis,X=Z.trustedTypes,Q=X?X.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+et,st=`<${it}>`,ot=document,rt=()=>ot.createComment(""),at=t=>null===t||"object"!=typeof t&&"function"!=typeof t,nt=Array.isArray,lt="[ \t\n\f\r]",ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,ut=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,mt=/"/g,ft=/^(?:script|style|textarea|title)$/i,vt=Symbol.for("lit-noChange"),bt=Symbol.for("lit-nothing"),gt=new WeakMap,yt=ot.createTreeWalker(ot,129);function wt(t,e){if(!nt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Q?Q.createHTML(e):e}class xt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,n=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",a=ht;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===ht?"!--"===l[1]?a=ct:void 0!==l[1]?a=dt:void 0!==l[2]?(ft.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=ut):void 0!==l[3]&&(a=ut):a===ut?">"===l[0]?(a=null!=o?o:ht,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?ut:'"'===l[3]?mt:pt):a===mt||a===pt?a=ut:a===ct||a===dt?a=ht:(a=ut,o=void 0);const d=a===ut&&t[e+1].startsWith("/>")?" ":"";r+=a===ht?i+st:h>=0?(s.push(n),i.slice(0,h)+tt+i.slice(h)+et+d):i+et+(-2===h?e:d)}return[wt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=xt.createElement(l,i),yt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=yt.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(tt)){const e=h[r++],i=s.getAttribute(t).split(et),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:a[2],strings:i,ctor:"."===a[1]?Tt:"?"===a[1]?Dt:"@"===a[1]?At:St}),s.removeAttribute(t)}else t.startsWith(et)&&(n.push({type:6,index:o}),s.removeAttribute(t));if(ft.test(s.tagName)){const t=s.textContent.split(et),e=t.length-1;if(e>0){s.textContent=X?X.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],rt()),yt.nextNode(),n.push({type:2,index:++o});s.append(t[e],rt())}}}else if(8===s.nodeType)if(s.data===it)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(et,t+1));)n.push({type:7,index:o}),t+=et.length-1}o++}}static createElement(t,e){const i=ot.createElement("template");return i.innerHTML=t,i}}function kt(t,e,i=t,s){var o,r,a;if(e===vt)return e;let n=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=at(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==l&&(null==(r=null==n?void 0:n._$AO)||r.call(n,!1),void 0===l?n=void 0:(n=new l(t),n._$AT(t,i,s)),void 0!==s?(null!=(a=i._$Co)?a:i._$Co=[])[s]=n:i._$Cl=n),void 0!==n&&(e=kt(t,n._$AS(t,e.values),n,s)),e}class _t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:ot).importNode(i,!0);yt.currentNode=o;let r=yt.nextNode(),a=0,n=0,l=s[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new Ct(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new It(r,this,t)),this._$AV.push(e),l=s[++n]}a!==(null==l?void 0:l.index)&&(r=yt.nextNode(),a++)}return yt.currentNode=ot,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ct{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=bt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){var i;t=kt(this,t,e),at(t)?t===bt||null==t||""===t?(this._$AH!==bt&&this._$AR(),this._$AH=bt):t!==this._$AH&&t!==vt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):nt(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==bt&&at(this._$AH)?this._$AA.nextSibling.data=t:this.T(ot.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=xt.createElement(wt(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new _t(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=gt.get(t.strings);return void 0===e&&gt.set(t.strings,e=new xt(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Ct(this.O(rt()),this.O(rt()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=bt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=bt}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=kt(this,t,e,0),r=!at(t)||t!==this._$AH&&t!==vt,r&&(this._$AH=t);else{const s=t;let a,n;for(t=o[0],a=0;a<o.length-1;a++)n=kt(this,s[i+a],e,a),n===vt&&(n=this._$AH[a]),r||(r=!at(n)||n!==this._$AH[a]),n===bt?t=bt:t!==bt&&(t+=(null!=n?n:"")+o[a+1]),this._$AH[a]=n}r&&!s&&this.j(t)}j(t){t===bt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Tt extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===bt?void 0:t}}class Dt extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==bt)}}class At extends St{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=kt(this,t,e,0))?i:bt)===vt)return;const s=this._$AH,o=t===bt&&s!==bt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==bt&&(s===bt||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class It{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}}const zt=Z.litHtmlPolyfillSupport;var Mt;null==zt||zt(xt,Ct),(null!=(Mt=Z.litHtmlVersions)?Mt:Z.litHtmlVersions=[]).push("3.3.1");const Pt=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let a=r._$litPart$;if(void 0===a){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=a=new Ct(e.insertBefore(rt(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a
28
+ const Z=globalThis,X=Z.trustedTypes,Q=X?X.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+et,st=`<${it}>`,ot=document,rt=()=>ot.createComment(""),at=t=>null===t||"object"!=typeof t&&"function"!=typeof t,nt=Array.isArray,lt="[ \t\n\f\r]",ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,ut=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),pt=/'/g,mt=/"/g,ft=/^(?:script|style|textarea|title)$/i,vt=Symbol.for("lit-noChange"),bt=Symbol.for("lit-nothing"),gt=new WeakMap,yt=ot.createTreeWalker(ot,129);function wt(t,e){if(!nt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Q?Q.createHTML(e):e}class xt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,n=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",a=ht;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===ht?"!--"===l[1]?a=ct:void 0!==l[1]?a=dt:void 0!==l[2]?(ft.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=ut):void 0!==l[3]&&(a=ut):a===ut?">"===l[0]?(a=null!=o?o:ht,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?ut:'"'===l[3]?mt:pt):a===mt||a===pt?a=ut:a===ct||a===dt?a=ht:(a=ut,o=void 0);const d=a===ut&&t[e+1].startsWith("/>")?" ":"";r+=a===ht?i+st:h>=0?(s.push(n),i.slice(0,h)+tt+i.slice(h)+et+d):i+et+(-2===h?e:d)}return[wt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=xt.createElement(l,i),yt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=yt.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(tt)){const e=h[r++],i=s.getAttribute(t).split(et),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:o,name:a[2],strings:i,ctor:"."===a[1]?Tt:"?"===a[1]?Dt:"@"===a[1]?At:St}),s.removeAttribute(t)}else t.startsWith(et)&&(n.push({type:6,index:o}),s.removeAttribute(t));if(ft.test(s.tagName)){const t=s.textContent.split(et),e=t.length-1;if(e>0){s.textContent=X?X.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],rt()),yt.nextNode(),n.push({type:2,index:++o});s.append(t[e],rt())}}}else if(8===s.nodeType)if(s.data===it)n.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(et,t+1));)n.push({type:7,index:o}),t+=et.length-1}o++}}static createElement(t,e){const i=ot.createElement("template");return i.innerHTML=t,i}}function kt(t,e,i=t,s){var o,r,a;if(e===vt)return e;let n=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=at(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==l&&(null==(r=null==n?void 0:n._$AO)||r.call(n,!1),void 0===l?n=void 0:(n=new l(t),n._$AT(t,i,s)),void 0!==s?(null!=(a=i._$Co)?a:i._$Co=[])[s]=n:i._$Cl=n),void 0!==n&&(e=kt(t,n._$AS(t,e.values),n,s)),e}class _t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:ot).importNode(i,!0);yt.currentNode=o;let r=yt.nextNode(),a=0,n=0,l=s[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new Ct(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new It(r,this,t)),this._$AV.push(e),l=s[++n]}a!==(null==l?void 0:l.index)&&(r=yt.nextNode(),a++)}return yt.currentNode=ot,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Ct{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=bt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){var i;t=kt(this,t,e),at(t)?t===bt||null==t||""===t?(this._$AH!==bt&&this._$AR(),this._$AH=bt):t!==this._$AH&&t!==vt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):nt(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==bt&&at(this._$AH)?this._$AA.nextSibling.data=t:this.T(ot.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=xt.createElement(wt(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new _t(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=gt.get(t.strings);return void 0===e&&gt.set(t.strings,e=new xt(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Ct(this.O(rt()),this.O(rt()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||i.call(this,!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=bt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=bt}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=kt(this,t,e,0),r=!at(t)||t!==this._$AH&&t!==vt,r&&(this._$AH=t);else{const s=t;let a,n;for(t=o[0],a=0;a<o.length-1;a++)n=kt(this,s[i+a],e,a),n===vt&&(n=this._$AH[a]),r||(r=!at(n)||n!==this._$AH[a]),n===bt?t=bt:t!==bt&&(t+=(null!=n?n:"")+o[a+1]),this._$AH[a]=n}r&&!s&&this.j(t)}j(t){t===bt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Tt extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===bt?void 0:t}}class Dt extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==bt)}}class At extends St{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=kt(this,t,e,0))?i:bt)===vt)return;const s=this._$AH,o=t===bt&&s!==bt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==bt&&(s===bt||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class It{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}}const zt=Z.litHtmlPolyfillSupport;var Mt;null==zt||zt(xt,Ct),(null!=(Mt=Z.litHtmlVersions)?Mt:Z.litHtmlVersions=[]).push("3.3.2");const Pt=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let a=r._$litPart$;if(void 0===a){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=a=new Ct(e.insertBefore(rt(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a
29
29
  /**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */},Bt=globalThis;class Nt extends J{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return vt}}var Ot;Nt._$litElement$=!0,Nt.finalized=!0,null==(Ot=Bt.litElementHydrateSupport)||Ot.call(Bt,{LitElement:Nt});const Et=Bt.litElementPolyfillSupport;var Ft;null==Et||Et({LitElement:Nt}),(null!=(Ft=Bt.litElementVersions)?Ft:Bt.litElementVersions=[]).push("4.2.1");
33
+ */},Bt=globalThis;class Nt extends J{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return vt}}var Ot;Nt._$litElement$=!0,Nt.finalized=!0,null==(Ot=Bt.litElementHydrateSupport)||Ot.call(Bt,{LitElement:Nt});const Et=Bt.litElementPolyfillSupport;var Ft;null==Et||Et({LitElement:Nt}),(null!=(Ft=Bt.litElementVersions)?Ft:Bt.litElementVersions=[]).push("4.2.2");
34
34
  /**
35
35
  * @license
36
36
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -6654,4 +6654,4 @@ qt("vaadin-tabs",B`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}function Tl(t){return Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(t)}function Dl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Al(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Il(t){Al(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Tl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}T(Sl);var zl={};function Ml(){return zl}function Pl(t){Al(1,arguments);var e=Il(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function Bl(t){Al(1,arguments);var e=Il(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=Pl(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Pl(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function Nl(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Il(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Il(t),d=c.getUTCFullYear(),u=Ml(),p=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var f=Nl(m,e),v=new Date(0);v.setUTCFullYear(d,0,p),v.setUTCHours(0,0,0,0);var b=Nl(v,e);return c.getTime()>=f.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function El(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const Fl=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return El("yy"===e?s%100:s,e.length)},jl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):El(i+1,2)},Rl=function(t,e){return El(t.getUTCDate(),e.length)},Ll=function(t,e){return El(t.getUTCHours()%12||12,e.length)},Wl=function(t,e){return El(t.getUTCHours(),e.length)},$l=function(t,e){return El(t.getUTCMinutes(),e.length)},Hl=function(t,e){return El(t.getUTCSeconds(),e.length)},Gl=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return El(Math.floor(s*Math.pow(10,i-3)),e.length)};var Ul={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return Fl(t,e)},Y:function(t,e,i,s){var o=Ol(t,s),r=o>0?o:1-o;return"YY"===e?El(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):El(r,e.length)},R:function(t,e){return El(Bl(t),e.length)},u:function(t,e){return El(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return El(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return El(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return jl(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return El(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){Al(1,arguments);var i=Il(t),s=Nl(i,e).getTime()-function(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Nl(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):El(o,e.length)},I:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=Pl(e).getTime()-function(t){Al(1,arguments);var e=Bl(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Pl(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):El(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Rl(t,e)},D:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):El(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return El(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return El(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return El(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return Ll(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Wl(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hl(t,e)},S:function(t,e){return Gl(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ql(o);case"XXXX":case"XX":return Yl(o);default:return Yl(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return ql(o);case"xxxx":case"xx":return Yl(o);default:return Yl(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},t:function(t,e,i,s){return El(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return El((s._originalDate||t).getTime(),e.length)}};function Vl(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var a=e||"";return i+String(o)+a+El(r,2)}function ql(t,e){return t%60==0?(t>0?"-":"+")+El(Math.abs(t)/60,2):Yl(t,e)}function Yl(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+El(Math.floor(o/60),2)+i+El(o%60,2)}const Jl=Ul;var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Zl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Xl={p:Zl,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return Kl(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(o,e)).replace("{{time}}",Zl(r,e))}};const Ql=Xl;var th=["D","DD"],eh=["YY","YYYY"];function ih(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var sh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var rh,ah={date:oh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function lh(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[n]||t.values[a]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function hh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,a=o[0],n=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const ch={code:"en-US",formatDistance:function(t,e,i){var s,o=sh[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:ah,formatRelative:function(t){return nh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:lh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:lh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:lh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:lh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:lh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(rh.matchPattern);if(!i)return null;var s=i[0],o=t.match(rh.parsePattern);if(!o)return null;var r=rh.valueCallback?rh.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:hh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:hh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var dh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ph=/^'([^]*?)'?$/,mh=/''/g,fh=/[a-zA-Z]/;function vh(t,e,i){var s,o,r,a,n,l,h,c,d,u,p,m,f,v,b,g,y,w;Al(2,arguments);var x=String(e),k=Ml(),_=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:k.locale)&&void 0!==s?s:ch,C=Dl(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Dl(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:k.weekStartsOn)&&void 0!==m?m:null===(y=k.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var T=Il(t);if(!function(t){if(Al(1,arguments),!function(t){return Al(1,arguments),t instanceof Date||"object"===Tl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Il(t);return!isNaN(Number(e))}(T))throw new RangeError("Invalid time value");var D=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(T),A=function(t,e){return Al(2,arguments),function(t,e){Al(2,arguments);var i=Il(t).getTime(),s=Dl(e);return new Date(i+s)}(t,-Dl(e))}(T,D),I={firstWeekContainsDate:C,weekStartsOn:S,locale:_,_originalDate:T};return x.match(uh).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ql[e])(t,_.formatLong):t})).join("").match(dh).map((function(s){if("''"===s)return"'";var o,r,a=s[0];if("'"===a)return(r=(o=s).match(ph))?r[1].replace(mh,"'"):o;var n=Jl[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||-1===eh.indexOf(s)||ih(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==th.indexOf(s))||ih(s,e,String(t)),n(A,s,_.localize,I);if(a.match(fh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s})).join("")}const bh=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.handleTicketId=t=>{t.target.value&&(this.filterData.ticketId=t.target.value)},this.handleTicketType=t=>{t.target.selectedItems&&t.target.selectedItems.length&&(this.filterData.ticketType=t.target.selectedItems.map((t=>t.value)))},this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.ticketTypeList=[{label:"Normal",value:"NORMAL"},{label:"Syndicate",value:"SYNDICATE"},{label:"Subscription",value:"SUBSCRIPTION"}]}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])p[e][i]=t[e][i]})))}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.filterFromCalendar||this.filterData.filterToCalendar||this.filterData.ticketId||this.filterData.ticketType.length)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){if(this.modalCloseEvent(),this.showClearButton=!0,this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterSelectionHandler(this.filterData)}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.clearSelection(),this.filterData={}}formateDate(t){const{year:e,month:i,day:s}=t;return vh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}render(){return s("div",{key:"38024b55a7afaa317f11fe7dc3832e6e3ebcf7ac",class:"HelperFilters",ref:t=>this.stylingContainer=t},s("div",{key:"30f033084f8b40ceb660a92d6769fd1dfb1f7d98",class:"FilterButtonsWrapper"},s("button",{key:"3c347b67791547808207fd72c57c10a0c62c9e25",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},m("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?s("button",{class:"FilterClear",onClick:()=>this.resetSearch()},m("filterClear",this.language)):null),s("helper-modal",{key:"71eed9aa7b4c9aa16d218ad7103181498c81975a","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"a97c9b4a1cbc1fb0afc0a128e626ead51c7f8047",class:"FilterModalHeader"},s("h3",{key:"10f4051b2e02ccd372c3e0dbe757983ba43a16e6",class:"FilterModalTitle"},m(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),s("div",{key:"50f4af101f28a436b0a275010c89eae94833d449",class:"FilterModalBody"},this.activateTicketSearch&&s("div",{key:"1426e94093e76ec65f53a9b6a50aca564f572aab",class:"ticketFilterContainer"},s("div",{key:"4aa30387fb87aa411a21ea4452316f139c3301fd",class:"ticketFilterItem"},s("div",{key:"66136fc7c3588b834f02d1efeb2e622e1bd0b52d",class:"filterKey"},m("filterTicketIdPlaceholder",this.language)),s("vaadin-text-field",{key:"522a8fdc8ad41b033f4126bf27cb449d9db6606e",placeholder:m("filterTicketIdPlaceholder",this.language),value:this.filterData.ticketId,onInput:t=>this.handleTicketId(t)})),s("div",{key:"d2cde3e11ba86f6443fca85cde2c7383a87585b8",class:"ticketFilterItem"},s("div",{key:"6b98a9e702f484c19754a04cb4f1a009c9add01a",class:"filterKey"},m("searchByTicketType",this.language)),s("div",{key:"b52029c39d340ec3e5aa7f9b6844d3cf05bdaadc",class:"general-multi-select-container"},s("general-multi-select",{key:"bf2948532aba6d577eb50e338d2a6c5e5737f674","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrlContent,ref:t=>this.comboBox=t,placeholder:m("filterTiketTypePlaceholder",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType})))),s("div",{key:"e7214b53b0c05f6379da1f6e83b69b8aadfcc59a",class:"filterItem"},s("div",{key:"2262d0e72ac653f93c04381d70b797e9fff68ead",class:"filterKey"},m("searchByDate",this.language)),s("div",{key:"c1b10ba14ebe8624af0708d0a500b9a1d1751dbf",class:"FilterCalendarWrapper"},s("vaadin-date-picker",{key:"807a7987b19ecdc3b34d759a9a5d68d3f77e27dd",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:m("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),s("vaadin-date-picker",{key:"3be5eea8d7c41f84c0d624faf32cd800468366a4",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:m("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"})))),s("div",{key:"0987fee1be9552effcc023b93e67886e7bab535a",class:"FilterModalFooter"},s("button",{key:"f46728dfb5e63db90f6c8437d233b47354419295",class:"FilterModalButton",onClick:()=>this.filterSearch()},m("filterModalButton",this.language)))))}};bh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-typography-inverse, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .filterKey,.FilterModalBody .filterKey,.FilterModalFooter .filterKey{color:var(--emw--color-primary, #009993);text-align:left;font-size:16px}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-primary, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-primary-variant, #004d4a);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-primary, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}.ticketFilterItem{margin:12px 0}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}';const gh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),yh=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&s("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},s("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(gh(this.userAgent)?" HelperModalMobileContent":"")},s("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(gh(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),s("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};yh.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:var(--emw--color-background, #fff);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-300, #333);box-shadow:2px 2px 2px var(--emw--color-typography-secondary, #ccc);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-dialog-background, #fff);position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-dialog-background, #fff);top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--color-dialog-typography, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--color-dialog-typography, #000)}";const wh="en",xh=["en"],kh={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},_h=(t,e)=>{const i=e;return kh[void 0!==i&&xh.includes(i)?i:wh][t]},Ch=class{constructor(e){t(this,e),this.selectedIndex=0,this.cmsEndpoint=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0,this.tabContent=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])kh[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=kh[void 0!==i&&xh.includes(i)?i:wh][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):kh[void 0!==i&&xh.includes(i)?i:wh][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=s("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=s("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},s("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},s("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},_h("register",this.language)),s("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},_h("butTickets",this.language)),s("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},_h("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=s("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},s("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},s("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},_h("odds",this.language)),s("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},_h("winGame",this.language)),s("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},_h("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ch.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--color-typography, #000);font-weight:normal}";const Sh=class{constructor(e){t(this,e),this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.mbSource=void 0,this.clientStylingurl="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}connectedCallback(){}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},s("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>s("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),s("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},s("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Sh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-background-secondary, #f5f5f5)}.TabButton.Active{background:var(--emw--color-primary, #009993);color:var(--emw--color-background, #fff)}';const Th=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"2cfab600728d3aa72f9f87e4e07a968ea030e415",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Th.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--color-typography, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-background, #fff);background:radial-gradient(circle at top, var(--emw--color-background, #fff) 0%, var(--emw--color-background, #fff) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 var(--emw--color-gray-300, #333);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-background, #fff) 0%, var(--emw--color-background-secondary, #f5f5f5) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-background, #fff);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-primary, #009993)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #f5f5f5);background:var(--emw--color-gray-250, #ccc);border:solid 2px var(--emw--color-gray-100, #e6e6e6);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #f5f5f5);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-gray-100, #e6e6e6);cursor:default}.Circle.Bonus{background:var(--emw--color-tertiary, #ff6536)}';const Dh=["ro","en","hr"],Ah={en:{drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridDraw:"Draw Numbers",drawNumbersGridTicket:"Selected Numbers",ticketResult:"Ticket Result",amountWon:"Amount won",numberOfDraws:"Number of Draws",multiplierNum:"Multiplier Number",ticketId:"Ticket ID",ticketType:"Ticket Type",ticketAmount:"Ticket Amount",prize:"Prizes"},ro:{drawId:"Id extragere",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase",drawNumbersGridTicket:"Numere selectate",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplierNum:"Multiplier Number",ticketId:"Id biletul",ticketType:"Ticket Type",ticketAmount:"Valoarea biletului",prize:"Premii"},fr:{drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros",drawNumbersGridTicket:"Nombres sélectionnés",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplierNum:"Multiplier Number",ticketId:"ID de billets",ticketType:"Ticket Type",ticketAmount:"Montant du billet",prize:"Prix"},ar:{drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridDraw:" أرقام السحب",drawNumbersGridTicket:"الأرقام المختارة",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplierNum:"Multiplier Number",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",prize:"الجوائز"},hr:{drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih",drawNumbersGridTicket:"Odabrani brojevi",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplierNum:"Multiplier Number",ticketId:"ID listića",ticketType:"Ticket Type",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ih=(t,e)=>{const i=e;return Ah[void 0!==i&&Dh.includes(i)?i:"en"][t]},zh=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,s=t.amount,o=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+s,currency:o,times:e.get(i).times+1}):e.set(i,{amount:s,currency:o,times:1}))}));const i=[];for(let[t,s]of e.entries())i.push({prizeName:t,amount:s.amount,currency:s.currency,times:s.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketType="",this.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketMultiplierNum=void 0,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.ticketDrawData="",this.historyDrawData="",this.tabValue="",this.translationUrl=void 0,this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.drawData=void 0,this.resultMap={Won:"Win",Lost:"Lose"}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ah[e][i]=t[e][i]})))}connectedCallback(){if(this.historyDrawData&&(this.drawData=JSON.parse(this.historyDrawData)),this.ticketNumbers){let t=JSON.parse(this.ticketNumbers);this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.isLoading=!1}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>{t.drawData=Object.assign({},e);let i=this.displayPrizeCategory(t.details);t.details=[...i]}))})),this.ticketDrawDetailsFlag=!1)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}getDivision(t,e){var i,s;let o=t.division,r=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===o));return r&&r.length?r[0].division:null}render(){return this.isLoading?s("p",null,"Loading, please wait ..."):this.hasErrors?void s("p",null,this.errorText):s("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?s("div",{class:"DrawResultsArea"},this.drawData&&s("div",null,s("div",{class:"DrawResultsHeader"},s("span",null,Ih("drawId",this.language),": ",this.drawData.id),s("span",null,Ih("drawDate",this.language),": ",vh(new Date(this.drawData.date),"dd/MM/yyyy"))),s("div",{class:"DrawResultsBody"},s("div",{class:"DrawNumbersGrid"},s("p",null,Ih("drawNumbersGridDraw",this.language)),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.length&&this.drawData.winningNumbers[0].numbers.join(","),"secondary-numbers":this.drawData.winningNumbers.length?this.drawData.winningNumbers[0].secondaryNumbers.join(","):"","display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language)," "),this.drawData.prizes.length?s("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>s("div",null,s("span",{style:{"margin-right":"5px"}},t.division,":"),s("span",{style:{"margin-right":"4px"}}," ",this.thousandSeperator(t.amount.value)),s("span",null,t.amount.currency))))):s("div",null,"None")))))):s("div",{class:"DrawResultsArea TicketDraws"},s("div",{class:"DrawResultsBody"},s("div",{class:"TicketIdContainer"},s("label",{class:"Label"},Ih("ticketId",this.language),": ",s("span",null,this.ticketId))),s("div",{class:"TicketTypeContainer"},s("label",{class:"Label"},Ih("ticketType",this.language),": ",s("span",null,this.ticketType))),s("div",{class:"TicketAmountContainer"},s("label",{class:"Label"},Ih("ticketAmount",this.language),":"," ",s("span",null,`${this.thousandSeperator(this.ticketAmount)} ${this.ticketCurrency}`))),s("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var i;return s("div",null,s("label",{class:"Label"},Ih("drawNumbersGridTicket",this.language),":"),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(i=this.gridSecondaryNumbers[e])||void 0===i?void 0:i.join(","),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))}))),this.ticketMultiplier&&s("div",{class:"DrawMultipler"},s("label",{class:"Label"},Ih("multiplierNum",this.language),": ",this.thousandSeperator(this.ticketMultiplierNum))),s("div",{class:"NumberOfDrawsContainer"},s("label",{class:"Label"},Ih("numberOfDraws",this.language),": ",this.thousandSeperator(this.ticketDrawCount)),s("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&s("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var i,o,r,a,n,l,h,c;return s("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},s("div",{class:"ExpandableBoxHeader"},s("div",{class:"TicketResultContainer"},s("p",null,Ih("ticketResult",this.language),": ",this.resultMap[t.state])),"won"==t.state&&s("div",{class:"AmountWonContainer"},s("p",null,Ih("amountWon",this.language),":"," ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId))),s("div",{class:"ExpandableBoxBody"},s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId)),s("div",{class:"DrawDateContainer"},s("p",null,Ih("drawDate",this.language),": ",null===(i=t.drawData)||void 0===i?void 0:i.date.slice(0,10)," |"," ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),s("div",{class:"DrawNumbersGrid"},t.drawData&&s("div",{class:"BulletContainer"},s("label",{class:"Label"},Ih("drawNumbersGridDraw",this.language),":"),s("lottery-grid",{"selected-numbers":(null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.length)&&(null===(n=t.drawData.winningNumbers[0].numbers)||void 0===n?void 0:n.join(",")),"secondary-numbers":(null===(h=null===(l=t.drawData)||void 0===l?void 0:l.winningNumbers)||void 0===h?void 0:h.length)&&(null===(c=t.drawData.winningNumbers[0].secondaryNumbers)||void 0===c?void 0:c.join(",")),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),t.details.length>0&&s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language),":"),s("span",null,t.details.map((t=>s("span",null,s("div",null,s("span",null,t.prizeName,t.times>1?" x "+t.times:"",":"," "),s("span",{style:{"margin-right":"4px"}},this.thousandSeperator(t.amount)),s("span",null,t.currency)))))))))}))))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:var(--emw--color-primary, #009993);color:var(--emw--color-background-secondary, #f5f5f5);font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid var(--emw--color-typography, #009993)}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px;margin-bottom:10px;color:var(--emw--color-typography, #000)}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid var(--emw--color-gray-250, #ccc);border-radius:5px;background-color:var(--emw--color-background-secondary, #f5f5f5)}.ExpandableBox{border-bottom:1px solid var(--emw--color-gray-250, #ccc);transition:height 300ms ease-in-out;overflow:hidden;height:80px;background-color:var(--emw--color-background, #fff)}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:var(--emw--color-primary, #009993)}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:var(--emw--color-primary, #009993)}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:var(--emw--color-primary, #009993);transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:auto}';const Mh=["ro","en","fr","ar","hr"],Ph={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results.",loading:"Loading, please wait ...",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",loading:"Loading, please wait ..."},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",loading:"Loading, please wait ..."},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",loading:"Loading, please wait ..."},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",loading:"Loading, please wait ..."}},Bh=(t,e)=>{const i=e;return Ph[void 0!==i&&Mh.includes(i)?i:"en"][t]},Nh=class{constructor(e){t(this,e),this.isReset=!1,this.getDrawsData=()=>{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);t.searchParams.append("limit",this.limit.toString()),t.searchParams.append("offset",this.offset.toString()),t.searchParams.append("status","PAYABLE"),this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items||[],this.drawData=this.winningDataSetsData.map((t=>t)),this.totalResults=t.total})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.transDataToString=t=>{try{return JSON.stringify(t)}catch(t){throw new Error(t)}},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.drawData=[],this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.activeIndex=0,this.totalResults=0,this.limit=5,this.offset=0}filtersHandler(t){this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.limit=5,this.offset=0,this.getDrawsData()}clearFiltersHandler(){this.dateFiltersFrom="",this.dateFiltersTo="",this.limit=5,this.offset=0,this.drawData=this.winningDataSetsData,this.getDrawsData()}hpPageChange(t){this.limit=t.detail.limit,this.offset=t.detail.offset,this.isReset=!1,this.getDrawsData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}connectedCallback(){this.getDrawsData()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ph[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){clearInterval(this.interval)}render(){let t=s("div",{key:"43dea3d7f12d1ac0b4df84ee15f3ff5192a16837",class:"DrawResultsHeader"},s("div",{key:"3ee231127221e0c6dfef0e94a4b2bec613aa25f7",class:"DrawResultsHeaderContent"},s("h4",{key:"7bc26099b3bb593b6e9229322e19941ecd38e093"},Bh("drawResultsHeader",this.language)),s("div",{key:"047d1f6718d26512801de33656a803435234eab1",class:"FilterSection"},s("helper-filters",{key:"2f6ffe2fd2ae0d1a544a57d330991fd72a043a78","activate-ticket-search":"false","game-id":this.gameId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))));return s("section",{key:"007d8200c91e7a99b911ea4e2b65be8932716a8e",class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"aa947a1455794d7719fb17098743ea60e84d6eb1",class:"DrawResultsSection"},s("div",{key:"ab8019f6591d773e8e9d52bfd8ca11d61dd74b89",class:"DrawResultsAreaHistory"},t,s("div",{key:"2a3fc14445339ba4895e8a9c7e99bcece2a54ca5",class:"HistoryGridWrapper"},s("div",{key:"90a5560b549fcd9ae871084ff5a5ab998af686cd",class:"HistoryGrid"},this.isLoading&&s("p",{key:"af0bdfd22c48844da0942b128ee304b2168571b5"},Bh("loading",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"history-draw-data":this.transDataToString(t),"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),!this.isLoading&&this.noResults&&s("p",{key:"e0691b0f79b53410a4d4cba4439fb907552473f8",class:"errorText"},Bh("noResults",this.language)))),s("div",{key:"814919c0ea3baf1286ba2ef13fd405d21e417b19",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&s("lottery-pagination",{key:"29f57cc28abab4a76fecb28a3039cf4f56d3f6f3",arrowsActive:!0,numberedNavActive:!0,"is-reset":this.isReset,"first-page":!1,"prev-page":!0,"next-page":!0,offset:this.offset,limit:this.limit,total:this.totalResults,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Nh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:var(--emw--color-primary, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-typography, #000);padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.GridWrapper{background-color:var(--emw--color-background, #fff)}.DrawResultsSection{max-width:600px;margin:0px auto;padding-bottom:30px;color:var(--emw--color-typography, #000)}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:var(--emw--color-primary, #009993);padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:var(--emw--color-primary, #009993);padding:10px;text-align:center;color:var(--emw--color-background, #fff);padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:var(--emw--color-primary, #009993);color:var(--emw--color-background, #fff);outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton,.FilterSection .ResetButton{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);border:1px solid var(--emw--button-border-color, #009993);background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .Active{background:var(--emw--color-primary-variant, #004d4a);color:var(--emw--color-background, #fff)}.FilterSection helper-filters{margin-left:auto}.errorText{color:var(--emw--color-error, #ff0000)}';const Oh=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"0bb2683f87461804914d26c708499902d92dc503",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"2ba23b953a9519ccb36fd203c3ac98a366673822","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"54c18e3a6fde25ff0953bb7b15b8a1200e237fd0",class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{key:"0cb93435825bf7a42636848ffd5ff67a30369cfa","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Oh.style=":host{display:block}";const Eh=["ro","en","fr","ar","hr"],Fh={en:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ...",emptyText:"Sorry. The Game is not available now."},ro:{error:"Eroare",backButton:"Inapoi",lobbyButton:"Lobby",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",submitSuccess:"Submit successfully!",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",modalLogin:"Please login to submit a ticket",loading:"Se incarca, va rugam asteptati ..."},fr:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ar:{error:"خطأ",backButton:"خلف",lobbyButton:"ردهة",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",submitSuccess:"Submit successfully!",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة",loading:"Loading, please wait ..."},hr:{error:"Greška",backButton:"Nazad",lobbyButton:"Lobby",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",submitSuccess:"Submit successfully!",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",modalLogin:"Molimo prijavite se da uplatite listić",loading:"Učitavanje, molimo pričekajte ..."}},jh=(t,e)=>{const i=e;return Fh[void 0!==i&&Eh.includes(i)?i:"en"][t]},Rh=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Fh[e][i]=t[e][i]})),e(Fh)})).catch((t=>{i(t)}))})),Lh=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));function Wh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a=Lh(),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const $h=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Hh=class{constructor(i){t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.resetAllTicketSelection=e(this,"resetAllTicketSelection",7),this.quickPick=!1,this.gameData={},this.secondarySelectionAllowed=!1,this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.tickets=[],this.mainTickets=[],this.secondaryTickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.isLoading=!1,this.showSubmitError=!1,this.submitError="",this.showApiError=!1,this.apiError="",this.translationData=void 0,this.isSubscription=!1,this.subscriptionParam=null,this.showSubscriptionError=!1,this.subscriptionError="",this.isSubscribed=!1,this.isFetchingGame=!1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}handleNewTranslations(){this.isLoading=!0,Rh(this.translationUrl).then((()=>{this.isLoading=!1}))}watchGameInfoChange(t,e){t&&t!=e&&this.getGameDetails()}async componentWillLoad(){this.gameId&&this.endpoint&&this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0);const t=[];if(this.translationUrl){const e=Rh(this.translationUrl).then((t=>{this.translationData=JSON.stringify(t)})).catch((t=>{console.log(t)}));t.push(e)}return Promise.all(t)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}countdownLogic(t){const e=()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)};e(),this.interval=setInterval(e,1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isFetchingGame=!0,fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{var e,i;this.gameData=t,this.basicStake=this.gameData.rules.stakes.length?Number(this.gameData.rules.stakes[0].value):0,this.basicLine=(null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.length)?this.gameData.rules.betTypes[0].boardsAllowed[0]:1,this.basicBetType=this.gameData.rules.betTypes[0],this.nextDate=null===(i=this.gameData.currentDraw)||void 0===i?void 0:i.date,this.nextDate&&this.countdownLogic(this.nextDate),this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed,this.quickPick=this.gameData.rules.quickPickAvailable,this.isSubscription=this.gameData.rules.wagerTypes&&this.gameData.rules.wagerTypes.includes("Subscription");let s=this.gameData.draws?this.gameData.draws.filter((t=>!t.winningNumbers)):[];s.length>0&&(this.nextDraw=s[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)})).finally((()=>{this.isFetchingGame=!1}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.mainTickets.forEach((t=>{var e;t.completed.every((t=>t))&&(this.totalAmount+=t.drawCount*(t.stake||this.basicStake)*t.multiplierNum*t.lineNum*(null===(e=t.betType)||void 0===e?void 0:e.combinations))})),this.currency=t}gridFilledHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!0,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:t.detail.drawCount,stake:e.stake||this.basicStake,selectedNumbers:i,multiplierNum:t.detail.multiplierNum,multiplier:t.detail.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:t.detail.quickPicks,betName:t.detail.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}gridDirtyHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!1,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:e.drawCount,stake:e.stake,selectedNumbers:i,multiplierNum:e.multiplierNum,multiplier:e.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:e.quickPicks,betName:e.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}modalCloseEvent(){this.loginModalVisible=!1,this.successVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.mainTickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){const{ticketId:e,multiplierNum:i,multiplier:s}=t.detail;this.mainTickets[e-1].multiplierNum=i,this.mainTickets[e-1].multiplier=s,this.calculateTotalAmount()}drawMultiplierChangeHandler(t){const{ticketId:e,drawCount:i}=t.detail;this.mainTickets[e-1].drawCount=i,this.calculateTotalAmount()}lineMultiplierChangeHandler(t){const{ticketId:e,lineNum:i}=t.detail;this.mainTickets[e-1].lineNum=i,this.mainTickets[e-1].completed=Array.from({length:i},(()=>!1)),this.mainTickets[e-1].selectedNumbers=[],this.mainTickets[e-1].quickPicks=[]}betTypeChangeHandler(t){const{ticketId:e,betType:i}=t.detail;this.mainTickets[e-1].betType=i}createNewTicket(){this.mainTickets=[...this.mainTickets,{gameId:this.gameId,ticketId:this.mainTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine,quickPicks:[!1],betName:""}],this.secondaryTickets=[...this.secondaryTickets,{gameId:this.gameId,ticketId:this.secondaryTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}]}showLoginModal(){this.loginModalVisible=!0}handleSubscriptionReady(t){this.subscriptionParam=t.detail}handleSubscriptionCheckChange(t){this.isSubscribed=t.detail}buildTicketParam(){let t={playerId:this.playerId.toString(),tickets:[]},e=[];this.secondarySelectionAllowed&&(e=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let i=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),s=[...new Set([...e,...i])].sort(((t,e)=>t-e));if(s.length){this.showSubmitError=!0;let t=s.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,setTimeout((()=>{this.showSubmitError=!1}),3e3),null}return this.mainTickets.forEach(((e,i)=>{var s;t.tickets.push({startingDrawId:this.nextDraw,amount:(e.stake*e.drawCount*e.multiplierNum*(e.lineNum||1)*(null===(s=e.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:e.selectedNumbers.map(((t,s)=>{var o;return{betType:(null===(o=e.betType)||void 0===o?void 0:o.id)||this.gameData.rules.defaultBetType,stake:e.stake,selections:t,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[],quickPick:e.quickPicks[s],betName:e.betName}})),multiplier:e.multiplier,multiplierNum:e.multiplierNum,drawCount:e.drawCount,quickPick:this.quickPick})})),t}handleSubmitTickets(){this.isSubscription&&this.isSubscribed?(this.submitTickets(),this.submitSubscriptionTickets()):this.submitTickets()}async submitSubscriptionTickets(){try{let t=await this.buildTicketParam();if(!t)return;if(!this.subscriptionParam||"string"==typeof this.subscriptionParam)return this.subscriptionError="string"==typeof this.subscriptionParam?this.subscriptionParam:"Ouccurence is required.",this.showSubscriptionError=!0,void setTimeout((()=>{this.showSubscriptionError=!1}),3e3);this.isLoading=!0;const e=this.playerId.toString(),i=`${this.endpointSubscription}/player/${e}/ruleDefinition`;this.subscriptionParam.playerId=e;const s=vh(new Date,"yyyyMMddHHMMSS");this.subscriptionParam.name=`${this.subscriptionParam.ruleType}_${e}_${s}`;const{id:o}=await Wh(i,"POST",this.subscriptionParam,{Authorization:`Bearer ${this.sessionId}`});if(t){const e=Object.assign(Object.assign({},t),{ruleDefinitionId:o}),i=`${this.endpointTicket}/subscription`;await Wh(i,"POST",e,{Authorization:`Bearer ${this.sessionId}`}),$h({message:"Subscription rule created successfully.",theme:"success"});const s=new CustomEvent("resetAllTicketSelection",{bubbles:!0,composed:!0});document.dispatchEvent(s),console.log("resetAllTicketSelection event emitted through document after subscription ticket submission")}}catch(t){$h({message:"Failed to create the subscription rule. Please try again.",theme:"error"})}this.isLoading=!1}submitTickets(){let t=new URL(`${this.endpointTicket}/tickets`);const e=this.buildTicketParam();if(e){const i=Lh();let s={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":i},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,s).then((t=>{if(t.status>300)throw this.apiError=t.statusText+".",this.showApiError=!0,setTimeout((()=>{this.showApiError=!1}),3e3),new Error(t.statusText);return t.json()})).then((()=>{$h({message:"Ticket submitted successfully.",theme:"success"}),this.resetAllTicketSelection.emit();const t=new CustomEvent("resetAllTicketSelection",{bubbles:!0,composed:!0});document.dispatchEvent(t)})).catch((t=>{console.log("Error ",t),$h({message:"Failed to purchase the ticket. Please try again.",theme:"error"})})).finally((()=>{this.isLoading=!1}))}else console.log("No valid ticket parameters to submit")}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,i,o,r,a,n,l,h,c,d,u,p,m,f,v,b,g,y,w;return this.hasErrors?s("div",{class:"GamePage"},s("div",{class:"Title"},jh("error",this.language))):s("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},s("div",{class:"GridBanner",style:{background:this.backgroundUrl?`url(${this.backgroundUrl})`:"","background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},s("div",{class:"BannerButtonsWrapper"}),s("div",{class:"Tabs"},s("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},jh("buy",this.language)),s("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},jh("viewLatest",this.language)))),this.isFetchingGame?s("div",{class:"fetching"},"Loading..."):s("div",{class:"GamePageWrap"},this.nextDate?s("div",null,s("div",{class:"NextDrawWrapper"},s("div",{class:"NextDraw"},s("p",{class:"BannerText"},jh("nextDraw",this.language)),s("div",{class:"BannerCountdown"},s("span",{class:"CountdownDays"},this.daysRemaining,"D"),s("span",{class:"CountdownHours"},this.hoursRemaining,"H"),s("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),s("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&s("div",{class:"GamePageContentWrapper"},s("div",{class:"GamePageContent"},s("div",{class:"GameDetails"},s("lottery-game-details",{"low-number":null===(e=null===(t=this.gameData.rules)||void 0===t?void 0:t.boards[0])||void 0===e?void 0:e.lowNumber,"high-number":null===(o=null===(i=this.gameData.rules)||void 0===i?void 0:i.boards[0])||void 0===o?void 0:o.highNumber,"minimum-allowed":null===(a=null===(r=this.gameData.rules)||void 0===r?void 0:r.boards[0])||void 0===a?void 0:a.minimumAllowed,"maxinum-allowed":null===(l=null===(n=this.gameData.rules)||void 0===n?void 0:n.boards[0])||void 0===l?void 0:l.maxinumAllowed,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"translation-url":this.translationData})),s("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,i;return s("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":null===(e=this.gameData.rules)||void 0===e?void 0:e.quickPickAvailable,"reset-button":null===(i=this.gameData.rules)||void 0===i?void 0:i.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})}))),s("div",{class:"OrderSummary"},s("h3",{class:"OrderSummaryTitle"},jh("orderSummaryTitle",this.language)),s("div",{class:"OrderTicketInfo"},s("div",{class:"Ticket"},jh("orderSummaryTickets",this.language),": ",s("span",null,this.mainTickets.length)),s("div",null,s("span",null,this.thousandSeperator((null===(c=null===(h=this.mainTickets[0])||void 0===h?void 0:h.betType)||void 0===c?void 0:c.combinations)*(null===(d=this.mainTickets[0])||void 0===d?void 0:d.lineNum))),s("span",{class:"Multiplier"},"x"),(null===(u=this.gameData.rules)||void 0===u?void 0:u.stakeMultiplierAvailable)&&s("span",null,s("span",null,1===(null===(p=this.mainTickets[0])||void 0===p?void 0:p.multiplierNum)?`${null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum} Multiplier`:`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multipliers`),s("span",{class:"Multiplier"},"x")),s("span",null,`${null===(v=this.mainTickets[0])||void 0===v?void 0:v.stake} EUR`),(null===(b=this.gameData.rules)||void 0===b?void 0:b.drawMultiplierAvailable)&&s("span",null,s("span",{class:"Multiplier"},"x"),s("span",null,1===(null===(g=this.mainTickets[0])||void 0===g?void 0:g.drawCount)?`${null===(y=this.mainTickets[0])||void 0===y?void 0:y.drawCount} Draw`:`${null===(w=this.mainTickets[0])||void 0===w?void 0:w.drawCount} Draws`)))),s("hr",null),s("div",{class:"Total"},jh("orderSummaryTotal",this.language),":"," ",s("span",null,this.thousandSeperator(this.totalAmount)," ",this.currency)),this.isSubscription&&s("div",{class:"SubscriptionWrapper"},s("lottery-subscription",{endpoint:this.endpoint,endpointSubscription:this.endpointSubscription,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,gameName:this.gameData.name})),s("div",{class:"ButtonWrapper"},this.isLoggedIn&&s("div",null,!this.isLoading&&s("div",{class:"submitWrap"},s("div",{class:"Button",onClick:()=>this.handleSubmitTickets()},jh("orderSummarySubmit",this.language)),this.showSubmitError&&s("div",{class:"submitError"},this.submitError),this.showApiError&&s("div",{class:"submitError"},this.apiError),this.showSubscriptionError&&s("div",{class:"submitError"},this.subscriptionError)),this.isLoading&&s("span",{class:"Button",style:{cursor:"default"}},jh("loading",this.language))),!this.isLoggedIn&&s("div",null,s("span",{class:"Button",onClick:()=>this.showLoginModal()},jh("orderSummarySubmit",this.language)),s("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("modalLogin",this.language)))))))),1==this.tabIndex&&s("div",{class:"HistoryContentWrapper"},s("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))):s("div",{class:"noActiveDraw"},jh("emptyText",this.language))),s("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"],endpoint:["watchGameInfoChange"],gameId:["watchGameInfoChange"]}}};Hh.style='@charset "UTF-8";\n@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n display: block;\n font-family: "Roboto", sans-serif;\n}\n\n.GamePage {\n background-color: var(--emw--color-background, #fff);\n}\n.GamePage ß .GridBanner {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n background-repeat: no-repeat;\n background-position: center;\n color: var(--emw--color-typography, #000);\n padding: 0 20px 10px;\n height: 220px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.GamePage ß .GridBanner .BannerButtonsWrapper {\n display: flex;\n justify-content: space-between;\n padding-top: 16px;\n}\n.GamePage ß .GridBanner .BannerButtonsWrapper .BannerBackButton,\n.GamePage ß .GridBanner .BannerButtonsWrapper .BannerLobbyButton {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 7px 15px;\n font-size: 12px;\n text-transform: uppercase;\n width: 80px;\n cursor: pointer;\n}\n.GamePage ß .GridBanner .GridBannerArea {\n padding-top: 30px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.GamePage .TotalWinnings {\n color: var(--emw--color-typography, #000);\n font-size: 18px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 10px;\n text-transform: uppercase;\n}\n.GamePage .TotalWinnings span {\n font-size: 18px;\n font-weight: 700;\n}\n.GamePage .NextDraw {\n color: var(--emw--color-primary, #009993);\n font-size: 24px;\n font-weight: 600;\n margin: 0 auto;\n text-align: center;\n text-transform: uppercase;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 4px;\n}\n.GamePage .NextDraw .BannerText {\n font-weight: 400;\n font-size: 18px;\n text-transform: uppercase;\n padding: 0;\n margin: 15px 0 0 0;\n}\n.GamePage .NextDraw .BannerCountdown {\n font-size: 22px;\n color: var(--emw--color-primary, #009993);\n display: flex;\n gap: 20px;\n}\n.GamePage .Tabs {\n display: flex;\n justify-content: center;\n gap: 10px;\n}\n.GamePage .Tabs .TabButton {\n border-radius: var(--emw--button-border-radius, 4px);\n cursor: pointer;\n padding: 8px 0;\n width: 50%;\n max-width: 200px;\n border: 1px solid var(--emw--color-primary, #009993);\n background: var(--emw--color-primary, #009993);\n color: var(--emw--color-background-secondary, #f5f5f5);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.GamePage .Tabs .TabButton.Active {\n color: var(--emw--color-primary, #009993);\n background: var(--emw--color-gray-50, #f5f5f5);\n border: 1px solid var(--emw--color-gray-50, #f5f5f5);\n}\n\n.LastDrawResultsTitle {\n color: var(--emw--color-primary, #009993);\n padding: 25px 0 10px 0;\n text-align: center;\n border-radius: var(--emw--button-border-radius, 4px);\n text-transform: uppercase;\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.NextDrawWrapper {\n padding: 10px 15px;\n background: var(--emw--color-background, #fff);\n}\n.NextDrawWrapper .BannerText {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n.NextDrawWrapper .BannerCountdown {\n font-size: 22px;\n display: flex;\n gap: 8px;\n color: var(--emw--color-primary, #009993);\n font-weight: bolder;\n justify-content: center;\n}\n\n.GamePageContent {\n max-width: 1200px;\n margin: 0 auto;\n background: var(--emw--color-background, #fff);\n container-type: inline-size;\n container-name: gamePage;\n}\n\n.TicketsWrapper {\n min-height: 300px;\n}\n\n@container gamePage (min-width: 1200px) {\n .GamePageContent .TicketsWrapper {\n float: left;\n width: 49%;\n }\n .GamePageContent .GameDetails {\n float: right;\n width: 49%;\n }\n .GamePageContent .OrderSummary {\n float: right;\n width: 49%;\n }\n}\n.GameDetails {\n padding-bottom: 10px;\n margin-bottom: 20px;\n}\n\n.OrderSummary {\n min-width: 200px;\n border-radius: var(--emw--button-border-radius, 4px);\n color: var(--emw--color-typography, #000);\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n background: var(--emw--color-background, #fff);\n}\n.OrderSummary .OrderSummaryTitle {\n font-size: 16px;\n color: var(--emw--color-primary, #009993);\n text-transform: uppercase;\n text-align: center;\n}\n.OrderSummary .OrderTicketInfo {\n display: flex;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n.OrderSummary .OrderTicketInfo .Multiplier {\n margin: 0 6px;\n}\n.OrderSummary .Ticket {\n display: inline-block;\n color: var(--emw--color-typography, #000);\n font-size: 14px;\n height: 50px;\n line-height: 50px;\n margin-left: 15px;\n margin-right: 30px;\n}\n.OrderSummary .Ticket span {\n text-align: right;\n}\n.OrderSummary hr {\n border: none;\n border-top: 1px double var(--emw--color-gray-100, #e6e6e6);\n color: var(--emw--color-gray-100, #e6e6e6);\n width: 100%;\n}\n.OrderSummary .Total {\n display: inline-block;\n color: var(--emw--color-typography, #000);\n font-size: 14px;\n height: 50px;\n line-height: 50px;\n margin-left: 15px;\n}\n.OrderSummary .Total span {\n text-align: right;\n}\n\n.ButtonWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ButtonWrapper .Button {\n cursor: pointer;\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 8px 60px;\n width: max-content;\n margin: 5px;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: var(--emw--color-primary, #009993);\n color: var(--emw--color-background-secondary, #f5f5f5);\n}\n.ButtonWrapper .Button:hover {\n background: var(--emw--color-secondary, #00aba4);\n}\n.ButtonWrapper .Button.ButtonDisabled {\n pointer-events: none;\n background: var(--emw--color-background-tertiary, #ccc);\n}\n.ButtonWrapper .submitError {\n margin-top: 10px;\n color: var(--emw--color-error, #ff3d00);\n}\n.ButtonWrapper .submitWrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.SubmitModalSuccess {\n text-align: center;\n font-size: 18px;\n padding: 20px;\n}\n\n.DeleteTicketModalWrapper {\n padding: 20px;\n text-align: center;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalTitle {\n font-size: 16px;\n color: var(--emw--color-primary, #009993);\n font-weight: 400;\n text-transform: uppercase;\n margin: 20px 0 40px;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalText {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n line-height: 22px;\n margin-bottom: 40px;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons {\n display: flex;\n gap: 10px;\n justify-content: center;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 25px;\n width: max-content;\n margin: 5px;\n color: var(--emw--color-typography, #000);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: var(--emw--color-error, #ff3d00);\n border: 1px solid var(--emw--color-error, #ff3d00);\n color: var(--emw--color-background-secondary, #f5f5f5);\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover {\n background: var(--emw--color-tertiary, #ff6536);\n border: 1px solid var(--emw--color-error, #ff3d00);\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel {\n cursor: pointer;\n width: max-content;\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 10px 25px;\n margin: 5px;\n border: 1px solid var(--emw--color-secondary, #00aba4);\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover {\n background: var(--emw--color-gray-50, #f5f5f5);\n}\n\n.GamePage {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.GamePage .GamePageContentWrapper,\n.GamePage .HistoryContentWrapper {\n padding: 15px;\n flex: 1;\n background: var(--emw--color-background, #fff);\n}\n\n.HistoryContentWrapper::after,\n.GamePageContent::after {\n content: "";\n display: block;\n clear: both;\n}\n\n.GamePageWrap .noActiveDraw {\n margin: 10% auto 0px;\n padding: 24px;\n border: 1px solid var(--emw--color-primary, #009993);\n border-radius: 4px;\n width: 280px;\n color: var(--emw--color-primary, #009993);\n}\n\n.fetching {\n margin: 40px auto;\n}';const Gh=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.selectedCounter=0,this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return s("div",{key:"f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7",class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{key:"e381adbfff57e2cc343188c46037eb45ab798cac",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))):""))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Gh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Uh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Vh={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},qh=(t,e)=>Vh[void 0!==e&&e in Vh?e:"en"][t],Yh=class{constructor(i){t(this,i),this.hpPageChange=e(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,e)=>{isNaN(t)?0===e&&this.currentPage<=4?this.navigateTo("firstPage"):0===e&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===e&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Vh[e][i]=t[e][i]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,e)=>e+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,e)=>this.currentPage+e-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,e)=>this.endInt-2+e)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(Uh(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},s("span",null,t)))))),e=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},qh("firstPage",this.language)),s("span",{class:"NavigationIcon"})),i=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"})));Uh(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let o=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},qh("lastPage",this.language)),s("span",{class:"NavigationIcon"})),r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);return Uh(this.userAgent)&&(r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&r)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Yh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--color-typography, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-150, #6f6f6f);border-radius:5px;background:var(--emw--color-gray-150, #6f6f6f);color:var(--emw--color-typography-inverse, #fff);font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004d4a);border-color:var(--emw--color-primary-variant, #004d4a)}button:disabled{background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography-inverse, #fff);cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}}';const Jh=["ro","en","hr"],Kh={en:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ro:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},fr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ar:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},hr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"}},Zh=(t,e)=>{const i=e;return Kh[void 0!==i&&Jh.includes(i)?i:"en"][t]};function Xh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const Qh=class{constructor(i){t(this,i),this.subscriptionCompleted=e(this,"subscriptionCompleted",7),this.subscriptionCheckChange=e(this,"subscriptionCheckChange",7),this.changeDateParam=()=>{if(this.filterData.from&&!this.filterData.to){let t=this.filterData.from,e=t.split("/");t=new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),0,0,0)).toISOString();const i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:"",fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}if(this.filterData.from&&this.filterData.to){const{from:t,to:e}=this.transDate(this.filterData.from,this.filterData.to),i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:e,fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{from:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{to:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.translationUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.language="en",this.gameName=void 0,this.isSubscribed=!1,this.frequenceList=[],this.frequenceState="",this.filterData={from:"",to:""},this.subscriptionCode="lottery-subscription-widget001",this.conditionId="",this.paramId="",this.conditionRule=void 0,this.paramRule=void 0,this.peroidRule=void 0,this.startDateRule=void 0,this.endDateRule=void 0,this.gameNameRule=void 0,this.ruleType=""}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Kh[e][i]=t[e][i]}))),this.getSubscriptionData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}transDate(t,e){let i=t.split("/"),s=e.split("/");return{from:new Date(Date.UTC(Number(i[2]),Number(i[1])-1,Number(i[0]),0,0,0)).toISOString(),to:new Date(Date.UTC(Number(s[2]),Number(s[1])-1,Number(s[0]),23,59,59)).toISOString()}}async getSubscriptionData(){try{const t=`${this.endpointSubscription}/feWidgetConfig/${this.subscriptionCode}`,{conditionMetadataId:e,paramMetadataId:i,ruleType:s}=await Xh(t);this.conditionId=e,this.paramId=i,this.ruleType=s;const o=`${this.endpointSubscription}/metadata/${this.conditionId}`,r=`${this.endpointSubscription}/metadata/${this.paramId}`,[a,n]=await Promise.allSettled([Xh(o),Xh(r)]);if("fulfilled"!==a.status||"fulfilled"!==n.status)throw new Error("Failed to get subscription data");this.conditionRule=a.value,this.paramRule=n.value,this.conditionRule.fields&&(this.peroidRule=this.conditionRule.fields.find((t=>"Period"===t.code)),this.startDateRule=this.conditionRule.fields.find((t=>"StartDate"===t.code)),this.endDateRule=this.conditionRule.fields.find((t=>"EndDate"===t.code)),this.gameNameRule=this.conditionRule.fields.find((t=>"GameName"===t.code)),this.frequenceList=this.peroidRule.enums.map((t=>({label:t.text,value:t.key}))))}catch(t){console.error(t)}}handleCheckboxchange(t){this.isSubscribed=t.target.checked,this.subscriptionCheckChange.emit(this.isSubscribed)}handleSelectionChange(t){if(this.frequenceState=t.detail.value,"NeverMissADraw"===this.frequenceState&&this.isSubscribed){const t={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};t.params=this.paramRule.fields.map((t=>({value:"",fieldId:t.id}))),this.subscriptionCompleted.emit(t)}else"Custom"===this.frequenceState&&this.isSubscribed&&this.subscriptionCompleted.emit("Subscription start date is required.")}formateDate(t){const{year:e,month:i,day:s}=t;return vh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate}))}render(){return s("div",{key:"f301b99245d1950605dbdfac1f4bc06c60ea0c50",class:"subscripitonContainer",ref:t=>this.stylingContainer=t},s("vaadin-checkbox",{key:"e9005320778ae1d66975e7825b5259fa2bca36d2",label:"Subscription",checked:this.isSubscribed,onChange:this.handleCheckboxchange.bind(this)}),this.isSubscribed&&s("div",{key:"9dc052565ef92bb4c00559766b933e4bf567c1a7",class:"secondConditon"},s("span",{key:"4251cf447cb9c00b12109c1d930720f6465983be",style:{"margin-right":"8px"}},"Occurrence: "),s("vaadin-select",{key:"0eabde390ba1fcab6ec654bf567c38b1afd376c7",items:this.frequenceList,value:this.frequenceState,"on-value-changed":this.handleSelectionChange.bind(this)}),"Custom"===this.frequenceState&&s("div",{key:"61ab68b026444a2c2f63f200b7eeeb84d615c00e",class:"thirdCondition"},s("div",{key:"6b03192f386a3b864012c8c5374a454f367a95e3",class:"filterCalenderWrap"},s("div",{key:"ec7e479eaba4b50dcd41cb953b90dd97fe879dae",class:"filterText"},"Subscription Start Date*"),s("div",{key:"796c81340a082f033a9461d7ef2e0116b962d1e6",class:"filter"},s("vaadin-date-picker",{value:this.filterData.from,key:"filterFromCalendar",max:void 0===this.filterData.to?void 0:this.changeFormate(this.filterData.to),onChange:this.handleFilterFrom,placeholder:Zh("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))),s("div",{key:"7a8a64b82154802b65a848f73226e65904e6fe57",class:"filterCalenderWrap"},s("div",{key:"396e291a86a3121f7a3fd7d1316271b8c36f6915",class:"filterText"},"Subscription End Date"),s("div",{key:"ecf9e2f2564c8bf336fcaef61d9ed46635f1bda0",class:"filter"},s("vaadin-date-picker",{value:this.filterData.to,key:"filterToCalendar",min:void 0===this.filterData.from?void 0:this.changeFormate(this.filterData.from),onChange:this.handleFilterTo,placeholder:Zh("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Qh.style=".subscripitonContainer{margin-bottom:40px}.subscripitonContainer vaadin-checkbox[checked]::part(checkbox){background-color:var(--emw--color-primary, #009993)}.subscripitonContainer .secondCondition{padding-left:24px}.subscripitonContainer .thirdCondition{display:flex;gap:24px;align-items:center}.subscripitonContainer .thirdCondition,.subscripitonContainer .secondConditon{margin:16px 0}";const tc=["ro","en","hr"],ec={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},ic=(t,e)=>{const i=e;return ec[void 0!==i&&tc.includes(i)?i:"en"][t]},sc=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let o=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=o.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])ec[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)],this.quickPicks[e]=!1}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}toggleResetAllSeletion(){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)}))}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return s("div",null,s("p",null,ic("loading",this.language)));if(this.hasErrors)return s("div",null,s("p",null,ic("error",this.language)));{const{rules:t}=this.gameData;return s("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},s("p",{class:"TicketTitle"},this.gameData.name),s("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>s("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&s("div",null,s("label",{class:"Label"},ic("playType",this.language),": "),s("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&s("div",null,s("label",{class:"Label"},ic("lines",this.language),": "),s("div",{class:"WagerInput"},s("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},s("span",null,this.lineMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>s("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,i)=>s("div",null,s("div",{class:"TicketGridHeader"},s("div",null,ic("lineName",this.language),i+1),this.resetButton&&this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(i)},ic("resetButton",this.language))),this.autoPick&&!this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(i)},ic("autoButton",this.language)))),s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].selectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),this.secondarySelectionAllowed&&s("div",{class:"SecondarySelectionWrapper"},s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))),t.stakeMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ic("multiplier",this.language),": "),s("div",{class:"WagerInput"},t.stakeMultipliers.length>1?s("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},s("span",null,this.stakeMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>s("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ic("numberOfDraws",this.language),": "),s("div",{class:"WagerInput"},t.durations.length>1?s("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},s("span",null,this.drawMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.durations.map((t=>s("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),s("div",null,s("label",{class:"Label"},ic("wagerPerDraw",this.language),": "),s("div",{class:"WagerInput"},t.stakes.length>1?s("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleClass()},s("span",null,this.amountInfo.value," ",this.amountInfo.currency),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakes.map((t=>s("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):s("div",null,s("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),s("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};sc.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-primary, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-primary, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--color-typography, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--color-typography, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-typography-inverse, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-typography-inverse, #fff)}.ResetButton:hover{background:var(--emw--color-tertiary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-background-secondary, #f5f5f5);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-background-tertiary, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-background-tertiary, #ccc);overflow:hidden;background:var(--emw--color-typography-inverse, #fff);z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-typography-inverse, #fff)}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-background-secondary, #f5f5f5);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-background-tertiary, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-background-secondary, #f5f5f5)}';const oc=["ro","en","fr","ar","hr"],rc={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},ac=(t,e)=>{const i=e;return rc[void 0!==i&&oc.includes(i)?i:"en"][t]},nc=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])rc[e][i]=t[e][i]})))}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"28756fcff01b738bfe8339114445032a5da757c2",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"18a566d1c97ccbf74cd759215df3a18faf5c43dc","header-title":`${ac("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"3a056f64dc8572b66f50cb151adde2caea2cd427",slot:"accordionContent"},s("lottery-ticket",{key:"06a0696b79840c05381429b1b87af94b478b09f0",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};nc.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{l as general_multi_select,d as helper_accordion,bh as helper_filters,yh as helper_modal,Ch as helper_tab,Sh as helper_tabs,Th as lottery_bullet,zh as lottery_draw_results,Nh as lottery_draw_results_history,Oh as lottery_game_details,Hh as lottery_game_page,Gh as lottery_grid,Yh as lottery_pagination,Qh as lottery_subscription,sc as lottery_ticket,nc as lottery_ticket_controller}
6657
+ `}static get is(){return"vaadin-tabs"}}function Tl(t){return Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(t)}function Dl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Al(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Il(t){Al(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Tl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}T(Sl);var zl={};function Ml(){return zl}function Pl(t){Al(1,arguments);var e=Il(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function Bl(t){Al(1,arguments);var e=Il(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=Pl(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Pl(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function Nl(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Il(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Il(t),d=c.getUTCFullYear(),u=Ml(),p=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var f=Nl(m,e),v=new Date(0);v.setUTCFullYear(d,0,p),v.setUTCHours(0,0,0,0);var b=Nl(v,e);return c.getTime()>=f.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function El(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const Fl=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return El("yy"===e?s%100:s,e.length)},jl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):El(i+1,2)},Rl=function(t,e){return El(t.getUTCDate(),e.length)},Ll=function(t,e){return El(t.getUTCHours()%12||12,e.length)},Wl=function(t,e){return El(t.getUTCHours(),e.length)},$l=function(t,e){return El(t.getUTCMinutes(),e.length)},Hl=function(t,e){return El(t.getUTCSeconds(),e.length)},Gl=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return El(Math.floor(s*Math.pow(10,i-3)),e.length)};var Ul={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return Fl(t,e)},Y:function(t,e,i,s){var o=Ol(t,s),r=o>0?o:1-o;return"YY"===e?El(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):El(r,e.length)},R:function(t,e){return El(Bl(t),e.length)},u:function(t,e){return El(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return El(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return El(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return jl(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return El(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){Al(1,arguments);var i=Il(t),s=Nl(i,e).getTime()-function(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Nl(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):El(o,e.length)},I:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=Pl(e).getTime()-function(t){Al(1,arguments);var e=Bl(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Pl(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):El(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Rl(t,e)},D:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):El(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return El(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return El(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return El(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return Ll(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Wl(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hl(t,e)},S:function(t,e){return Gl(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ql(o);case"XXXX":case"XX":return Yl(o);default:return Yl(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return ql(o);case"xxxx":case"xx":return Yl(o);default:return Yl(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},t:function(t,e,i,s){return El(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return El((s._originalDate||t).getTime(),e.length)}};function Vl(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var a=e||"";return i+String(o)+a+El(r,2)}function ql(t,e){return t%60==0?(t>0?"-":"+")+El(Math.abs(t)/60,2):Yl(t,e)}function Yl(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+El(Math.floor(o/60),2)+i+El(o%60,2)}const Jl=Ul;var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Zl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Xl={p:Zl,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return Kl(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(o,e)).replace("{{time}}",Zl(r,e))}};const Ql=Xl;var th=["D","DD"],eh=["YY","YYYY"];function ih(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var sh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var rh,ah={date:oh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function lh(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[n]||t.values[a]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function hh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,a=o[0],n=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const ch={code:"en-US",formatDistance:function(t,e,i){var s,o=sh[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:ah,formatRelative:function(t){return nh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:lh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:lh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:lh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:lh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:lh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(rh.matchPattern);if(!i)return null;var s=i[0],o=t.match(rh.parsePattern);if(!o)return null;var r=rh.valueCallback?rh.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:hh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:hh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var dh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ph=/^'([^]*?)'?$/,mh=/''/g,fh=/[a-zA-Z]/;function vh(t,e,i){var s,o,r,a,n,l,h,c,d,u,p,m,f,v,b,g,y,w;Al(2,arguments);var x=String(e),k=Ml(),_=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:k.locale)&&void 0!==s?s:ch,C=Dl(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Dl(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:k.weekStartsOn)&&void 0!==m?m:null===(y=k.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var T=Il(t);if(!function(t){if(Al(1,arguments),!function(t){return Al(1,arguments),t instanceof Date||"object"===Tl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Il(t);return!isNaN(Number(e))}(T))throw new RangeError("Invalid time value");var D=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(T),A=function(t,e){return Al(2,arguments),function(t,e){Al(2,arguments);var i=Il(t).getTime(),s=Dl(e);return new Date(i+s)}(t,-Dl(e))}(T,D),I={firstWeekContainsDate:C,weekStartsOn:S,locale:_,_originalDate:T};return x.match(uh).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ql[e])(t,_.formatLong):t})).join("").match(dh).map((function(s){if("''"===s)return"'";var o,r,a=s[0];if("'"===a)return(r=(o=s).match(ph))?r[1].replace(mh,"'"):o;var n=Jl[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||-1===eh.indexOf(s)||ih(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==th.indexOf(s))||ih(s,e,String(t)),n(A,s,_.localize,I);if(a.match(fh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s})).join("")}const bh=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.handleTicketId=t=>{t.target.value&&(this.filterData.ticketId=t.target.value)},this.handleTicketType=t=>{t.target.selectedItems&&t.target.selectedItems.length&&(this.filterData.ticketType=t.target.selectedItems.map((t=>t.value)))},this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.ticketTypeList=[{label:"Normal",value:"NORMAL"},{label:"Syndicate",value:"SYNDICATE"},{label:"Subscription",value:"SUBSCRIPTION"}]}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])p[e][i]=t[e][i]})))}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.filterFromCalendar||this.filterData.filterToCalendar||this.filterData.ticketId||this.filterData.ticketType.length)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){if(this.modalCloseEvent(),this.showClearButton=!0,this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterSelectionHandler(this.filterData)}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.clearSelection(),this.filterData={}}formateDate(t){const{year:e,month:i,day:s}=t;return vh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}render(){return s("div",{key:"38024b55a7afaa317f11fe7dc3832e6e3ebcf7ac",class:"HelperFilters",ref:t=>this.stylingContainer=t},s("div",{key:"30f033084f8b40ceb660a92d6769fd1dfb1f7d98",class:"FilterButtonsWrapper"},s("button",{key:"3c347b67791547808207fd72c57c10a0c62c9e25",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},m("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?s("button",{class:"FilterClear",onClick:()=>this.resetSearch()},m("filterClear",this.language)):null),s("helper-modal",{key:"71eed9aa7b4c9aa16d218ad7103181498c81975a","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"a97c9b4a1cbc1fb0afc0a128e626ead51c7f8047",class:"FilterModalHeader"},s("h3",{key:"10f4051b2e02ccd372c3e0dbe757983ba43a16e6",class:"FilterModalTitle"},m(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),s("div",{key:"50f4af101f28a436b0a275010c89eae94833d449",class:"FilterModalBody"},this.activateTicketSearch&&s("div",{key:"1426e94093e76ec65f53a9b6a50aca564f572aab",class:"ticketFilterContainer"},s("div",{key:"4aa30387fb87aa411a21ea4452316f139c3301fd",class:"ticketFilterItem"},s("div",{key:"66136fc7c3588b834f02d1efeb2e622e1bd0b52d",class:"filterKey"},m("filterTicketIdPlaceholder",this.language)),s("vaadin-text-field",{key:"522a8fdc8ad41b033f4126bf27cb449d9db6606e",placeholder:m("filterTicketIdPlaceholder",this.language),value:this.filterData.ticketId,onInput:t=>this.handleTicketId(t)})),s("div",{key:"d2cde3e11ba86f6443fca85cde2c7383a87585b8",class:"ticketFilterItem"},s("div",{key:"6b98a9e702f484c19754a04cb4f1a009c9add01a",class:"filterKey"},m("searchByTicketType",this.language)),s("div",{key:"b52029c39d340ec3e5aa7f9b6844d3cf05bdaadc",class:"general-multi-select-container"},s("general-multi-select",{key:"bf2948532aba6d577eb50e338d2a6c5e5737f674","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrlContent,ref:t=>this.comboBox=t,placeholder:m("filterTiketTypePlaceholder",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType})))),s("div",{key:"e7214b53b0c05f6379da1f6e83b69b8aadfcc59a",class:"filterItem"},s("div",{key:"2262d0e72ac653f93c04381d70b797e9fff68ead",class:"filterKey"},m("searchByDate",this.language)),s("div",{key:"c1b10ba14ebe8624af0708d0a500b9a1d1751dbf",class:"FilterCalendarWrapper"},s("vaadin-date-picker",{key:"807a7987b19ecdc3b34d759a9a5d68d3f77e27dd",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:m("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),s("vaadin-date-picker",{key:"3be5eea8d7c41f84c0d624faf32cd800468366a4",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:m("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"})))),s("div",{key:"0987fee1be9552effcc023b93e67886e7bab535a",class:"FilterModalFooter"},s("button",{key:"f46728dfb5e63db90f6c8437d233b47354419295",class:"FilterModalButton",onClick:()=>this.filterSearch()},m("filterModalButton",this.language)))))}};bh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-typography-inverse, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .filterKey,.FilterModalBody .filterKey,.FilterModalFooter .filterKey{color:var(--emw--color-primary, #009993);text-align:left;font-size:16px}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-primary, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-primary-variant, #004d4a);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-primary, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}.ticketFilterItem{margin:12px 0}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}';const gh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),yh=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&s("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},s("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(gh(this.userAgent)?" HelperModalMobileContent":"")},s("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(gh(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),s("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};yh.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:var(--emw--color-background, #fff);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-300, #333);box-shadow:2px 2px 2px var(--emw--color-typography-secondary, #ccc);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-dialog-background, #fff);position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-dialog-background, #fff);top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--color-dialog-typography, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--color-dialog-typography, #000)}";const wh="en",xh=["en"],kh={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},_h=(t,e)=>{const i=e;return kh[void 0!==i&&xh.includes(i)?i:wh][t]},Ch=class{constructor(e){t(this,e),this.selectedIndex=0,this.cmsEndpoint=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0,this.tabContent=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])kh[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=kh[void 0!==i&&xh.includes(i)?i:wh][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):kh[void 0!==i&&xh.includes(i)?i:wh][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=s("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=s("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},s("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},s("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},_h("register",this.language)),s("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},_h("butTickets",this.language)),s("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},_h("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=s("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},s("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},s("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},_h("odds",this.language)),s("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},_h("winGame",this.language)),s("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},_h("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ch.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--color-typography, #000);font-weight:normal}";const Sh=class{constructor(e){t(this,e),this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.mbSource=void 0,this.clientStylingurl="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}connectedCallback(){}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},s("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>s("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),s("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},s("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Sh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-background-secondary, #f5f5f5)}.TabButton.Active{background:var(--emw--color-primary, #009993);color:var(--emw--color-background, #fff)}';const Th=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"2cfab600728d3aa72f9f87e4e07a968ea030e415",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Th.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--color-typography, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-background, #fff);background:radial-gradient(circle at top, var(--emw--color-background, #fff) 0%, var(--emw--color-background, #fff) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 var(--emw--color-gray-300, #333);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-background, #fff) 0%, var(--emw--color-background-secondary, #f5f5f5) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-background, #fff);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-primary, #009993)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #f5f5f5);background:var(--emw--color-gray-250, #ccc);border:solid 2px var(--emw--color-gray-100, #e6e6e6);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #f5f5f5);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-gray-100, #e6e6e6);cursor:default}.Circle.Bonus{background:var(--emw--color-tertiary, #ff6536)}';const Dh=["ro","en","hr"],Ah={en:{drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridDraw:"Draw Numbers",drawNumbersGridTicket:"Selected Numbers",ticketResult:"Ticket Result",amountWon:"Amount won",numberOfDraws:"Number of Draws",multiplierNum:"Multiplier Number",ticketId:"Ticket ID",ticketType:"Ticket Type",ticketAmount:"Ticket Amount",prize:"Prizes"},ro:{drawId:"Id extragere",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase",drawNumbersGridTicket:"Numere selectate",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplierNum:"Multiplier Number",ticketId:"Id biletul",ticketType:"Ticket Type",ticketAmount:"Valoarea biletului",prize:"Premii"},fr:{drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros",drawNumbersGridTicket:"Nombres sélectionnés",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplierNum:"Multiplier Number",ticketId:"ID de billets",ticketType:"Ticket Type",ticketAmount:"Montant du billet",prize:"Prix"},ar:{drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridDraw:" أرقام السحب",drawNumbersGridTicket:"الأرقام المختارة",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplierNum:"Multiplier Number",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",prize:"الجوائز"},hr:{drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih",drawNumbersGridTicket:"Odabrani brojevi",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplierNum:"Multiplier Number",ticketId:"ID listića",ticketType:"Ticket Type",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ih=(t,e)=>{const i=e;return Ah[void 0!==i&&Dh.includes(i)?i:"en"][t]},zh=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.displayPrizeCategory=t=>{const e=new Map;t.forEach((t=>{let i=t.divisionDisplayName,s=t.amount,o=t.currency;i&&"None"!=i&&(e.has(i)?e.set(i,{amount:e.get(i).amount+s,currency:o,times:e.get(i).times+1}):e.set(i,{amount:s,currency:o,times:1}))}));const i=[];for(let[t,s]of e.entries())i.push({prizeName:t,amount:s.amount,currency:s.currency,times:s.times});return i.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),i},this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketType="",this.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketMultiplierNum=void 0,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.ticketDrawData="",this.historyDrawData="",this.tabValue="",this.translationUrl=void 0,this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.drawData=void 0,this.resultMap={Won:"Win",Lost:"Lose"}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ah[e][i]=t[e][i]})))}connectedCallback(){if(this.historyDrawData&&(this.drawData=JSON.parse(this.historyDrawData)),this.ticketNumbers){let t=JSON.parse(this.ticketNumbers);this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.isLoading=!1}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>{t.drawData=Object.assign({},e);let i=this.displayPrizeCategory(t.details);t.details=[...i]}))})),this.ticketDrawDetailsFlag=!1)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}getDivision(t,e){var i,s;let o=t.division,r=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===o));return r&&r.length?r[0].division:null}render(){return this.isLoading?s("p",null,"Loading, please wait ..."):this.hasErrors?void s("p",null,this.errorText):s("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?s("div",{class:"DrawResultsArea"},this.drawData&&s("div",null,s("div",{class:"DrawResultsHeader"},s("span",null,Ih("drawId",this.language),": ",this.drawData.id),s("span",null,Ih("drawDate",this.language),": ",vh(new Date(this.drawData.date),"dd/MM/yyyy"))),s("div",{class:"DrawResultsBody"},s("div",{class:"DrawNumbersGrid"},s("p",null,Ih("drawNumbersGridDraw",this.language)),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.length&&this.drawData.winningNumbers[0].numbers.join(","),"secondary-numbers":this.drawData.winningNumbers.length?this.drawData.winningNumbers[0].secondaryNumbers.join(","):"","display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language)," "),this.drawData.prizes.length?s("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>s("div",null,s("span",{style:{"margin-right":"5px"}},t.division,":"),s("span",{style:{"margin-right":"4px"}}," ",this.thousandSeperator(t.amount.value)),s("span",null,t.amount.currency))))):s("div",null,"None")))))):s("div",{class:"DrawResultsArea TicketDraws"},s("div",{class:"DrawResultsBody"},s("div",{class:"TicketIdContainer"},s("label",{class:"Label"},Ih("ticketId",this.language),": ",s("span",null,this.ticketId))),s("div",{class:"TicketTypeContainer"},s("label",{class:"Label"},Ih("ticketType",this.language),": ",s("span",null,this.ticketType))),s("div",{class:"TicketAmountContainer"},s("label",{class:"Label"},Ih("ticketAmount",this.language),":"," ",s("span",null,`${this.thousandSeperator(this.ticketAmount)} ${this.ticketCurrency}`))),s("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var i;return s("div",null,s("label",{class:"Label"},Ih("drawNumbersGridTicket",this.language),":"),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(i=this.gridSecondaryNumbers[e])||void 0===i?void 0:i.join(","),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))}))),this.ticketMultiplier&&s("div",{class:"DrawMultipler"},s("label",{class:"Label"},Ih("multiplierNum",this.language),": ",this.thousandSeperator(this.ticketMultiplierNum))),s("div",{class:"NumberOfDrawsContainer"},s("label",{class:"Label"},Ih("numberOfDraws",this.language),": ",this.thousandSeperator(this.ticketDrawCount)),s("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&s("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var i,o,r,a,n,l,h,c;return s("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},s("div",{class:"ExpandableBoxHeader"},s("div",{class:"TicketResultContainer"},s("p",null,Ih("ticketResult",this.language),": ",this.resultMap[t.state])),"won"==t.state&&s("div",{class:"AmountWonContainer"},s("p",null,Ih("amountWon",this.language),":"," ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId))),s("div",{class:"ExpandableBoxBody"},s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId)),s("div",{class:"DrawDateContainer"},s("p",null,Ih("drawDate",this.language),": ",null===(i=t.drawData)||void 0===i?void 0:i.date.slice(0,10)," |"," ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),s("div",{class:"DrawNumbersGrid"},t.drawData&&s("div",{class:"BulletContainer"},s("label",{class:"Label"},Ih("drawNumbersGridDraw",this.language),":"),s("lottery-grid",{"selected-numbers":(null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.length)&&(null===(n=t.drawData.winningNumbers[0].numbers)||void 0===n?void 0:n.join(",")),"secondary-numbers":(null===(h=null===(l=t.drawData)||void 0===l?void 0:l.winningNumbers)||void 0===h?void 0:h.length)&&(null===(c=t.drawData.winningNumbers[0].secondaryNumbers)||void 0===c?void 0:c.join(",")),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),t.details.length>0&&s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language),":"),s("span",null,t.details.map((t=>s("span",null,s("div",null,s("span",null,t.prizeName,t.times>1?" x "+t.times:"",":"," "),s("span",{style:{"margin-right":"4px"}},this.thousandSeperator(t.amount)),s("span",null,t.currency)))))))))}))))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:var(--emw--color-primary, #009993);color:var(--emw--color-background-secondary, #f5f5f5);font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid var(--emw--color-typography, #009993)}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px;margin-bottom:10px;color:var(--emw--color-typography, #000)}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid var(--emw--color-gray-250, #ccc);border-radius:5px;background-color:var(--emw--color-background-secondary, #f5f5f5)}.ExpandableBox{border-bottom:1px solid var(--emw--color-gray-250, #ccc);transition:height 300ms ease-in-out;overflow:hidden;height:80px;background-color:var(--emw--color-background, #fff)}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:var(--emw--color-primary, #009993)}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:var(--emw--color-primary, #009993)}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:var(--emw--color-primary, #009993);transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:auto}';const Mh=["ro","en","fr","ar","hr"],Ph={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results.",loading:"Loading, please wait ...",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",loading:"Loading, please wait ..."},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",loading:"Loading, please wait ..."},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",loading:"Loading, please wait ..."},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",loading:"Loading, please wait ..."}},Bh=(t,e)=>{const i=e;return Ph[void 0!==i&&Mh.includes(i)?i:"en"][t]},Nh=class{constructor(e){t(this,e),this.isReset=!1,this.getDrawsData=()=>{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);t.searchParams.append("limit",this.limit.toString()),t.searchParams.append("offset",this.offset.toString()),t.searchParams.append("status","PAYABLE"),this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items||[],this.drawData=this.winningDataSetsData.map((t=>t)),this.totalResults=t.total})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.transDataToString=t=>{try{return JSON.stringify(t)}catch(t){throw new Error(t)}},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.drawData=[],this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.activeIndex=0,this.totalResults=0,this.limit=5,this.offset=0}filtersHandler(t){this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.limit=5,this.offset=0,this.getDrawsData()}clearFiltersHandler(){this.dateFiltersFrom="",this.dateFiltersTo="",this.limit=5,this.offset=0,this.drawData=this.winningDataSetsData,this.getDrawsData()}hpPageChange(t){this.limit=t.detail.limit,this.offset=t.detail.offset,this.isReset=!1,this.getDrawsData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}connectedCallback(){this.getDrawsData()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ph[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){clearInterval(this.interval)}render(){let t=s("div",{key:"43dea3d7f12d1ac0b4df84ee15f3ff5192a16837",class:"DrawResultsHeader"},s("div",{key:"3ee231127221e0c6dfef0e94a4b2bec613aa25f7",class:"DrawResultsHeaderContent"},s("h4",{key:"7bc26099b3bb593b6e9229322e19941ecd38e093"},Bh("drawResultsHeader",this.language)),s("div",{key:"047d1f6718d26512801de33656a803435234eab1",class:"FilterSection"},s("helper-filters",{key:"2f6ffe2fd2ae0d1a544a57d330991fd72a043a78","activate-ticket-search":"false","game-id":this.gameId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))));return s("section",{key:"007d8200c91e7a99b911ea4e2b65be8932716a8e",class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"aa947a1455794d7719fb17098743ea60e84d6eb1",class:"DrawResultsSection"},s("div",{key:"ab8019f6591d773e8e9d52bfd8ca11d61dd74b89",class:"DrawResultsAreaHistory"},t,s("div",{key:"2a3fc14445339ba4895e8a9c7e99bcece2a54ca5",class:"HistoryGridWrapper"},s("div",{key:"90a5560b549fcd9ae871084ff5a5ab998af686cd",class:"HistoryGrid"},this.isLoading&&s("p",{key:"af0bdfd22c48844da0942b128ee304b2168571b5"},Bh("loading",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"history-draw-data":this.transDataToString(t),"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),!this.isLoading&&this.noResults&&s("p",{key:"e0691b0f79b53410a4d4cba4439fb907552473f8",class:"errorText"},Bh("noResults",this.language)))),s("div",{key:"814919c0ea3baf1286ba2ef13fd405d21e417b19",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&s("lottery-pagination",{key:"29f57cc28abab4a76fecb28a3039cf4f56d3f6f3",arrowsActive:!0,numberedNavActive:!0,"is-reset":this.isReset,"first-page":!1,"prev-page":!0,"next-page":!0,offset:this.offset,limit:this.limit,total:this.totalResults,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Nh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:var(--emw--color-primary, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-typography, #000);padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.GridWrapper{background-color:var(--emw--color-background, #fff)}.DrawResultsSection{max-width:600px;margin:0px auto;padding-bottom:30px;color:var(--emw--color-typography, #000)}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:var(--emw--color-primary, #009993);padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:var(--emw--color-primary, #009993);padding:10px;text-align:center;color:var(--emw--color-background, #fff);padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:var(--emw--color-primary, #009993);color:var(--emw--color-background, #fff);outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton,.FilterSection .ResetButton{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);border:1px solid var(--emw--button-border-color, #009993);background:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .Active{background:var(--emw--color-primary-variant, #004d4a);color:var(--emw--color-background, #fff)}.FilterSection helper-filters{margin-left:auto}.errorText{color:var(--emw--color-error, #ff0000)}';const Oh=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"0bb2683f87461804914d26c708499902d92dc503",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"2ba23b953a9519ccb36fd203c3ac98a366673822","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"54c18e3a6fde25ff0953bb7b15b8a1200e237fd0",class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{key:"0cb93435825bf7a42636848ffd5ff67a30369cfa","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Oh.style=":host{display:block}";const Eh=["ro","en","fr","ar","hr"],Fh={en:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ...",emptyText:"Sorry. The Game is not available now."},ro:{error:"Eroare",backButton:"Inapoi",lobbyButton:"Lobby",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",submitSuccess:"Submit successfully!",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",modalLogin:"Please login to submit a ticket",loading:"Se incarca, va rugam asteptati ..."},fr:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ar:{error:"خطأ",backButton:"خلف",lobbyButton:"ردهة",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",submitSuccess:"Submit successfully!",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة",loading:"Loading, please wait ..."},hr:{error:"Greška",backButton:"Nazad",lobbyButton:"Lobby",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",submitSuccess:"Submit successfully!",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",modalLogin:"Molimo prijavite se da uplatite listić",loading:"Učitavanje, molimo pričekajte ..."}},jh=(t,e)=>{const i=e;return Fh[void 0!==i&&Eh.includes(i)?i:"en"][t]},Rh=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Fh[e][i]=t[e][i]})),e(Fh)})).catch((t=>{i(t)}))})),Lh=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));function Wh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a=Lh(),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const $h=({message:t,theme:e="success"})=>{window.postMessage({type:"ShowNotificationToast",message:t,theme:e})},Hh=class{constructor(i){t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.resetAllTicketSelection=e(this,"resetAllTicketSelection",7),this.quickPick=!1,this.gameData={},this.secondarySelectionAllowed=!1,this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.tickets=[],this.mainTickets=[],this.secondaryTickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.isLoading=!1,this.showSubmitError=!1,this.submitError="",this.showApiError=!1,this.apiError="",this.translationData=void 0,this.isSubscription=!1,this.subscriptionParam=null,this.showSubscriptionError=!1,this.subscriptionError="",this.isSubscribed=!1,this.isFetchingGame=!1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}handleNewTranslations(){this.isLoading=!0,Rh(this.translationUrl).then((()=>{this.isLoading=!1}))}watchGameInfoChange(t,e){t&&t!=e&&this.getGameDetails()}async componentWillLoad(){this.gameId&&this.endpoint&&this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0);const t=[];if(this.translationUrl){const e=Rh(this.translationUrl).then((t=>{this.translationData=JSON.stringify(t)})).catch((t=>{console.log(t)}));t.push(e)}return Promise.all(t)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}countdownLogic(t){const e=()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)};e(),this.interval=setInterval(e,1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);this.isFetchingGame=!0,fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{var e,i;this.gameData=t,this.basicStake=this.gameData.rules.stakes.length?Number(this.gameData.rules.stakes[0].value):0,this.basicLine=(null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.length)?this.gameData.rules.betTypes[0].boardsAllowed[0]:1,this.basicBetType=this.gameData.rules.betTypes[0],this.nextDate=null===(i=this.gameData.currentDraw)||void 0===i?void 0:i.date,this.nextDate&&this.countdownLogic(this.nextDate),this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed,this.quickPick=this.gameData.rules.quickPickAvailable,this.isSubscription=this.gameData.rules.wagerTypes&&this.gameData.rules.wagerTypes.includes("Subscription");let s=this.gameData.draws?this.gameData.draws.filter((t=>!t.winningNumbers)):[];s.length>0&&(this.nextDraw=s[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)})).finally((()=>{this.isFetchingGame=!1}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.mainTickets.forEach((t=>{var e;t.completed.every((t=>t))&&(this.totalAmount+=t.drawCount*(t.stake||this.basicStake)*t.multiplierNum*t.lineNum*(null===(e=t.betType)||void 0===e?void 0:e.combinations))})),this.currency=t}gridFilledHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!0,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:t.detail.drawCount,stake:e.stake||this.basicStake,selectedNumbers:i,multiplierNum:t.detail.multiplierNum,multiplier:t.detail.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:t.detail.quickPicks,betName:t.detail.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}gridDirtyHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!1,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:e.drawCount,stake:e.stake,selectedNumbers:i,multiplierNum:e.multiplierNum,multiplier:e.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:e.quickPicks,betName:e.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}modalCloseEvent(){this.loginModalVisible=!1,this.successVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.mainTickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){const{ticketId:e,multiplierNum:i,multiplier:s}=t.detail;this.mainTickets[e-1].multiplierNum=i,this.mainTickets[e-1].multiplier=s,this.calculateTotalAmount()}drawMultiplierChangeHandler(t){const{ticketId:e,drawCount:i}=t.detail;this.mainTickets[e-1].drawCount=i,this.calculateTotalAmount()}lineMultiplierChangeHandler(t){const{ticketId:e,lineNum:i}=t.detail;this.mainTickets[e-1].lineNum=i,this.mainTickets[e-1].completed=Array.from({length:i},(()=>!1)),this.mainTickets[e-1].selectedNumbers=[],this.mainTickets[e-1].quickPicks=[]}betTypeChangeHandler(t){const{ticketId:e,betType:i}=t.detail;this.mainTickets[e-1].betType=i}createNewTicket(){this.mainTickets=[...this.mainTickets,{gameId:this.gameId,ticketId:this.mainTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine,quickPicks:[!1],betName:""}],this.secondaryTickets=[...this.secondaryTickets,{gameId:this.gameId,ticketId:this.secondaryTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}]}showLoginModal(){this.loginModalVisible=!0}handleSubscriptionReady(t){this.subscriptionParam=t.detail}handleSubscriptionCheckChange(t){this.isSubscribed=t.detail}buildTicketParam(){let t={playerId:this.playerId.toString(),tickets:[]},e=[];this.secondarySelectionAllowed&&(e=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let i=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),s=[...new Set([...e,...i])].sort(((t,e)=>t-e));if(s.length){this.showSubmitError=!0;let t=s.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,setTimeout((()=>{this.showSubmitError=!1}),3e3),null}return this.mainTickets.forEach(((e,i)=>{var s;t.tickets.push({startingDrawId:this.nextDraw,amount:(e.stake*e.drawCount*e.multiplierNum*(e.lineNum||1)*(null===(s=e.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:e.selectedNumbers.map(((t,s)=>{var o;return{betType:(null===(o=e.betType)||void 0===o?void 0:o.id)||this.gameData.rules.defaultBetType,stake:e.stake,selections:t,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[],quickPick:e.quickPicks[s],betName:e.betName}})),multiplier:e.multiplier,multiplierNum:e.multiplierNum,drawCount:e.drawCount,quickPick:this.quickPick})})),t}handleSubmitTickets(){this.isSubscription&&this.isSubscribed?(this.submitTickets(),this.submitSubscriptionTickets()):this.submitTickets()}async submitSubscriptionTickets(){try{let t=await this.buildTicketParam();if(!t)return;if(!this.subscriptionParam||"string"==typeof this.subscriptionParam)return this.subscriptionError="string"==typeof this.subscriptionParam?this.subscriptionParam:"Ouccurence is required.",this.showSubscriptionError=!0,void setTimeout((()=>{this.showSubscriptionError=!1}),3e3);this.isLoading=!0;const e=this.playerId.toString(),i=`${this.endpoint}/player/${e}/ruleDefinition`;this.subscriptionParam.playerId=e;const s=vh(new Date,"yyyyMMddHHMMSS");this.subscriptionParam.name=`${this.subscriptionParam.ruleType}_${e}_${s}`;const{id:o}=await Wh(i,"POST",this.subscriptionParam,{Authorization:`Bearer ${this.sessionId}`});if(t){const e=Object.assign(Object.assign({},t),{ruleDefinitionId:o}),i=`${this.endpoint}/subscription`;await Wh(i,"POST",e,{Authorization:`Bearer ${this.sessionId}`}),$h({message:"Subscription rule created successfully.",theme:"success"});const s=new CustomEvent("resetAllTicketSelection",{bubbles:!0,composed:!0});document.dispatchEvent(s),console.log("resetAllTicketSelection event emitted through document after subscription ticket submission")}}catch(t){$h({message:"Failed to create the subscription rule. Please try again.",theme:"error"})}this.isLoading=!1}submitTickets(){let t=new URL(`${this.endpoint}/tickets`);const e=this.buildTicketParam();if(e){const i=Lh();let s={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":i},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,s).then((t=>{if(t.status>300)throw this.apiError=t.statusText+".",this.showApiError=!0,setTimeout((()=>{this.showApiError=!1}),3e3),new Error(t.statusText);return t.json()})).then((()=>{$h({message:"Ticket submitted successfully.",theme:"success"}),this.resetAllTicketSelection.emit();const t=new CustomEvent("resetAllTicketSelection",{bubbles:!0,composed:!0});document.dispatchEvent(t)})).catch((t=>{console.log("Error ",t),$h({message:"Failed to purchase the ticket. Please try again.",theme:"error"})})).finally((()=>{this.isLoading=!1}))}else console.log("No valid ticket parameters to submit")}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,i,o,r,a,n,l,h,c,d,u,p,m,f,v,b,g,y,w;return this.hasErrors?s("div",{class:"GamePage"},s("div",{class:"Title"},jh("error",this.language))):s("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},s("div",{class:"GridBanner",style:{background:this.backgroundUrl?`url(${this.backgroundUrl})`:"","background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},s("div",{class:"BannerButtonsWrapper"}),s("div",{class:"Tabs"},s("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},jh("buy",this.language)),s("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},jh("viewLatest",this.language)))),this.isFetchingGame?s("div",{class:"fetching"},"Loading..."):s("div",{class:"GamePageWrap"},this.nextDate?s("div",null,s("div",{class:"NextDrawWrapper"},s("div",{class:"NextDraw"},s("p",{class:"BannerText"},jh("nextDraw",this.language)),s("div",{class:"BannerCountdown"},s("span",{class:"CountdownDays"},this.daysRemaining,"D"),s("span",{class:"CountdownHours"},this.hoursRemaining,"H"),s("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),s("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&s("div",{class:"GamePageContentWrapper"},s("div",{class:"GamePageContent"},s("div",{class:"GameDetails"},s("lottery-game-details",{"low-number":null===(e=null===(t=this.gameData.rules)||void 0===t?void 0:t.boards[0])||void 0===e?void 0:e.lowNumber,"high-number":null===(o=null===(i=this.gameData.rules)||void 0===i?void 0:i.boards[0])||void 0===o?void 0:o.highNumber,"minimum-allowed":null===(a=null===(r=this.gameData.rules)||void 0===r?void 0:r.boards[0])||void 0===a?void 0:a.minimumAllowed,"maxinum-allowed":null===(l=null===(n=this.gameData.rules)||void 0===n?void 0:n.boards[0])||void 0===l?void 0:l.maxinumAllowed,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"translation-url":this.translationData})),s("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,i;return s("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":null===(e=this.gameData.rules)||void 0===e?void 0:e.quickPickAvailable,"reset-button":null===(i=this.gameData.rules)||void 0===i?void 0:i.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})}))),s("div",{class:"OrderSummary"},s("h3",{class:"OrderSummaryTitle"},jh("orderSummaryTitle",this.language)),s("div",{class:"OrderTicketInfo"},s("div",{class:"Ticket"},jh("orderSummaryTickets",this.language),": ",s("span",null,this.mainTickets.length)),s("div",null,s("span",null,this.thousandSeperator((null===(c=null===(h=this.mainTickets[0])||void 0===h?void 0:h.betType)||void 0===c?void 0:c.combinations)*(null===(d=this.mainTickets[0])||void 0===d?void 0:d.lineNum))),s("span",{class:"Multiplier"},"x"),(null===(u=this.gameData.rules)||void 0===u?void 0:u.stakeMultiplierAvailable)&&s("span",null,s("span",null,1===(null===(p=this.mainTickets[0])||void 0===p?void 0:p.multiplierNum)?`${null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum} Multiplier`:`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multipliers`),s("span",{class:"Multiplier"},"x")),s("span",null,`${null===(v=this.mainTickets[0])||void 0===v?void 0:v.stake} EUR`),(null===(b=this.gameData.rules)||void 0===b?void 0:b.drawMultiplierAvailable)&&s("span",null,s("span",{class:"Multiplier"},"x"),s("span",null,1===(null===(g=this.mainTickets[0])||void 0===g?void 0:g.drawCount)?`${null===(y=this.mainTickets[0])||void 0===y?void 0:y.drawCount} Draw`:`${null===(w=this.mainTickets[0])||void 0===w?void 0:w.drawCount} Draws`)))),s("hr",null),s("div",{class:"Total"},jh("orderSummaryTotal",this.language),":"," ",s("span",null,this.thousandSeperator(this.totalAmount)," ",this.currency)),this.isSubscription&&s("div",{class:"SubscriptionWrapper"},s("lottery-subscription",{endpoint:this.endpoint,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,gameName:this.gameData.name})),s("div",{class:"ButtonWrapper"},this.isLoggedIn&&s("div",null,!this.isLoading&&s("div",{class:"submitWrap"},s("div",{class:"Button",onClick:()=>this.handleSubmitTickets()},jh("orderSummarySubmit",this.language)),this.showSubmitError&&s("div",{class:"submitError"},this.submitError),this.showApiError&&s("div",{class:"submitError"},this.apiError),this.showSubscriptionError&&s("div",{class:"submitError"},this.subscriptionError)),this.isLoading&&s("span",{class:"Button",style:{cursor:"default"}},jh("loading",this.language))),!this.isLoggedIn&&s("div",null,s("span",{class:"Button",onClick:()=>this.showLoginModal()},jh("orderSummarySubmit",this.language)),s("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("modalLogin",this.language)))))))),1==this.tabIndex&&s("div",{class:"HistoryContentWrapper"},s("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))):s("div",{class:"noActiveDraw"},jh("emptyText",this.language))),s("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"],endpoint:["watchGameInfoChange"],gameId:["watchGameInfoChange"]}}};Hh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n display: block;\n font-family: "Roboto", sans-serif;\n}\n\n.GamePage {\n background-color: var(--emw--color-background, #fff);\n}\n.GamePage .GridBanner {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n background-repeat: no-repeat;\n background-position: center;\n color: var(--emw--color-typography, #000);\n padding: 0 20px 10px;\n height: 220px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.GamePage .GridBanner .BannerButtonsWrapper {\n display: flex;\n justify-content: space-between;\n padding-top: 16px;\n}\n.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,\n.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton {\n background: var(--emw--color-background-secondary, #f5f5f5);\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 7px 15px;\n font-size: 12px;\n text-transform: uppercase;\n width: 80px;\n cursor: pointer;\n}\n.GamePage .GridBanner .GridBannerArea {\n padding-top: 30px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.GamePage .TotalWinnings {\n color: var(--emw--color-typography, #000);\n font-size: 18px;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 10px;\n text-transform: uppercase;\n}\n.GamePage .TotalWinnings span {\n font-size: 18px;\n font-weight: 700;\n}\n.GamePage .NextDraw {\n color: var(--emw--color-primary, #009993);\n font-size: 24px;\n font-weight: 600;\n margin: 0 auto;\n text-align: center;\n text-transform: uppercase;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 4px;\n}\n.GamePage .NextDraw .BannerText {\n font-weight: 400;\n font-size: 18px;\n text-transform: uppercase;\n padding: 0;\n margin: 15px 0 0 0;\n}\n.GamePage .NextDraw .BannerCountdown {\n font-size: 22px;\n color: var(--emw--color-primary, #009993);\n display: flex;\n gap: 20px;\n}\n.GamePage .Tabs {\n display: flex;\n justify-content: center;\n gap: 10px;\n}\n.GamePage .Tabs .TabButton {\n border-radius: var(--emw--button-border-radius, 4px);\n cursor: pointer;\n padding: 8px 0;\n width: 50%;\n max-width: 200px;\n border: 1px solid var(--emw--color-primary, #009993);\n background: var(--emw--color-primary, #009993);\n color: var(--emw--color-background-secondary, #f5f5f5);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.GamePage .Tabs .TabButton.Active {\n color: var(--emw--color-primary, #009993);\n background: var(--emw--color-gray-50, #f5f5f5);\n border: 1px solid var(--emw--color-gray-50, #f5f5f5);\n}\n\n.LastDrawResultsTitle {\n color: var(--emw--color-primary, #009993);\n padding: 25px 0 10px 0;\n text-align: center;\n border-radius: var(--emw--button-border-radius, 4px);\n text-transform: uppercase;\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.NextDrawWrapper {\n padding: 10px 15px;\n background: var(--emw--color-background, #fff);\n}\n.NextDrawWrapper .BannerText {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n color: var(--emw--color-typography, #000);\n}\n.NextDrawWrapper .BannerCountdown {\n font-size: 22px;\n display: flex;\n gap: 8px;\n color: var(--emw--color-primary, #009993);\n font-weight: bolder;\n justify-content: center;\n}\n\n.GamePageContent {\n max-width: 1200px;\n margin: 0 auto;\n background: var(--emw--color-background, #fff);\n container-type: inline-size;\n container-name: gamePage;\n}\n\n.TicketsWrapper {\n min-height: 300px;\n}\n\n@container gamePage (min-width: 1200px) {\n .GamePageContent .TicketsWrapper {\n float: left;\n width: 49%;\n }\n .GamePageContent .GameDetails {\n float: right;\n width: 49%;\n }\n .GamePageContent .OrderSummary {\n float: right;\n width: 49%;\n }\n}\n.GameDetails {\n padding-bottom: 10px;\n margin-bottom: 20px;\n}\n\n.OrderSummary {\n min-width: 200px;\n border-radius: var(--emw--button-border-radius, 4px);\n color: var(--emw--color-typography, #000);\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 20px;\n background: var(--emw--color-background, #fff);\n}\n.OrderSummary .OrderSummaryTitle {\n font-size: 16px;\n color: var(--emw--color-primary, #009993);\n text-transform: uppercase;\n text-align: center;\n}\n.OrderSummary .OrderTicketInfo {\n display: flex;\n align-items: center;\n color: var(--emw--color-typography, #000);\n}\n.OrderSummary .OrderTicketInfo .Multiplier {\n margin: 0 6px;\n}\n.OrderSummary .Ticket {\n display: inline-block;\n color: var(--emw--color-typography, #000);\n font-size: 14px;\n height: 50px;\n line-height: 50px;\n margin-left: 15px;\n margin-right: 30px;\n}\n.OrderSummary .Ticket span {\n text-align: right;\n}\n.OrderSummary hr {\n border: none;\n border-top: 1px double var(--emw--color-gray-100, #e6e6e6);\n color: var(--emw--color-gray-100, #e6e6e6);\n width: 100%;\n}\n.OrderSummary .Total {\n display: inline-block;\n color: var(--emw--color-typography, #000);\n font-size: 14px;\n height: 50px;\n line-height: 50px;\n margin-left: 15px;\n}\n.OrderSummary .Total span {\n text-align: right;\n}\n\n.ButtonWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ButtonWrapper .Button {\n cursor: pointer;\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 8px 60px;\n width: max-content;\n margin: 5px;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: var(--emw--color-primary, #009993);\n color: var(--emw--color-background-secondary, #f5f5f5);\n}\n.ButtonWrapper .Button:hover {\n background: var(--emw--color-secondary, #00aba4);\n}\n.ButtonWrapper .Button.ButtonDisabled {\n pointer-events: none;\n background: var(--emw--color-background-tertiary, #ccc);\n}\n.ButtonWrapper .submitError {\n margin-top: 10px;\n color: var(--emw--color-error, #ff3d00);\n}\n.ButtonWrapper .submitWrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.SubmitModalSuccess {\n text-align: center;\n font-size: 18px;\n padding: 20px;\n}\n\n.DeleteTicketModalWrapper {\n padding: 20px;\n text-align: center;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalTitle {\n font-size: 16px;\n color: var(--emw--color-primary, #009993);\n font-weight: 400;\n text-transform: uppercase;\n margin: 20px 0 40px;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalText {\n font-size: 14px;\n color: var(--emw--color-typography, #000);\n line-height: 22px;\n margin-bottom: 40px;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons {\n display: flex;\n gap: 10px;\n justify-content: center;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm {\n cursor: pointer;\n border-radius: 4px;\n padding: 8px 25px;\n width: max-content;\n margin: 5px;\n color: var(--emw--color-typography, #000);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: var(--emw--color-error, #ff3d00);\n border: 1px solid var(--emw--color-error, #ff3d00);\n color: var(--emw--color-background-secondary, #f5f5f5);\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover {\n background: var(--emw--color-tertiary, #ff6536);\n border: 1px solid var(--emw--color-error, #ff3d00);\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel {\n cursor: pointer;\n width: max-content;\n border-radius: var(--emw--button-border-radius, 4px);\n padding: 10px 25px;\n margin: 5px;\n border: 1px solid var(--emw--color-secondary, #00aba4);\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover {\n background: var(--emw--color-gray-50, #f5f5f5);\n}\n\n.GamePage {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.GamePage .GamePageContentWrapper,\n.GamePage .HistoryContentWrapper {\n padding: 15px;\n flex: 1;\n background: var(--emw--color-background, #fff);\n}\n\n.HistoryContentWrapper::after,\n.GamePageContent::after {\n content: "";\n display: block;\n clear: both;\n}\n\n.GamePageWrap .noActiveDraw {\n margin: 10% auto 0px;\n padding: 24px;\n border: 1px solid var(--emw--color-primary, #009993);\n border-radius: 4px;\n width: 280px;\n color: var(--emw--color-primary, #009993);\n}\n\n.fetching {\n margin: 40px auto;\n}';const Gh=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.selectedCounter=0,this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return s("div",{key:"f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7",class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{key:"e381adbfff57e2cc343188c46037eb45ab798cac",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))):""))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Gh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Uh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Vh={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},qh=(t,e)=>Vh[void 0!==e&&e in Vh?e:"en"][t],Yh=class{constructor(i){t(this,i),this.hpPageChange=e(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,e)=>{isNaN(t)?0===e&&this.currentPage<=4?this.navigateTo("firstPage"):0===e&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===e&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Vh[e][i]=t[e][i]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,e)=>e+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,e)=>this.currentPage+e-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,e)=>this.endInt-2+e)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(Uh(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},s("span",null,t)))))),e=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},qh("firstPage",this.language)),s("span",{class:"NavigationIcon"})),i=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"})));Uh(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let o=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},qh("lastPage",this.language)),s("span",{class:"NavigationIcon"})),r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);return Uh(this.userAgent)&&(r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&r)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Yh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--color-typography, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff);opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-150, #6f6f6f);border-radius:5px;background:var(--emw--color-gray-150, #6f6f6f);color:var(--emw--color-typography-inverse, #fff);font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004d4a);border-color:var(--emw--color-primary-variant, #004d4a)}button:disabled{background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography-inverse, #fff);cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-primary, #009993);border-color:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}}';const Jh=["ro","en","hr"],Kh={en:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ro:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},fr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ar:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},hr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"}},Zh=(t,e)=>{const i=e;return Kh[void 0!==i&&Jh.includes(i)?i:"en"][t]};function Xh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const Qh=class{constructor(i){t(this,i),this.subscriptionCompleted=e(this,"subscriptionCompleted",7),this.subscriptionCheckChange=e(this,"subscriptionCheckChange",7),this.changeDateParam=()=>{if(this.filterData.from&&!this.filterData.to){let t=this.filterData.from,e=t.split("/");t=new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),0,0,0)).toISOString();const i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:"",fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}if(this.filterData.from&&this.filterData.to){const{from:t,to:e}=this.transDate(this.filterData.from,this.filterData.to),i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:e,fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{from:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{to:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.translationUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.endpoint=void 0,this.language="en",this.gameName=void 0,this.isSubscribed=!1,this.frequenceList=[],this.frequenceState="",this.filterData={from:"",to:""},this.subscriptionCode="lottery-subscription-widget001",this.conditionId="",this.paramId="",this.conditionRule=void 0,this.paramRule=void 0,this.peroidRule=void 0,this.startDateRule=void 0,this.endDateRule=void 0,this.gameNameRule=void 0,this.ruleType=""}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Kh[e][i]=t[e][i]}))),this.getSubscriptionData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}transDate(t,e){let i=t.split("/"),s=e.split("/");return{from:new Date(Date.UTC(Number(i[2]),Number(i[1])-1,Number(i[0]),0,0,0)).toISOString(),to:new Date(Date.UTC(Number(s[2]),Number(s[1])-1,Number(s[0]),23,59,59)).toISOString()}}async getSubscriptionData(){try{const t=`${this.endpoint}/feWidgetConfig/${this.subscriptionCode}`,{conditionMetadataId:e,paramMetadataId:i,ruleType:s}=await Xh(t);this.conditionId=e,this.paramId=i,this.ruleType=s;const o=`${this.endpoint}/metadata/${this.conditionId}`,r=`${this.endpoint}/metadata/${this.paramId}`,[a,n]=await Promise.allSettled([Xh(o),Xh(r)]);if("fulfilled"!==a.status||"fulfilled"!==n.status)throw new Error("Failed to get subscription data");this.conditionRule=a.value,this.paramRule=n.value,this.conditionRule.fields&&(this.peroidRule=this.conditionRule.fields.find((t=>"Period"===t.code)),this.startDateRule=this.conditionRule.fields.find((t=>"StartDate"===t.code)),this.endDateRule=this.conditionRule.fields.find((t=>"EndDate"===t.code)),this.gameNameRule=this.conditionRule.fields.find((t=>"GameName"===t.code)),this.frequenceList=this.peroidRule.enums.map((t=>({label:t.text,value:t.key}))))}catch(t){console.error(t)}}handleCheckboxchange(t){this.isSubscribed=t.target.checked,this.subscriptionCheckChange.emit(this.isSubscribed)}handleSelectionChange(t){if(this.frequenceState=t.detail.value,"NeverMissADraw"===this.frequenceState&&this.isSubscribed){const t={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};t.params=this.paramRule.fields.map((t=>({value:"",fieldId:t.id}))),this.subscriptionCompleted.emit(t)}else"Custom"===this.frequenceState&&this.isSubscribed&&this.subscriptionCompleted.emit("Subscription start date is required.")}formateDate(t){const{year:e,month:i,day:s}=t;return vh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate}))}render(){return s("div",{key:"185b4f76308ff8df614f520f5eb93a19c619cbcd",class:"subscripitonContainer",ref:t=>this.stylingContainer=t},s("vaadin-checkbox",{key:"c3af7821b5bacbfc8527ad242ddc6cb9d8b5234d",label:"Subscription",checked:this.isSubscribed,onChange:this.handleCheckboxchange.bind(this)}),this.isSubscribed&&s("div",{key:"e567968dca8f1150f751662e2834ffeb60e791cd",class:"secondConditon"},s("span",{key:"5999241e246949594cf39d1dade31deb04e17f1a",style:{"margin-right":"8px"}},"Occurrence: "),s("vaadin-select",{key:"50a04ac0202ab7912cd56043cda5d8f915a9151e",items:this.frequenceList,value:this.frequenceState,"on-value-changed":this.handleSelectionChange.bind(this)}),"Custom"===this.frequenceState&&s("div",{key:"329650009ba11791abf137bfd75b18ce982c6ee9",class:"thirdCondition"},s("div",{key:"f29c8951aa53637f6f66ab523b847e0937f2f323",class:"filterCalenderWrap"},s("div",{key:"a19a4c4ba091397bf79c0969b9fc7bafd3fef519",class:"filterText"},"Subscription Start Date*"),s("div",{key:"fd91ca7fc3df5250e2e88f6c34cd92e8b91b9907",class:"filter"},s("vaadin-date-picker",{value:this.filterData.from,key:"filterFromCalendar",max:void 0===this.filterData.to?void 0:this.changeFormate(this.filterData.to),onChange:this.handleFilterFrom,placeholder:Zh("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))),s("div",{key:"450a8c165db8ddb42d3c731f49257d17e9426c40",class:"filterCalenderWrap"},s("div",{key:"e66f7308e413493e84ae659b02f8eb11a025f559",class:"filterText"},"Subscription End Date"),s("div",{key:"4644c0873295e22573f9e2d1927b649e10ecd3f5",class:"filter"},s("vaadin-date-picker",{value:this.filterData.to,key:"filterToCalendar",min:void 0===this.filterData.from?void 0:this.changeFormate(this.filterData.from),onChange:this.handleFilterTo,placeholder:Zh("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Qh.style=".subscripitonContainer{margin-bottom:40px}.subscripitonContainer vaadin-checkbox[checked]::part(checkbox){background-color:var(--emw--color-primary, #009993)}.subscripitonContainer .secondCondition{padding-left:24px}.subscripitonContainer .thirdCondition{display:flex;gap:24px;align-items:center}.subscripitonContainer .thirdCondition,.subscripitonContainer .secondConditon{margin:16px 0}";const tc=["ro","en","hr"],ec={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},ic=(t,e)=>{const i=e;return ec[void 0!==i&&tc.includes(i)?i:"en"][t]},sc=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let o=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=o.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])ec[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)],this.quickPicks[e]=!1}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}toggleResetAllSeletion(){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)}))}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return s("div",null,s("p",null,ic("loading",this.language)));if(this.hasErrors)return s("div",null,s("p",null,ic("error",this.language)));{const{rules:t}=this.gameData;return s("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},s("p",{class:"TicketTitle"},this.gameData.name),s("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>s("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&s("div",null,s("label",{class:"Label"},ic("playType",this.language),": "),s("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&s("div",null,s("label",{class:"Label"},ic("lines",this.language),": "),s("div",{class:"WagerInput"},s("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},s("span",null,this.lineMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>s("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,i)=>s("div",null,s("div",{class:"TicketGridHeader"},s("div",null,ic("lineName",this.language),i+1),this.resetButton&&this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(i)},ic("resetButton",this.language))),this.autoPick&&!this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(i)},ic("autoButton",this.language)))),s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].selectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),this.secondarySelectionAllowed&&s("div",{class:"SecondarySelectionWrapper"},s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))),t.stakeMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ic("multiplier",this.language),": "),s("div",{class:"WagerInput"},t.stakeMultipliers.length>1?s("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},s("span",null,this.stakeMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>s("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ic("numberOfDraws",this.language),": "),s("div",{class:"WagerInput"},t.durations.length>1?s("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},s("span",null,this.drawMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.durations.map((t=>s("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),s("div",null,s("label",{class:"Label"},ic("wagerPerDraw",this.language),": "),s("div",{class:"WagerInput"},t.stakes.length>1?s("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleClass()},s("span",null,this.amountInfo.value," ",this.amountInfo.currency),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakes.map((t=>s("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):s("div",null,s("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),s("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};sc.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-primary, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-primary, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--color-typography, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--color-typography, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--color-primary, #009993);background:var(--emw--color-typography-inverse, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-typography-inverse, #fff)}.ResetButton:hover{background:var(--emw--color-tertiary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-background-secondary, #f5f5f5);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-background-tertiary, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-background-tertiary, #ccc);overflow:hidden;background:var(--emw--color-typography-inverse, #fff);z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-typography-inverse, #fff)}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-background-secondary, #f5f5f5);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-background-tertiary, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-background-secondary, #f5f5f5)}';const oc=["ro","en","fr","ar","hr"],rc={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},ac=(t,e)=>{const i=e;return rc[void 0!==i&&oc.includes(i)?i:"en"][t]},nc=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])rc[e][i]=t[e][i]})))}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"28756fcff01b738bfe8339114445032a5da757c2",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"18a566d1c97ccbf74cd759215df3a18faf5c43dc","header-title":`${ac("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"3a056f64dc8572b66f50cb151adde2caea2cd427",slot:"accordionContent"},s("lottery-ticket",{key:"06a0696b79840c05381429b1b87af94b478b09f0",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};nc.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{l as general_multi_select,d as helper_accordion,bh as helper_filters,yh as helper_modal,Ch as helper_tab,Sh as helper_tabs,Th as lottery_bullet,zh as lottery_draw_results,Nh as lottery_draw_results_history,Oh as lottery_game_details,Hh as lottery_game_page,Gh as lottery_grid,Yh as lottery_pagination,Qh as lottery_subscription,sc as lottery_ticket,nc as lottery_ticket_controller}