@everymatrix/lottery-grid 1.44.0 → 1.45.2

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 (51) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-402a1909.js +1276 -0
  3. package/dist/cjs/loader.cjs.js +6 -12
  4. package/dist/cjs/lottery-bullet_2.cjs.entry.js +212 -252
  5. package/dist/cjs/lottery-grid.cjs.js +16 -10
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/lottery-grid/index.js +1 -0
  8. package/dist/collection/components/lottery-grid/lottery-grid.js +473 -488
  9. package/dist/collection/utils/locale.utils.js +22 -22
  10. package/dist/esm/app-globals-0f993ce5.js +3 -0
  11. package/dist/esm/index-d55f95ff.js +1249 -0
  12. package/dist/esm/loader.js +6 -12
  13. package/dist/esm/lottery-bullet_2.entry.js +212 -252
  14. package/dist/esm/lottery-grid.js +13 -10
  15. package/dist/lottery-grid/lottery-grid.esm.js +1 -1
  16. package/dist/lottery-grid/p-205e4975.entry.js +1 -0
  17. package/dist/lottery-grid/p-2a12d7f8.js +2 -0
  18. package/dist/lottery-grid/p-e1255160.js +1 -0
  19. package/dist/stencil.config.dev.js +17 -0
  20. package/dist/stencil.config.js +14 -19
  21. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.d.ts +2 -0
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.dev.d.ts +2 -0
  23. package/dist/types/components/lottery-grid/index.d.ts +1 -0
  24. package/dist/types/components/lottery-grid/lottery-grid.d.ts +74 -74
  25. package/dist/types/components/lottery-grid/lottery-grid.types.d.ts +8 -8
  26. package/dist/types/components.d.ts +19 -2
  27. package/dist/types/stencil-public-runtime.d.ts +142 -33
  28. package/loader/cdn.js +1 -3
  29. package/loader/index.cjs.js +1 -3
  30. package/loader/index.d.ts +13 -1
  31. package/loader/index.es2017.js +1 -3
  32. package/loader/index.js +1 -3
  33. package/loader/package.json +1 -0
  34. package/package.json +9 -2
  35. package/dist/cjs/index-dfe5695c.js +0 -1249
  36. package/dist/components/index.d.ts +0 -26
  37. package/dist/components/index.js +0 -1
  38. package/dist/components/lottery-bullet.js +0 -6
  39. package/dist/components/lottery-bullet2.js +0 -91
  40. package/dist/components/lottery-grid.d.ts +0 -11
  41. package/dist/components/lottery-grid.js +0 -248
  42. package/dist/esm/index-c15ec15f.js +0 -1223
  43. package/dist/esm/polyfills/core-js.js +0 -11
  44. package/dist/esm/polyfills/css-shim.js +0 -1
  45. package/dist/esm/polyfills/dom.js +0 -79
  46. package/dist/esm/polyfills/es5-html-element.js +0 -1
  47. package/dist/esm/polyfills/index.js +0 -34
  48. package/dist/esm/polyfills/system.js +0 -6
  49. package/dist/lottery-grid/p-6caa0d6c.entry.js +0 -1
  50. package/dist/lottery-grid/p-8a854495.js +0 -1
  51. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-grid/.stencil/packages/lottery-grid/stencil.config.d.ts +0 -2
@@ -1,17 +1,11 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-c15ec15f.js';
1
+ import { b as bootstrapLazy } from './index-d55f95ff.js';
2
+ export { s as setNonce } from './index-d55f95ff.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
2
4
 
3
- /*
4
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
5
- */
6
- const patchEsm = () => {
7
- return promiseResolve();
8
- };
9
-
10
- const defineCustomElements = (win, options) => {
11
- if (typeof window === 'undefined') return Promise.resolve();
12
- return patchEsm().then(() => {
5
+ const defineCustomElements = async (win, options) => {
6
+ if (typeof window === 'undefined') return undefined;
7
+ await globalScripts();
13
8
  return bootstrapLazy([["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
14
- });
15
9
  };
16
10
 
17
11
  export { defineCustomElements };
@@ -1,274 +1,234 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-c15ec15f.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-d55f95ff.js';
2
2
 
3
- const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}";
3
+ const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(241, 241, 241) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}";
4
+ const LotteryBulletStyle0 = lotteryBulletCss;
4
5
 
5
6
  const LotteryBullet = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.bulletEvent = createEvent(this, "lotteryBulletSelection", 7);
9
- /**
10
- * Value of the bullet
11
- */
12
- this.value = '0';
13
- /**
14
- * Marks if the bullet should be selectable
15
- */
16
- this.selectable = true;
17
- /**
18
- * Marks if the bullet should be selected
19
- */
20
- this.isSelected = false;
21
- /**
22
- * Client custom styling via string
23
- */
24
- this.clientStyling = '';
25
- /**
26
- * Client custom styling via url content
27
- */
28
- this.clientStylingUrlContent = '';
29
- this.limitStylingAppends = false;
30
- this.select = () => {
31
- if (this.selectable) {
32
- this.isSelected = !this.isSelected;
33
- this.bulletEvent.emit({
34
- value: this.value,
35
- selected: this.isSelected
36
- });
37
- }
38
- };
39
- this.setClientStyling = () => {
40
- let sheet = document.createElement('style');
41
- sheet.innerHTML = this.clientStyling;
42
- this.stylingContainer.prepend(sheet);
43
- };
44
- this.setClientStylingURL = () => {
45
- let cssFile = document.createElement('style');
46
- setTimeout(() => {
47
- cssFile.innerHTML = this.clientStylingUrlContent;
48
- this.stylingContainer.prepend(cssFile);
49
- }, 1);
50
- };
51
- }
52
- componentDidRender() {
53
- // start custom styling area
54
- if (!this.limitStylingAppends && this.stylingContainer) {
55
- if (this.clientStyling)
56
- this.setClientStyling();
57
- if (this.clientStylingUrlContent)
58
- this.setClientStylingURL();
59
- this.limitStylingAppends = true;
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.bulletEvent = createEvent(this, "lotteryBulletSelection", 7);
10
+ this.select = () => {
11
+ if (this.selectable) {
12
+ this.isSelected = !this.isSelected;
13
+ this.bulletEvent.emit({
14
+ value: this.value,
15
+ selected: this.isSelected
16
+ });
17
+ }
18
+ };
19
+ this.setClientStyling = () => {
20
+ let sheet = document.createElement('style');
21
+ sheet.innerHTML = this.clientStyling;
22
+ this.stylingContainer.prepend(sheet);
23
+ };
24
+ this.setClientStylingURL = () => {
25
+ let cssFile = document.createElement('style');
26
+ setTimeout(() => {
27
+ cssFile.innerHTML = this.clientStylingUrlContent;
28
+ this.stylingContainer.prepend(cssFile);
29
+ }, 1);
30
+ };
31
+ this.value = '0';
32
+ this.selectable = true;
33
+ this.isSelected = false;
34
+ this.clientStyling = '';
35
+ this.clientStylingUrlContent = '';
36
+ this.limitStylingAppends = false;
37
+ }
38
+ componentDidRender() {
39
+ // start custom styling area
40
+ if (!this.limitStylingAppends && this.stylingContainer) {
41
+ if (this.clientStyling)
42
+ this.setClientStyling();
43
+ if (this.clientStylingUrlContent)
44
+ this.setClientStylingURL();
45
+ this.limitStylingAppends = true;
46
+ }
47
+ // end custom styling area
48
+ }
49
+ render() {
50
+ return (h("div", { key: 'af3601684ecf1f39d65fc9461430cba96b9e4b8c', class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
60
51
  }
61
- // end custom styling area
62
- }
63
- render() {
64
- return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
65
- }
66
52
  };
67
- LotteryBullet.style = lotteryBulletCss;
53
+ LotteryBullet.style = LotteryBulletStyle0;
68
54
 
69
55
  const lotteryGridCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}";
56
+ const LotteryGridStyle0 = lotteryGridCss;
70
57
 
71
58
  const LotteryGrid = class {
72
- constructor(hostRef) {
73
- registerInstance(this, hostRef);
74
- this.gridFilledEvent = createEvent(this, "gridFilled", 7);
75
- this.gridDirtyEvent = createEvent(this, "gridDirty", 7);
76
- /**
77
- * Number of bullets of grid
78
- */
79
- this.totalNumbers = 0;
80
- /**
81
- * Number of maximum bullets that can be selected
82
- */
83
- this.maximumAllowed = 0;
84
- /**
85
- * Minimum allowed of bullets
86
- */
87
- this.minimumAllowed = 1;
88
- /**
89
- * Allows the user to select numbers on the grid
90
- */
91
- this.selectable = true;
92
- /**
93
- * Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')
94
- */
95
- this.selectedNumbers = '';
96
- /**
97
- * Show only selected numbers
98
- */
99
- this.displaySelected = false;
100
- /**
101
- * Language
102
- */
103
- this.language = 'en';
104
- /**
105
- * Personalize grid for ticket
106
- */
107
- this.gridType = '';
108
- /**
109
- * Client custom styling via string
110
- */
111
- this.clientStyling = '';
112
- /**
113
- * Client custom styling via url content
114
- */
115
- this.clientStylingUrlContent = '';
116
- this.numbers = [];
117
- this.limitStylingAppends = false;
118
- this.selectedCounter = 0;
119
- this.setClientStyling = () => {
120
- let sheet = document.createElement('style');
121
- sheet.innerHTML = this.clientStyling;
122
- this.stylingContainer.prepend(sheet);
123
- };
124
- this.setClientStylingURL = () => {
125
- let cssFile = document.createElement('style');
126
- setTimeout(() => {
127
- cssFile.innerHTML = this.clientStylingUrlContent;
128
- this.stylingContainer.prepend(cssFile);
129
- }, 1);
130
- };
131
- }
132
- connectedCallback() {
133
- let selected = [];
134
- if (this.selectedNumbers.length > 0) {
135
- selected = this.selectedNumbers.split(',');
136
- this.selectedCounter = selected.length;
137
- }
138
- if (this.displaySelected) {
139
- selected.forEach((item) => {
140
- this.numbers.push({
141
- number: item,
142
- selected: true,
143
- selectable: this.selectable
144
- });
145
- });
59
+ constructor(hostRef) {
60
+ registerInstance(this, hostRef);
61
+ this.gridFilledEvent = createEvent(this, "gridFilled", 7);
62
+ this.gridDirtyEvent = createEvent(this, "gridDirty", 7);
63
+ this.selectedCounter = 0;
64
+ this.setClientStyling = () => {
65
+ let sheet = document.createElement('style');
66
+ sheet.innerHTML = this.clientStyling;
67
+ this.stylingContainer.prepend(sheet);
68
+ };
69
+ this.setClientStylingURL = () => {
70
+ let cssFile = document.createElement('style');
71
+ setTimeout(() => {
72
+ cssFile.innerHTML = this.clientStylingUrlContent;
73
+ this.stylingContainer.prepend(cssFile);
74
+ }, 1);
75
+ };
76
+ this.ticketId = undefined;
77
+ this.totalNumbers = 0;
78
+ this.gameId = undefined;
79
+ this.maximumAllowed = 0;
80
+ this.minimumAllowed = 1;
81
+ this.selectable = true;
82
+ this.selectedNumbers = '';
83
+ this.displaySelected = false;
84
+ this.language = 'en';
85
+ this.gridIndex = undefined;
86
+ this.gridType = '';
87
+ this.clientStyling = '';
88
+ this.clientStylingUrlContent = '';
89
+ this.numbers = [];
90
+ this.limitStylingAppends = false;
146
91
  }
147
- else {
148
- [...Array(this.totalNumbers).keys()]
149
- .map(number => (number + 1).toString())
150
- .forEach((number) => {
151
- this.numbers.push({
152
- number,
153
- selected: selected.indexOf(number) >= 0 ? true : false,
154
- selectable: this.selectedCounter == this.maximumAllowed ? false : this.selectable
155
- });
156
- });
92
+ connectedCallback() {
93
+ let selected = [];
94
+ if (this.selectedNumbers.length > 0) {
95
+ selected = this.selectedNumbers.split(',');
96
+ this.selectedCounter = selected.length;
97
+ }
98
+ if (this.displaySelected) {
99
+ selected.forEach((item) => {
100
+ this.numbers.push({
101
+ number: item,
102
+ selected: true,
103
+ selectable: this.selectable
104
+ });
105
+ });
106
+ }
107
+ else {
108
+ [...Array(this.totalNumbers).keys()]
109
+ .map(number => (number + 1).toString())
110
+ .forEach((number) => {
111
+ this.numbers.push({
112
+ number,
113
+ selected: selected.indexOf(number) >= 0 ? true : false,
114
+ selectable: this.selectedCounter == this.maximumAllowed ? false : this.selectable
115
+ });
116
+ });
117
+ }
157
118
  }
158
- }
159
- componentDidRender() {
160
- // start custom styling area
161
- if (!this.limitStylingAppends && this.stylingContainer) {
162
- if (this.clientStyling)
163
- this.setClientStyling();
164
- if (this.clientStylingUrlContent)
165
- this.setClientStylingURL();
166
- this.limitStylingAppends = true;
119
+ componentDidRender() {
120
+ // start custom styling area
121
+ if (!this.limitStylingAppends && this.stylingContainer) {
122
+ if (this.clientStyling)
123
+ this.setClientStyling();
124
+ if (this.clientStylingUrlContent)
125
+ this.setClientStylingURL();
126
+ this.limitStylingAppends = true;
127
+ }
128
+ // end custom styling area
167
129
  }
168
- // end custom styling area
169
- }
170
- // wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
171
- shuffleArray(array) {
172
- const result = [];
173
- while (array.length > 0) {
174
- const randomIndex = Math.floor(Math.random() * (array.length));
175
- result.push(array.splice(randomIndex, 1)[0]);
130
+ // wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
131
+ shuffleArray(array) {
132
+ const result = [];
133
+ while (array.length > 0) {
134
+ const randomIndex = Math.floor(Math.random() * (array.length));
135
+ result.push(array.splice(randomIndex, 1)[0]);
136
+ }
137
+ return result;
176
138
  }
177
- return result;
178
- }
179
- lotteryBulletSelectionHandler(event) {
180
- this.numbers = this.numbers.map((item) => {
181
- if (item.number == event.detail.value) {
182
- return {
183
- number: item.number,
184
- selected: event.detail.selected,
185
- selectable: item.selectable
186
- };
187
- }
188
- return {
189
- number: item.number,
190
- selected: item.selected,
191
- selectable: item.selectable
192
- };
193
- });
194
- if (event.detail.selected) {
195
- this.selectedCounter += 1;
196
- if (this.selectedCounter == this.maximumAllowed) {
139
+ lotteryBulletSelectionHandler(event) {
197
140
  this.numbers = this.numbers.map((item) => {
198
- return {
199
- number: item.number,
200
- selected: item.selected,
201
- selectable: item.selected ? true : false
202
- };
141
+ if (item.number == event.detail.value) {
142
+ return {
143
+ number: item.number,
144
+ selected: event.detail.selected,
145
+ selectable: item.selectable
146
+ };
147
+ }
148
+ return {
149
+ number: item.number,
150
+ selected: item.selected,
151
+ selectable: item.selectable
152
+ };
203
153
  });
204
- this.gridFilledEvent.emit({
205
- id: this.ticketId,
206
- index: this.gridIndex,
207
- selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
208
- });
209
- }
154
+ if (event.detail.selected) {
155
+ this.selectedCounter += 1;
156
+ if (this.selectedCounter == this.maximumAllowed) {
157
+ this.numbers = this.numbers.map((item) => {
158
+ return {
159
+ number: item.number,
160
+ selected: item.selected,
161
+ selectable: item.selected ? true : false
162
+ };
163
+ });
164
+ this.gridFilledEvent.emit({
165
+ id: this.ticketId,
166
+ index: this.gridIndex,
167
+ selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
168
+ });
169
+ }
170
+ }
171
+ else {
172
+ if (this.selectedCounter == this.maximumAllowed) {
173
+ this.numbers = this.numbers.map((item) => {
174
+ return {
175
+ number: item.number,
176
+ selected: item.selected,
177
+ selectable: true
178
+ };
179
+ });
180
+ this.gridDirtyEvent.emit({
181
+ id: this.ticketId,
182
+ index: this.gridIndex,
183
+ selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
184
+ });
185
+ }
186
+ this.selectedCounter -= 1;
187
+ }
210
188
  }
211
- else {
212
- if (this.selectedCounter == this.maximumAllowed) {
213
- this.numbers = this.numbers.map((item) => {
214
- return {
215
- number: item.number,
216
- selected: item.selected,
217
- selectable: true
218
- };
219
- });
220
- this.gridDirtyEvent.emit({
221
- id: this.ticketId,
222
- index: this.gridIndex,
223
- selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
224
- });
225
- }
226
- this.selectedCounter -= 1;
189
+ async resetSelectionHandler(event) {
190
+ if (event.detail && event.detail == this.ticketId) {
191
+ this.selectedCounter = 0;
192
+ this.numbers = this.numbers.map((item) => {
193
+ return {
194
+ number: item.number,
195
+ selected: false,
196
+ selectable: this.selectable
197
+ };
198
+ });
199
+ this.gridDirtyEvent.emit({
200
+ id: this.ticketId,
201
+ index: this.gridIndex,
202
+ selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
203
+ });
204
+ }
227
205
  }
228
- }
229
- async resetSelectionHandler(event) {
230
- if (event.detail && event.detail == this.ticketId) {
231
- this.selectedCounter = 0;
232
- this.numbers = this.numbers.map((item) => {
233
- return {
234
- number: item.number,
235
- selected: false,
236
- selectable: this.selectable
237
- };
238
- });
239
- this.gridDirtyEvent.emit({
240
- id: this.ticketId,
241
- index: this.gridIndex,
242
- selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
243
- });
206
+ async autoSelectionHandler(event) {
207
+ if (event.detail && event.detail == this.ticketId) {
208
+ this.resetSelectionHandler(event);
209
+ let array = [...Array(this.totalNumbers).keys()]
210
+ .map(number => number + 1);
211
+ array = this.shuffleArray(array);
212
+ array = array.slice(0, this.minimumAllowed);
213
+ this.numbers = this.numbers.map((item) => {
214
+ return {
215
+ number: item.number,
216
+ selected: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
217
+ selectable: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
218
+ };
219
+ });
220
+ this.gridFilledEvent.emit({
221
+ id: this.ticketId,
222
+ index: this.gridIndex,
223
+ selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
224
+ });
225
+ this.selectedCounter = this.maximumAllowed;
226
+ }
244
227
  }
245
- }
246
- async autoSelectionHandler(event) {
247
- if (event.detail && event.detail == this.ticketId) {
248
- this.resetSelectionHandler(event);
249
- let array = [...Array(this.totalNumbers).keys()]
250
- .map(number => number + 1);
251
- array = this.shuffleArray(array);
252
- array = array.slice(0, this.minimumAllowed);
253
- this.numbers = this.numbers.map((item) => {
254
- return {
255
- number: item.number,
256
- selected: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
257
- selectable: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
258
- };
259
- });
260
- this.gridFilledEvent.emit({
261
- id: this.ticketId,
262
- index: this.gridIndex,
263
- selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
264
- });
265
- this.selectedCounter = this.maximumAllowed;
228
+ render() {
229
+ return (h("div", { key: '54b9187146b5d2625fd5ce7f53f38abf091cd943', class: "GridContainer", ref: el => this.stylingContainer = el }, h("div", { key: 'e7e8570557ebaa78edf881cdbc1ed720028cdf6e', class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => h("div", null, h("lottery-bullet", { value: item.number, selectable: item.selectable, "is-selected": item.selected, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))))));
266
230
  }
267
- }
268
- render() {
269
- return (h("div", { class: "GridContainer", ref: el => this.stylingContainer = el }, h("div", { class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => h("div", null, h("lottery-bullet", { value: item.number, selectable: item.selectable, "is-selected": item.selected, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))))));
270
- }
271
231
  };
272
- LotteryGrid.style = lotteryGridCss;
232
+ LotteryGrid.style = LotteryGridStyle0;
273
233
 
274
234
  export { LotteryBullet as lottery_bullet, LotteryGrid as lottery_grid };
@@ -1,17 +1,20 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-c15ec15f.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-d55f95ff.js';
2
+ export { s as setNonce } from './index-d55f95ff.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
2
4
 
3
5
  /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
5
7
  */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
13
15
  };
14
16
 
15
- patchBrowser().then(options => {
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
16
19
  return bootstrapLazy([["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[514,"ticket-id"],"totalNumbers":[514,"total-numbers"],"gameId":[513,"game-id"],"maximumAllowed":[514,"maximum-allowed"],"minimumAllowed":[514,"minimum-allowed"],"selectable":[516],"selectedNumbers":[513,"selected-numbers"],"displaySelected":[516,"display-selected"],"language":[513],"gridIndex":[514,"grid-index"],"gridType":[513,"grid-type"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[513],"selectable":[516],"isSelected":[516,"is-selected"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
17
20
  });
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-8a854495.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-6caa0d6c",[[1,"lottery-grid",{ticketId:[514,"ticket-id"],totalNumbers:[514,"total-numbers"],gameId:[513,"game-id"],maximumAllowed:[514,"maximum-allowed"],minimumAllowed:[514,"minimum-allowed"],selectable:[516],selectedNumbers:[513,"selected-numbers"],displaySelected:[516,"display-selected"],language:[513],gridIndex:[514,"grid-index"],gridType:[513,"grid-type"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[513],selectable:[516],isSelected:[516,"is-selected"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-2a12d7f8.js";export{s as setNonce}from"./p-2a12d7f8.js";import{g as l}from"./p-e1255160.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t([["p-205e4975",[[1,"lottery-grid",{ticketId:[514,"ticket-id"],totalNumbers:[514,"total-numbers"],gameId:[513,"game-id"],maximumAllowed:[514,"maximum-allowed"],minimumAllowed:[514,"minimum-allowed"],selectable:[516],selectedNumbers:[513,"selected-numbers"],displaySelected:[516,"display-selected"],language:[513],gridIndex:[514,"grid-index"],gridType:[513,"grid-type"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[513],selectable:[516],isSelected:[516,"is-selected"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],limitStylingAppends:[32]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s}from"./p-2a12d7f8.js";const i=class{constructor(s){t(this,s),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{key:"af3601684ecf1f39d65fc9461430cba96b9e4b8c",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};i.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(241, 241, 241) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const r=class{constructor(s){t(this,s),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const s=Math.floor(Math.random()*t.length);e.push(t.splice(s,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return s("div",{key:"54b9187146b5d2625fd5ce7f53f38abf091cd943",class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{key:"e7e8570557ebaa78edf881cdbc1ed720028cdf6e",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';export{i as lottery_bullet,r as lottery_grid}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w(v):f.raf(v))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{b(m),b(y),(p=m.length>0)&&f.raf(v)},w=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>x,unwrapErr:()=>P});var E=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return O(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),T={},D=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>F(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},F=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},H=new WeakMap,N=e=>"sc-"+e.v,U=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=W(n),s=W(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},L=/\s/,W=e=>e?e.split(L):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of _(Object.keys(o)))e in s||U(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))U(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),V(null,l,z),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=B(e,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},I=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=B(null,n,o),r&&(l[o].$=r,Y(i,r,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;X(t),e&&e.remove()}}},K=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Q=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(V(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(K(h,m,o))Q(h,m,o),h=t[++i],m=l[++c];else if(K(d,y,o))Q(d,y,o),d=t[--f],y=l[--p];else if(K(h,y,o))Q(h,y,o),Y(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(K(d,m,o))Q(d,m,o),Y(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=B(t&&t[c],n,u):(Q(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=B(t&&t[c],n,c),m=l[++c]),s&&Y(h.$.parentNode,s,h.$)}i>f?I(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&J(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),I(l,null,t,s,0,s.length-1)):!n&&null!==o&&J(o,0,o.length-1)):e.i!==r&&(l.data=r)},X=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(X)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.j),g((()=>te(e,t)));e.l|=512},te=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return t&&(e.l|=256,e.k&&(e.k.map((([e,t])=>ce(n,e,t))),e.k=void 0)),ne(void 0,(()=>oe(e,n,t)))},ne=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=H.get(e=e.head||e);if(r||H.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.C)?n:k(a);null!=l&&s.setAttribute("nonce",l),(!(1&t.l)||1&t.l&&"HEAD"!==e.nodeName)&&e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);se(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},se=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||A(null,null),r=(e=>e&&e.m===T)(t)?t:R(null,null,t);if(M=l.tagName,o.P&&(r.u=r.u||{},o.P.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.M=r,r.$=s.$=l.shadowRoot||l,Q(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.j;ce(e.t,"componentDidRender"),64&e.l||(e.l|=64,ue(t),e.R(t),n||ie()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>ee(e,!1))),e.l&=-517},ie=()=>{ue(a.documentElement),w((()=>F(u,"appload",{detail:{namespace:"lottery-grid"}})))},ce=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l)=>{var o,s;const r=e.prototype;if(t.A){const i=Object.entries(null!=(o=t.A)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=s.T.get(t),i=s.l,c=s.t;l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.A[t][0]),8&i&&void 0!==r||l===r||Number.isNaN(r)&&Number.isNaN(l)||(s.T.set(t,l),c&&2==(18&i)&&ee(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.D)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.D)?s:{}),...i.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},fe=e=>{ce(e,"connectedCallback")},he=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),v=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],v:l[1],A:l[2],F:l[3]};4&o.l&&(S=!0),o.A=l[2],o.F=l[3],o.P=[];const c=o.v,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,T:new Map};l.H=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,o),1&o.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,de(this,e,o.F)),w&&(clearTimeout(w),w=null),g?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)de(e,t,l.F),(null==t?void 0:t.t)?fe(t.t):(null==t?void 0:t.H)&&t.H.then((()=>fe(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.j=n);break}}l.A&&Object.entries(l.A).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.N){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.N;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.U}" was not found`);l.isProxied||(ae(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,o(),fe(t.t)}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ee(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.L&&(e.L.map((e=>e())),e.L=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.H)&&e.H.then((()=>{}))}})()))}componentOnReady(){return n(this).H}};o.N=e[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,ae(u,o,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ie,30)))},de=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=me(e,n),r=pe(t,o),i=ye(n);f.ael(s,l,r,i),(t.L=t.L||[]).push((()=>f.rel(s,l,r,i)))}))},pe=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},me=(e,t)=>4&t?a:e,ye=e=>({passive:!!(1&e),capture:!!(2&e)}),$e=e=>f.C=e;export{he as b,D as c,R as h,h as p,l as r,$e as s}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}