@everymatrix/lottery-hakuna-ticket-buy 0.0.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 (59) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-f1909c9b.js +1359 -0
  3. package/dist/cjs/index.cjs.js +10 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/lottery-button_7.cjs.entry.js +1285 -0
  6. package/dist/cjs/lottery-hakuna-ticket-buy-fe6a420c.js +545 -0
  7. package/dist/cjs/lottery-hakuna-ticket-buy.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +49 -0
  9. package/dist/collection/components/lottery-hakuna-ticket-buy/index.js +1 -0
  10. package/dist/collection/components/lottery-hakuna-ticket-buy/lottery-hakuna-ticket-buy.css +197 -0
  11. package/dist/collection/components/lottery-hakuna-ticket-buy/lottery-hakuna-ticket-buy.js +690 -0
  12. package/dist/collection/components/model/index.js +5 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +124 -0
  15. package/dist/collection/utils/utils.js +47 -0
  16. package/dist/esm/app-globals-0f993ce5.js +3 -0
  17. package/dist/esm/index-1f778cb5.js +1331 -0
  18. package/dist/esm/index.js +2 -0
  19. package/dist/esm/loader.js +11 -0
  20. package/dist/esm/lottery-button_7.entry.js +1276 -0
  21. package/dist/esm/lottery-hakuna-ticket-buy-a9f8e014.js +540 -0
  22. package/dist/esm/lottery-hakuna-ticket-buy.js +20 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/lottery-hakuna-ticket-buy/app-globals-0f993ce5.js +1 -0
  26. package/dist/lottery-hakuna-ticket-buy/index-1f778cb5.js +2 -0
  27. package/dist/lottery-hakuna-ticket-buy/index.esm.js +1 -0
  28. package/dist/lottery-hakuna-ticket-buy/lottery-button_7.entry.js +1 -0
  29. package/dist/lottery-hakuna-ticket-buy/lottery-hakuna-ticket-buy-a9f8e014.js +1 -0
  30. package/dist/lottery-hakuna-ticket-buy/lottery-hakuna-ticket-buy.esm.js +1 -0
  31. package/dist/stencil.config.dev.js +19 -0
  32. package/dist/stencil.config.js +19 -0
  33. package/dist/storybook/main.js +43 -0
  34. package/dist/storybook/preview.js +9 -0
  35. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  36. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/packages/stencil/lottery-hakuna-ticket-buy/stencil.config.d.ts +2 -0
  37. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/packages/stencil/lottery-hakuna-ticket-buy/stencil.config.dev.d.ts +2 -0
  38. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/packages/stencil/lottery-hakuna-ticket-buy/storybook/main.d.ts +3 -0
  39. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/packages/stencil/lottery-hakuna-ticket-buy/storybook/preview.d.ts +70 -0
  40. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/tools/plugins/index.d.ts +4 -0
  41. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  42. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  43. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  44. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-hakuna-ticket-buy/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  45. package/dist/types/components/lottery-hakuna-ticket-buy/index.d.ts +1 -0
  46. package/dist/types/components/lottery-hakuna-ticket-buy/lottery-hakuna-ticket-buy.d.ts +121 -0
  47. package/dist/types/components/model/index.d.ts +103 -0
  48. package/dist/types/components.d.ts +147 -0
  49. package/dist/types/index.d.ts +1 -0
  50. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  51. package/dist/types/utils/locale.utils.d.ts +3 -0
  52. package/dist/types/utils/utils.d.ts +13 -0
  53. package/loader/cdn.js +1 -0
  54. package/loader/index.cjs.js +1 -0
  55. package/loader/index.d.ts +24 -0
  56. package/loader/index.es2017.js +1 -0
  57. package/loader/index.js +2 -0
  58. package/loader/package.json +11 -0
  59. package/package.json +27 -0
@@ -0,0 +1,540 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-1f778cb5.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
+ addTicket: 'ADD TICKET',
67
+ emptyDraw: 'Sorry. The Game is not available now.',
68
+ payNow: 'PAY NOW',
69
+ error: 'Error',
70
+ deleteTicketTitle: 'Are You Sure?',
71
+ deleteTicketMessage: 'Are you sure you want to delete this ticket? This process cannot be undone.',
72
+ cancel: 'CANCEL',
73
+ delete: 'DELETE',
74
+ confirmPaymentTitle: 'Confirm Your Payment',
75
+ back: 'BACK',
76
+ confirm: 'CONFIRM',
77
+ viewTicket: 'VIEW TICKET',
78
+ home: 'HOME',
79
+ ticketSubmittedSuccess: 'Payment Successful',
80
+ ticketSubmittedSuccessMessage: 'Thank you for your payment. Payment has been proceeded successfully.',
81
+ ticketSubmittedError: 'Error Processing Payment',
82
+ ticketSubmittedErrorMessage: 'Please check your wallet, account details and connection and try again. If you need help, please contact us.',
83
+ fetchingGameConfig: 'Fetching game config...',
84
+ ticket: 'Ticket',
85
+ price: 'Price',
86
+ tickets: 'Ticket(s)',
87
+ total: 'Total'
88
+ },
89
+ ro: {
90
+ error: 'Eroare',
91
+ backButton: 'Inapoi',
92
+ lobbyButton: 'Lobby',
93
+ nextDraw: 'Urmatoarea extragere:',
94
+ buy: 'Cumpara bilet',
95
+ viewLatest: 'Ultimile extrageri',
96
+ submitSuccess: 'Submit successfully!',
97
+ orderSummaryTitle: 'Rezumat comanda',
98
+ orderSummaryTickets: 'Bilet',
99
+ orderSummaryTotal: 'Total',
100
+ orderSummarySubmit: 'Trimite',
101
+ modalLogin: 'Please login to submit a ticket',
102
+ loading: 'Se incarca, va rugam asteptati ...'
103
+ },
104
+ fr: {
105
+ error: 'Error',
106
+ backButton: 'Back',
107
+ lobbyButton: 'Lobby',
108
+ nextDraw: 'Next draw in: ',
109
+ buy: 'Buy tickets',
110
+ viewLatest: 'View latest results',
111
+ submitSuccess: 'Submit successfully!',
112
+ orderSummaryTitle: 'Order Summary',
113
+ orderSummaryTickets: 'Ticket',
114
+ orderSummaryTotal: 'Total',
115
+ orderSummarySubmit: 'Submit',
116
+ modalLogin: 'Please login to submit a ticket',
117
+ loading: 'Loading, please wait ...'
118
+ },
119
+ ar: {
120
+ error: 'خطأ',
121
+ backButton: 'خلف',
122
+ lobbyButton: 'ردهة',
123
+ nextDraw: 'السحب التالي:',
124
+ buy: 'اشتري تذاكر',
125
+ viewLatest: 'عرض أحدث النتائج',
126
+ submitSuccess: 'Submit successfully!',
127
+ orderSummaryTitle: 'ملخص الطلب',
128
+ orderSummaryTickets: 'تذكرة',
129
+ orderSummaryTotal: 'المجموع',
130
+ orderSummarySubmit: 'يُقدِّم',
131
+ modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة',
132
+ loading: 'Loading, please wait ...'
133
+ },
134
+ hr: {
135
+ error: 'Greška',
136
+ backButton: 'Nazad',
137
+ lobbyButton: 'Lobby',
138
+ nextDraw: 'Sljedeće izvlačenje za: ',
139
+ buy: 'Uplati listić',
140
+ viewLatest: 'Pogledajte najnovije rezultate',
141
+ submitSuccess: 'Submit successfully!',
142
+ orderSummaryTitle: 'Sažetak narudžbe',
143
+ orderSummaryTickets: 'Listić',
144
+ orderSummaryTotal: 'Ukupno',
145
+ orderSummarySubmit: 'Podnijeti',
146
+ modalLogin: 'Molimo prijavite se da uplatite listić',
147
+ loading: 'Učitavanje, molimo pričekajte ...'
148
+ }
149
+ };
150
+ const translate = (key, customLang) => {
151
+ const lang = customLang;
152
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
153
+ };
154
+
155
+ /**
156
+ * @name isMobile
157
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
158
+ * @param {String} userAgent window.navigator.userAgent
159
+ * @returns {Boolean} true or false
160
+ */
161
+ const generateUUID = () => {
162
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
163
+ var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
164
+ return v.toString(16);
165
+ });
166
+ };
167
+
168
+ const lotteryHakunaTicketBuyCss = ":host{--emw--color-background-secondary:var(--emw-hakuna-bg-secondary, #120505);--emw--color-primary:var(--emw-hakuna-color-primary, #c52217);--emw--color-background:var(--emw-hakuna-bg-primary, #2c2525);--emw--color-background-tertiary:var(--emw-hakuna-bg-tertiary, #4f2421);--lottery-button-outline-active-bg:var(--emw-hakuna-bg-tertiary, #4f2421);--lottery-button-outline-active-bg:var(--emw-hakuna-bg-tertiary, #4f2421);scrollbar-width:thin;scrollbar-color:var(--emw-hakuna-scroll-scrollbar-thumb-background, #120505) var(--emw-hakuna-scroll-scrollbar-track-background, transparent);}:host::-webkit-scrollbar{width:var(--emw-hakuna-scroll-scrollbar-width, 2px)}:host::-webkit-scrollbar-track{background:var(--emw-hakuna-scroll-scrollbar-track-background, transparent)}:host::-webkit-scrollbar-thumb{background:var(--emw-hakuna-scroll-scrollbar-thumb-background, #120505);border-radius:var(--emw-hakuna-scroll-scrollbar-thumb-border-radius, 2px)}.error-container{display:flex;justify-content:center;align-items:center;padding:20px;min-height:100px;background-color:var(--emw--color-background-secondary, #f5f5f5);border-radius:4px;margin:20px 0}.error-text{font-size:16px;color:var(--emw--color-error, #ff3d00);font-weight:500;text-align:center}.hakuna-ticket-buy{display:flex;justify-content:center}.hakuna-ticket-buy .empty-draw{display:flex;color:var(--emw-hakuna-text-primary, #ffffff);width:335px;padding:28px 20px;justify-content:center;border:1px solid transparent;border-radius:12px;background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) 32%, var(--emw-hakuna-bg-primary, #2c2525) 68%)}.hakuna-ticket-buy-skeleton{display:flex;flex-direction:column;align-items:center;margin:0 auto}.hakuna-ticket-buy-skeleton-ticket{box-sizing:border-box;padding:20px;min-width:336px;max-width:414px;background-color:var(--emw-hakuna-ticket-skeleton-bg, #2d2d2d)}.hakuna-ticket-buy-skeleton-pay{position:fixed;bottom:0;left:0;right:0;padding:16px 24px;background-color:var(--emw-hakuna-ticket-skeleton-bg, #2d2d2d);display:flex;align-items:center;justify-content:space-between}.hakuna-ticket-buy-wrapper{width:100%;display:flex;flex-direction:column;align-items:center;max-height:calc(100vh - 90px);overflow-y:scroll}.hakuna-ticket-buy-list{display:flex;flex-direction:column;gap:12px;min-width:336px;max-width:414px;width:100%}.hakuna-ticket-buy-operation{display:flex;justify-content:center}.hakuna-ticket-buy-pay{position:fixed;bottom:0;left:0;right:0;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;background:var(--emw-hakuna-bg-secondary, #120505)}.hakuna-ticket-buy-pay-info{display:flex;flex-direction:column;gap:10px}.hakuna-ticket-buy-pay-info-item{color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:12px;font-weight:600}.dialog-content{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 0}.dialog-content-icon{margin-bottom:16px;display:flex;justify-content:center;align-items:center}.dialog-content-icon svg{display:block}.dialog-content-title{color:var(--emw-hakuna-text-primary, #ffffff);font-size:16px;font-weight:700;text-transform:uppercase}.dialog-content-message{color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:14px;font-weight:500;width:100%;display:flex;justify-content:center}.dialog-content-footer{display:flex;justify-content:center;gap:16px;width:100%}.confirm-submit-message{width:200px;display:flex;flex-direction:column;gap:2px;justify-content:center}.confirm-submit-message-item{width:100%;display:flex;justify-content:space-between;color:var(--emw-hakuna-text-secondary, #b4a5a5);font-size:14px;font-weight:500}.hakuna-dialog::part(dialog){border:1px solid transparent;border-radius:12px;background-origin:border-box;background-clip:padding-box, border-box;background-image:linear-gradient(var(--emw-hakuna-bg-secondary, #120505), var(--emw-hakuna-bg-secondary, #120505)), linear-gradient(to top left, var(--emw-hakuna-color-primary, #c52217) 32%, var(--emw-hakuna-bg-primary, #2c2525) 68%)}.hakuna-skeleton{animation:skeleton-loading 1s linear infinite alternate}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #414141)}100%{background-color:var(--emw-skeleton-secondary-color, #2f2929)}}";
169
+ const LotteryHakunaTicketBuyStyle0 = lotteryHakunaTicketBuyCss;
170
+
171
+ const LotteryHakunaTicketBuy = class {
172
+ constructor(hostRef) {
173
+ registerInstance(this, hostRef);
174
+ this.goToTicketList = createEvent(this, "TicketSubmission:jumpToHistoryList", 7);
175
+ this.sessionExpired = createEvent(this, "SessionExpired", 7);
176
+ this.goToHomePage = createEvent(this, "TicketBuying:leaveToHomepage", 7);
177
+ this.resetAllTicketSelection = createEvent(this, "resetAllTicketSelection", 7);
178
+ this.thousandSeparator = (value) => {
179
+ if (value === 0) {
180
+ return '0';
181
+ }
182
+ if (!value) {
183
+ return '';
184
+ }
185
+ value = value.toString();
186
+ const parts = value.split('.');
187
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
188
+ return parts.join('.');
189
+ };
190
+ this.endpoint = undefined;
191
+ this.gameId = undefined;
192
+ this.playerId = undefined;
193
+ this.sessionId = undefined;
194
+ this.country = 'South Africa';
195
+ this.currency = 'R';
196
+ this.language = 'en';
197
+ this.clientStyling = '';
198
+ this.clientStylingUrl = '';
199
+ this.mbSource = undefined;
200
+ this.translationUrl = '';
201
+ this.tickets = [];
202
+ this.mainTickets = [];
203
+ this.hasErrors = false;
204
+ this.totalAmount = 0;
205
+ this.translationData = undefined;
206
+ this.isFetchingGame = false;
207
+ this.dialogInfo = {
208
+ title: '',
209
+ message: '',
210
+ icon: '',
211
+ visible: false,
212
+ showLeftBtn: false,
213
+ showRightBtn: false,
214
+ leftBtnText: '',
215
+ rightBtnText: '',
216
+ loading: false,
217
+ type: '',
218
+ leftBtnEvent: () => { },
219
+ rightBtnEvent: () => { }
220
+ };
221
+ }
222
+ handleClientStylingChange(newValue, oldValue) {
223
+ if (newValue != oldValue) {
224
+ setClientStyling(this.stylingContainer, this.clientStyling);
225
+ }
226
+ }
227
+ handleClientStylingUrlChange(newValue, oldValue) {
228
+ if (newValue != oldValue) {
229
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
230
+ }
231
+ }
232
+ handleMbSourceChange(newValue, oldValue) {
233
+ if (newValue != oldValue) {
234
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
235
+ }
236
+ }
237
+ watchGameInfoChange(newValue, oldValue) {
238
+ if (newValue && newValue != oldValue) {
239
+ this.getGameDetails();
240
+ }
241
+ }
242
+ async componentWillLoad() {
243
+ if (this.gameId && this.endpoint) {
244
+ this.getGameDetails();
245
+ }
246
+ }
247
+ componentDidLoad() {
248
+ this.applyStyles();
249
+ }
250
+ componentDidUpdate() {
251
+ this.applyStyles();
252
+ }
253
+ applyStyles() {
254
+ if (this.stylingContainer && this.stylingContainer !== this.appliedStylingContainer) {
255
+ this.appliedStylingContainer = this.stylingContainer;
256
+ if (this.mbSource)
257
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
258
+ if (this.clientStyling)
259
+ setClientStyling(this.stylingContainer, this.clientStyling);
260
+ if (this.clientStylingUrl)
261
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
262
+ }
263
+ }
264
+ disconnectedCallback() { }
265
+ getGameDetails() {
266
+ let url = new URL(`${this.endpoint}/games/${this.gameId}`);
267
+ this.isFetchingGame = true;
268
+ fetch(url.href)
269
+ .then((res) => {
270
+ if (res.status === 401) {
271
+ this.sessionExpired.emit();
272
+ }
273
+ if (res.status >= 300) {
274
+ this.hasErrors = true;
275
+ throw new Error('There was an error while fetching the data');
276
+ }
277
+ return res.json();
278
+ })
279
+ .then((data) => {
280
+ var _a;
281
+ this.gameData = data;
282
+ this.basicStake = this.gameData.rules.stakes.length ? Number(this.gameData.rules.stakes[0].value) : 0;
283
+ this.basicLine = ((_a = this.gameData.rules.betTypes) === null || _a === void 0 ? void 0 : _a.length) ? this.gameData.rules.betTypes[0].boardsAllowed[0] : 1;
284
+ this.basicBetType = this.gameData.rules.betTypes[0];
285
+ this.createNewTicket();
286
+ })
287
+ .catch((err) => {
288
+ this.hasErrors = true;
289
+ console.log('Error', err);
290
+ })
291
+ .finally(() => {
292
+ this.isFetchingGame = false;
293
+ });
294
+ }
295
+ isTicketComplete(ticket) {
296
+ const filledCount = ticket.selectedNumbers ? ticket.selectedNumbers.filter((v) => v && v.length > 0).length : 0;
297
+ return filledCount === (ticket.lineNum || 1);
298
+ }
299
+ calculateTotalAmount() {
300
+ const { currency } = this.gameData.rules.stakes[0];
301
+ this.totalAmount = 0;
302
+ this.mainTickets.forEach((item) => {
303
+ var _a;
304
+ if (this.isTicketComplete(item)) {
305
+ this.totalAmount +=
306
+ item.drawCount *
307
+ (item.stake || this.basicStake) *
308
+ item.multiplierNum *
309
+ item.lineNum *
310
+ ((_a = item.betType) === null || _a === void 0 ? void 0 : _a.combinations);
311
+ }
312
+ });
313
+ this.currencyInner = currency;
314
+ }
315
+ gridUpdateHandler(event) {
316
+ let tickets = this.mainTickets;
317
+ tickets = tickets.map((item) => {
318
+ if (item.ticketId == event.detail.id) {
319
+ let arr = item.selectedNumbers || [];
320
+ arr[event.detail.index] = event.detail.selectedNumbers.map((item) => parseInt(item, 10));
321
+ return Object.assign(Object.assign({}, item), { drawCount: 1, stake: item.stake || this.basicStake, selectedNumbers: arr, multiplierNum: 1, multiplier: this.gameData.rules.stakeMultiplierAvailable, lineNum: item.lineNum, betType: item.betType, quickPicks: event.detail.quickPicks, betName: this.basicBetType.name || this.basicBetType.id });
322
+ }
323
+ return item;
324
+ });
325
+ this.mainTickets = tickets;
326
+ this.calculateTotalAmount();
327
+ }
328
+ deleteTicketHandler(event) {
329
+ const { ticketId } = event.detail;
330
+ this.dialogInfo = {
331
+ loading: false,
332
+ title: translate('deleteTicketTitle', this.language),
333
+ message: translate('deleteTicketMessage', this.language),
334
+ icon: this.getDialogIcon('delete'),
335
+ visible: true,
336
+ showLeftBtn: true,
337
+ showRightBtn: true,
338
+ leftBtnText: translate('cancel', this.language),
339
+ rightBtnText: translate('delete', this.language),
340
+ leftBtnEvent: () => (this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { visible: false })),
341
+ rightBtnEvent: this.confirmDeleteTicket.bind(this, ticketId),
342
+ type: 'DELETE_CONFIRM'
343
+ };
344
+ }
345
+ confirmDeleteTicket(ticketId) {
346
+ this.mainTickets = this.mainTickets
347
+ .filter((ticket) => ticket.ticketId !== ticketId)
348
+ .map((ticket, index) => (Object.assign(Object.assign({}, ticket), { ticketId: index + 1 })));
349
+ this.calculateTotalAmount();
350
+ this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { visible: false });
351
+ }
352
+ saveTicketHandler(event) {
353
+ const { ticketId } = event.detail;
354
+ this.mainTickets = this.mainTickets.map((ticket) => {
355
+ if (ticket.ticketId === ticketId) {
356
+ return Object.assign(Object.assign({}, ticket), { isSubmitted: true });
357
+ }
358
+ return ticket;
359
+ });
360
+ }
361
+ editTicketHandler(event) {
362
+ const { ticketId } = event.detail;
363
+ this.mainTickets = this.mainTickets.map((ticket) => {
364
+ if (ticket.ticketId === ticketId) {
365
+ return Object.assign(Object.assign({}, ticket), { isSubmitted: false });
366
+ }
367
+ return ticket;
368
+ });
369
+ }
370
+ getNewTicketData(ticketId) {
371
+ const lineNum = this.basicLine || 1;
372
+ return {
373
+ uid: generateUUID(),
374
+ gameId: this.gameId,
375
+ ticketId: ticketId,
376
+ drawCount: 1,
377
+ multiplierNum: 1,
378
+ stake: this.basicStake,
379
+ betType: this.basicBetType,
380
+ lineNum: lineNum,
381
+ quickPicks: Array.from({ length: lineNum }, () => false),
382
+ betName: '',
383
+ isSubmitted: false
384
+ };
385
+ }
386
+ createNewTicket() {
387
+ this.mainTickets = [...this.mainTickets, this.getNewTicketData(this.mainTickets.length + 1)];
388
+ }
389
+ buildTicketParam() {
390
+ let body = {
391
+ playerId: this.playerId.toString(),
392
+ tickets: []
393
+ };
394
+ this.mainTickets.forEach((item) => {
395
+ var _a;
396
+ body.tickets.push({
397
+ startingDrawId: this.nextDraw,
398
+ amount: (item.stake *
399
+ item.drawCount *
400
+ item.multiplierNum *
401
+ (item.lineNum || 1) *
402
+ ((_a = item.betType) === null || _a === void 0 ? void 0 : _a.combinations)).toString(),
403
+ gameId: this.gameId,
404
+ gameName: this.gameData.name,
405
+ currency: this.currencyInner,
406
+ selection: item.selectedNumbers.map((v, i) => {
407
+ var _a;
408
+ return {
409
+ betType: ((_a = item.betType) === null || _a === void 0 ? void 0 : _a.id) || this.gameData.rules.defaultBetType,
410
+ stake: item.stake,
411
+ selections: v,
412
+ quickPick: item.quickPicks[i],
413
+ betName: item.betName
414
+ };
415
+ }),
416
+ multiplier: item.multiplier,
417
+ multiplierNum: item.multiplierNum,
418
+ drawCount: item.drawCount,
419
+ quickPick: this.gameData.rules.quickPickAvailable
420
+ });
421
+ });
422
+ return body;
423
+ }
424
+ getDialogIcon(type) {
425
+ switch (type) {
426
+ case 'confirm':
427
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "45", height: "45", viewBox: "0 0 45 45", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM22.5 13.125C23.5355 13.125 24.375 13.9645 24.375 15V22.5C24.375 23.5355 23.5355 24.375 22.5 24.375C21.4645 24.375 20.625 23.5355 20.625 22.5V15C20.625 13.9645 21.4645 13.125 22.5 13.125ZM20.625 30C20.625 28.9645 21.4645 28.125 22.5 28.125H22.5188C23.5543 28.125 24.3938 28.9645 24.3938 30C24.3938 31.0355 23.5543 31.875 22.5188 31.875H22.5C21.4645 31.875 20.625 31.0355 20.625 30Z", fill: "#B4A5A5" })));
428
+ case 'delete':
429
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "45", height: "45", viewBox: "0 0 45 45", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.9277 1.875H24.0723C25.0607 1.87497 25.9134 1.87494 26.6157 1.93232C27.3569 1.99289 28.0942 2.1266 28.8037 2.48809C29.8621 3.02738 30.7226 3.8879 31.2619 4.94631C31.6234 5.65577 31.7571 6.39305 31.8177 7.13433C31.8691 7.76391 31.8744 8.51431 31.8749 9.375H39.375C40.4105 9.375 41.25 10.2145 41.25 11.25C41.25 12.2855 40.4105 13.125 39.375 13.125H37.5V32.3275C37.5 33.8368 37.5 35.0824 37.4171 36.0972C37.331 37.1511 37.1462 38.1199 36.6825 39.0299C35.9635 40.4411 34.8161 41.5885 33.4049 42.3076C32.4949 42.7712 31.5261 42.956 30.4722 43.0421C29.4574 43.125 28.2118 43.125 26.7025 43.125H18.2975C16.7882 43.125 15.5426 43.125 14.5278 43.0421C13.4739 42.956 12.5051 42.7712 11.5951 42.3076C10.1839 41.5885 9.0365 40.4411 8.31745 39.0299C7.85378 38.1199 7.66897 37.1511 7.58286 36.0972C7.49996 35.0824 7.49998 33.8368 7.5 32.3274L7.5 13.125H5.625C4.58947 13.125 3.75 12.2855 3.75 11.25C3.75 10.2145 4.58947 9.375 5.625 9.375H13.1251C13.1256 8.51431 13.1309 7.76391 13.1823 7.13433C13.2429 6.39305 13.3766 5.65577 13.7381 4.94631C14.2774 3.8879 15.1379 3.02738 16.1963 2.48809C16.9058 2.1266 17.6431 1.99289 18.3843 1.93232C19.0866 1.87494 19.9393 1.87497 20.9277 1.875ZM11.25 13.125V32.25C11.25 33.8561 11.2515 34.9479 11.3204 35.7918C11.3876 36.6138 11.5093 37.0342 11.6587 37.3275C12.0183 38.0331 12.5919 38.6068 13.2975 38.9663C13.5908 39.1157 14.0112 39.2374 14.8332 39.3046C15.6771 39.3735 16.7689 39.375 18.375 39.375H26.625C28.2311 39.375 29.3229 39.3735 30.1668 39.3046C30.9888 39.2374 31.4092 39.1157 31.7025 38.9663C32.4081 38.6068 32.9818 38.0331 33.3413 37.3275C33.4907 37.0342 33.6124 36.6138 33.6796 35.7918C33.7485 34.9479 33.75 33.8561 33.75 32.25V13.125H11.25ZM28.1249 9.375H16.8751C16.876 8.50293 16.8817 7.90685 16.9199 7.4397C16.9615 6.93033 17.0321 6.74148 17.0794 6.64877C17.2591 6.29597 17.546 6.00913 17.8988 5.82937C17.9915 5.78213 18.1803 5.71148 18.6897 5.66987C19.2209 5.62646 19.919 5.625 21 5.625H24C25.081 5.625 25.7791 5.62646 26.3103 5.66987C26.8197 5.71148 27.0085 5.78213 27.1012 5.82937C27.454 6.00913 27.7409 6.29597 27.9206 6.64877C27.9679 6.74148 28.0385 6.93033 28.0801 7.4397C28.1183 7.90685 28.124 8.50293 28.1249 9.375ZM18.75 19.6875C19.7855 19.6875 20.625 20.527 20.625 21.5625V30.9375C20.625 31.973 19.7855 32.8125 18.75 32.8125C17.7145 32.8125 16.875 31.973 16.875 30.9375V21.5625C16.875 20.527 17.7145 19.6875 18.75 19.6875ZM26.25 19.6875C27.2855 19.6875 28.125 20.527 28.125 21.5625V30.9375C28.125 31.973 27.2855 32.8125 26.25 32.8125C25.2145 32.8125 24.375 31.973 24.375 30.9375V21.5625C24.375 20.527 25.2145 19.6875 26.25 19.6875Z", fill: "#C52217" })));
430
+ case 'success':
431
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "45", height: "45", viewBox: "0 0 45 45", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8198 13.1802 39.375 22.5 39.375C31.8198 39.375 39.375 31.8198 39.375 22.5C39.375 13.1802 31.8198 5.625 22.5 5.625ZM1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8909 1.875 43.125 11.1091 43.125 22.5C43.125 33.8909 33.8909 43.125 22.5 43.125C11.1091 43.125 1.875 33.8909 1.875 22.5ZM32.2633 15.5492C32.9956 16.2814 32.9956 17.4686 32.2633 18.2008L21.0133 29.4508C20.2811 30.1831 19.0939 30.1831 18.3617 29.4508L12.7367 23.8258C12.0044 23.0936 12.0044 21.9064 12.7367 21.1742C13.4689 20.4419 14.6561 20.4419 15.3883 21.1742L19.6875 25.4734L29.6117 15.5492C30.3439 14.8169 31.5311 14.8169 32.2633 15.5492Z", fill: "#23AC4D" })));
432
+ case 'error':
433
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "45", height: "45", viewBox: "0 0 45 45", fill: "none" }, h("path", { d: "M39.375 22.5C39.375 13.1802 31.8197 5.625 22.5 5.625C13.1802 5.625 5.625 13.1802 5.625 22.5C5.625 31.8197 13.1802 39.375 22.5 39.375C31.8197 39.375 39.375 31.8197 39.375 22.5ZM26.7993 15.5493C27.5315 14.8171 28.7185 14.8171 29.4507 15.5493C30.1829 16.2815 30.1829 17.4685 29.4507 18.2007L25.1514 22.5L29.4507 26.7993C30.1829 27.5315 30.1829 28.7185 29.4507 29.4507C28.7185 30.1829 27.5315 30.1829 26.7993 29.4507L22.5 25.1514L18.2007 29.4507C17.4685 30.1829 16.2815 30.1829 15.5493 29.4507C14.8171 28.7185 14.8171 27.5315 15.5493 26.7993L19.8486 22.5L15.5493 18.2007C14.8171 17.4685 14.8171 16.2815 15.5493 15.5493C16.2815 14.8171 17.4685 14.8171 18.2007 15.5493L22.5 19.8486L26.7993 15.5493ZM43.125 22.5C43.125 33.8908 33.8908 43.125 22.5 43.125C11.1091 43.125 1.875 33.8908 1.875 22.5C1.875 11.1091 11.1091 1.875 22.5 1.875C33.8908 1.875 43.125 11.1091 43.125 22.5Z", fill: "#C52217" })));
434
+ }
435
+ }
436
+ handleConfirmSubmit() {
437
+ this.dialogInfo = {
438
+ loading: false,
439
+ title: translate('confirmPaymentTitle', this.language),
440
+ message: '',
441
+ icon: this.getDialogIcon('confirm'),
442
+ visible: true,
443
+ showLeftBtn: true,
444
+ showRightBtn: true,
445
+ leftBtnText: translate('back', this.language),
446
+ rightBtnText: translate('confirm', this.language),
447
+ leftBtnEvent: this.handleLeaveToHomepage.bind(this),
448
+ rightBtnEvent: this.handleSubmitTickets.bind(this),
449
+ type: 'SUBMIT_CONFIRM'
450
+ };
451
+ }
452
+ handleSubmitTickets() {
453
+ let url = new URL(`${this.endpoint}/tickets`);
454
+ const body = this.buildTicketParam();
455
+ if (body) {
456
+ const uuid = generateUUID();
457
+ let options = {
458
+ method: 'POST',
459
+ headers: {
460
+ 'Content-Type': 'application/json',
461
+ Accept: 'application/json',
462
+ Authorization: `Bearer ${this.sessionId}`,
463
+ 'X-Idempotency-Key': uuid
464
+ },
465
+ body: JSON.stringify(body)
466
+ };
467
+ this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { loading: true });
468
+ fetch(url.href, options)
469
+ .then((res) => {
470
+ if (res.status === 401) {
471
+ this.sessionExpired.emit();
472
+ throw new Error('401');
473
+ }
474
+ if (res.status > 300) {
475
+ throw new Error(res.statusText);
476
+ }
477
+ return res.json();
478
+ })
479
+ .then(() => {
480
+ this.mainTickets = [this.getNewTicketData(1)];
481
+ this.calculateTotalAmount();
482
+ this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { loading: false, visible: true, title: translate('ticketSubmittedSuccess', this.language), message: translate('ticketSubmittedSuccessMessage', this.language), icon: this.getDialogIcon('success'), type: 'SUCCESS', showLeftBtn: true, showRightBtn: true, leftBtnText: translate('viewTicket', this.language), rightBtnText: translate('home', this.language), leftBtnEvent: this.handleGoToTicketList.bind(this), rightBtnEvent: this.handleLeaveToHomepage.bind(this) });
483
+ })
484
+ .catch((err) => {
485
+ console.log('Error ', err);
486
+ if (err.message === '401') {
487
+ this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { visible: false, loading: false });
488
+ return;
489
+ }
490
+ this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { loading: false, visible: true, title: translate('ticketSubmittedError', this.language), message: translate('ticketSubmittedErrorMessage', this.language), icon: this.getDialogIcon('error'), type: 'ERROR', showLeftBtn: false, showRightBtn: true, rightBtnText: translate('confirm', this.language), rightBtnEvent: () => (this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { visible: false })) });
491
+ });
492
+ }
493
+ else {
494
+ console.log('No valid ticket parameters to submit');
495
+ }
496
+ }
497
+ handleGoToTicketList() {
498
+ this.goToTicketList.emit();
499
+ }
500
+ handleLeaveToHomepage() {
501
+ this.goToHomePage.emit();
502
+ }
503
+ getSkeletonEle(style, type) {
504
+ return (h("div", { class: "hakuna-skeleton", style: Object.assign(Object.assign({}, style), { display: type === 'inline' ? 'inline-flex' : 'flex' }) }));
505
+ }
506
+ renderSkeleton() {
507
+ return (h("div", { class: "hakuna-ticket-buy-skeleton" }, h("div", { class: "hakuna-ticket-buy-skeleton-ticket" }, this.getSkeletonEle({ width: '123px', height: '18px', borderRadius: '8px' }, 'block'), this.getSkeletonEle({ width: '181px', height: '12px', borderRadius: '8px', marginTop: '12px' }, 'block'), this.getSkeletonEle({ width: '296px', height: '194px', borderRadius: '8px', marginTop: '20px' }, 'block'), this.getSkeletonEle({ width: '20px', height: '20px', borderRadius: '50%', marginTop: '25px' }, 'inline'), this.getSkeletonEle({ width: '80px', height: '30px', borderRadius: '8px', marginTop: '25px', marginLeft: '108px' }, 'inline'), this.getSkeletonEle({ width: '80px', height: '30px', borderRadius: '8px', marginTop: '25px', marginLeft: '8px' }, 'inline')), h("div", { class: "hakuna-ticket-buy-skeleton-ticketBtn" }, this.getSkeletonEle({ width: '102px', height: '30px', borderRadius: '8px', marginTop: '16px' }, 'block')), h("div", { class: "hakuna-ticket-buy-skeleton-pay" }, h("div", { class: "hakuna-ticket-buy-skeleton-pay-left" }, this.getSkeletonEle({ width: '107px', height: '12px', borderRadius: '8px' }, 'block'), this.getSkeletonEle({ width: '107px', height: '12px', borderRadius: '8px', marginTop: '10px' }, 'block')), h("div", { class: "hakuna-ticket-buy-skeleton-pay-right" }, this.getSkeletonEle({ width: '80px', height: '30px', borderRadius: '8px' }, 'block')))));
508
+ }
509
+ render() {
510
+ var _a, _b;
511
+ if (this.isFetchingGame) {
512
+ return this.renderSkeleton();
513
+ }
514
+ else if (this.hasErrors) {
515
+ return (h("div", { class: "error-container" }, h("p", { class: "error-text" }, translate('error', this.language) || 'Error loading data')));
516
+ }
517
+ else {
518
+ const { rules } = this.gameData;
519
+ const { quickPickAvailable } = rules;
520
+ const { highNumber, lowNumber, maxinumAllowed, minimumAllowed } = rules.boards[0];
521
+ const selectionRules = rules.betTypes[0].selectionRules;
522
+ const numberRange = selectionRules.map((item) => item.selectionCount);
523
+ const isAllTicketsSubmitted = this.mainTickets.length > 0 && this.mainTickets.every((ticket) => ticket.isSubmitted);
524
+ const nextDate = (_b = (_a = this.gameData) === null || _a === void 0 ? void 0 : _a.currentDraw) === null || _b === void 0 ? void 0 : _b.date;
525
+ return (h("div", { class: "hakuna-ticket-buy", ref: (el) => (this.stylingContainer = el) }, nextDate ? (h("div", { class: "hakuna-ticket-buy-wrapper" }, h("div", { class: "hakuna-ticket-buy-list" }, this.mainTickets.map((item) => (h("lottery-hakuna-ticket", { key: item.uid, "ticket-id": item.ticketId, allowQuickPick: quickPickAvailable, gameName: this.country || this.gameData.name, "is-submitted": item.isSubmitted, "high-number": highNumber, "low-number": lowNumber, "maximum-allowed": maxinumAllowed, "minimum-allowed": minimumAllowed, "number-range": numberRange, language: this.language, "translation-url": this.translationUrl, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "disable-delete": this.mainTickets.length === 1 })))), h("div", { class: "hakuna-ticket-buy-operation" }, h("lottery-button", { variant: "outline", color: "var(--emw-hakuna-color-primary, #C52217)", size: "small", onClick: this.createNewTicket.bind(this) }, h("span", { slot: "icon-left" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.00004 2.33337C7.32221 2.33337 7.58337 2.59454 7.58337 2.91671V6.41671H11.0834C11.4055 6.41671 11.6667 6.67787 11.6667 7.00004C11.6667 7.32221 11.4055 7.58337 11.0834 7.58337H7.58337V11.0834C7.58337 11.4055 7.32221 11.6667 7.00004 11.6667C6.67787 11.6667 6.41671 11.4055 6.41671 11.0834V7.58337H2.91671C2.59454 7.58337 2.33337 7.32221 2.33337 7.00004C2.33337 6.67787 2.59454 6.41671 2.91671 6.41671H6.41671V2.91671C6.41671 2.59454 6.67787 2.33337 7.00004 2.33337Z", fill: "white" }))), h("span", { style: { color: '#fff' } }, translate('addTicket', this.language)))), h("lottery-tipping-dialog", { closable: false, visible: this.dialogInfo.visible, width: "335px", mask: true, maskClosable: true, class: "hakuna-dialog", onCancel: () => (this.dialogInfo = Object.assign(Object.assign({}, this.dialogInfo), { visible: false })) }, h("div", { class: "dialog-content" }, h("div", { class: "dialog-content-icon" }, this.dialogInfo.icon), h("div", { class: "dialog-content-title" }, this.dialogInfo.title), h("div", { class: "dialog-content-message" }, this.dialogInfo.type === 'SUBMIT_CONFIRM' ? (h("div", { class: "confirm-submit-message" }, h("div", { class: "confirm-submit-message-item" }, h("div", { class: "title" }, translate('tickets', this.language), ":"), h("div", { class: "value" }, this.mainTickets.length)), h("div", { class: "confirm-submit-message-item" }, h("div", { class: "title" }, translate('total', this.language), ": "), h("div", { class: "value" }, `${this.currency} ${this.thousandSeparator(this.totalAmount)}`)))) : (h("span", null, this.dialogInfo.message)))), h("div", { slot: "footer", class: "dialog-content-footer" }, h("lottery-button", { variant: "outline", color: "var(--emw-hakuna-color-primary, #C52217)", onClick: this.dialogInfo.leftBtnEvent, text: this.dialogInfo.leftBtnText }), h("lottery-button", { variant: "primary", color: "var(--emw-hakuna-color-primary, #C52217)", onClick: this.dialogInfo.rightBtnEvent, text: this.dialogInfo.rightBtnText, loading: this.dialogInfo.loading }))))) : (h("div", { class: "empty-draw" }, translate('emptyDraw', this.language))), h("div", { class: "hakuna-ticket-buy-pay" }, h("div", { class: "hakuna-ticket-buy-pay" }, h("div", { class: "hakuna-ticket-buy-pay" }, h("div", { class: "hakuna-ticket-buy-pay-info" }, h("div", { class: "hakuna-ticket-buy-pay-info-item" }, translate('ticket', this.language), ": ", this.mainTickets.length), h("div", { class: "hakuna-ticket-buy-pay-info-item" }, translate('price', this.language), ":", ' ', `${this.currency} ${this.thousandSeparator(this.totalAmount)}`)), h("div", { class: "hakuna-ticket-buy-pay-button" }, h("lottery-button", { variant: "primary", color: "var(--emw-hakuna-color-primary, #C52217)", text: translate('payNow', this.language), disabled: !isAllTicketsSubmitted, onClick: this.handleConfirmSubmit.bind(this) })))))));
526
+ }
527
+ }
528
+ static get assetsDirs() { return ["../static"]; }
529
+ get element() { return getElement(this); }
530
+ static get watchers() { return {
531
+ "clientStyling": ["handleClientStylingChange"],
532
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
533
+ "mbSource": ["handleMbSourceChange"],
534
+ "endpoint": ["watchGameInfoChange"],
535
+ "gameId": ["watchGameInfoChange"]
536
+ }; }
537
+ };
538
+ LotteryHakunaTicketBuy.style = LotteryHakunaTicketBuyStyle0;
539
+
540
+ export { LotteryHakunaTicketBuy as L, setClientStylingURL as a, setStreamStyling as b, setClientStyling as s };
@@ -0,0 +1,20 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-1f778cb5.js';
2
+ export { s as setNonce } from './index-1f778cb5.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["lottery-button_7",[[1,"lottery-hakuna-ticket-buy",{"endpoint":[513],"gameId":[513,"game-id"],"playerId":[514,"player-id"],"sessionId":[513,"session-id"],"country":[513],"currency":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[513,"translation-url"],"tickets":[32],"mainTickets":[32],"hasErrors":[32],"totalAmount":[32],"translationData":[32],"isFetchingGame":[32],"dialogInfo":[32]},[[0,"ticketUpdate","gridUpdateHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"saveTicket","saveTicketHandler"],[0,"editTicket","editTicketHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"endpoint":["watchGameInfoChange"],"gameId":["watchGameInfoChange"]}],[1,"lottery-hakuna-ticket",{"gameName":[513,"game-name"],"allowQuickPick":[516,"allow-quick-pick"],"highNumber":[514,"high-number"],"lowNumber":[514,"low-number"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"numberRange":[16],"useCollapse":[516,"use-collapse"],"isSubmitted":[516,"is-submitted"],"ticketId":[514,"ticket-id"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"translationUrl":[520,"translation-url"],"disableDelete":[516,"disable-delete"],"grids":[32],"ticketDone":[32],"quickPicks":[32]},[[4,"resetAllTicketSelection","toggleResetAllSelection"],[0,"bulletGroupUpdateSelection","bulletGroupUpdateSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"splitToken":[513,"split-token"],"selectionGroupId":[513,"selection-group-id"],"selectionGroupLabel":[513,"selection-group-label"],"type":[513],"selectedBulletTexts":[513,"selected-bullet-texts"],"maxSelectedCount":[514,"max-selected-count"],"maxDisplayBulletsCount":[514,"max-display-bullets-count"],"bulletTexts":[513,"bullet-texts"],"maxIntegerBulletText":[514,"max-integer-bullet-text"],"minIntegerBulletText":[514,"min-integer-bullet-text"],"bulletTextType":[513,"bullet-text-type"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"dialogTitle":[513,"dialog-title"],"dialogInputPlaceholder":[513,"dialog-input-placeholder"],"dialogConfig":[32],"inputInfo":[32]},[[0,"lotteryBulletClick","lotteryBulletClickHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-hakuna-collapse",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"headerTitle":[513,"header-title"],"collapsed":[516],"isOpen":[32],"hasSummary":[32],"toggle":[64]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-button",{"variant":[513],"size":[513],"color":[513],"disabled":[516],"loading":[516],"text":[513],"mbSource":[513,"mb-source"],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"ripples":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-selection",{"value":[520],"text":[513],"idx":[514],"type":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"hasBorder":[516,"has-border"],"hasBackground":[516,"has-background"],"deleteIconSvg":[513,"delete-icon-svg"],"deleteIconWidth":[513,"delete-icon-width"],"deleteIconHeight":[513,"delete-icon-height"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-dialog",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"visible":[516],"dialogTitle":[1,"dialog-title"],"width":[1],"closable":[4],"mask":[4],"maskClosable":[4,"mask-closable"],"animationDuration":[2,"animation-duration"],"fullscreen":[4],"showFooter":[4,"show-footer"],"showCancelBtn":[4,"show-cancel-btn"],"language":[513],"translationUrl":[520,"translation-url"],"dialogClass":[1,"dialog-class"],"dialogStyle":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
+ });
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?$(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(m),w(v),(p=m.length>0)&&f.raf(b)},$=e=>h().then(e),g=y(v,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},U=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?W(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=W(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},W=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},T=e=>n(e).$hostElement$,A=(e,t,n)=>{const l=T(e);return{emit:e=>D(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},D=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},F=new WeakMap,N=e=>"sc-"+e.$,H=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=G(n),s=G(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(_,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},q=/\s/,G=e=>e?e.split(q):[],V="Capture",_=RegExp(V+"$"),z=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||S,s=t.u||S;for(const e of B(Object.keys(o)))e in s||H(l,e,o[e],void 0,n,t.l);for(const e of B(Object.keys(s)))H(l,e,o[e],s[e],n,t.l)};function B(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var I=!1,J=!1,K=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else{if(J||(J="svg"===l.m),o=l.v=a.createElementNS(J?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),J&&"foreignObject"===l.m&&(J=!1),z(null,l,J),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=K(e,l,r),s&&o.appendChild(s);"svg"===l.m?J=!1:"foreignObject"===o.tagName&&(J=!0)}return o["s-hn"]=x,o},Q=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=K(null,n,o),r&&(l[o].v=r,te(i,r,t)))},X=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;ee(t),e&&e.remove()}}},Y=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Z=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(J="svg"===r||"foreignObject"!==r&&J,("slot"!==r||I)&&z(e,t,J),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],v=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==v)v=l[--p];else if(Y(h,m,o))Z(h,m,o),h=t[++i],m=l[++c];else if(Y(d,v,o))Z(d,v,o),d=t[--f],v=l[--p];else if(Y(h,v,o))Z(h,v,o),te(e,h.v,d.v.nextSibling),h=t[++i],v=l[--p];else if(Y(d,m,o))Z(d,m,o),te(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=K(t&&t[c],n,u):(Z(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=K(t&&t[c],n,c),m=l[++c]),s&&te(h.v.parentNode,s,h.v)}i>f?Q(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&X(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),Q(l,null,t,s,0,s.length-1)):null!==o&&X(o,0,o.length-1),J&&"svg"===r&&(J=!1)):e.i!==i&&(l.data=i)},ee=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ee)},te=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ne=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},le=(e,t)=>{if(e.l|=16,!(4&e.l))return ne(e,e.j),g((()=>oe(e,t)));e.l|=512},oe=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t?(e.l|=256,e.k&&(e.k.map((([e,t])=>fe(n,e,t))),e.k=void 0),l=fe(n,"componentWillLoad")):l=fe(n,"componentWillUpdate"),l=se(l,(()=>fe(n,"componentWillRender"))),se(l,(()=>ie(e,n,t)))},se=(e,t)=>re(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),re=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ie=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.C)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ce(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ue(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ce=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||W(null,null),r=(e=>e&&e.m===L)(t)?t:U(null,null,t);if(x=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.v=s.v=l.shadowRoot||l,M=l["s-sc"],I=!!(1&o.l),Z(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ue=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l?fe(n,"componentDidUpdate"):(e.l|=64,he(t),fe(n,"componentDidLoad"),e.R(t),l||ae()),e.U(t),e.S&&(e.S(),e.S=void 0),512&e.l&&$((()=>le(e,!1))),e.l&=-517},ae=()=>{he(a.documentElement),$((()=>D(u,"appload",{detail:{namespace:"lottery-hakuna-ticket-buy"}})))},fe=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},he=e=>e.classList.add("hydrated"),de=(e,t,l)=>{var o,r;const i=e.prototype;if(t.W||t.L||e.watchers){e.watchers&&!t.L&&(t.L=e.watchers);const c=Object.entries(null!=(o=t.W)?o:{});if(c.map((([e,[o]])=>{31&o||2&l&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.W[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.L&&128&u){const e=o.L[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&le(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&o&&Object.defineProperty(i,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.A)?void 0:l.then((()=>{var n;return null==(n=o.t)?void 0:n[e](...t)}))}})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.L)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.L)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},pe=e=>{fe(e,"disconnectedCallback")},me=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let $,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],W:l[2],D:l[3]};4&c.l&&(S=!0),c.W=l[2],c.D=l[3],c.P=[],c.L=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,T:new Map};l.A=new Promise((e=>l.U=e)),l.F=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ve(this,e,c.D)),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)ve(e,t,l.D),(null==t?void 0:t.t)||(null==t?void 0:t.F)&&t.F.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ne(t,t.j=n);break}}l.W&&Object.entries(l.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.N){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.N;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);l.isProxied||(n.L=l.watchers,de(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>le(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.q&&(e.q.map((e=>e())),e.q=void 0),(null==e?void 0:e.t)?pe(e.t):(null==e?void 0:e.F)&&e.F.then((()=>pe(e.t)))}})()))}componentOnReady(){return n(this).F}};c.N=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,de(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&w.setAttribute("nonce",e),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>$=setTimeout(ae,30)))},ve=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=we(e,n),r=ye(t,o),i=be(n);f.ael(s,l,r,i),(t.q=t.q||[]).push((()=>f.rel(s,l,r,i)))}))},ye=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},we=(e,t)=>4&t?a:e,be=e=>({passive:!!(1&e),capture:!!(2&e)}),$e=e=>f.C=e;export{me as b,A as c,T as g,U as h,h as p,l as r,$e as s}
@@ -0,0 +1 @@
1
+ export{L as LotteryHakunaTicketBuy}from"./lottery-hakuna-ticket-buy-a9f8e014.js";import"./index-1f778cb5.js";