@everymatrix/lottery-hakuna-ticket-history-item 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/cjs/{index-99904d3f.js → index-62dddc9a.js} +3 -2
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{lottery-button_5.cjs.entry.js → lottery-button_6.cjs.entry.js} +177 -2
  5. package/dist/cjs/lottery-hakuna-ticket-history-item-ba3ec0d0.js +203 -0
  6. package/dist/cjs/lottery-hakuna-ticket-history-item.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +6 -0
  8. package/dist/collection/components/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item.css +11 -9
  9. package/dist/collection/components/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item.js +56 -11
  10. package/dist/esm/{index-09b72148.js → index-45df3d8d.js} +3 -3
  11. package/dist/esm/index.js +2 -2
  12. package/dist/esm/loader.js +3 -3
  13. package/dist/esm/{lottery-button_5.entry.js → lottery-button_6.entry.js} +178 -4
  14. package/dist/esm/lottery-hakuna-ticket-history-item-5bc91571.js +198 -0
  15. package/dist/esm/lottery-hakuna-ticket-history-item.js +3 -3
  16. package/dist/lottery-hakuna-ticket-history-item/{index-09b72148.js → index-45df3d8d.js} +2 -2
  17. package/dist/lottery-hakuna-ticket-history-item/index.esm.js +1 -1
  18. package/dist/lottery-hakuna-ticket-history-item/lottery-button_6.entry.js +1 -0
  19. package/dist/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item-5bc91571.js +1 -0
  20. package/dist/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item.esm.js +1 -1
  21. package/dist/types/components/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item.d.ts +13 -2
  22. package/dist/types/components.d.ts +26 -10
  23. package/package.json +1 -1
  24. package/dist/cjs/lottery-hakuna-ticket-history-item-6b877fa8.js +0 -195
  25. package/dist/esm/lottery-hakuna-ticket-history-item-785a2e3d.js +0 -190
  26. package/dist/lottery-hakuna-ticket-history-item/lottery-button_5.entry.js +0 -1
  27. package/dist/lottery-hakuna-ticket-history-item/lottery-hakuna-ticket-history-item-785a2e3d.js +0 -1
@@ -1,190 +0,0 @@
1
- import { r as registerInstance, h } from './index-09b72148.js';
2
-
3
- /**
4
- * @name setClientStyling
5
- * @description Method used to create and append to the passed element of the widget a style element with the content received
6
- * @param {HTMLElement} stylingContainer The reference element of the widget
7
- * @param {string} clientStyling The style content
8
- */
9
- function setClientStyling(stylingContainer, clientStyling) {
10
- if (stylingContainer) {
11
- const sheet = document.createElement('style');
12
- sheet.innerHTML = clientStyling;
13
- stylingContainer.appendChild(sheet);
14
- }
15
- }
16
-
17
- /**
18
- * @name setClientStylingURL
19
- * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
20
- * @param {HTMLElement} stylingContainer The reference element of the widget
21
- * @param {string} clientStylingUrl The URL of the style content
22
- */
23
- function setClientStylingURL(stylingContainer, clientStylingUrl) {
24
- if (!stylingContainer || !clientStylingUrl) return;
25
-
26
- const url = new URL(clientStylingUrl);
27
-
28
- fetch(url.href)
29
- .then((res) => res.text())
30
- .then((data) => {
31
- const cssFile = document.createElement('style');
32
- cssFile.innerHTML = data;
33
- if (stylingContainer) {
34
- stylingContainer.appendChild(cssFile);
35
- }
36
- })
37
- .catch((err) => {
38
- console.error('There was an error while trying to load client styling from URL', err);
39
- });
40
- }
41
-
42
- /**
43
- * @name setStreamLibrary
44
- * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
45
- * @param {HTMLElement} stylingContainer The highest element of the widget
46
- * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
47
- * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
48
- */
49
- function setStreamStyling(stylingContainer, domain, subscription) {
50
- if (window.emMessageBus) {
51
- const sheet = document.createElement('style');
52
-
53
- window.emMessageBus.subscribe(domain, (data) => {
54
- sheet.innerHTML = data;
55
- if (stylingContainer) {
56
- stylingContainer.appendChild(sheet);
57
- }
58
- });
59
- }
60
- }
61
-
62
- const DEFAULT_LANGUAGE = 'en';
63
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
64
- const TRANSLATIONS = {
65
- en: {
66
- total: 'Total:',
67
- },
68
- };
69
- const translate = (key, customLang, replacements) => {
70
- const lang = customLang;
71
- let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
72
- if (replacements) {
73
- Object.keys(replacements).forEach((placeholder) => {
74
- translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
75
- });
76
- }
77
- return translation;
78
- };
79
- const getTranslations = (data) => {
80
- Object.keys(data).forEach((item) => {
81
- for (let key in data[item]) {
82
- TRANSLATIONS[item][key] = data[item][key];
83
- }
84
- });
85
- };
86
- const resolveTranslationUrl = async (translationUrl) => {
87
- if (translationUrl) {
88
- try {
89
- const response = await fetch(translationUrl);
90
- if (!response.ok) {
91
- throw new Error(`HTTP error! status: ${response.status}`);
92
- }
93
- const translations = await response.json();
94
- getTranslations(translations);
95
- }
96
- catch (error) {
97
- console.error('Failed to fetch or parse translations from URL:', error);
98
- }
99
- }
100
- };
101
-
102
- const lotteryHakunaTicketHistoryItemCss = ":host{display:block}.lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;max-width:var(--lottery-hakuna-ticket-history-item-container-max-width, 300px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--lottery-hakuna-ticket-history-item-bg, #120505), var(--lottery-hakuna-ticket-history-item-bg, #120505)), linear-gradient(to top left, var(--lottery-hakuna-ticket-history-item-border-gradient-start, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--lottery-hakuna-ticket-history-item-border-gradient-end, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--lottery-hakuna-ticket-history-item-details-color, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 6px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 70px)}lottery-selection-group{width:100%}";
103
- const LotteryHakunaTicketHistoryItemStyle0 = lotteryHakunaTicketHistoryItemCss;
104
-
105
- const LotteryHakunaTicketHistoryItem = class {
106
- constructor(hostRef) {
107
- registerInstance(this, hostRef);
108
- this.selectionGroupStyle = `
109
- :host{
110
- --lottery-selection-width: 24px;
111
- --lottery-selection-height: 24px;
112
- --lottery-selection-padding: 10px;
113
- --lottery-selection-border-radius: 6px;
114
- --lottery-selection-border-width: 1px;
115
- --lottery-selection-border-color: #C51917;
116
-
117
- --lottery-selection-color: #fff;
118
- --lottery-selection-font-size: 14px;
119
- --lottery-selection-font-weight: 500;
120
-
121
- --lottery-selection-hover-background: transparent;
122
- --lottery-selection-hover-border-color: #C51917;
123
- --lottery-selection-hover-color: #fff;
124
-
125
- .lottery-selection__button{
126
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
127
- line-height: normal;
128
- }
129
- .lottery-selection__button:hover{
130
- cursor: default;
131
- }
132
- --lottery-selection-group-item-gap:6px;
133
- }
134
- `;
135
- this.mbSource = undefined;
136
- this.clientStyling = undefined;
137
- this.clientStylingUrl = undefined;
138
- this.language = 'en';
139
- this.translationUrl = '';
140
- this.historyItemName = undefined;
141
- this.historyItemImageSrc = undefined;
142
- this.ticketId = undefined;
143
- this.totalAmount = undefined;
144
- this.drawDate = undefined;
145
- this.drawTime = undefined;
146
- this.selectedNumbers = undefined;
147
- }
148
- handleClientStylingChange(newValue, oldValue) {
149
- if (newValue != oldValue) {
150
- setClientStyling(this.stylingContainer, this.clientStyling);
151
- }
152
- }
153
- handleClientStylingUrlChange(newValue, oldValue) {
154
- if (newValue != oldValue) {
155
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
156
- }
157
- }
158
- handleMbSourceChange(newValue, oldValue) {
159
- if (newValue != oldValue) {
160
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
161
- }
162
- }
163
- async componentWillLoad() {
164
- resolveTranslationUrl(this.translationUrl);
165
- }
166
- componentDidLoad() {
167
- if (this.stylingContainer) {
168
- if (this.mbSource)
169
- setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
170
- if (this.clientStyling)
171
- setClientStyling(this.stylingContainer, this.clientStyling);
172
- if (this.clientStylingUrl)
173
- setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
174
- }
175
- }
176
- disconnectedCallback() {
177
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
178
- }
179
- render() {
180
- return (h("div", { key: 'a740a3e2d88502ee4009369b8e04810ca21b0315', class: "lottery-hakuna-ticket-history-item__container", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5488e10c6768d617f73b9675c1ede5c9b1f56640', class: "lottery-hakuna-ticket-history-item__top" }, h("div", { key: 'e4ac3e621a805a1d0b1a531ce70bc7709299e0d0', class: "lottery-hakuna-ticket-history-item__country-wrapper" }, this.historyItemName && (h("img", { key: '8e189b80aefc6d4fdbe25786eb0262852d1cc156', src: this.historyItemImageSrc, alt: this.historyItemName, class: "lottery-hakuna-ticket-history-item__country-flag" })), h("span", { key: '1d860a451d56729e3a9e6bdc64fc2d094e1e54b0', class: "lottery-hakuna-ticket-history-item__country-name" }, this.historyItemName)), h("div", { key: '02772a834c453ceed1c68012acadd3c8041c40ff', class: "lottery-hakuna-ticket-history-item__details" }, h("span", { key: 'c4f6c8b94a95a45d1d6e4c055fe965835040876d', class: "lottery-hakuna-ticket-history-item__meta" }, translate('total', this.language), " ", h("span", { key: '1c88238ed18c0b8babe12d76775b1ac935dacb3f', class: "lottery-hakuna-ticket-history-item__meta-value" }, this.totalAmount)))), h("div", { key: 'd2385c18c6b6b252a2346d703bab06537a97a20f', class: "lottery-hakuna-ticket-history-item__bottom" }, h("div", { key: 'f30447836f082f499a81e74d833f65549e09cb8d', class: "lottery-hakuna-ticket-history-item__numbers-wrapper" }, this.selectedNumbers && (h("lottery-selection-group", { key: '87fc3bb9ab5568323b03c418156b1f1e1d08b016', type: "preview", bulletTexts: this.selectedNumbers, clientStyling: this.selectionGroupStyle + (this.clientStyling || ''), clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource, hasBorder: true, hasBackground: false, selectionGroupId: this.ticketId ? this.ticketId.toString() : undefined }))), h("div", { key: '4696416810b6bbf569ac9b63594dd8a56a7df4c2', class: "lottery-hakuna-ticket-history-item__date-wrapper" }, this.drawDate && h("div", { key: 'c9e64166205a1183bc6487c597dd7ae05a9d2604' }, this.drawDate), this.drawTime && h("div", { key: '5d6cea8b4e0c53d405ebaebf253aafe779b7ef8a' }, this.drawTime)))));
181
- }
182
- static get watchers() { return {
183
- "clientStyling": ["handleClientStylingChange"],
184
- "clientStylingUrl": ["handleClientStylingUrlChange"],
185
- "mbSource": ["handleMbSourceChange"]
186
- }; }
187
- };
188
- LotteryHakunaTicketHistoryItem.style = LotteryHakunaTicketHistoryItemStyle0;
189
-
190
- export { LotteryHakunaTicketHistoryItem as L, setClientStylingURL as a, setStreamStyling as b, setClientStyling as s };
@@ -1 +0,0 @@
1
- import{r as t,h as e,g as o,c as r}from"./index-09b72148.js";import{s as i,a as n,b as l}from"./lottery-hakuna-ticket-history-item-785a2e3d.js";export{L as lottery_hakuna_ticket_history_item}from"./lottery-hakuna-ticket-history-item-785a2e3d.js";const a=["ro","en","fr","ar","hr","zh"],s={en:{loading:"Loading"},ro:{},fr:{},ar:{},hr:{}},c=class{constructor(e){t(this,e),this.handleClick=t=>{if(this.disabled)return;const e=this.host.shadowRoot.querySelector(".btn");if(!e)return;const o=e.getBoundingClientRect(),r=Math.max(o.width,o.height),i={top:t.clientY-o.top-r/2,left:t.clientX-o.left-r/2,size:r};this.ripples=[...this.ripples,i],setTimeout((()=>{this.ripples=this.ripples.filter((t=>t!==i))}),600)},this.variant="primary",this.size="medium",this.color=void 0,this.disabled=!1,this.loading=!1,this.text=void 0,this.mbSource=void 0,this.language="en",this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.ripples=[]}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const o=await fetch(t);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const r=await o.json();e=r,Object.keys(e).forEach((t=>{for(let o in e[t])s[t][o]=e[t][o]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}render(){const{variant:t,disabled:o,size:r,color:i}=this,n=o||this.loading,l={};if(i)switch(t){case"primary":default:Object.assign(l,{backgroundColor:i,borderColor:i});break;case"outline":case"dashed":Object.assign(l,{color:i,borderColor:i});break;case"text":Object.assign(l,{color:i})}return e("button",{key:"aa74ad98c90e7548228557bf8a8d26b125d4a83a",class:{btn:!0,[`btn--${t}`]:!0,[`btn--${r}`]:!0,"btn--loading":this.loading},style:i?l:void 0,disabled:n,onClick:this.handleClick,ref:t=>this.stylingContainer=t},this.loading?e("div",{class:"loading-container"},e("span",{class:"content"},this.text||(()=>{const t=this.language;let e=s[void 0!==t&&a.includes(t)?t:"en"].loading;return e})()),e("span",{class:"spinner"})):e("span",{class:"content"},e("slot",{name:"icon-left"}),this.text||e("slot",null),e("slot",{name:"icon-right"})),e("div",{key:"302ea02be395bb24989d4abc040a513e23fa029a",class:"ripple-container"},this.ripples.map(((t,o)=>e("span",{key:o,class:"ripple",style:{top:`${t.top}px`,left:`${t.left}px`,width:`${t.size}px`,height:`${t.size}px`}})))))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style=":host{display:inline-block}.btn{font:inherit;position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--lottery-button-border-radius, 6px);font-weight:var(--lottery-button-font-weight, 500);cursor:pointer;outline:none;overflow:hidden;transition:var(--lottery-button-transition, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s);user-select:none;-webkit-tap-highlight-color:transparent;box-shadow:var(--lottery-button-box-shadow, 0 2px 4px 0 rgba(0, 0, 0, 0.5))}.btn .content{position:relative;display:inline-flex;align-items:center;gap:var(--lottery-button-content-gap, 0.5em)}.btn .content ::slotted(span){display:inline-flex;align-items:center}.btn:hover:not(:disabled){box-shadow:var(--lottery-button-hover-box-shadow, 0 4px 8px 0 rgba(0, 0, 0, 0.5))}.btn:disabled{cursor:not-allowed;opacity:var(--lottery-button-disabled-opacity, 0.5)}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:var(--lottery-button-spinner-border, 2px solid rgba(255, 255, 255, 0.3));border-radius:50%;border-top-color:var(--lottery-button-spinner-color, white);animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:var(--lottery-button-primary-active-bg, #08104a)}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:var(--lottery-button-spinner-inverse-border-color, rgba(0, 0, 0, 0.2))}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:var(--lottery-button-outline-border-color, #dcdcdc);color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:var(--lottery-button-outline-hover-border-color, #a6a6a6)}.btn--outline:active:not(:disabled){background-color:var(--lottery-button-outline-active-bg, #e6e6e6)}.btn--dashed{background-color:transparent;border-style:dashed;border-color:var(--lottery-button-dashed-border-color, #dcdcdc);color:var(--lottery-button-dashed-color, #333)}.btn--dashed:hover:not(:disabled){border-color:var(--lottery-button-dashed-hover-border-color, #a6a6a6);color:var(--lottery-button-dashed-hover-color, #0052d9)}.btn--text{background-color:transparent;color:var(--lottery-button-text-color, #0052d9);border-color:transparent}.btn--text:hover:not(:disabled){background-color:var(--lottery-button-text-hover-bg, #f2f2f2)}.btn--text:active:not(:disabled){background-color:var(--lottery-button-text-active-bg, #e6e6e6)}.btn--custom-color:hover:not(:disabled){opacity:var(--lottery-button-custom-hover-opacity, 0.9)}.btn--custom-color:active:not(:disabled){opacity:var(--lottery-button-custom-active-opacity, 0.8)}.btn--small{height:var(--lottery-button-small-height, 28px);font-size:var(--lottery-button-small-font-size, 12px);padding:var(--lottery-button-small-padding, 0 12px)}.btn--medium{height:var(--lottery-button-medium-height, 34px);font-size:var(--lottery-button-medium-font-size, 14px);padding:var(--lottery-button-medium-padding, 0 18px)}.btn--large{height:var(--lottery-button-large-height, 40px);font-size:var(--lottery-button-large-font-size, 16px);padding:var(--lottery-button-large-padding, 0 24px)}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:var(--lottery-button-ripple-light, rgba(255, 255, 255, 0.3));transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:var(--lottery-button-ripple-dark, rgba(0, 0, 0, 0.03))}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";const d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"};var h=function(){return h=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},h.apply(this,arguments)},b={primaryColor:"#333",secondaryColor:"#E6E6E6"};function u(t,e){var o="svg"===t.tag?h(h({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(o).reduce((function(t,e){var r=o[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",n=(t.children||[]).map((function(t){return u(t,e)})).join("");return n&&n.length?"<".concat(t.tag).concat(i,">").concat(n,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const g=class{constructor(e){t(this,e),this.lotteryBulletClickHandler=r(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||b;return u(t.icon(o.primaryColor,o.secondaryColor),e)}return u(t.icon,e)}(d,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),e("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},e("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&e("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),e("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};g.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";const p=["ro","en","fr","ar","hr","zh"],y={en:{noTicketBoard:"No ticket board available.",selectionCleared:"Your selection has been cleared.",clearAll:"Clear All",stopAt:"Stop at",turnover:"Turnover: ",pleaseFillIn:"Please fill in all the selection input!",fillIn:"Fill in",noBets:"Sorry. No bets have been placed so far. Check back later!",search:"Search",clear:"Clear",oddsChart:"Odds Chart",ticketSuccess:"Ticket purchased successfully.",stakePerLine:"Stake per Line:",lowestOdds:"Lowest Odds:",highestOdds:"Highest Odds:",orderSummary:"ORDER SUMMARY",ticket:"Ticket",lines:"Lines",total:"Total",submit:"Submit",loading:"Loading",enterValidNumber:"Please enter a valid number.",enterNumberBetween:"Please enter a number between {min} and {max}.",numberAlreadySelected:"This number has already been selected.",enterScoreUpTo:"Please enter the score (Up to {maxScore})",enterValue:"Please enter a value",myChoices:"My Choices",teams:"Teams",scores:"Scores",euro:"Euro",cancel:"Cancel",confirm:"Confirm"},ro:{},fr:{},ar:{},hr:{}},f=(t,e,o)=>{const r=e;let i=y[void 0!==r&&p.includes(r)?r:"en"][t];return o&&Object.keys(o).forEach((t=>{i=i.replace(`{${t}}`,o[t])})),i};function v(t,e){return new Set(t?t.split(e):[])}function m(t,e){return e.filter((e=>e!==t))}function x(t,e){return e.concat([t])}const w=class{constructor(e){t(this,e),this.bulletGroupUpdateSelectedBulletTexts=r(this,"bulletGroupUpdateSelection",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.splitToken=",",this.selectionGroupId=void 0,this.selectionGroupLabel=void 0,this.type="bet",this.selectedBulletTexts=null,this.maxSelectedCount=null,this.maxDisplayBulletsCount=11,this.bulletTexts=null,this.maxIntegerBulletText=null,this.minIntegerBulletText=0,this.bulletTextType="integer",this.hasBorder=!0,this.hasBackground=!0,this.dialogTitle=void 0,this.dialogInputPlaceholder=void 0,this.dialogConfig={width:"400px",visible:!1,onConfirm:()=>this.handleFillInAddMore(),onCancel:()=>this.handleCloseAddMoreDialog()},this.inputInfo={valid:!0,errorMessage:"",value:""}}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let o in t[e])y[e][o]=t[e][o]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryBulletClickHandler(t){if(t.stopPropagation(),"input"!==t.detail.type)if(["delete","toggle"].includes(t.detail.type))this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:(e=t.detail,o=Array.from(this.selectedSet),r=this.maxSelectedCount,"delete"===e.type?m(e.text,o):"toggle"===e.type?o.includes(e.text)?m(e.text,o):o.length>=r?function(t,e,o){return e.slice(e.length-(o-1)).concat([t])}(e.text,o,r):x(e.text,o):[]).join(this.splitToken),selectionGroupId:this.selectionGroupId});else var e,o,r;else this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!0})}get selectedSet(){return v(this.selectedBulletTexts,this.splitToken)}get bulletTextsSet(){return this.bulletTexts?v(this.bulletTexts,this.splitToken):"integer"===this.bulletTextType&&null!=this.maxIntegerBulletText?v(Array.from({length:Number(this.lastDisplayBulletText)-this.minIntegerBulletText+1},((t,e)=>this.minIntegerBulletText+e)).join(this.splitToken),this.splitToken):new Set}get lastDisplayBulletText(){if("integer"===this.bulletTextType)return null!=this.maxIntegerBulletText?Math.min(this.maxIntegerBulletText,this.minIntegerBulletText+this.maxDisplayBulletsCount-1):this.minIntegerBulletText+this.maxDisplayBulletsCount-1;if(this.bulletTextsSet.size>0){const t=Array.from(this.bulletTextsSet);return t.length>=this.maxDisplayBulletsCount?t[this.maxDisplayBulletsCount-1]:t[t.length-1]}return null}get isSingleSelectionMode(){return 1===this.maxSelectedCount}getBulletToRender(){const t=Array.from(this.bulletTextsSet);let e=t,o=!1;return"text"===this.bulletTextType?t.length>this.maxDisplayBulletsCount?(o=!0,e=t.slice(0,this.maxDisplayBulletsCount-1)):e=t:(o=null!=this.maxIntegerBulletText&&this.maxIntegerBulletText>Number(this.lastDisplayBulletText),e=t),{bulletsToRender:e,showInputButton:o}}renderBulletGroup(){let t=[];if("bet"===this.type){const e=null!==this.maxSelectedCount&&this.selectedSet.size>=this.maxSelectedCount,{bulletsToRender:o,showInputButton:r}=this.getBulletToRender();if(o.forEach(((o,r)=>{let i="toggle";this.selectedSet.has(String(o))||!e||this.isSingleSelectionMode||(i="disabled"),t.push({value:this.selectedSet.has(String(o))?1:0,text:String(o),idx:r,type:i})})),r){let o="input";e&&!this.isSingleSelectionMode&&(o="disabled");const r="text"===this.bulletTextType?"...":`${this.lastDisplayBulletText}+`,i="text"===this.bulletTextType?-1:Number(this.lastDisplayBulletText)+1;"integer"===this.bulletTextType&&t.length>=this.maxDisplayBulletsCount&&t.pop(),t.push({value:0,text:r,idx:i,type:o})}}else if(["choice","preview"].includes(this.type)){const{bulletsToRender:e}=this.getBulletToRender();e.forEach(((e,o)=>{let r="toggle";"preview"===this.type?r="readonly":this.selectedSet.has(String(e))&&(r="delete"),t.push({value:this.selectedSet.has(String(e))?1:0,text:e,idx:o,type:r})}))}return e("div",{class:"lottery-selection-group__item--right"},t.map((t=>e("lottery-selection",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,text:t.text,idx:t.idx,value:t.value,type:t.type,hasBorder:this.hasBorder,hasBackground:this.hasBackground}))))}handleCloseAddMoreDialog(){this.dialogConfig=Object.assign(Object.assign({},this.dialogConfig),{visible:!1}),this.inputInfo={value:"",errorMessage:"",valid:!0}}handleInputChange(t){const e=t.target.value;this.inputInfo=Object.assign(Object.assign({},this.inputInfo),{value:e}),this.inputInfo=function({value:t,selectedSet:e,maxValue:o,minValue:r,language:i,type:n="integer"}){const l=t.trim();if("integer"===n){if(!/^-?\d+$/.test(l))return{valid:!1,errorMessage:f("enterValidNumber",i),value:t};const n=Number(l);if(isNaN(n))return{valid:!1,errorMessage:f("enterValidNumber",i),value:t};if(void 0!==r&&n<r||void 0!==o&&n>o)return{valid:!1,errorMessage:f("enterNumberBetween",i,{min:r,max:o}),value:t};const a=String(n);if(e.has(a))return{valid:!1,errorMessage:f("numberAlreadySelected",i),value:t}}else if(e.has(l))return{valid:!1,errorMessage:f("numberAlreadySelected",i),value:t};return{valid:!0,errorMessage:"",value:t}}({value:e,selectedSet:this.selectedSet,maxValue:this.maxIntegerBulletText,minValue:"integer"===this.bulletTextType?Number(this.lastDisplayBulletText)+1:void 0,language:this.language,type:this.bulletTextType})}handleFillInAddMore(){if(this.inputInfo.valid){const{value:t}=this.inputInfo;let e,o=t;o="integer"===this.bulletTextType?String(Number(t)):t.trim(),e=this.isSingleSelectionMode?o:x(o,Array.from(this.selectedSet)).join(this.splitToken),this.bulletGroupUpdateSelectedBulletTexts.emit({newSelectedBulletTexts:e,selectionGroupId:this.selectionGroupId}),this.handleCloseAddMoreDialog()}}render(){return e("div",{key:"66b8e9c63d948eb2f7eb37adb80892dbedd7df9a",class:"lottery-selection-group",ref:t=>this.stylingContainer=t},e("div",{key:"6562fdcad0f352b5e2d03edcc980a9aeab32277e",class:"lottery-selection-group__item"},this.selectionGroupLabel&&e("div",{key:"43c2132e4904a2b69b970d9b2074f120ed4d0986",class:"lottery-selection-group__item--left"},this.selectionGroupLabel),this.renderBulletGroup()),e("lottery-tipping-dialog",{key:"cb693d10e6b499628909571021d8508cdebbe29a",visible:this.dialogConfig.visible,width:this.dialogConfig.width,onCancel:this.dialogConfig.onCancel},e("div",{key:"dd312634574bbe1b4d3de7e82a9c58f58f846c1a",class:"addSelectionDialog"},e("div",{key:"b371b1090598f0219a7c652bab51e9d349703c34",class:"addSelectionDialog-title"},this.dialogTitle||("text"===this.bulletTextType?f("enterValue",this.language):f("enterScoreUpTo",this.language,{maxScore:this.maxIntegerBulletText}))),e("input",{key:"b5f1bb74999246dac8dc20f04e3af893deae6654",type:"text",class:{"dialog-input":!0,invalid:!this.inputInfo.valid},value:this.inputInfo.value,onInput:this.handleInputChange.bind(this),placeholder:this.dialogInputPlaceholder}),e("div",{key:"f33970a6dffdc881ffa9cf2c0bb54b26b27cccd6",class:"error-message"},this.inputInfo.errorMessage)),e("div",{key:"4c580dae14b38aff03e17067b2c0b72d01aa4f42",slot:"footer",class:"addSelectionDialog-footer"},e("lottery-button",{key:"874aa0ffde8fe2d0b08efea0cf951f101ab8dad0",onClick:this.dialogConfig.onCancel,text:f("cancel",this.language),variant:"outline"}),e("lottery-button",{key:"63a556eb5f9ad1cdd357c017756be274d40ef235",onClick:this.dialogConfig.onConfirm,text:f("confirm",this.language),variant:"primary",disabled:!this.inputInfo.valid||!this.inputInfo.value}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};w.style=":host {\n width: 100%;\n}\n\n.lottery-selection-group {\n container-type: inline-size;\n padding: var(--lottery-selection-group-padding, 0);\n background: var(--lottery-selection-group-background, transparent);\n border: var(--lottery-selection-group-border, none);\n border-radius: var(--lottery-selection-group-border-radius, 0);\n}\n.lottery-selection-group__item {\n display: flex;\n flex-direction: var(--lottery-selection-group-flex-direction, row);\n align-items: var(--lottery-selection-group-item-align, center);\n justify-content: var(--lottery-selection-group-item-justify, flex-start);\n gap: var(--lottery-selection-group-item-gap, 16px);\n width: 100%;\n}\n.lottery-selection-group__item--left {\n width: var(--lottery-selection-group-label-width, 130px);\n min-width: var(--lottery-selection-group-label-min-width, auto);\n max-width: var(--lottery-selection-group-label-max-width, none);\n color: var(--lottery-selection-group-label-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-label-font-size, 1em);\n font-weight: var(--lottery-selection-group-label-font-weight, bold);\n text-align: var(--lottery-selection-group-label-align, left);\n white-space: var(--lottery-selection-group-label-white-space, normal);\n}\n.lottery-selection-group__item--right {\n flex: 1;\n display: flex;\n flex-wrap: var(--lottery-selection-group-bullets-wrap, wrap); /* Allow items to wrap */\n gap: var(--lottery-selection-group-bullets-gap, 8px); /* Gap between bullets */\n align-items: var(--lottery-selection-group-bullets-align, center);\n justify-content: var(--lottery-selection-group-bullets-justify, flex-start); /* Align bullets to start */\n}\n@container (max-width: 320px) {\n .lottery-selection-group__item--left {\n width: 100px;\n max-width: 100px;\n }\n}\n\n.dialog-input {\n width: 100%;\n padding: var(--lottery-selection-group-input-padding, 8px);\n border: var(--lottery-selection-group-input-border-width, 1px) var(--lottery-selection-group-input-border-style, solid) var(--lottery-selection-group-input-border-color, var(--emw--color-gray-100, #e6e6e6));\n border-radius: var(--lottery-selection-group-input-radius, 4px);\n background-color: var(--lottery-selection-group-input-bg, #fff);\n color: var(--lottery-selection-group-input-color, #000);\n box-sizing: border-box;\n margin-top: var(--lottery-selection-group-input-margin-top, 10px);\n font-size: var(--lottery-selection-group-input-font-size, 1em);\n}\n.dialog-input::placeholder {\n color: var(--lottery-selection-group-input-placeholder-color, #999);\n}\n\n.dialog-input.invalid,\n.dialog-input.invalid:focus {\n border-color: var(--emw--color-error, #ff3d00);\n outline-color: var(--emw--color-error, #ff3d00);\n}\n\n.error-message {\n color: var(--lottery-selection-group-error-color, var(--emw--color-error, #ff3d00));\n font-size: var(--lottery-selection-group-error-font-size, 12px);\n font-weight: var(--lottery-selection-group-error-font-weight, normal);\n margin-top: 4px;\n}\n\n.addSelectionDialog-title {\n color: var(--lottery-selection-group-dialog-title-color, var(--emw--color-typography, #000));\n font-size: var(--lottery-selection-group-dialog-title-font-size, 1.2em);\n font-weight: var(--lottery-selection-group-dialog-title-font-weight, bold);\n margin-bottom: var(--lottery-selection-group-dialog-title-margin-bottom, 0);\n}\n.addSelectionDialog-footer {\n display: flex;\n justify-content: var(--lottery-selection-group-dialog-footer-justify, flex-end);\n gap: var(--lottery-selection-group-dialog-footer-gap, 18px);\n margin-top: var(--lottery-selection-group-dialog-footer-margin-top, 0);\n}";const k=["ro","en","fr","ar","hr"],S={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},C=(t,e)=>{const o=e;return S[void 0!==o&&k.includes(o)?o:"en"][t]},_=class{constructor(e){t(this,e),this.open=r(this,"open",7),this.close=r(this,"close",7),this.confirm=r(this,"confirm",7),this.cancel=r(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const o=await fetch(t);if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const r=await o.json();e=r,Object.keys(e).forEach((t=>{for(let o in e[t])S[t][o]=e[t][o]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const t=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),o=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],r=["mask",this.visible?"mask-enter":"mask-leave"],i=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return e("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:o.join(" "),ref:t=>this.stylingContainer=t},e("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:r.join(" "),onClick:this.handleMaskClick.bind(this)}),e("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:i,style:t,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},e("div",{key:"30ca33b925ff2525ead8aae83e72031258367b40",class:"dialog-header"},e("h2",{key:"492c3e864ac1547da58b0a47e4cc8d45470bde54",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&e("button",{key:"8ae4b872d18ce82d33292dc794e8a1f714a96ba9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),e("div",{key:"d661c78b333f78b9dee92e0975f8b136ef5a3071",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},e("slot",{key:"f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82"})),this.showFooter&&e("div",{key:"40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7",class:"dialog-footer"},e("slot",{key:"91539def47d118a69735ec229e7a6b36fc1db40b",name:"footer"},this.showCancelBtn&&e("button",{key:"f3b3add23f150c660159a906c2ef23b5fbe3b4c5",class:"cancel-btn",onClick:this.handleClose.bind(this)},C("cancel",this.language)),e("button",{key:"5fc33e89b6c55ac9e2162302e128bce0e79c5f89",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},C("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};_.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{c as lottery_button,g as lottery_selection,w as lottery_selection_group,_ as lottery_tipping_dialog}
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-09b72148.js";function i(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function a(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function r(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const o=["ro","en","fr","ar","hr"],n={en:{total:"Total:"}},s=class{constructor(e){t(this,e),this.selectionGroupStyle="\n :host{\n --lottery-selection-width: 24px;\n --lottery-selection-height: 24px;\n --lottery-selection-padding: 10px;\n --lottery-selection-border-radius: 6px;\n --lottery-selection-border-width: 1px;\n --lottery-selection-border-color: #C51917;\n\n --lottery-selection-color: #fff;\n --lottery-selection-font-size: 14px;\n --lottery-selection-font-weight: 500;\n\n --lottery-selection-hover-background: transparent;\n --lottery-selection-hover-border-color: #C51917;\n --lottery-selection-hover-color: #fff;\n\n .lottery-selection__button{\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n line-height: normal;\n }\n .lottery-selection__button:hover{\n cursor: default;\n }\n --lottery-selection-group-item-gap:6px;\n }\n ",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.language="en",this.translationUrl="",this.historyItemName=void 0,this.historyItemImageSrc=void 0,this.ticketId=void 0,this.totalAmount=void 0,this.drawDate=void 0,this.drawTime=void 0,this.selectedNumbers=void 0}handleClientStylingChange(t,e){t!=e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&r(this.stylingContainer,`${this.mbSource}.Style`)}async componentWillLoad(){(async t=>{if(t)try{const i=await fetch(t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const a=await i.json();e=a,Object.keys(e).forEach((t=>{for(let i in e[t])n[t][i]=e[t][i]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&r(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"a740a3e2d88502ee4009369b8e04810ca21b0315",class:"lottery-hakuna-ticket-history-item__container",ref:t=>this.stylingContainer=t},e("div",{key:"5488e10c6768d617f73b9675c1ede5c9b1f56640",class:"lottery-hakuna-ticket-history-item__top"},e("div",{key:"e4ac3e621a805a1d0b1a531ce70bc7709299e0d0",class:"lottery-hakuna-ticket-history-item__country-wrapper"},this.historyItemName&&e("img",{key:"8e189b80aefc6d4fdbe25786eb0262852d1cc156",src:this.historyItemImageSrc,alt:this.historyItemName,class:"lottery-hakuna-ticket-history-item__country-flag"}),e("span",{key:"1d860a451d56729e3a9e6bdc64fc2d094e1e54b0",class:"lottery-hakuna-ticket-history-item__country-name"},this.historyItemName)),e("div",{key:"02772a834c453ceed1c68012acadd3c8041c40ff",class:"lottery-hakuna-ticket-history-item__details"},e("span",{key:"c4f6c8b94a95a45d1d6e4c055fe965835040876d",class:"lottery-hakuna-ticket-history-item__meta"},(()=>{const t=this.language;let e=n[void 0!==t&&o.includes(t)?t:"en"].total;return e})()," ",e("span",{key:"1c88238ed18c0b8babe12d76775b1ac935dacb3f",class:"lottery-hakuna-ticket-history-item__meta-value"},this.totalAmount)))),e("div",{key:"d2385c18c6b6b252a2346d703bab06537a97a20f",class:"lottery-hakuna-ticket-history-item__bottom"},e("div",{key:"f30447836f082f499a81e74d833f65549e09cb8d",class:"lottery-hakuna-ticket-history-item__numbers-wrapper"},this.selectedNumbers&&e("lottery-selection-group",{key:"87fc3bb9ab5568323b03c418156b1f1e1d08b016",type:"preview",bulletTexts:this.selectedNumbers,clientStyling:this.selectionGroupStyle+(this.clientStyling||""),clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource,hasBorder:!0,hasBackground:!1,selectionGroupId:this.ticketId?this.ticketId.toString():void 0})),e("div",{key:"4696416810b6bbf569ac9b63594dd8a56a7df4c2",class:"lottery-hakuna-ticket-history-item__date-wrapper"},this.drawDate&&e("div",{key:"c9e64166205a1183bc6487c597dd7ae05a9d2604"},this.drawDate),this.drawTime&&e("div",{key:"5d6cea8b4e0c53d405ebaebf253aafe779b7ef8a"},this.drawTime))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};s.style=":host{display:block}.lottery-hakuna-ticket-history-item__container{display:flex;padding:var(--lottery-hakuna-ticket-history-item-container-padding, 20px);flex-direction:column;justify-content:center;gap:var(--lottery-hakuna-ticket-history-item-container-gap, 16px);border-radius:var(--lottery-hakuna-ticket-history-item-container-border-radius, 12px);border:1px solid transparent;max-width:var(--lottery-hakuna-ticket-history-item-container-max-width, 300px);background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--lottery-hakuna-ticket-history-item-bg, #120505), var(--lottery-hakuna-ticket-history-item-bg, #120505)), linear-gradient(to top left, var(--lottery-hakuna-ticket-history-item-border-gradient-start, #c52217) var(--lottery-hakuna-ticket-history-item-border-gradient-start-stop, 22%), var(--lottery-hakuna-ticket-history-item-border-gradient-end, #2c2525) var(--lottery-hakuna-ticket-history-item-border-gradient-end-stop, 68%))}.lottery-hakuna-ticket-history-item__top{display:flex;justify-content:space-between;align-items:center}.lottery-hakuna-ticket-history-item__country-wrapper{display:flex;align-items:center;gap:10px}.lottery-hakuna-ticket-history-item__country-flag{width:var(--lottery-hakuna-ticket-history-item-country-flag-width, 30px);object-fit:cover;aspect-ratio:var(--lottery-hakuna-ticket-history-item-country-flag-aspect-ratio, 3/2)}.lottery-hakuna-ticket-history-item__country-name{color:var(--lottery-hakuna-ticket-history-item-country-name-color, #fff);font-size:var(--lottery-hakuna-ticket-history-item-country-name-font-size, 14px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-country-name-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-country-name-line-height, normal)}.lottery-hakuna-ticket-history-item__details{display:flex;gap:var(--lottery-hakuna-ticket-history-item-details-gap, 13px);color:var(--lottery-hakuna-ticket-history-item-details-color, #b4a5a5);font-size:var(--lottery-hakuna-ticket-history-item-details-font-size, 10px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-details-font-weight, 700);line-height:var(--lottery-hakuna-ticket-history-item-details-line-height, normal)}.lottery-hakuna-ticket-history-item__meta{display:flex;gap:var(--lottery-hakuna-ticket-history-item-meta-gap, 10px)}.lottery-hakuna-ticket-history-item__meta-value{color:var(--lottery-hakuna-ticket-history-item-meta-value-color, inherit)}.lottery-hakuna-ticket-history-item__bottom{display:flex;justify-content:space-between;align-items:center;align-self:stretch}.lottery-hakuna-ticket-history-item__numbers-wrapper{flex:1;display:flex;align-items:flex-start;gap:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-gap, 6px);box-shadow:var(--lottery-hakuna-ticket-history-item-numbers-wrapper-box-shadow, 0 1px 2px 0 rgba(0, 0, 0, 0.25))}.lottery-hakuna-ticket-history-item__date-wrapper{color:var(--lottery-hakuna-ticket-history-item-date-wrapper-color, #fffefe);text-align:var(--lottery-hakuna-ticket-history-item-date-wrapper-text-align, right);font-size:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-size, 8px);font-style:normal;font-weight:var(--lottery-hakuna-ticket-history-item-date-wrapper-font-weight, 400);line-height:var(--lottery-hakuna-ticket-history-item-date-wrapper-line-height, 125%);max-width:var(--lottery-hakuna-ticket-history-item-date-wrapper-max-width, 70px)}lottery-selection-group{width:100%}";export{s as L,a,r as b,i as s}