@everymatrix/lottery-pagination 1.76.12 → 1.76.13

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.
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'lottery-pagination';
24
- const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -776,14 +776,14 @@ var postUpdateComponent = (hostRef) => {
776
776
  const endPostUpdate = createTime("postUpdate", tagName);
777
777
  const instance = hostRef.$lazyInstance$ ;
778
778
  const ancestorComponent = hostRef.$ancestorComponent$;
779
- {
780
- safeCall(instance, "componentDidRender");
781
- }
782
779
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
783
780
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
784
781
  {
785
782
  addHydratedFlag(elm);
786
783
  }
784
+ {
785
+ safeCall(instance, "componentDidLoad");
786
+ }
787
787
  endPostUpdate();
788
788
  {
789
789
  hostRef.$onReadyResolve$(elm);
@@ -835,6 +835,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
835
835
  `Couldn't find host element for "${cmpMeta.$tagName$}" 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).`
836
836
  );
837
837
  }
838
+ const elm = hostRef.$hostElement$ ;
838
839
  const oldVal = hostRef.$instanceValues$.get(propName);
839
840
  const flags = hostRef.$flags$;
840
841
  const instance = hostRef.$lazyInstance$ ;
@@ -844,6 +845,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
844
845
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
845
846
  hostRef.$instanceValues$.set(propName, newVal);
846
847
  if (instance) {
848
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
849
+ const watchMethods = cmpMeta.$watchers$[propName];
850
+ if (watchMethods) {
851
+ watchMethods.map((watchMethodName) => {
852
+ try {
853
+ instance[watchMethodName](newVal, oldVal, propName);
854
+ } catch (e) {
855
+ consoleError(e, elm);
856
+ }
857
+ });
858
+ }
859
+ }
847
860
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
848
861
  scheduleUpdate(hostRef, false);
849
862
  }
@@ -855,7 +868,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
855
868
  var proxyComponent = (Cstr, cmpMeta, flags) => {
856
869
  var _a, _b;
857
870
  const prototype = Cstr.prototype;
858
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
871
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
872
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
873
+ cmpMeta.$watchers$ = Cstr.watchers;
874
+ }
859
875
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
860
876
  members.map(([memberName, [memberFlags]]) => {
861
877
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -937,6 +953,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
937
953
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
938
954
  }
939
955
  if (!Cstr.isProxied) {
956
+ {
957
+ cmpMeta.$watchers$ = Cstr.watchers;
958
+ }
940
959
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
941
960
  Cstr.isProxied = true;
942
961
  }
@@ -952,6 +971,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
952
971
  {
953
972
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
954
973
  }
974
+ {
975
+ hostRef.$flags$ |= 128 /* isWatchReady */;
976
+ }
955
977
  endNewInstance();
956
978
  } else {
957
979
  Cstr = elm.constructor;
@@ -1048,6 +1070,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1048
1070
  let hasSlotRelocation = false;
1049
1071
  lazyBundles.map((lazyBundle) => {
1050
1072
  lazyBundle[1].map((compactMeta) => {
1073
+ var _a2;
1051
1074
  const cmpMeta = {
1052
1075
  $flags$: compactMeta[0],
1053
1076
  $tagName$: compactMeta[1],
@@ -1063,6 +1086,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1063
1086
  {
1064
1087
  cmpMeta.$attrsToReflect$ = [];
1065
1088
  }
1089
+ {
1090
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1091
+ }
1066
1092
  const tagName = cmpMeta.$tagName$;
1067
1093
  const HostElement = class extends HTMLElement {
1068
1094
  // StencilLazyHost
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryPagination = require('./lottery-pagination-e0a51394.js');
6
- require('./index-94cc7cac.js');
5
+ const lotteryPagination = require('./lottery-pagination-04abe239.js');
6
+ require('./index-64558488.js');
7
7
 
8
8
 
9
9
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-94cc7cac.js');
5
+ const index = require('./index-64558488.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["lottery-pagination.cjs",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["lottery-pagination.cjs",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"mbSource":[513,"mb-source"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -1,6 +1,63 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-94cc7cac.js');
3
+ const index = require('./index-64558488.js');
4
+
5
+ /**
6
+ * @name setClientStyling
7
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
8
+ * @param {HTMLElement} stylingContainer The reference element of the widget
9
+ * @param {string} clientStyling The style content
10
+ */
11
+ function setClientStyling(stylingContainer, clientStyling) {
12
+ if (stylingContainer) {
13
+ const sheet = document.createElement('style');
14
+ sheet.innerHTML = clientStyling;
15
+ stylingContainer.appendChild(sheet);
16
+ }
17
+ }
18
+
19
+ /**
20
+ * @name setClientStylingURL
21
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
22
+ * @param {HTMLElement} stylingContainer The reference element of the widget
23
+ * @param {string} clientStylingUrl The URL of the style content
24
+ */
25
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
26
+ const url = new URL(clientStylingUrl);
27
+
28
+ fetch(url.href)
29
+ .then((res) => res.text())
30
+ .then((data) => {
31
+ const cssFile = document.createElement('style');
32
+ cssFile.innerHTML = data;
33
+ if (stylingContainer) {
34
+ stylingContainer.appendChild(cssFile);
35
+ }
36
+ })
37
+ .catch((err) => {
38
+ console.error('There was an error while trying to load client styling from URL', err);
39
+ });
40
+ }
41
+
42
+ /**
43
+ * @name setStreamLibrary
44
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
45
+ * @param {HTMLElement} stylingContainer The highest element of the widget
46
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
47
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
48
+ */
49
+ function setStreamStyling(stylingContainer, domain, subscription) {
50
+ if (window.emMessageBus) {
51
+ const sheet = document.createElement('style');
52
+
53
+ window.emMessageBus.subscribe(domain, (data) => {
54
+ sheet.innerHTML = data;
55
+ if (stylingContainer) {
56
+ stylingContainer.appendChild(sheet);
57
+ }
58
+ });
59
+ }
60
+ }
4
61
 
5
62
  /**
6
63
  * @name isMobile
@@ -140,18 +197,6 @@ const LotteryPagination = class {
140
197
  }
141
198
  }
142
199
  };
143
- this.setClientStyling = () => {
144
- let sheet = document.createElement('style');
145
- sheet.innerHTML = this.clientStyling;
146
- this.stylingContainer.prepend(sheet);
147
- };
148
- this.setClientStylingURL = () => {
149
- let cssFile = document.createElement('style');
150
- setTimeout(() => {
151
- cssFile.innerHTML = this.clientStylingUrlContent;
152
- this.stylingContainer.prepend(cssFile);
153
- }, 1);
154
- };
155
200
  this.nextPage = false;
156
201
  this.prevPage = false;
157
202
  this.offset = 0;
@@ -159,7 +204,8 @@ const LotteryPagination = class {
159
204
  this.total = 1;
160
205
  this.language = 'en';
161
206
  this.clientStyling = '';
162
- this.clientStylingUrlContent = '';
207
+ this.clientStylingUrl = '';
208
+ this.mbSource = undefined;
163
209
  this.arrowsActive = undefined;
164
210
  this.secondaryArrowsActive = undefined;
165
211
  this.numberedNavActive = undefined;
@@ -172,7 +218,21 @@ const LotteryPagination = class {
172
218
  this.totalInt = undefined;
173
219
  this.pagesArray = [];
174
220
  this.endInt = 0;
175
- this.limitStylingAppends = false;
221
+ }
222
+ handleClientStylingChange(newValue, oldValue) {
223
+ if (newValue != oldValue) {
224
+ setClientStyling(this.stylingContainer, this.clientStyling);
225
+ }
226
+ }
227
+ handleClientStylingUrlChange(newValue, oldValue) {
228
+ if (newValue != oldValue) {
229
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
230
+ }
231
+ }
232
+ handleMbSourceChange(newValue, oldValue) {
233
+ if (newValue != oldValue) {
234
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
235
+ }
176
236
  }
177
237
  componentWillLoad() {
178
238
  if (this.translationUrl) {
@@ -215,17 +275,15 @@ const LotteryPagination = class {
215
275
  }
216
276
  }
217
277
  }
218
- componentDidRender() {
219
- this.isReset = false;
220
- // start custom styling area
221
- if (!this.limitStylingAppends && this.stylingContainer) {
278
+ componentDidLoad() {
279
+ if (this.stylingContainer) {
280
+ if (this.mbSource)
281
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
222
282
  if (this.clientStyling)
223
- this.setClientStyling();
224
- if (this.clientStylingUrlContent)
225
- this.setClientStylingURL();
226
- this.limitStylingAppends = true;
283
+ setClientStyling(this.stylingContainer, this.clientStyling);
284
+ if (this.clientStylingUrl)
285
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
227
286
  }
228
- // end custom styling area
229
287
  }
230
288
  render() {
231
289
  /**
@@ -254,6 +312,11 @@ const LotteryPagination = class {
254
312
  }
255
313
  return (index.h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
256
314
  }
315
+ static get watchers() { return {
316
+ "clientStyling": ["handleClientStylingChange"],
317
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
318
+ "mbSource": ["handleMbSourceChange"]
319
+ }; }
257
320
  };
258
321
  LotteryPagination.style = LotteryPaginationStyle0;
259
322
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryPagination = require('./lottery-pagination-e0a51394.js');
6
- require('./index-94cc7cac.js');
5
+ const lotteryPagination = require('./lottery-pagination-04abe239.js');
6
+ require('./index-64558488.js');
7
7
 
8
8
 
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-94cc7cac.js');
5
+ const index = require('./index-64558488.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["lottery-pagination.cjs",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
22
+ return index.bootstrapLazy([["lottery-pagination.cjs",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"mbSource":[513,"mb-source"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
2
3
  import { isMobile } from "../../utils/utils";
3
4
  import { translate, getTranslations } from "../../utils/locale.utils";
4
5
  export class LotteryPagination {
@@ -70,18 +71,6 @@ export class LotteryPagination {
70
71
  }
71
72
  }
72
73
  };
73
- this.setClientStyling = () => {
74
- let sheet = document.createElement('style');
75
- sheet.innerHTML = this.clientStyling;
76
- this.stylingContainer.prepend(sheet);
77
- };
78
- this.setClientStylingURL = () => {
79
- let cssFile = document.createElement('style');
80
- setTimeout(() => {
81
- cssFile.innerHTML = this.clientStylingUrlContent;
82
- this.stylingContainer.prepend(cssFile);
83
- }, 1);
84
- };
85
74
  this.nextPage = false;
86
75
  this.prevPage = false;
87
76
  this.offset = 0;
@@ -89,7 +78,8 @@ export class LotteryPagination {
89
78
  this.total = 1;
90
79
  this.language = 'en';
91
80
  this.clientStyling = '';
92
- this.clientStylingUrlContent = '';
81
+ this.clientStylingUrl = '';
82
+ this.mbSource = undefined;
93
83
  this.arrowsActive = undefined;
94
84
  this.secondaryArrowsActive = undefined;
95
85
  this.numberedNavActive = undefined;
@@ -102,7 +92,21 @@ export class LotteryPagination {
102
92
  this.totalInt = undefined;
103
93
  this.pagesArray = [];
104
94
  this.endInt = 0;
105
- this.limitStylingAppends = false;
95
+ }
96
+ handleClientStylingChange(newValue, oldValue) {
97
+ if (newValue != oldValue) {
98
+ setClientStyling(this.stylingContainer, this.clientStyling);
99
+ }
100
+ }
101
+ handleClientStylingUrlChange(newValue, oldValue) {
102
+ if (newValue != oldValue) {
103
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
104
+ }
105
+ }
106
+ handleMbSourceChange(newValue, oldValue) {
107
+ if (newValue != oldValue) {
108
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
109
+ }
106
110
  }
107
111
  componentWillLoad() {
108
112
  if (this.translationUrl) {
@@ -145,17 +149,15 @@ export class LotteryPagination {
145
149
  }
146
150
  }
147
151
  }
148
- componentDidRender() {
149
- this.isReset = false;
150
- // start custom styling area
151
- if (!this.limitStylingAppends && this.stylingContainer) {
152
+ componentDidLoad() {
153
+ if (this.stylingContainer) {
154
+ if (this.mbSource)
155
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
152
156
  if (this.clientStyling)
153
- this.setClientStyling();
154
- if (this.clientStylingUrlContent)
155
- this.setClientStylingURL();
156
- this.limitStylingAppends = true;
157
+ setClientStyling(this.stylingContainer, this.clientStyling);
158
+ if (this.clientStylingUrl)
159
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
157
160
  }
158
- // end custom styling area
159
161
  }
160
162
  render() {
161
163
  /**
@@ -324,7 +326,7 @@ export class LotteryPagination {
324
326
  "reflect": true,
325
327
  "defaultValue": "''"
326
328
  },
327
- "clientStylingUrlContent": {
329
+ "clientStylingUrl": {
328
330
  "type": "string",
329
331
  "mutable": true,
330
332
  "complexType": {
@@ -338,10 +340,27 @@ export class LotteryPagination {
338
340
  "tags": [],
339
341
  "text": "Client custom styling via url content"
340
342
  },
341
- "attribute": "client-styling-url-content",
343
+ "attribute": "client-styling-url",
342
344
  "reflect": true,
343
345
  "defaultValue": "''"
344
346
  },
347
+ "mbSource": {
348
+ "type": "string",
349
+ "mutable": false,
350
+ "complexType": {
351
+ "original": "string",
352
+ "resolved": "string",
353
+ "references": {}
354
+ },
355
+ "required": false,
356
+ "optional": false,
357
+ "docs": {
358
+ "tags": [],
359
+ "text": "Client custom styling via message bus"
360
+ },
361
+ "attribute": "mb-source",
362
+ "reflect": true
363
+ },
345
364
  "arrowsActive": {
346
365
  "type": "boolean",
347
366
  "mutable": true,
@@ -438,8 +457,7 @@ export class LotteryPagination {
438
457
  "limitInt": {},
439
458
  "totalInt": {},
440
459
  "pagesArray": {},
441
- "endInt": {},
442
- "limitStylingAppends": {}
460
+ "endInt": {}
443
461
  };
444
462
  }
445
463
  static get events() {
@@ -460,4 +478,16 @@ export class LotteryPagination {
460
478
  }
461
479
  }];
462
480
  }
481
+ static get watchers() {
482
+ return [{
483
+ "propName": "clientStyling",
484
+ "methodName": "handleClientStylingChange"
485
+ }, {
486
+ "propName": "clientStylingUrl",
487
+ "methodName": "handleClientStylingUrlChange"
488
+ }, {
489
+ "propName": "mbSource",
490
+ "methodName": "handleMbSourceChange"
491
+ }];
492
+ }
463
493
  }
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'lottery-pagination';
2
- const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* lottery-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -754,14 +754,14 @@ var postUpdateComponent = (hostRef) => {
754
754
  const endPostUpdate = createTime("postUpdate", tagName);
755
755
  const instance = hostRef.$lazyInstance$ ;
756
756
  const ancestorComponent = hostRef.$ancestorComponent$;
757
- {
758
- safeCall(instance, "componentDidRender");
759
- }
760
757
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
761
758
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
762
759
  {
763
760
  addHydratedFlag(elm);
764
761
  }
762
+ {
763
+ safeCall(instance, "componentDidLoad");
764
+ }
765
765
  endPostUpdate();
766
766
  {
767
767
  hostRef.$onReadyResolve$(elm);
@@ -813,6 +813,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
813
813
  `Couldn't find host element for "${cmpMeta.$tagName$}" 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).`
814
814
  );
815
815
  }
816
+ const elm = hostRef.$hostElement$ ;
816
817
  const oldVal = hostRef.$instanceValues$.get(propName);
817
818
  const flags = hostRef.$flags$;
818
819
  const instance = hostRef.$lazyInstance$ ;
@@ -822,6 +823,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
822
823
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
823
824
  hostRef.$instanceValues$.set(propName, newVal);
824
825
  if (instance) {
826
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
827
+ const watchMethods = cmpMeta.$watchers$[propName];
828
+ if (watchMethods) {
829
+ watchMethods.map((watchMethodName) => {
830
+ try {
831
+ instance[watchMethodName](newVal, oldVal, propName);
832
+ } catch (e) {
833
+ consoleError(e, elm);
834
+ }
835
+ });
836
+ }
837
+ }
825
838
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
826
839
  scheduleUpdate(hostRef, false);
827
840
  }
@@ -833,7 +846,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
833
846
  var proxyComponent = (Cstr, cmpMeta, flags) => {
834
847
  var _a, _b;
835
848
  const prototype = Cstr.prototype;
836
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
849
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
850
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
851
+ cmpMeta.$watchers$ = Cstr.watchers;
852
+ }
837
853
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
838
854
  members.map(([memberName, [memberFlags]]) => {
839
855
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -915,6 +931,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
915
931
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
916
932
  }
917
933
  if (!Cstr.isProxied) {
934
+ {
935
+ cmpMeta.$watchers$ = Cstr.watchers;
936
+ }
918
937
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
919
938
  Cstr.isProxied = true;
920
939
  }
@@ -930,6 +949,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
930
949
  {
931
950
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
932
951
  }
952
+ {
953
+ hostRef.$flags$ |= 128 /* isWatchReady */;
954
+ }
933
955
  endNewInstance();
934
956
  } else {
935
957
  Cstr = elm.constructor;
@@ -1026,6 +1048,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1026
1048
  let hasSlotRelocation = false;
1027
1049
  lazyBundles.map((lazyBundle) => {
1028
1050
  lazyBundle[1].map((compactMeta) => {
1051
+ var _a2;
1029
1052
  const cmpMeta = {
1030
1053
  $flags$: compactMeta[0],
1031
1054
  $tagName$: compactMeta[1],
@@ -1041,6 +1064,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1041
1064
  {
1042
1065
  cmpMeta.$attrsToReflect$ = [];
1043
1066
  }
1067
+ {
1068
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1069
+ }
1044
1070
  const tagName = cmpMeta.$tagName$;
1045
1071
  const HostElement = class extends HTMLElement {
1046
1072
  // StencilLazyHost
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryPagination } from './lottery-pagination-b349c62d.js';
2
- import './index-af8909e6.js';
1
+ export { L as LotteryPagination } from './lottery-pagination-1e4d4ea1.js';
2
+ import './index-95386fc2.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-af8909e6.js';
2
- export { s as setNonce } from './index-af8909e6.js';
1
+ import { b as bootstrapLazy } from './index-95386fc2.js';
2
+ export { s as setNonce } from './index-95386fc2.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["lottery-pagination",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
8
+ return bootstrapLazy([["lottery-pagination",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"mbSource":[513,"mb-source"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,61 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-af8909e6.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-95386fc2.js';
2
+
3
+ /**
4
+ * @name setClientStyling
5
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
6
+ * @param {HTMLElement} stylingContainer The reference element of the widget
7
+ * @param {string} clientStyling The style content
8
+ */
9
+ function setClientStyling(stylingContainer, clientStyling) {
10
+ if (stylingContainer) {
11
+ const sheet = document.createElement('style');
12
+ sheet.innerHTML = clientStyling;
13
+ stylingContainer.appendChild(sheet);
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @name setClientStylingURL
19
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
20
+ * @param {HTMLElement} stylingContainer The reference element of the widget
21
+ * @param {string} clientStylingUrl The URL of the style content
22
+ */
23
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
24
+ const url = new URL(clientStylingUrl);
25
+
26
+ fetch(url.href)
27
+ .then((res) => res.text())
28
+ .then((data) => {
29
+ const cssFile = document.createElement('style');
30
+ cssFile.innerHTML = data;
31
+ if (stylingContainer) {
32
+ stylingContainer.appendChild(cssFile);
33
+ }
34
+ })
35
+ .catch((err) => {
36
+ console.error('There was an error while trying to load client styling from URL', err);
37
+ });
38
+ }
39
+
40
+ /**
41
+ * @name setStreamLibrary
42
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
43
+ * @param {HTMLElement} stylingContainer The highest element of the widget
44
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
45
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
46
+ */
47
+ function setStreamStyling(stylingContainer, domain, subscription) {
48
+ if (window.emMessageBus) {
49
+ const sheet = document.createElement('style');
50
+
51
+ window.emMessageBus.subscribe(domain, (data) => {
52
+ sheet.innerHTML = data;
53
+ if (stylingContainer) {
54
+ stylingContainer.appendChild(sheet);
55
+ }
56
+ });
57
+ }
58
+ }
2
59
 
3
60
  /**
4
61
  * @name isMobile
@@ -138,18 +195,6 @@ const LotteryPagination = class {
138
195
  }
139
196
  }
140
197
  };
141
- this.setClientStyling = () => {
142
- let sheet = document.createElement('style');
143
- sheet.innerHTML = this.clientStyling;
144
- this.stylingContainer.prepend(sheet);
145
- };
146
- this.setClientStylingURL = () => {
147
- let cssFile = document.createElement('style');
148
- setTimeout(() => {
149
- cssFile.innerHTML = this.clientStylingUrlContent;
150
- this.stylingContainer.prepend(cssFile);
151
- }, 1);
152
- };
153
198
  this.nextPage = false;
154
199
  this.prevPage = false;
155
200
  this.offset = 0;
@@ -157,7 +202,8 @@ const LotteryPagination = class {
157
202
  this.total = 1;
158
203
  this.language = 'en';
159
204
  this.clientStyling = '';
160
- this.clientStylingUrlContent = '';
205
+ this.clientStylingUrl = '';
206
+ this.mbSource = undefined;
161
207
  this.arrowsActive = undefined;
162
208
  this.secondaryArrowsActive = undefined;
163
209
  this.numberedNavActive = undefined;
@@ -170,7 +216,21 @@ const LotteryPagination = class {
170
216
  this.totalInt = undefined;
171
217
  this.pagesArray = [];
172
218
  this.endInt = 0;
173
- this.limitStylingAppends = false;
219
+ }
220
+ handleClientStylingChange(newValue, oldValue) {
221
+ if (newValue != oldValue) {
222
+ setClientStyling(this.stylingContainer, this.clientStyling);
223
+ }
224
+ }
225
+ handleClientStylingUrlChange(newValue, oldValue) {
226
+ if (newValue != oldValue) {
227
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
228
+ }
229
+ }
230
+ handleMbSourceChange(newValue, oldValue) {
231
+ if (newValue != oldValue) {
232
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
233
+ }
174
234
  }
175
235
  componentWillLoad() {
176
236
  if (this.translationUrl) {
@@ -213,17 +273,15 @@ const LotteryPagination = class {
213
273
  }
214
274
  }
215
275
  }
216
- componentDidRender() {
217
- this.isReset = false;
218
- // start custom styling area
219
- if (!this.limitStylingAppends && this.stylingContainer) {
276
+ componentDidLoad() {
277
+ if (this.stylingContainer) {
278
+ if (this.mbSource)
279
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
220
280
  if (this.clientStyling)
221
- this.setClientStyling();
222
- if (this.clientStylingUrlContent)
223
- this.setClientStylingURL();
224
- this.limitStylingAppends = true;
281
+ setClientStyling(this.stylingContainer, this.clientStyling);
282
+ if (this.clientStylingUrl)
283
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
225
284
  }
226
- // end custom styling area
227
285
  }
228
286
  render() {
229
287
  /**
@@ -252,6 +310,11 @@ const LotteryPagination = class {
252
310
  }
253
311
  return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
254
312
  }
313
+ static get watchers() { return {
314
+ "clientStyling": ["handleClientStylingChange"],
315
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
316
+ "mbSource": ["handleMbSourceChange"]
317
+ }; }
255
318
  };
256
319
  LotteryPagination.style = LotteryPaginationStyle0;
257
320
 
@@ -1,2 +1,2 @@
1
- export { L as lottery_pagination } from './lottery-pagination-b349c62d.js';
2
- import './index-af8909e6.js';
1
+ export { L as lottery_pagination } from './lottery-pagination-1e4d4ea1.js';
2
+ import './index-95386fc2.js';
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-af8909e6.js';
2
- export { s as setNonce } from './index-af8909e6.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-95386fc2.js';
2
+ export { s as setNonce } from './index-95386fc2.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["lottery-pagination",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
19
+ return bootstrapLazy([["lottery-pagination",[[1,"lottery-pagination",{"nextPage":[1540,"next-page"],"prevPage":[1540,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"mbSource":[513,"mb-source"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"isReset":[1540,"is-reset"],"translationUrl":[520,"translation-url"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
20
  });
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>e.set(n.t=t,n),o=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=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:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,d=[],y=[],$=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&f.l?v(b):f.raf(b))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},b=()=>{w(d),w(y),(m=d.length>0)&&f.raf(b)},v=t=>h().then(t),g=$(y,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>R});var k=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},L=(t,e,...n)=>{let l=null,o=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!j(l))&&(l+=""),o&&r?s[s.length-1].i+=l:s.push(o?T(null,l):l),r=o)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=T(t,null);return c.u=e,s.length>0&&(c.h=s),c},T=(t,e)=>({l:0,p:t,i:e,m:null,h:null,u:null}),W={},A=(t,e,l)=>{const o=(t=>n(t).$hostElement$)(t);return{emit:t=>F(o,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},F=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},N=new WeakMap,U=t=>"sc-"+t.$,D=(t,e,n,l,r,s)=>{if(n!==l){let i=o(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=q(n),r=q(l);e.remove(...o.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else if(i||"o"!==e[0]||"n"!==e[1]){const o=j(l);if((i||o&&null!==l)&&!r)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!o&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(u,c)?c.slice(2):c[2]+e.slice(3),n||l){const o=e.endsWith(G);e=e.replace(V,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}}},H=/\s/,q=t=>t?t.split(H):[],G="Capture",V=RegExp(G+"$"),_=(t,e,n)=>{const l=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||S,r=e.u||S;for(const t of z(Object.keys(o)))t in r||D(l,t,o[t],void 0,n,e.l);for(const t of z(Object.keys(r)))D(l,t,o[t],r[t],n,e.l)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,I=(t,e,n)=>{const l=e.h[n];let o,r,s=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else if(o=l.m=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(s=0;s<l.h.length;++s)r=I(t,l,s),r&&o.appendChild(r);return o["s-hn"]=x,o},J=(t,e,n,l,o,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=r;++o)l[o]&&(s=I(null,n,o),s&&(l[o].m=s,Z(i,s,e)))},K=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.m;Y(e),t&&t.remove()}}},Q=(t,e)=>t.p===e.p,X=(t,e,n=!1)=>{const l=e.m=t.m,o=t.h,r=e.h,s=e.i;null===s?(_(t,e,B),null!==o&&null!==r?((t,e,n,l,o=!1)=>{let r,s=0,i=0,c=e.length-1,u=e[0],a=e[c],f=l.length-1,h=l[0],p=l[f];for(;s<=c&&i<=f;)null==u?u=e[++s]:null==a?a=e[--c]:null==h?h=l[++i]:null==p?p=l[--f]:Q(u,h)?(X(u,h,o),u=e[++s],h=l[++i]):Q(a,p)?(X(a,p,o),a=e[--c],p=l[--f]):Q(u,p)?(X(u,p,o),Z(t,u.m,a.m.nextSibling),u=e[++s],p=l[--f]):Q(a,h)?(X(a,h,o),Z(t,a.m,u.m),a=e[--c],h=l[++i]):(r=I(e&&e[i],n,i),h=l[++i],r&&Z(u.m.parentNode,r,u.m));s>c?J(t,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&K(e,s,c)})(l,o,e,r,n):null!==r?(null!==t.i&&(l.textContent=""),J(l,null,e,r,0,r.length-1)):null!==o&&K(o,0,o.length-1)):t.i!==s&&(l.data=s)},Y=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Y)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},et=(t,e)=>{if(t.l|=16,!(4&t.l))return tt(t,t.S),g((()=>nt(t,e)));t.l|=512},nt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=ut(n,"componentWillLoad")),l=lt(l,(()=>ut(n,"componentWillRender"))),lt(l,(()=>rt(t,n,e)))},lt=(t,e)=>ot(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,l=e.l,o=((t,e)=>{var n;const l=U(e),o=i.get(l);if(t=11===t.nodeType?t:a,o)if("string"==typeof o){let r,s=N.get(t=t.head||t);if(s||N.set(t,s=new Set),!s.has(l)){{r=a.createElement("style"),r.innerHTML=o;const e=null!=(n=f.O)?n:O(a);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.l&&(r.innerHTML+=c),s&&s.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);st(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},st=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.j,r=t.k||T(null,null),s=(t=>t&&t.p===W)(e)?e:L(null,null,e);if(x=l.tagName,o.C&&(s.u=s.u||{},o.C.map((([t,e])=>s.u[e]=l[t]))),n&&s.u)for(const t of Object.keys(s.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=l[t]);s.p=null,s.l|=4,t.k=s,s.m=r.m=l.shadowRoot||l,M=l["s-sc"],X(r,s,n)})(t,e,l)}catch(e){r(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.t,l=t.S;64&t.l||(t.l|=64,at(e),ut(n,"componentDidLoad"),t.M(e),l||ct()),t.v&&(t.v(),t.v=void 0),512&t.l&&v((()=>et(t,!1))),t.l&=-517},ct=()=>{at(a.documentElement),v((()=>F(u,"appload",{detail:{namespace:"lottery-pagination"}})))},ut=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},at=t=>t.classList.add("hydrated"),ft=(t,e,l)=>{var o,s;const i=t.prototype;if(e.P||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const c=Object.entries(null!=(o=e.P)?o:{});if(c.map((([t,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).L.get(e))(0,t)},set(l){((t,e,l,o)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.L.get(e),u=s.l,a=s.t;if(l=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(l,o.P[e][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(s.L.set(e,l),a)){if(o.R&&128&u){const t=o.R[e];t&&t.map((t=>{try{a[t](l,c,e)}catch(t){r(t,i)}}))}2==(18&u)&&et(s,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,r){f.jmp((()=>{var s;const c=l.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&r!==o){const n=l.t,i=null==(s=e.R)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,o,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.R)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const r=n[1]||t;return l.set(r,t),512&n[0]&&(null==(o=e.C)||o.push([t,r])),r}))]))}}return t},ht=(t,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{var o;const c={l:l[0],$:l[1],P:l[2],T:l[3]};4&c.l&&(S=!0),c.P=l[2],c.C=[],c.R=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,j:n,L:new Map};l.W=new Promise((t=>l.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c),1&c.l)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.l)){const e=n(t),l=e.j,o=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.W)&&e.W.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.S=n);break}}l.P&&Object.entries(l.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.A){const t=(t=>{const e=t.$.replace(/-/g,"_"),n=t.A;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};l=await t,e()}else l=t;if(!l)throw Error(`Constructor for "${n.$}#${e.F}" was not found`);l.isProxied||(n.R=l.watchers,ft(l,n,2),l.isProxied=!0);const o=()=>{};e.l|=8;try{new l(e)}catch(t){r(t)}e.l&=-9,e.l|=128,o()}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=U(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.l)),l()}}}const o=e.S,c=()=>et(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(t,e,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const t=n(this);(null==t?void 0:t.t)||(null==t?void 0:t.W)&&t.W.then((()=>{}))}})()))}componentOnReady(){return n(this).W}};c.A=t[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ft(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(o=f.O)?o:O(a);null!=t&&w.setAttribute("nonce",t),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>v=setTimeout(ct,30)))},pt=t=>f.O=t;export{ht as b,A as c,L as h,h as p,l as r,pt as s}
@@ -1 +1 @@
1
- export{L as LotteryPagination}from"./lottery-pagination-b349c62d.js";import"./index-af8909e6.js";
1
+ export{L as LotteryPagination}from"./lottery-pagination-1e4d4ea1.js";import"./index-95386fc2.js";
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./index-95386fc2.js";function a(t,i){if(t){const s=document.createElement("style");s.innerHTML=i,t.appendChild(s)}}function e(t,i){const s=new URL(i);fetch(s.href).then((t=>t.text())).then((i=>{const s=document.createElement("style");s.innerHTML=i,t&&t.appendChild(s)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i){if(window.emMessageBus){const s=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{s.innerHTML=i,t&&t.appendChild(s)}))}}const n=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),r={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},h=(t,i)=>r[void 0!==i&&i in r?i:"en"][t],l=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!=i&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&e(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((i=>{for(let s in t[i])r[i][s]=t[i][s]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&e(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(n(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},h("firstPage",this.language)),s("span",{class:"NavigationIcon"})),a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})));n(this.userAgent)&&(a=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let e=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},h("lastPage",this.language)),s("span",{class:"NavigationIcon"})),o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&e);return n(this.userAgent)&&(o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&o)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--button-text-color, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-transparency-30, #524e52);border-radius:5px;background:var(--emw--color-gray-transparency-30, #524e52);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004D4A);border-color:var(--emw--color-primary-variant, #004D4A)}button:disabled{background-color:var(--emw--color-gray-transparency-80, #ccc);border-color:var(--emw--color-gray-transparency-80, #ccc);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}}';export{l as L}
@@ -1 +1 @@
1
- export{L as lottery_pagination}from"./lottery-pagination-b349c62d.js";import"./index-af8909e6.js";
1
+ export{L as lottery_pagination}from"./lottery-pagination-1e4d4ea1.js";import"./index-95386fc2.js";
@@ -1 +1 @@
1
- import{p as t,b as e}from"./index-af8909e6.js";export{s as setNonce}from"./index-af8909e6.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((async t=>(await a(),e([["lottery-pagination",[[1,"lottery-pagination",{nextPage:[1540,"next-page"],prevPage:[1540,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],isReset:[1540,"is-reset"],translationUrl:[520,"translation-url"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]]],t))));
1
+ import{p as e,b as t}from"./index-95386fc2.js";export{s as setNonce}from"./index-95386fc2.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["lottery-pagination",[[1,"lottery-pagination",{nextPage:[1540,"next-page"],prevPage:[1540,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrl:[1537,"client-styling-url"],mbSource:[513,"mb-source"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],isReset:[1540,"is-reset"],translationUrl:[520,"translation-url"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
@@ -31,7 +31,11 @@ export declare class LotteryPagination {
31
31
  /**
32
32
  * Client custom styling via url content
33
33
  */
34
- clientStylingUrlContent: string;
34
+ clientStylingUrl: string;
35
+ /**
36
+ * Client custom styling via message bus
37
+ */
38
+ mbSource: string;
35
39
  /**
36
40
  * Customize pagination: Activate pagination arrows
37
41
  */
@@ -83,8 +87,11 @@ export declare class LotteryPagination {
83
87
  * Event that handles the navigation, updating the offset, limit and total values
84
88
  */
85
89
  hpPageChange: EventEmitter<any>;
86
- private limitStylingAppends;
87
90
  private stylingContainer;
91
+ private stylingSubscription;
92
+ handleClientStylingChange(newValue: any, oldValue: any): void;
93
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
94
+ handleMbSourceChange(newValue: any, oldValue: any): void;
88
95
  /**
89
96
  * Navigation logic
90
97
  */
@@ -95,8 +102,6 @@ export declare class LotteryPagination {
95
102
  paginationNavigation: (pageNumber: number, index: any) => void;
96
103
  componentWillLoad(): void;
97
104
  componentWillRender(): void;
98
- componentDidRender(): void;
99
- setClientStyling: () => void;
100
- setClientStylingURL: () => void;
105
+ componentDidLoad(): void;
101
106
  render(): any;
102
107
  }
@@ -18,7 +18,7 @@ export namespace Components {
18
18
  /**
19
19
  * Client custom styling via url content
20
20
  */
21
- "clientStylingUrlContent": string;
21
+ "clientStylingUrl": string;
22
22
  "isReset": boolean;
23
23
  /**
24
24
  * Language
@@ -28,6 +28,10 @@ export namespace Components {
28
28
  * The received limit for the number of pages
29
29
  */
30
30
  "limit": number;
31
+ /**
32
+ * Client custom styling via message bus
33
+ */
34
+ "mbSource": string;
31
35
  /**
32
36
  * Next page string value - determines if the next page is disabled or active
33
37
  */
@@ -97,7 +101,7 @@ declare namespace LocalJSX {
97
101
  /**
98
102
  * Client custom styling via url content
99
103
  */
100
- "clientStylingUrlContent"?: string;
104
+ "clientStylingUrl"?: string;
101
105
  "isReset"?: boolean;
102
106
  /**
103
107
  * Language
@@ -107,6 +111,10 @@ declare namespace LocalJSX {
107
111
  * The received limit for the number of pages
108
112
  */
109
113
  "limit"?: number;
114
+ /**
115
+ * Client custom styling via message bus
116
+ */
117
+ "mbSource"?: string;
110
118
  /**
111
119
  * Next page string value - determines if the next page is disabled or active
112
120
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-pagination",
3
- "version": "1.76.12",
3
+ "version": "1.76.13",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
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,r=(e,t)=>(0,console.error)(e,t),s=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),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){r(e)}e.length=0},b=()=>{w(d),w(y),(m=d.length>0)&&f.raf(b)},v=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function O(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>R});var k=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},T=(e,t,...n)=>{let l=null,o=!1,r=!1;const s=[],i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!j(l))&&(l+=""),o&&r?s[s.length-1].i+=l:s.push(o?W(null,l):l),r=o)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=W(e,null);return c.u=t,s.length>0&&(c.h=s),c},W=(e,t)=>({l:0,p:e,i:t,m:null,h:null,u:null}),A={},F=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>L(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},L=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},N=new WeakMap,U=e=>"sc-"+e.$,D=(e,t,n,l,r,s)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),r=q(l);t.remove(...o.filter((e=>e&&!r.includes(e)))),t.add(...r.filter((e=>e&&!o.includes(e))))}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)&&!r)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&s||r)&&!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(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||S,r=t.u||S;for(const e of z(Object.keys(o)))e in r||D(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(r)))D(l,e,o[e],r[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=(e,t,n)=>{const l=t.h[n];let o,r,s=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else if(o=l.m=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(s=0;s<l.h.length;++s)r=I(e,l,s),r&&o.appendChild(r);return o["s-hn"]=x,o},J=(e,t,n,l,o,r)=>{let s,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=r;++o)l[o]&&(s=I(null,n,o),s&&(l[o].m=s,Z(i,s,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.m;Y(t),e&&e.remove()}}},Q=(e,t)=>e.p===t.p,X=(e,t,n=!1)=>{const l=t.m=e.m,o=e.h,r=t.h,s=t.i;null===s?(_(e,t,B),null!==o&&null!==r?((e,t,n,l,o=!1)=>{let r,s=0,i=0,c=t.length-1,u=t[0],a=t[c],f=l.length-1,h=l[0],p=l[f];for(;s<=c&&i<=f;)null==u?u=t[++s]:null==a?a=t[--c]:null==h?h=l[++i]:null==p?p=l[--f]:Q(u,h)?(X(u,h,o),u=t[++s],h=l[++i]):Q(a,p)?(X(a,p,o),a=t[--c],p=l[--f]):Q(u,p)?(X(u,p,o),Z(e,u.m,a.m.nextSibling),u=t[++s],p=l[--f]):Q(a,h)?(X(a,h,o),Z(e,a.m,u.m),a=t[--c],h=l[++i]):(r=I(t&&t[i],n,i),h=l[++i],r&&Z(u.m.parentNode,r,u.m));s>c?J(e,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&K(t,s,c)})(l,o,t,r,n):null!==r?(null!==e.i&&(l.textContent=""),J(l,null,t,r,0,r.length-1)):null!==o&&K(o,0,o.length-1)):e.i!==s&&(l.data=s)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.S),g((()=>ne(e,t)));e.l|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ue(n,"componentWillLoad")),l=le(l,(()=>ue(n,"componentWillRender"))),le(l,(()=>re(e,n,t)))},le=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,r=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let r,s=N.get(e=e.head||e);if(s||N.set(e,s=new Set),!s.has(l)){{r=a.createElement("style"),r.innerHTML=o;const t=null!=(n=f.O)?n:O(a);null!=t&&r.setAttribute("nonce",t),e.insertBefore(r,e.querySelector("link"))}4&t.l&&(r.innerHTML+=c),s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);se(e,t,o,n),r&&(r.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(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.j,r=e.k||W(null,null),s=(e=>e&&e.p===A)(t)?t:T(null,null,t);if(x=l.tagName,o.C&&(s.u=s.u||{},o.C.map((([e,t])=>s.u[t]=l[e]))),n&&s.u)for(const e of Object.keys(s.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.u[e]=l[e]);s.p=null,s.l|=4,e.k=s,s.m=r.m=l.shadowRoot||l,M=l["s-sc"],X(r,s,n)})(e,t,l)}catch(t){r(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.S;ue(e.t,"componentDidRender"),64&e.l||(e.l|=64,ae(t),e.M(t),n||ce()),e.v&&(e.v(),e.v=void 0),512&e.l&&v((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(a.documentElement),v((()=>L(u,"appload",{detail:{namespace:"lottery-pagination"}})))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){r(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const s=e.prototype;if(t.P){const i=Object.entries(null!=(o=t.P)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(s,e,{get(){return((e,t)=>n(this).R.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const s=r.R.get(t),i=r.l,c=r.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.P[t][0]),8&i&&void 0!==s||l===s||Number.isNaN(s)&&Number.isNaN(l)||(r.R.set(t,l),c&&2==(18&i)&&te(r,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,o,r){f.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const l=n(this),s=null==l?void 0:l.l;if(s&&!(8&s)&&128&s&&r!==o){const n=l.t,s=null==(i=t.T)?void 0:i[e];null==s||s.forEach((t=>{null!=n[t]&&n[t].call(n,r,o,e)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...i.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const r=n[1]||e;return l.set(r,e),512&n[0]&&(null==(o=t.C)||o.push([e,r])),r}))]))}}return e},he=(e,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let v,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],$:l[1],P:l[2],W:l[3]};4&o.l&&(S=!0),o.P=l[2],o.C=[];const c=o.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,R:new Map};l.A=new Promise((e=>l.M=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.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.A)&&t.A.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.S=n);break}}l.P&&Object.entries(l.P).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.F){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.F;if(!n)return;const l=s.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(s.set(n,e),e[t])),r)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.L}" was not found`);l.isProxied||(fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){r(e)}t.l&=-9,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&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.S,c=()=>te(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);(null==e?void 0:e.t)||(null==e?void 0:e.A)&&e.A.then((()=>{}))}})()))}componentOnReady(){return n(this).A}};o.F=e[0],m.includes(c)||d.get(c)||(h.push(c),d.define(c,fe(u,o,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:O(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ce,30)))},pe=e=>f.O=e;export{he as b,F as c,T as h,h as p,l as r,pe as s}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s}from"./index-af8909e6.js";const a=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),e={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},o=(t,i)=>e[void 0!==i&&i in e?i:"en"][t],r=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.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.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0,this.limitStylingAppends=!1}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((i=>{for(let s in t[i])e[i][s]=t[i][s]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)))}componentDidRender(){this.isReset=!1,!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(a(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},o("firstPage",this.language)),s("span",{class:"NavigationIcon"})),e=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},o("previousPage",this.language)),s("span",{class:"NavigationIcon"})));a(this.userAgent)&&(e=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},o("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let r=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},o("lastPage",this.language)),s("span",{class:"NavigationIcon"})),n=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},o("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&r);return a(this.userAgent)&&(n=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},o("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&e,this.numberedNavActive&&t,this.arrowsActive&&n)}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--button-text-color, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-transparency-30, #524e52);border-radius:5px;background:var(--emw--color-gray-transparency-30, #524e52);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004D4A);border-color:var(--emw--color-primary-variant, #004D4A)}button:disabled{background-color:var(--emw--color-gray-transparency-80, #ccc);border-color:var(--emw--color-gray-transparency-80, #ccc);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}}';export{r as L}