@everymatrix/lottery-game-details 0.1.7 → 0.1.21

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 (23) hide show
  1. package/dist/cjs/helper-accordion_4.cjs.entry.js +146 -8
  2. package/dist/cjs/{index-9d95408f.js → index-0355373c.js} +17 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/lottery-game-details.cjs.js +2 -2
  5. package/dist/collection/components/lottery-game-details/lottery-game-details.js +80 -5
  6. package/dist/components/helper-accordion2.js +44 -3
  7. package/dist/components/helper-tab2.js +39 -4
  8. package/dist/components/helper-tabs2.js +42 -2
  9. package/dist/components/lottery-game-details.js +38 -2
  10. package/dist/esm/helper-accordion_4.entry.js +146 -8
  11. package/dist/esm/{index-515a97dd.js → index-627fc49c.js} +17 -0
  12. package/dist/esm/loader.js +2 -2
  13. package/dist/esm/lottery-game-details.js +2 -2
  14. package/dist/lottery-game-details/lottery-game-details.esm.js +1 -1
  15. package/dist/lottery-game-details/p-41f52078.entry.js +1 -0
  16. package/dist/lottery-game-details/p-ca6b7fee.js +1 -0
  17. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/lottery-game-details/.stencil/packages/lottery-game-details/stencil.config.d.ts +2 -0
  18. package/dist/types/components/lottery-game-details/lottery-game-details.d.ts +13 -0
  19. package/dist/types/components.d.ts +16 -0
  20. package/package.json +5 -1
  21. package/dist/lottery-game-details/p-703a43dd.js +0 -1
  22. package/dist/lottery-game-details/p-ea7da786.entry.js +0 -1
  23. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-details/.stencil/packages/lottery-game-details/stencil.config.d.ts +0 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9d95408f.js');
5
+ const index = require('./index-0355373c.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -13,13 +13,19 @@ const TRANSLATIONS = {
13
13
  ro: {
14
14
  deleteTicket: 'Sterge biletul'
15
15
  },
16
+ fr: {
17
+ deleteTicket: 'Supprimer le billet'
18
+ },
19
+ ar: {
20
+ deleteTicket: 'حذف التذكرة'
21
+ }
16
22
  };
17
23
  const translate = (key, customLang) => {
18
24
  const lang = customLang;
19
25
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
20
26
  };
21
27
 
22
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
28
+ const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
23
29
 
24
30
  const Accordion = class {
25
31
  constructor(hostRef) {
@@ -65,11 +71,43 @@ const Accordion = class {
65
71
  * Language
66
72
  */
67
73
  this.language = 'en';
74
+ /**
75
+ * Client custom styling via string
76
+ */
77
+ this.clientStyling = '';
78
+ /**
79
+ * Client custom styling via url content
80
+ */
81
+ this.clientStylingUrlContent = '';
82
+ this.limitStylingAppends = false;
83
+ this.setClientStyling = () => {
84
+ let sheet = document.createElement('style');
85
+ sheet.innerHTML = this.clientStyling;
86
+ this.stylingContainer.prepend(sheet);
87
+ };
88
+ this.setClientStylingURL = () => {
89
+ let cssFile = document.createElement('style');
90
+ setTimeout(() => {
91
+ cssFile.innerHTML = this.clientStylingUrlContent;
92
+ this.stylingContainer.prepend(cssFile);
93
+ }, 1);
94
+ };
68
95
  }
69
96
  // @TODO fix the `any` type :)
70
97
  connectedCallback() {
71
98
  this.showContent = !this.collapsed;
72
99
  }
100
+ componentDidRender() {
101
+ // start custom styling area
102
+ if (!this.limitStylingAppends && this.stylingContainer) {
103
+ if (this.clientStyling)
104
+ this.setClientStyling();
105
+ if (this.clientStylingUrlContent)
106
+ this.setClientStylingURL();
107
+ this.limitStylingAppends = true;
108
+ }
109
+ // end custom styling area
110
+ }
73
111
  toggleContent() {
74
112
  this.showContent = !this.showContent;
75
113
  }
@@ -81,7 +119,7 @@ const Accordion = class {
81
119
  this.accordionEvent.emit();
82
120
  }
83
121
  render() {
84
- return (index.h("div", { class: "Wrapper" }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
122
+ return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
85
123
  index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
86
124
  index.h("div", null, this.deleteTab &&
87
125
  index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -98,20 +136,52 @@ const HelperTab = class {
98
136
  * Selected index
99
137
  */
100
138
  this.selectedIndex = 0;
139
+ /**
140
+ * Client custom styling via string
141
+ */
142
+ this.clientStyling = '';
143
+ /**
144
+ * Client custom styling via url content
145
+ */
146
+ this.clientStylingUrlContent = '';
101
147
  this.tabContent = '';
148
+ this.limitStylingAppends = false;
149
+ this.setClientStyling = () => {
150
+ let sheet = document.createElement('style');
151
+ sheet.innerHTML = this.clientStyling;
152
+ this.stylingContainer.prepend(sheet);
153
+ };
154
+ this.setClientStylingURL = () => {
155
+ let cssFile = document.createElement('style');
156
+ setTimeout(() => {
157
+ cssFile.innerHTML = this.clientStylingUrlContent;
158
+ this.stylingContainer.prepend(cssFile);
159
+ }, 1);
160
+ };
102
161
  }
103
162
  connectedCallback() {
104
163
  /**
105
164
  * fetch(cmsEndpoint + / + / + selectedIndex)
106
165
  */
107
166
  }
167
+ componentDidRender() {
168
+ // start custom styling area
169
+ if (!this.limitStylingAppends && this.stylingContainer) {
170
+ if (this.clientStyling)
171
+ this.setClientStyling();
172
+ if (this.clientStylingUrlContent)
173
+ this.setClientStylingURL();
174
+ this.limitStylingAppends = true;
175
+ }
176
+ // end custom styling area
177
+ }
108
178
  render() {
109
- this.tabContent = index.h("div", { class: "TabContent" }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
179
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
110
180
  if (this.selectedIndex + 1 == 2) {
111
- this.tabContent = index.h("div", { class: "TabContent" }, index.h("ol", null, index.h("li", null, "Register or Login"), index.h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), index.h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
181
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", null, index.h("li", null, "Register or Login"), index.h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), index.h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
112
182
  }
113
183
  else if (this.selectedIndex + 1 == 3) {
114
- this.tabContent = index.h("div", { class: "TabContent" }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
184
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
115
185
  }
116
186
  return (this.tabContent);
117
187
  }
@@ -139,11 +209,47 @@ const HelperTabs = class {
139
209
  * Tabs details
140
210
  */
141
211
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
212
+ /**
213
+ * Client custom styling via string
214
+ */
215
+ this.clientStyling = '';
216
+ /**
217
+ * Client custom styling via url
218
+ */
219
+ this.clientStylingurl = '';
220
+ /**
221
+ * Client custom styling via url content
222
+ */
223
+ this.clientStylingUrlContent = '';
224
+ this.limitStylingAppends = false;
225
+ this.setClientStyling = () => {
226
+ let sheet = document.createElement('style');
227
+ sheet.innerHTML = this.clientStyling;
228
+ this.stylingContainer.prepend(sheet);
229
+ };
230
+ this.setClientStylingURL = () => {
231
+ let cssFile = document.createElement('style');
232
+ setTimeout(() => {
233
+ cssFile.innerHTML = this.clientStylingUrlContent;
234
+ this.stylingContainer.prepend(cssFile);
235
+ }, 1);
236
+ };
142
237
  }
143
238
  connectedCallback() {
144
239
  }
240
+ componentDidRender() {
241
+ // start custom styling area
242
+ if (!this.limitStylingAppends && this.stylingContainer) {
243
+ this.setClientStyling();
244
+ if (this.clientStylingUrlContent) {
245
+ this.setClientStylingURL();
246
+ }
247
+ this.limitStylingAppends = true;
248
+ }
249
+ // end custom styling area
250
+ }
145
251
  render() {
146
- return (index.h("div", null, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex }))));
252
+ return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
147
253
  }
148
254
  get host() { return index.getElement(this); }
149
255
  };
@@ -154,9 +260,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
154
260
  const LotteryGameDetails = class {
155
261
  constructor(hostRef) {
156
262
  index.registerInstance(this, hostRef);
263
+ /**
264
+ * Client custom styling via string
265
+ */
266
+ this.clientStyling = '';
267
+ /**
268
+ * Client custom styling via url content
269
+ */
270
+ this.clientStylingUrlContent = '';
271
+ this.limitStylingAppends = false;
272
+ this.setClientStyling = () => {
273
+ let sheet = document.createElement('style');
274
+ sheet.innerHTML = this.clientStyling;
275
+ this.stylingContainer.prepend(sheet);
276
+ };
277
+ this.setClientStylingURL = () => {
278
+ let cssFile = document.createElement('style');
279
+ setTimeout(() => {
280
+ cssFile.innerHTML = this.clientStylingUrlContent;
281
+ this.stylingContainer.prepend(cssFile);
282
+ }, 1);
283
+ };
284
+ }
285
+ componentDidRender() {
286
+ // start custom styling area
287
+ if (!this.limitStylingAppends && this.stylingContainer) {
288
+ if (this.clientStyling)
289
+ this.setClientStyling();
290
+ if (this.clientStylingUrlContent)
291
+ this.setClientStylingURL();
292
+ this.limitStylingAppends = true;
293
+ }
294
+ // end custom styling area
157
295
  }
158
296
  render() {
159
- return (index.h("div", null, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false }, index.h("div", { slot: "accordionContent" }, index.h("helper-tabs", null)))));
297
+ return (index.h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "AccordionContainer", slot: "accordionContent" }, index.h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
160
298
  }
161
299
  };
162
300
  LotteryGameDetails.style = lotteryGameDetailsCss;
@@ -234,6 +234,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
234
234
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
235
235
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
236
236
  }
237
+ else if (memberName === 'ref') {
238
+ // minifier will clean this up
239
+ if (newValue) {
240
+ newValue(elm);
241
+ }
242
+ }
237
243
  else if ((!isProp ) &&
238
244
  memberName[0] === 'o' &&
239
245
  memberName[1] === 'n') {
@@ -390,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
390
396
  for (; startIdx <= endIdx; ++startIdx) {
391
397
  if ((vnode = vnodes[startIdx])) {
392
398
  elm = vnode.$elm$;
399
+ callNodeRefs(vnode);
393
400
  // remove the vnode's element from the dom
394
401
  elm.remove();
395
402
  }
@@ -511,6 +518,12 @@ const patch = (oldVNode, newVNode) => {
511
518
  elm.data = text;
512
519
  }
513
520
  };
521
+ const callNodeRefs = (vNode) => {
522
+ {
523
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
524
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
525
+ }
526
+ };
514
527
  const renderVdom = (hostRef, renderFnResults) => {
515
528
  const hostElm = hostRef.$hostElement$;
516
529
  const cmpMeta = hostRef.$cmpMeta$;
@@ -648,7 +661,11 @@ const postUpdateComponent = (hostRef) => {
648
661
  const tagName = hostRef.$cmpMeta$.$tagName$;
649
662
  const elm = hostRef.$hostElement$;
650
663
  const endPostUpdate = createTime('postUpdate', tagName);
664
+ const instance = hostRef.$lazyInstance$ ;
651
665
  const ancestorComponent = hostRef.$ancestorComponent$;
666
+ {
667
+ safeCall(instance, 'componentDidRender');
668
+ }
652
669
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
653
670
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
654
671
  {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9d95408f.js');
5
+ const index = require('./index-0355373c.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
17
+ return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-9d95408f.js');
3
+ const index = require('./index-0355373c.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
18
+ return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
19
19
  });
@@ -1,12 +1,46 @@
1
- import { Component, h, } from '@stencil/core';
1
+ import { Component, h, Prop, State, } from '@stencil/core';
2
2
  import '@everymatrix/helper-accordion';
3
3
  import '@everymatrix/helper-tabs';
4
4
  export class LotteryGameDetails {
5
+ constructor() {
6
+ /**
7
+ * Client custom styling via string
8
+ */
9
+ this.clientStyling = '';
10
+ /**
11
+ * Client custom styling via url content
12
+ */
13
+ this.clientStylingUrlContent = '';
14
+ this.limitStylingAppends = false;
15
+ this.setClientStyling = () => {
16
+ let sheet = document.createElement('style');
17
+ sheet.innerHTML = this.clientStyling;
18
+ this.stylingContainer.prepend(sheet);
19
+ };
20
+ this.setClientStylingURL = () => {
21
+ let cssFile = document.createElement('style');
22
+ setTimeout(() => {
23
+ cssFile.innerHTML = this.clientStylingUrlContent;
24
+ this.stylingContainer.prepend(cssFile);
25
+ }, 1);
26
+ };
27
+ }
28
+ componentDidRender() {
29
+ // start custom styling area
30
+ if (!this.limitStylingAppends && this.stylingContainer) {
31
+ if (this.clientStyling)
32
+ this.setClientStyling();
33
+ if (this.clientStylingUrlContent)
34
+ this.setClientStylingURL();
35
+ this.limitStylingAppends = true;
36
+ }
37
+ // end custom styling area
38
+ }
5
39
  render() {
6
- return (h("div", null,
7
- h("helper-accordion", { "header-title": "Game Details", collapsed: false },
8
- h("div", { slot: "accordionContent" },
9
- h("helper-tabs", null)))));
40
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el },
41
+ h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
42
+ h("div", { class: "AccordionContainer", slot: "accordionContent" },
43
+ h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
10
44
  }
11
45
  static get is() { return "lottery-game-details"; }
12
46
  static get encapsulation() { return "shadow"; }
@@ -16,4 +50,45 @@ export class LotteryGameDetails {
16
50
  static get styleUrls() { return {
17
51
  "$": ["lottery-game-details.css"]
18
52
  }; }
53
+ static get properties() { return {
54
+ "clientStyling": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": false,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": "Client custom styling via string"
67
+ },
68
+ "attribute": "client-styling",
69
+ "reflect": false,
70
+ "defaultValue": "''"
71
+ },
72
+ "clientStylingUrlContent": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": "Client custom styling via url content"
85
+ },
86
+ "attribute": "client-styling-url-content",
87
+ "reflect": false,
88
+ "defaultValue": "''"
89
+ }
90
+ }; }
91
+ static get states() { return {
92
+ "limitStylingAppends": {}
93
+ }; }
19
94
  }
@@ -9,13 +9,19 @@ const TRANSLATIONS = {
9
9
  ro: {
10
10
  deleteTicket: 'Sterge biletul'
11
11
  },
12
+ fr: {
13
+ deleteTicket: 'Supprimer le billet'
14
+ },
15
+ ar: {
16
+ deleteTicket: 'حذف التذكرة'
17
+ }
12
18
  };
13
19
  const translate = (key, customLang) => {
14
20
  const lang = customLang;
15
21
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
16
22
  };
17
23
 
18
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
24
+ const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
19
25
 
20
26
  const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
27
  constructor() {
@@ -63,11 +69,43 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
63
69
  * Language
64
70
  */
65
71
  this.language = 'en';
72
+ /**
73
+ * Client custom styling via string
74
+ */
75
+ this.clientStyling = '';
76
+ /**
77
+ * Client custom styling via url content
78
+ */
79
+ this.clientStylingUrlContent = '';
80
+ this.limitStylingAppends = false;
81
+ this.setClientStyling = () => {
82
+ let sheet = document.createElement('style');
83
+ sheet.innerHTML = this.clientStyling;
84
+ this.stylingContainer.prepend(sheet);
85
+ };
86
+ this.setClientStylingURL = () => {
87
+ let cssFile = document.createElement('style');
88
+ setTimeout(() => {
89
+ cssFile.innerHTML = this.clientStylingUrlContent;
90
+ this.stylingContainer.prepend(cssFile);
91
+ }, 1);
92
+ };
66
93
  }
67
94
  // @TODO fix the `any` type :)
68
95
  connectedCallback() {
69
96
  this.showContent = !this.collapsed;
70
97
  }
98
+ componentDidRender() {
99
+ // start custom styling area
100
+ if (!this.limitStylingAppends && this.stylingContainer) {
101
+ if (this.clientStyling)
102
+ this.setClientStyling();
103
+ if (this.clientStylingUrlContent)
104
+ this.setClientStylingURL();
105
+ this.limitStylingAppends = true;
106
+ }
107
+ // end custom styling area
108
+ }
71
109
  toggleContent() {
72
110
  this.showContent = !this.showContent;
73
111
  }
@@ -79,7 +117,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
79
117
  this.accordionEvent.emit();
80
118
  }
81
119
  render() {
82
- return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
120
+ return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
83
121
  h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
84
122
  h("div", null, this.deleteTab &&
85
123
  h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -96,7 +134,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
96
134
  "eventName": [1, "event-name"],
97
135
  "collapsed": [4],
98
136
  "language": [1],
99
- "showContent": [32]
137
+ "clientStyling": [1, "client-styling"],
138
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
139
+ "showContent": [32],
140
+ "limitStylingAppends": [32]
100
141
  }]);
101
142
  function defineCustomElement() {
102
143
  if (typeof customElements === "undefined") {
@@ -11,20 +11,52 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  * Selected index
12
12
  */
13
13
  this.selectedIndex = 0;
14
+ /**
15
+ * Client custom styling via string
16
+ */
17
+ this.clientStyling = '';
18
+ /**
19
+ * Client custom styling via url content
20
+ */
21
+ this.clientStylingUrlContent = '';
14
22
  this.tabContent = '';
23
+ this.limitStylingAppends = false;
24
+ this.setClientStyling = () => {
25
+ let sheet = document.createElement('style');
26
+ sheet.innerHTML = this.clientStyling;
27
+ this.stylingContainer.prepend(sheet);
28
+ };
29
+ this.setClientStylingURL = () => {
30
+ let cssFile = document.createElement('style');
31
+ setTimeout(() => {
32
+ cssFile.innerHTML = this.clientStylingUrlContent;
33
+ this.stylingContainer.prepend(cssFile);
34
+ }, 1);
35
+ };
15
36
  }
16
37
  connectedCallback() {
17
38
  /**
18
39
  * fetch(cmsEndpoint + / + / + selectedIndex)
19
40
  */
20
41
  }
42
+ componentDidRender() {
43
+ // start custom styling area
44
+ if (!this.limitStylingAppends && this.stylingContainer) {
45
+ if (this.clientStyling)
46
+ this.setClientStyling();
47
+ if (this.clientStylingUrlContent)
48
+ this.setClientStylingURL();
49
+ this.limitStylingAppends = true;
50
+ }
51
+ // end custom styling area
52
+ }
21
53
  render() {
22
- this.tabContent = h("div", { class: "TabContent" }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
54
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
23
55
  if (this.selectedIndex + 1 == 2) {
24
- this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
56
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
25
57
  }
26
58
  else if (this.selectedIndex + 1 == 3) {
27
- this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
59
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
28
60
  }
29
61
  return (this.tabContent);
30
62
  }
@@ -32,7 +64,10 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
32
64
  }, [1, "helper-tab", {
33
65
  "selectedIndex": [2, "selected-index"],
34
66
  "cmsEndpoint": [1, "cms-endpoint"],
35
- "tabContent": [32]
67
+ "clientStyling": [1, "client-styling"],
68
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
69
+ "tabContent": [32],
70
+ "limitStylingAppends": [32]
36
71
  }]);
37
72
  function defineCustomElement() {
38
73
  if (typeof customElements === "undefined") {
@@ -24,11 +24,47 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
24
24
  * Tabs details
25
25
  */
26
26
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
27
+ /**
28
+ * Client custom styling via string
29
+ */
30
+ this.clientStyling = '';
31
+ /**
32
+ * Client custom styling via url
33
+ */
34
+ this.clientStylingurl = '';
35
+ /**
36
+ * Client custom styling via url content
37
+ */
38
+ this.clientStylingUrlContent = '';
39
+ this.limitStylingAppends = false;
40
+ this.setClientStyling = () => {
41
+ let sheet = document.createElement('style');
42
+ sheet.innerHTML = this.clientStyling;
43
+ this.stylingContainer.prepend(sheet);
44
+ };
45
+ this.setClientStylingURL = () => {
46
+ let cssFile = document.createElement('style');
47
+ setTimeout(() => {
48
+ cssFile.innerHTML = this.clientStylingUrlContent;
49
+ this.stylingContainer.prepend(cssFile);
50
+ }, 1);
51
+ };
27
52
  }
28
53
  connectedCallback() {
29
54
  }
55
+ componentDidRender() {
56
+ // start custom styling area
57
+ if (!this.limitStylingAppends && this.stylingContainer) {
58
+ this.setClientStyling();
59
+ if (this.clientStylingUrlContent) {
60
+ this.setClientStylingURL();
61
+ }
62
+ this.limitStylingAppends = true;
63
+ }
64
+ // end custom styling area
65
+ }
30
66
  render() {
31
- return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
67
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
32
68
  }
33
69
  get host() { return this; }
34
70
  static get style() { return helperTabsCss; }
@@ -38,7 +74,11 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
38
74
  "selected": [4],
39
75
  "cmsEndpoint": [1, "cms-endpoint"],
40
76
  "selectedIndex": [1538, "selected-index"],
41
- "tabs": [16]
77
+ "tabs": [16],
78
+ "clientStyling": [1, "client-styling"],
79
+ "clientStylingurl": [1, "client-stylingurl"],
80
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
81
+ "limitStylingAppends": [32]
42
82
  }]);
43
83
  function defineCustomElement() {
44
84
  if (typeof customElements === "undefined") {
@@ -10,12 +10,48 @@ const LotteryGameDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
10
10
  super();
11
11
  this.__registerHost();
12
12
  this.__attachShadow();
13
+ /**
14
+ * Client custom styling via string
15
+ */
16
+ this.clientStyling = '';
17
+ /**
18
+ * Client custom styling via url content
19
+ */
20
+ this.clientStylingUrlContent = '';
21
+ this.limitStylingAppends = false;
22
+ this.setClientStyling = () => {
23
+ let sheet = document.createElement('style');
24
+ sheet.innerHTML = this.clientStyling;
25
+ this.stylingContainer.prepend(sheet);
26
+ };
27
+ this.setClientStylingURL = () => {
28
+ let cssFile = document.createElement('style');
29
+ setTimeout(() => {
30
+ cssFile.innerHTML = this.clientStylingUrlContent;
31
+ this.stylingContainer.prepend(cssFile);
32
+ }, 1);
33
+ };
34
+ }
35
+ componentDidRender() {
36
+ // start custom styling area
37
+ if (!this.limitStylingAppends && this.stylingContainer) {
38
+ if (this.clientStyling)
39
+ this.setClientStyling();
40
+ if (this.clientStylingUrlContent)
41
+ this.setClientStylingURL();
42
+ this.limitStylingAppends = true;
43
+ }
44
+ // end custom styling area
13
45
  }
14
46
  render() {
15
- return (h("div", null, h("helper-accordion", { "header-title": "Game Details", collapsed: false }, h("div", { slot: "accordionContent" }, h("helper-tabs", null)))));
47
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
16
48
  }
17
49
  static get style() { return lotteryGameDetailsCss; }
18
- }, [1, "lottery-game-details"]);
50
+ }, [1, "lottery-game-details", {
51
+ "clientStyling": [1, "client-styling"],
52
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
53
+ "limitStylingAppends": [32]
54
+ }]);
19
55
  function defineCustomElement$1() {
20
56
  if (typeof customElements === "undefined") {
21
57
  return;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-515a97dd.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-627fc49c.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -9,13 +9,19 @@ const TRANSLATIONS = {
9
9
  ro: {
10
10
  deleteTicket: 'Sterge biletul'
11
11
  },
12
+ fr: {
13
+ deleteTicket: 'Supprimer le billet'
14
+ },
15
+ ar: {
16
+ deleteTicket: 'حذف التذكرة'
17
+ }
12
18
  };
13
19
  const translate = (key, customLang) => {
14
20
  const lang = customLang;
15
21
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
16
22
  };
17
23
 
18
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
24
+ const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
19
25
 
20
26
  const Accordion = class {
21
27
  constructor(hostRef) {
@@ -61,11 +67,43 @@ const Accordion = class {
61
67
  * Language
62
68
  */
63
69
  this.language = 'en';
70
+ /**
71
+ * Client custom styling via string
72
+ */
73
+ this.clientStyling = '';
74
+ /**
75
+ * Client custom styling via url content
76
+ */
77
+ this.clientStylingUrlContent = '';
78
+ this.limitStylingAppends = false;
79
+ this.setClientStyling = () => {
80
+ let sheet = document.createElement('style');
81
+ sheet.innerHTML = this.clientStyling;
82
+ this.stylingContainer.prepend(sheet);
83
+ };
84
+ this.setClientStylingURL = () => {
85
+ let cssFile = document.createElement('style');
86
+ setTimeout(() => {
87
+ cssFile.innerHTML = this.clientStylingUrlContent;
88
+ this.stylingContainer.prepend(cssFile);
89
+ }, 1);
90
+ };
64
91
  }
65
92
  // @TODO fix the `any` type :)
66
93
  connectedCallback() {
67
94
  this.showContent = !this.collapsed;
68
95
  }
96
+ componentDidRender() {
97
+ // start custom styling area
98
+ if (!this.limitStylingAppends && this.stylingContainer) {
99
+ if (this.clientStyling)
100
+ this.setClientStyling();
101
+ if (this.clientStylingUrlContent)
102
+ this.setClientStylingURL();
103
+ this.limitStylingAppends = true;
104
+ }
105
+ // end custom styling area
106
+ }
69
107
  toggleContent() {
70
108
  this.showContent = !this.showContent;
71
109
  }
@@ -77,7 +115,7 @@ const Accordion = class {
77
115
  this.accordionEvent.emit();
78
116
  }
79
117
  render() {
80
- return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
118
+ return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
81
119
  h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
82
120
  h("div", null, this.deleteTab &&
83
121
  h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -94,20 +132,52 @@ const HelperTab = class {
94
132
  * Selected index
95
133
  */
96
134
  this.selectedIndex = 0;
135
+ /**
136
+ * Client custom styling via string
137
+ */
138
+ this.clientStyling = '';
139
+ /**
140
+ * Client custom styling via url content
141
+ */
142
+ this.clientStylingUrlContent = '';
97
143
  this.tabContent = '';
144
+ this.limitStylingAppends = false;
145
+ this.setClientStyling = () => {
146
+ let sheet = document.createElement('style');
147
+ sheet.innerHTML = this.clientStyling;
148
+ this.stylingContainer.prepend(sheet);
149
+ };
150
+ this.setClientStylingURL = () => {
151
+ let cssFile = document.createElement('style');
152
+ setTimeout(() => {
153
+ cssFile.innerHTML = this.clientStylingUrlContent;
154
+ this.stylingContainer.prepend(cssFile);
155
+ }, 1);
156
+ };
98
157
  }
99
158
  connectedCallback() {
100
159
  /**
101
160
  * fetch(cmsEndpoint + / + / + selectedIndex)
102
161
  */
103
162
  }
163
+ componentDidRender() {
164
+ // start custom styling area
165
+ if (!this.limitStylingAppends && this.stylingContainer) {
166
+ if (this.clientStyling)
167
+ this.setClientStyling();
168
+ if (this.clientStylingUrlContent)
169
+ this.setClientStylingURL();
170
+ this.limitStylingAppends = true;
171
+ }
172
+ // end custom styling area
173
+ }
104
174
  render() {
105
- this.tabContent = h("div", { class: "TabContent" }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
175
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
106
176
  if (this.selectedIndex + 1 == 2) {
107
- this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
177
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
108
178
  }
109
179
  else if (this.selectedIndex + 1 == 3) {
110
- this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
180
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
111
181
  }
112
182
  return (this.tabContent);
113
183
  }
@@ -135,11 +205,47 @@ const HelperTabs = class {
135
205
  * Tabs details
136
206
  */
137
207
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
208
+ /**
209
+ * Client custom styling via string
210
+ */
211
+ this.clientStyling = '';
212
+ /**
213
+ * Client custom styling via url
214
+ */
215
+ this.clientStylingurl = '';
216
+ /**
217
+ * Client custom styling via url content
218
+ */
219
+ this.clientStylingUrlContent = '';
220
+ this.limitStylingAppends = false;
221
+ this.setClientStyling = () => {
222
+ let sheet = document.createElement('style');
223
+ sheet.innerHTML = this.clientStyling;
224
+ this.stylingContainer.prepend(sheet);
225
+ };
226
+ this.setClientStylingURL = () => {
227
+ let cssFile = document.createElement('style');
228
+ setTimeout(() => {
229
+ cssFile.innerHTML = this.clientStylingUrlContent;
230
+ this.stylingContainer.prepend(cssFile);
231
+ }, 1);
232
+ };
138
233
  }
139
234
  connectedCallback() {
140
235
  }
236
+ componentDidRender() {
237
+ // start custom styling area
238
+ if (!this.limitStylingAppends && this.stylingContainer) {
239
+ this.setClientStyling();
240
+ if (this.clientStylingUrlContent) {
241
+ this.setClientStylingURL();
242
+ }
243
+ this.limitStylingAppends = true;
244
+ }
245
+ // end custom styling area
246
+ }
141
247
  render() {
142
- return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
248
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
143
249
  }
144
250
  get host() { return getElement(this); }
145
251
  };
@@ -150,9 +256,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
150
256
  const LotteryGameDetails = class {
151
257
  constructor(hostRef) {
152
258
  registerInstance(this, hostRef);
259
+ /**
260
+ * Client custom styling via string
261
+ */
262
+ this.clientStyling = '';
263
+ /**
264
+ * Client custom styling via url content
265
+ */
266
+ this.clientStylingUrlContent = '';
267
+ this.limitStylingAppends = false;
268
+ this.setClientStyling = () => {
269
+ let sheet = document.createElement('style');
270
+ sheet.innerHTML = this.clientStyling;
271
+ this.stylingContainer.prepend(sheet);
272
+ };
273
+ this.setClientStylingURL = () => {
274
+ let cssFile = document.createElement('style');
275
+ setTimeout(() => {
276
+ cssFile.innerHTML = this.clientStylingUrlContent;
277
+ this.stylingContainer.prepend(cssFile);
278
+ }, 1);
279
+ };
280
+ }
281
+ componentDidRender() {
282
+ // start custom styling area
283
+ if (!this.limitStylingAppends && this.stylingContainer) {
284
+ if (this.clientStyling)
285
+ this.setClientStyling();
286
+ if (this.clientStylingUrlContent)
287
+ this.setClientStylingURL();
288
+ this.limitStylingAppends = true;
289
+ }
290
+ // end custom styling area
153
291
  }
154
292
  render() {
155
- return (h("div", null, h("helper-accordion", { "header-title": "Game Details", collapsed: false }, h("div", { slot: "accordionContent" }, h("helper-tabs", null)))));
293
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
156
294
  }
157
295
  };
158
296
  LotteryGameDetails.style = lotteryGameDetailsCss;
@@ -212,6 +212,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
212
212
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
213
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
214
  }
215
+ else if (memberName === 'ref') {
216
+ // minifier will clean this up
217
+ if (newValue) {
218
+ newValue(elm);
219
+ }
220
+ }
215
221
  else if ((!isProp ) &&
216
222
  memberName[0] === 'o' &&
217
223
  memberName[1] === 'n') {
@@ -368,6 +374,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
368
374
  for (; startIdx <= endIdx; ++startIdx) {
369
375
  if ((vnode = vnodes[startIdx])) {
370
376
  elm = vnode.$elm$;
377
+ callNodeRefs(vnode);
371
378
  // remove the vnode's element from the dom
372
379
  elm.remove();
373
380
  }
@@ -489,6 +496,12 @@ const patch = (oldVNode, newVNode) => {
489
496
  elm.data = text;
490
497
  }
491
498
  };
499
+ const callNodeRefs = (vNode) => {
500
+ {
501
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
502
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
503
+ }
504
+ };
492
505
  const renderVdom = (hostRef, renderFnResults) => {
493
506
  const hostElm = hostRef.$hostElement$;
494
507
  const cmpMeta = hostRef.$cmpMeta$;
@@ -626,7 +639,11 @@ const postUpdateComponent = (hostRef) => {
626
639
  const tagName = hostRef.$cmpMeta$.$tagName$;
627
640
  const elm = hostRef.$hostElement$;
628
641
  const endPostUpdate = createTime('postUpdate', tagName);
642
+ const instance = hostRef.$lazyInstance$ ;
629
643
  const ancestorComponent = hostRef.$ancestorComponent$;
644
+ {
645
+ safeCall(instance, 'componentDidRender');
646
+ }
630
647
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
631
648
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
632
649
  {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-515a97dd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-627fc49c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
13
+ return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-515a97dd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-627fc49c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
16
+ return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
17
17
  });
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-703a43dd.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-ea7da786",[[1,"lottery-game-details"],[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16]}],[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],showContent:[32]}],[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],tabContent:[32]}]]]],e)));
1
+ import{p as t,b as e}from"./p-ca6b7fee.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((t=>e([["p-41f52078",[[1,"lottery-game-details",{clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}],[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}],[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}],[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]]],t)));
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,g as s}from"./p-ca6b7fee.js";const o=["ro","en"],n={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return n[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const l=class{constructor(e){t(this,e),this.selectedIndex=0,this.clientStyling="",this.clientStylingUrlContent="",this.tabContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.tabContent=i("div",{class:"TabContent",ref:t=>this.stylingContainer=t},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account."),this.selectedIndex+1==2?this.tabContent=i("div",{class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",null,i("li",null,"Register or Login"),i("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),i("li",null,"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!"))):this.selectedIndex+1==3&&(this.tabContent=i("div",{class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",null,i("li",null,"What are my odds of winning?"),i("li",null,"How can I find out if I’ve won a draw game?"),i("li",null,"How do I claim my prize?")))),this.tabContent}};l.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const a=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",null,i("helper-tab",{selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrlContent})))}get host(){return s(this)}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const c=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{"header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"AccordionContainer",slot:"accordionContent"},i("helper-tabs",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};c.style=":host{display:block}";export{r as helper_accordion,l as helper_tab,a as helper_tabs,c as lottery_game_details}
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",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)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,a=e=>"sc-"+e.o,u={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const 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&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,r.length>0&&(i.$=r),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},m=(e,t,n,s,r,c)=>{if(n!==s){let i=B(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):B(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},y=/\s/,p=e=>e?e.split(y):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||u,r=t.u||u;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,c=n.$[l],i=0;if(null!==c.i)o=c.m=s.createTextNode(c.i);else if(o=c.m=s.createElement(c.h),b(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.$)for(i=0;i<c.$.length;++i)r=w(t,c,i),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=w(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;o<=c&&r<=u;)null==i?i=t[++o]:null==a?a=t[--c]:null==f?f=l[++r]:null==d?d=l[--u]:j(i,f)?(v(i,f),i=t[++o],f=l[++r]):j(a,d)?(v(a,d),a=t[--c],d=l[--u]):j(i,d)?(v(i,d),e.insertBefore(i.m,a.m.nextSibling),i=t[++o],d=l[--u]):j(a,f)?(v(a,f),e.insertBefore(a.m,i.m),a=t[--c],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[u+1]?null:l[u+1].m,n,l,r,u):r>u&&g(t,o,c)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(M)},k=e=>V(e).p,C=(e,t,n)=>{const l=k(e);return{emit:e=>O(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},O=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},P=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},x=(e,t)=>{if(e.t|=16,!(4&e.t))return P(e,e.g),ne((()=>E(e,t)));e.t|=512},E=(e,t)=>{const n=e.j;return L(void 0,(()=>N(e,n,t)))},N=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=a(t),l=K.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);R(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},R=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||$(null,null),c=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,o.k&&(c.u=c.u||{},o.k.map((([e,t])=>c.u[t]=s[e]))),c.h=null,c.t|=4,n.M=c,c.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,c)})(n,l)}catch(e){G(e,n.p)}return null},T=e=>{const t=e.p,n=e.g;F(e.j,"componentDidRender"),64&e.t||(e.t|=64,U(t),e.C(t),n||A()),e.S&&(e.S(),e.S=void 0),512&e.t&&te((()=>x(e,!1))),e.t&=-517},A=()=>{U(s.documentElement),te((()=>O(l,"appload",{detail:{namespace:"lottery-game-details"}})))},F=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){G(e)}},L=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>V(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=V(e),o=s.P.get(t),r=s.t,c=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),c&&2==(18&r)&&x(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},q=e=>{F(e,"connectedCallback")},D=(e,t={})=>{const n=[],r=t.exclude||[],i=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,u=class extends HTMLElement{constructor(e){super(e),z(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=V(e),n=t.v,l=()=>{};if(1&t.t)q(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){P(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=J(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){G(e)}t.t&=-9,e(),q(t.j)}if(s.style){let e=s.style;const t=a(n);if(!K.has(t)){const l=()=>{};((e,t,n)=>{let l=K.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,K.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>x(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return V(this).R}};l.T=e[0],r.includes(s)||i.get(s)||(n.push(s),i.define(s,W(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(A,30)))},H=new WeakMap,V=e=>H.get(e),_=(e,t)=>H.set(t.j=e,t),z=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,n)},B=(e,t)=>t in e,G=(e,t)=>(0,console.error)(e,t),I=new Map,J=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=I.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(I.set(n,e),e[t])),G)},K=new Map,Q=[],X=[],Y=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?te(ee):o.raf(ee))},Z=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){G(e)}e.length=0},ee=()=>{Z(Q),Z(X),(n=Q.length>0)&&o.raf(ee)},te=e=>r().then(e),ne=Y(X,!0);export{D as b,C as c,k as g,d as h,r as p,_ as r}
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -1,5 +1,18 @@
1
1
  import '@everymatrix/helper-accordion';
2
2
  import '@everymatrix/helper-tabs';
3
3
  export declare class LotteryGameDetails {
4
+ /**
5
+ * Client custom styling via string
6
+ */
7
+ clientStyling: string;
8
+ /**
9
+ * Client custom styling via url content
10
+ */
11
+ clientStylingUrlContent: string;
12
+ private limitStylingAppends;
13
+ private stylingContainer;
14
+ componentDidRender(): void;
15
+ setClientStyling: () => void;
16
+ setClientStylingURL: () => void;
4
17
  render(): any;
5
18
  }
@@ -7,6 +7,14 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
9
  interface LotteryGameDetails {
10
+ /**
11
+ * Client custom styling via string
12
+ */
13
+ "clientStyling": string;
14
+ /**
15
+ * Client custom styling via url content
16
+ */
17
+ "clientStylingUrlContent": string;
10
18
  }
11
19
  }
12
20
  declare global {
@@ -22,6 +30,14 @@ declare global {
22
30
  }
23
31
  declare namespace LocalJSX {
24
32
  interface LotteryGameDetails {
33
+ /**
34
+ * Client custom styling via string
35
+ */
36
+ "clientStyling"?: string;
37
+ /**
38
+ * Client custom styling via url content
39
+ */
40
+ "clientStylingUrlContent"?: string;
25
41
  }
26
42
  interface IntrinsicElements {
27
43
  "lottery-game-details": LotteryGameDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-game-details",
3
- "version": "0.1.7",
3
+ "version": "0.1.21",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -15,5 +15,9 @@
15
15
  ],
16
16
  "publishConfig": {
17
17
  "access": "public"
18
+ },
19
+ "dependencies": {
20
+ "@everymatrix/helper-accordion": "*",
21
+ "@everymatrix/helper-tabs": "*"
18
22
  }
19
23
  }
@@ -1 +0,0 @@
1
- let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",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)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,a=e=>"sc-"+e.o,u={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const 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&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,r.length>0&&(i.$=r),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},y=(e,t,n,s,r,c)=>{if(n!==s){let i=z(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):z(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||u,r=t.u||u;for(l in o)l in r||y(s,l,o[l],void 0,n,t.t);for(l in r)y(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,c=n.$[l],i=0;if(null!==c.i)o=c.m=s.createTextNode(c.i);else if(o=c.m=s.createElement(c.h),b(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.$)for(i=0;i<c.$.length;++i)r=w(t,c,i),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=w(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;o<=c&&r<=u;)null==i?i=t[++o]:null==a?a=t[--c]:null==f?f=l[++r]:null==d?d=l[--u]:j(i,f)?(v(i,f),i=t[++o],f=l[++r]):j(a,d)?(v(a,d),a=t[--c],d=l[--u]):j(i,d)?(v(i,d),e.insertBefore(i.m,a.m.nextSibling),i=t[++o],d=l[--u]):j(a,f)?(v(a,f),e.insertBefore(a.m,i.m),a=t[--c],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[u+1]?null:l[u+1].m,n,l,r,u):r>u&&g(t,o,c)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>H(e).p,k=(e,t,n)=>{const l=M(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},O=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return O(e,e.g),ee((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.j;return F(void 0,(()=>E(e,n,t)))},E=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=a(t),l=I.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);N(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||$(null,null),c=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,o.k&&(c.u=c.u||{},o.k.map((([e,t])=>c.u[t]=s[e]))),c.h=null,c.t|=4,n.M=c,c.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,c)})(n,l)}catch(e){B(e,n.p)}return null},T=e=>{const t=e.p,n=e.g;64&e.t||(e.t|=64,L(t),e.C(t),n||A()),e.S&&(e.S(),e.S=void 0),512&e.t&&Z((()=>P(e,!1))),e.t&=-517},A=()=>{L(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"lottery-game-details"}})))},F=(e,t)=>e&&e.then?e.then(t):t(),L=e=>e.classList.add("hydrated"),R=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>H(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=H(e),o=s.P.get(t),r=s.t,c=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),c&&2==(18&r)&&P(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},U=e=>{((e,t)=>{if(e&&e[t])try{e[t](void 0)}catch(e){B(e)}})(e,"connectedCallback")},W=(e,t={})=>{const n=[],r=t.exclude||[],i=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,u=class extends HTMLElement{constructor(e){super(e),_(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=H(e),n=t.v,l=()=>{};if(1&t.t)U(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=G(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(R(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){B(e)}t.t&=-9,e(),U(t.j)}if(s.style){let e=s.style;const t=a(n);if(!I.has(t)){const l=()=>{};((e,t,n)=>{let l=I.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,I.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return H(this).T}};l.A=e[0],r.includes(s)||i.get(s)||(n.push(s),i.define(s,R(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(A,30)))},q=new WeakMap,H=e=>q.get(e),V=(e,t)=>q.set(t.j=e,t),_=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.T=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,n)},z=(e,t)=>t in e,B=(e,t)=>(0,console.error)(e,t),D=new Map,G=e=>{const t=e.o.replace(/-/g,"_"),n=e.A,l=D.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(D.set(n,e),e[t])),B)},I=new Map,J=[],K=[],Q=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Z(Y):o.raf(Y))},X=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){B(e)}e.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=e=>r().then(e),ee=Q(K,!0);export{W as b,k as c,M as g,d as h,r as p,V as r}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as o,g as i}from"./p-703a43dd.js";const s=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},n=class{constructor(o){t(this,o),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en"}connectedCallback(){this.showContent=!this.collapsed}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return o("div",{class:"Wrapper"},o("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},o("p",{class:"Title"},this.headerTitle),o("p",{class:"Subtitle"},this.headerSubtitle),o("p",{class:"Subtitle"},this.description),o("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&o("div",null,o("div",{class:"Content"},o("slot",{name:"accordionContent"}),this.footer&&this.showContent&&o("div",null,this.deleteTab&&o("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return r[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const a=class{constructor(e){t(this,e),this.selectedIndex=0,this.tabContent=""}connectedCallback(){}render(){return this.tabContent=o("div",{class:"TabContent"},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account."),this.selectedIndex+1==2?this.tabContent=o("div",{class:"TabContent"},o("ol",null,o("li",null,"Register or Login"),o("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),o("li",null,"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!"))):this.selectedIndex+1==3&&(this.tabContent=o("div",{class:"TabContent"},o("ul",null,o("li",null,"What are my odds of winning?"),o("li",null,"How can I find out if I’ve won a draw game?"),o("li",null,"How do I claim my prize?")))),this.tabContent}};a.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const l=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}]}connectedCallback(){}render(){return o("div",null,o("div",{class:"Tabs"},this.tabs.map(((t,e)=>o("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),o("div",null,o("helper-tab",{selectedIndex:this.selectedIndex})))}get host(){return i(this)}};l.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const c=class{constructor(e){t(this,e)}render(){return o("div",null,o("helper-accordion",{"header-title":"Game Details",collapsed:!1},o("div",{slot:"accordionContent"},o("helper-tabs",null))))}};c.style=":host{display:block}";export{n as helper_accordion,a as helper_tab,l as helper_tabs,c as lottery_game_details}
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;