@everymatrix/player-user-consents 1.54.12 → 1.56.0

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 = 'player-user-consents';
24
- const BUILD = /* player-user-consents */ { 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: false, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, 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: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* player-user-consents */ { 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: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, 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: true, 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.26.0 | MIT Licensed | https://stenciljs.com
@@ -868,14 +868,14 @@ var postUpdateComponent = (hostRef) => {
868
868
  const endPostUpdate = createTime("postUpdate", tagName);
869
869
  const instance = hostRef.$lazyInstance$ ;
870
870
  const ancestorComponent = hostRef.$ancestorComponent$;
871
- {
872
- safeCall(instance, "componentDidRender", void 0, elm);
873
- }
874
871
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
875
872
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
876
873
  {
877
874
  addHydratedFlag(elm);
878
875
  }
876
+ {
877
+ safeCall(instance, "componentDidLoad", void 0, elm);
878
+ }
879
879
  endPostUpdate();
880
880
  {
881
881
  hostRef.$onReadyResolve$(elm);
@@ -1189,12 +1189,17 @@ var connectedCallback = (elm) => {
1189
1189
  }
1190
1190
  };
1191
1191
  var disconnectInstance = (instance, elm) => {
1192
+ {
1193
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1194
+ }
1192
1195
  };
1193
1196
  var disconnectedCallback = async (elm) => {
1194
1197
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1195
1198
  const hostRef = getHostRef(elm);
1196
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1197
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1199
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1200
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1201
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1202
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1198
1203
  }
1199
1204
  }
1200
1205
  if (rootAppliedStyles.has(elm)) {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a0eadbd.js');
5
+ const index = require('./index-2b0d6186.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([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
11
+ return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a0eadbd.js');
5
+ const index = require('./index-2b0d6186.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -130,6 +130,63 @@ const translate = (key, customLang, values) => {
130
130
  return translation;
131
131
  };
132
132
 
133
+ /**
134
+ * @name setClientStyling
135
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
136
+ * @param {HTMLElement} stylingContainer The reference element of the widget
137
+ * @param {string} clientStyling The style content
138
+ */
139
+ function setClientStyling(stylingContainer, clientStyling) {
140
+ if (stylingContainer) {
141
+ const sheet = document.createElement('style');
142
+ sheet.innerHTML = clientStyling;
143
+ stylingContainer.appendChild(sheet);
144
+ }
145
+ }
146
+
147
+ /**
148
+ * @name setClientStylingURL
149
+ * @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
150
+ * @param {HTMLElement} stylingContainer The reference element of the widget
151
+ * @param {string} clientStylingUrl The URL of the style content
152
+ */
153
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
154
+ const url = new URL(clientStylingUrl);
155
+
156
+ fetch(url.href)
157
+ .then((res) => res.text())
158
+ .then((data) => {
159
+ const cssFile = document.createElement('style');
160
+ cssFile.innerHTML = data;
161
+ if (stylingContainer) {
162
+ stylingContainer.appendChild(cssFile);
163
+ }
164
+ })
165
+ .catch((err) => {
166
+ console.error('There was an error while trying to load client styling from URL', err);
167
+ });
168
+ }
169
+
170
+ /**
171
+ * @name setStreamLibrary
172
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
173
+ * @param {HTMLElement} stylingContainer The highest element of the widget
174
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
175
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
176
+ */
177
+ function setStreamStyling(stylingContainer, domain, subscription) {
178
+ if (window.emMessageBus) {
179
+ const sheet = document.createElement('style');
180
+
181
+ window.emMessageBus.subscribe(domain, (data) => {
182
+ sheet.innerHTML = data;
183
+ if (stylingContainer) {
184
+ stylingContainer.appendChild(sheet);
185
+ }
186
+ });
187
+ }
188
+ }
189
+
133
190
  const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";
134
191
  const PlayerUserConsentsStyle0 = playerUserConsentsCss;
135
192
 
@@ -173,38 +230,16 @@ const PlayerUserConsents = class {
173
230
  * Translation url
174
231
  */
175
232
  this.translationUrl = '';
176
- /**
177
- * the text content to be rendered by the component. Determined at runtime
178
- */
179
233
  this.textContent = '';
180
- this.limitStylingAppends = false;
181
234
  this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
182
235
  this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
183
- this.setClientStyling = () => {
184
- let sheet = document.createElement('style');
185
- sheet.innerHTML = this.clientStyling;
186
- this.stylingContainer.prepend(sheet);
187
- };
188
- this.setClientStylingURL = () => {
189
- let url = new URL(this.clientStylingUrl);
190
- let cssFile = document.createElement('style');
191
- fetch(url.href)
192
- .then((res) => res.text())
193
- .then((data) => {
194
- cssFile.innerHTML = data;
195
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
196
- })
197
- .catch((err) => {
198
- console.log('error ', err);
199
- });
200
- };
201
236
  }
202
237
  handleNewTranslations() {
203
238
  getTranslations(this.translationUrl);
204
239
  }
205
240
  handleStylingUrlChange(newValue, oldValue) {
206
241
  if (newValue !== oldValue)
207
- this.setClientStylingURL();
242
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
208
243
  }
209
244
  async componentWillLoad() {
210
245
  if (this.translationUrl.length > 2) {
@@ -217,17 +252,22 @@ const PlayerUserConsents = class {
217
252
  value: this.checkboxInput.checked
218
253
  });
219
254
  }
220
- componentDidRender() {
221
- // start custom styling area
222
- if (!this.limitStylingAppends && this.stylingContainer) {
223
- if (this.clientStylingUrl) {
224
- this.setClientStylingURL();
255
+ componentDidLoad() {
256
+ if (this.stylingContainer) {
257
+ // @ts-ignore
258
+ if (window.emMessageBus != undefined) {
259
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
260
+ }
261
+ else {
262
+ if (this.clientStyling)
263
+ setClientStyling(this.stylingContainer, this.clientStyling);
264
+ if (this.clientStylingUrl)
265
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
225
266
  }
226
- if (this.clientStyling)
227
- this.setClientStyling();
228
- this.limitStylingAppends = true;
229
267
  }
230
- // end custom styling area
268
+ }
269
+ disconnectedCallback() {
270
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
231
271
  }
232
272
  determineTextContent() {
233
273
  if (this.gmVersion === 'gmcore') {
@@ -249,7 +289,7 @@ const PlayerUserConsents = class {
249
289
  if (this.queried) {
250
290
  this.userLegislationConsentHandler();
251
291
  }
252
- return (index.h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, index.h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
292
+ return (index.h("div", { key: 'aba04e96251f2f0febe96883b931193fb5ca8c94', ref: el => this.stylingContainer = el }, index.h("p", { key: 'd3f0cbeb5b45b4538462a53c41ab041b176a7c26', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '800ab8d45e87b075402c3178e60a16866d0321d4', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '919c15c353a8146661eca2870e7a63f7c689953e', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: 'f7126adee1ba5540837da4b852961d08a9eae857', class: "MandatoryItem" }, "*"))));
253
293
  }
254
294
  static get watchers() { return {
255
295
  "translationUrl": ["handleNewTranslations"],
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a0eadbd.js');
5
+ const index = require('./index-2b0d6186.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([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
22
+ return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  export class PlayerUserConsents {
4
5
  constructor() {
5
6
  /**
@@ -38,38 +39,16 @@ export class PlayerUserConsents {
38
39
  * Translation url
39
40
  */
40
41
  this.translationUrl = '';
41
- /**
42
- * the text content to be rendered by the component. Determined at runtime
43
- */
44
42
  this.textContent = '';
45
- this.limitStylingAppends = false;
46
43
  this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
47
44
  this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
48
- this.setClientStyling = () => {
49
- let sheet = document.createElement('style');
50
- sheet.innerHTML = this.clientStyling;
51
- this.stylingContainer.prepend(sheet);
52
- };
53
- this.setClientStylingURL = () => {
54
- let url = new URL(this.clientStylingUrl);
55
- let cssFile = document.createElement('style');
56
- fetch(url.href)
57
- .then((res) => res.text())
58
- .then((data) => {
59
- cssFile.innerHTML = data;
60
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
61
- })
62
- .catch((err) => {
63
- console.log('error ', err);
64
- });
65
- };
66
45
  }
67
46
  handleNewTranslations() {
68
47
  getTranslations(this.translationUrl);
69
48
  }
70
49
  handleStylingUrlChange(newValue, oldValue) {
71
50
  if (newValue !== oldValue)
72
- this.setClientStylingURL();
51
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
73
52
  }
74
53
  async componentWillLoad() {
75
54
  if (this.translationUrl.length > 2) {
@@ -82,17 +61,22 @@ export class PlayerUserConsents {
82
61
  value: this.checkboxInput.checked
83
62
  });
84
63
  }
85
- componentDidRender() {
86
- // start custom styling area
87
- if (!this.limitStylingAppends && this.stylingContainer) {
88
- if (this.clientStylingUrl) {
89
- this.setClientStylingURL();
64
+ componentDidLoad() {
65
+ if (this.stylingContainer) {
66
+ // @ts-ignore
67
+ if (window.emMessageBus != undefined) {
68
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
69
+ }
70
+ else {
71
+ if (this.clientStyling)
72
+ setClientStyling(this.stylingContainer, this.clientStyling);
73
+ if (this.clientStylingUrl)
74
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
90
75
  }
91
- if (this.clientStyling)
92
- this.setClientStyling();
93
- this.limitStylingAppends = true;
94
76
  }
95
- // end custom styling area
77
+ }
78
+ disconnectedCallback() {
79
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
96
80
  }
97
81
  determineTextContent() {
98
82
  if (this.gmVersion === 'gmcore') {
@@ -114,7 +98,7 @@ export class PlayerUserConsents {
114
98
  if (this.queried) {
115
99
  this.userLegislationConsentHandler();
116
100
  }
117
- return (h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
101
+ return (h("div", { key: 'aba04e96251f2f0febe96883b931193fb5ca8c94', ref: el => this.stylingContainer = el }, h("p", { key: 'd3f0cbeb5b45b4538462a53c41ab041b176a7c26', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '800ab8d45e87b075402c3178e60a16866d0321d4', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '919c15c353a8146661eca2870e7a63f7c689953e', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'f7126adee1ba5540837da4b852961d08a9eae857', class: "MandatoryItem" }, "*"))));
118
102
  }
119
103
  static get is() { return "player-user-consents"; }
120
104
  static get encapsulation() { return "shadow"; }
@@ -309,13 +293,31 @@ export class PlayerUserConsents {
309
293
  "attribute": "translation-url",
310
294
  "reflect": true,
311
295
  "defaultValue": "''"
296
+ },
297
+ "mbSource": {
298
+ "type": "string",
299
+ "mutable": false,
300
+ "complexType": {
301
+ "original": "string",
302
+ "resolved": "string",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "the text content to be rendered by the component. Determined at runtime"
310
+ },
311
+ "getter": false,
312
+ "setter": false,
313
+ "attribute": "mb-source",
314
+ "reflect": true
312
315
  }
313
316
  };
314
317
  }
315
318
  static get states() {
316
319
  return {
317
- "textContent": {},
318
- "limitStylingAppends": {}
320
+ "textContent": {}
319
321
  };
320
322
  }
321
323
  static get events() {
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'player-user-consents';
2
- const BUILD = /* player-user-consents */ { 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: false, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, 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: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* player-user-consents */ { 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: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, 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: true, 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.26.0 | MIT Licensed | https://stenciljs.com
@@ -846,14 +846,14 @@ var postUpdateComponent = (hostRef) => {
846
846
  const endPostUpdate = createTime("postUpdate", tagName);
847
847
  const instance = hostRef.$lazyInstance$ ;
848
848
  const ancestorComponent = hostRef.$ancestorComponent$;
849
- {
850
- safeCall(instance, "componentDidRender", void 0, elm);
851
- }
852
849
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
853
850
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
854
851
  {
855
852
  addHydratedFlag(elm);
856
853
  }
854
+ {
855
+ safeCall(instance, "componentDidLoad", void 0, elm);
856
+ }
857
857
  endPostUpdate();
858
858
  {
859
859
  hostRef.$onReadyResolve$(elm);
@@ -1167,12 +1167,17 @@ var connectedCallback = (elm) => {
1167
1167
  }
1168
1168
  };
1169
1169
  var disconnectInstance = (instance, elm) => {
1170
+ {
1171
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1172
+ }
1170
1173
  };
1171
1174
  var disconnectedCallback = async (elm) => {
1172
1175
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1173
1176
  const hostRef = getHostRef(elm);
1174
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1175
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1177
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1178
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1179
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1180
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1176
1181
  }
1177
1182
  }
1178
1183
  if (rootAppliedStyles.has(elm)) {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-d33945fb.js';
2
- export { s as setNonce } from './index-d33945fb.js';
1
+ import { b as bootstrapLazy } from './index-ddeaee0b.js';
2
+ export { s as setNonce } from './index-ddeaee0b.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([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
8
+ return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-d33945fb.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-ddeaee0b.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -126,6 +126,63 @@ const translate = (key, customLang, values) => {
126
126
  return translation;
127
127
  };
128
128
 
129
+ /**
130
+ * @name setClientStyling
131
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
132
+ * @param {HTMLElement} stylingContainer The reference element of the widget
133
+ * @param {string} clientStyling The style content
134
+ */
135
+ function setClientStyling(stylingContainer, clientStyling) {
136
+ if (stylingContainer) {
137
+ const sheet = document.createElement('style');
138
+ sheet.innerHTML = clientStyling;
139
+ stylingContainer.appendChild(sheet);
140
+ }
141
+ }
142
+
143
+ /**
144
+ * @name setClientStylingURL
145
+ * @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
146
+ * @param {HTMLElement} stylingContainer The reference element of the widget
147
+ * @param {string} clientStylingUrl The URL of the style content
148
+ */
149
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
150
+ const url = new URL(clientStylingUrl);
151
+
152
+ fetch(url.href)
153
+ .then((res) => res.text())
154
+ .then((data) => {
155
+ const cssFile = document.createElement('style');
156
+ cssFile.innerHTML = data;
157
+ if (stylingContainer) {
158
+ stylingContainer.appendChild(cssFile);
159
+ }
160
+ })
161
+ .catch((err) => {
162
+ console.error('There was an error while trying to load client styling from URL', err);
163
+ });
164
+ }
165
+
166
+ /**
167
+ * @name setStreamLibrary
168
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
169
+ * @param {HTMLElement} stylingContainer The highest element of the widget
170
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
171
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
172
+ */
173
+ function setStreamStyling(stylingContainer, domain, subscription) {
174
+ if (window.emMessageBus) {
175
+ const sheet = document.createElement('style');
176
+
177
+ window.emMessageBus.subscribe(domain, (data) => {
178
+ sheet.innerHTML = data;
179
+ if (stylingContainer) {
180
+ stylingContainer.appendChild(sheet);
181
+ }
182
+ });
183
+ }
184
+ }
185
+
129
186
  const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";
130
187
  const PlayerUserConsentsStyle0 = playerUserConsentsCss;
131
188
 
@@ -169,38 +226,16 @@ const PlayerUserConsents = class {
169
226
  * Translation url
170
227
  */
171
228
  this.translationUrl = '';
172
- /**
173
- * the text content to be rendered by the component. Determined at runtime
174
- */
175
229
  this.textContent = '';
176
- this.limitStylingAppends = false;
177
230
  this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
178
231
  this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
179
- this.setClientStyling = () => {
180
- let sheet = document.createElement('style');
181
- sheet.innerHTML = this.clientStyling;
182
- this.stylingContainer.prepend(sheet);
183
- };
184
- this.setClientStylingURL = () => {
185
- let url = new URL(this.clientStylingUrl);
186
- let cssFile = document.createElement('style');
187
- fetch(url.href)
188
- .then((res) => res.text())
189
- .then((data) => {
190
- cssFile.innerHTML = data;
191
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
192
- })
193
- .catch((err) => {
194
- console.log('error ', err);
195
- });
196
- };
197
232
  }
198
233
  handleNewTranslations() {
199
234
  getTranslations(this.translationUrl);
200
235
  }
201
236
  handleStylingUrlChange(newValue, oldValue) {
202
237
  if (newValue !== oldValue)
203
- this.setClientStylingURL();
238
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
204
239
  }
205
240
  async componentWillLoad() {
206
241
  if (this.translationUrl.length > 2) {
@@ -213,17 +248,22 @@ const PlayerUserConsents = class {
213
248
  value: this.checkboxInput.checked
214
249
  });
215
250
  }
216
- componentDidRender() {
217
- // start custom styling area
218
- if (!this.limitStylingAppends && this.stylingContainer) {
219
- if (this.clientStylingUrl) {
220
- this.setClientStylingURL();
251
+ componentDidLoad() {
252
+ if (this.stylingContainer) {
253
+ // @ts-ignore
254
+ if (window.emMessageBus != undefined) {
255
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
256
+ }
257
+ else {
258
+ if (this.clientStyling)
259
+ setClientStyling(this.stylingContainer, this.clientStyling);
260
+ if (this.clientStylingUrl)
261
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
221
262
  }
222
- if (this.clientStyling)
223
- this.setClientStyling();
224
- this.limitStylingAppends = true;
225
263
  }
226
- // end custom styling area
264
+ }
265
+ disconnectedCallback() {
266
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
227
267
  }
228
268
  determineTextContent() {
229
269
  if (this.gmVersion === 'gmcore') {
@@ -245,7 +285,7 @@ const PlayerUserConsents = class {
245
285
  if (this.queried) {
246
286
  this.userLegislationConsentHandler();
247
287
  }
248
- return (h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
288
+ return (h("div", { key: 'aba04e96251f2f0febe96883b931193fb5ca8c94', ref: el => this.stylingContainer = el }, h("p", { key: 'd3f0cbeb5b45b4538462a53c41ab041b176a7c26', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '800ab8d45e87b075402c3178e60a16866d0321d4', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '919c15c353a8146661eca2870e7a63f7c689953e', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'f7126adee1ba5540837da4b852961d08a9eae857', class: "MandatoryItem" }, "*"))));
249
289
  }
250
290
  static get watchers() { return {
251
291
  "translationUrl": ["handleNewTranslations"],
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-d33945fb.js';
2
- export { s as setNonce } from './index-d33945fb.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-ddeaee0b.js';
2
+ export { s as setNonce } from './index-ddeaee0b.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([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
19
+ return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
20
20
  });
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./p-97e255e9.js";const a={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{let n=(s=a[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),s));var s;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n};function r(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const o=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.textContent="",this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"})}handleNewTranslations(){n(this.translationUrl)}handleStylingUrlChange(t,e){t!==e&&r(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&function(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)),s("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,s("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,s(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"aba04e96251f2f0febe96883b931193fb5ca8c94",ref:t=>this.stylingContainer=t},i("p",{key:"d3f0cbeb5b45b4538462a53c41ab041b176a7c26",class:"ConsentTitle"},this.consentTitle),i("label",{key:"800ab8d45e87b075402c3178e60a16866d0321d4",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"919c15c353a8146661eca2870e7a63f7c689953e",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"f7126adee1ba5540837da4b852961d08a9eae857",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};o.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";export{o as player_user_consents}
@@ -1,2 +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),i=new Map,r=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=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w($):f.raf($))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{b(m),b(y),(p=m.length>0)&&f.raf($)},w=e=>h().then(e),S=v(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(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:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return k(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],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&&!g(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?R(null,l):l),i=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=R(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=o,u},R=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),A={},N=(e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e,T=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>D(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},D=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},H=new WeakMap,L=e=>"sc-"+e.$,U=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=F(n);let s=F(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(r||"o"!==t[0]||"n"!==t[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]!==l&&(e[t]=l);else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},W=/\s/,F=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(W):[]),V="Capture",q=RegExp(V+"$"),G=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||{},s=t.u||{};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,i=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.m),G(null,l,z),l.h)for(i=0;i<l.h.length;++i)s=B(e,l,i),s&&o.appendChild(s);return o["s-hn"]=C,o},I=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,Y(r,i,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;X(t),e&&e.remove()}}},K=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),Q=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,i=t.i;null===i?(G(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=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(;r<=f&&c<=p;)if(null==h)h=t[++r];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[++r],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.v,d.v.nextSibling),h=t[++r],y=l[--p];else if(K(d,m,o))Q(d,m,o),Y(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=B(t&&t[c],n,u):(Q(i,m,o),t[u]=void 0,s=i.v),m=l[++c]):(s=B(t&&t[c],n,c),m=l[++c]),s&&Y(h.v.parentNode,s,h.v)}r>f?I(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&J(t,r,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!==i&&(l.data=i)},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)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.S=()=>{t["s-p"].splice(n-1,1),l()})))}},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.j),S((()=>te(e,t)));e.l|=512},te=(e,t)=>{const n=e.$hostElement$,l=e.t;if(!l)throw Error(`Can't render component <${n.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 o;return t&&(o=ce(l,"componentWillLoad",void 0,n)),ne(o,(()=>oe(e,l,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=L(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=H.get(e=e.head||e);if(i||H.set(e,i=new Set),!i.has(l)){{s=document.querySelector(`[sty-id="${l}"]`)||a.createElement("style"),s.innerHTML=o;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),i&&i.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||128&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=()=>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.O,s=e.C||R(null,null),i=(e=>e&&e.m===A)(t)?t:P(null,null,t);if(C=l.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.m=null,i.l|=4,e.C=i,i.v=s.v=l.shadowRoot||l,Q(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.j;ce(e.t,"componentDidRender",void 0,t),64&e.l||(e.l|=64,ue(t),e.P(t),n||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>ee(e,!1))),e.l&=-517},re=()=>{w((()=>D(u,"appload",{detail:{namespace:"player-user-consents"}})))},ce=(e,t,n,l)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,l)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l,o)=>{const i=n(e);if(!i)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 r=i.$hostElement$,c=i.R.get(t),u=i.l,a=i.t;if(l=N(l,o.A[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.R.set(t,l),a)){if(o.N&&128&u){const e=o.N[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&ee(i,!1)}},fe=(e,t,l)=>{var o,s;const i=e.prototype;if(t.A||t.N||e.watchers){e.watchers&&!t.N&&(t.N=e.watchers);const r=Object.entries(null!=(o=t.A)?o:{});if(r.map((([e,[o]])=>{if(31&o||2&l&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.A[e][0]|=2048),r&&(t.A[e][0]|=4096),(1&l||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.A[e][0]))return((e,t)=>n(this).R.get(t))(0,e);const l=n(this),o=l?l.t:i;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&o?this[e]:i.$hostElement$[e];return void 0===n&&i.R.get(e)?s=i.R.get(e):!i.R.get(e)&&n&&i.R.set(e,n),r.call(this,N(s,o)),void ae(this,e,s=32&o?this[e]:i.$hostElement$[e],t)}{if(!(1&l&&4096&t.A[e][0]))return ae(this,e,s,t),void(1&l&&!i.t&&i.T.then((()=>{4096&t.A[e][0]&&i.t[e]!==i.R.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.R.get(e)&&n&&i.R.set(e,n),i.t[e]=N(s,o),ae(this,e,i.t[e],t)};i.t?n():i.T.then((()=>n()))}}})}})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.N)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.N)?s:{}),...r.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.M)||o.push([e,s])),s}))]))}}return e},he=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),b=a.createElement("style"),$=[];let w,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],A:l[2],D:l[3]};4&c.l&&(g=!0),c.A=l[2],c.M=[],c.N=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,R:new Map};l.T=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?$.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.T)&&t.T.then((()=>{}));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.H){const o=((e,t)=>{const n=e.$.replace(/-/g,"_"),l=e.H;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((e=>(i.set(l,e),e[n])),(e=>{s(e,t.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(o&&"then"in o){const e=()=>{};l=await o,e()}else l=o;if(!l)throw Error(`Constructor for "${n.$}#${t.L}" was not found`);l.isProxied||(n.N=l.watchers,fe(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(t){s(t,e)}t.l&=-9,t.l|=128,r()}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=L(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.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 e=>{if(!(1&f.l)){const t=n(e);(null==t?void 0:t.t)||(null==t?void 0:t.T)&&t.T.then((()=>{}))}H.has(e)&&H.delete(e),e.shadowRoot&&H.has(e.shadowRoot)&&H.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this),l=$.findIndex((e=>e===this));l>-1&&$.splice(l,1),(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).T}};c.H=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,fe(a,c,1)))}))})),h.length>0&&(g&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.k)?o:j(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,v?v.nextSibling:y.firstChild)}S=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(re,30)))},de=e=>f.k=e;export{he as b,T as c,P as h,h as p,l as r,de as s}
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),i=new Map,r=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=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w($):f.raf($))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{b(m),b(y),(p=m.length>0)&&f.raf($)},w=e=>h().then(e),S=v(y,!0),g=e=>"object"==(e=typeof e)||"function"===e;function j(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:()=>E,ok:()=>k,unwrap:()=>M,unwrapErr:()=>x});var k=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function E(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 O(e.value);throw"should never get here"}var C,M=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},P=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],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&&!g(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?A(null,l):l),i=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,r.length>0&&(u.h=r),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},N=(e,t)=>null==e||g(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e,R=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>T(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},T=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},D=new WeakMap,H=e=>"sc-"+e.$,U=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=F(n);let s=F(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(r||"o"!==t[0]||"n"!==t[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]!==l&&(e[t]=l);else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(V);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},W=/\s/,F=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(W):[]),V="Capture",q=RegExp(V+"$"),G=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||{},s=t.u||{};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,i=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.m),G(null,l,z),l.h)for(i=0;i<l.h.length;++i)s=B(e,l,i),s&&o.appendChild(s);return o["s-hn"]=C,o},I=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,Y(r,i,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;X(t),e&&e.remove()}}},K=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),Q=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,i=t.i;null===i?(G(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=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(;r<=f&&c<=p;)if(null==h)h=t[++r];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[++r],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.v,d.v.nextSibling),h=t[++r],y=l[--p];else if(K(d,m,o))Q(d,m,o),Y(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(i=t[u],i.m!==m.m?s=B(t&&t[c],n,u):(Q(i,m,o),t[u]=void 0,s=i.v),m=l[++c]):(s=B(t&&t[c],n,c),m=l[++c]),s&&Y(h.v.parentNode,s,h.v)}r>f?I(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&J(t,r,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!==i&&(l.data=i)},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)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.S=()=>{t["s-p"].splice(n-1,1),l()})))}},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.j),S((()=>te(e,t)));e.l|=512},te=(e,t)=>{const n=e.$hostElement$,l=e.t;if(!l)throw Error(`Can't render component <${n.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 o;return t&&(o=ce(l,"componentWillLoad",void 0,n)),ne(o,(()=>oe(e,l,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.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=H(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=D.get(e=e.head||e);if(i||D.set(e,i=new Set),!i.has(l)){{s=document.querySelector(`[sty-id="${l}"]`)||a.createElement("style"),s.innerHTML=o;const i=null!=(n=f.O)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),i&&i.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||128&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=()=>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.k,s=e.C||A(null,null),i=(e=>e&&e.m===L)(t)?t:P(null,null,t);if(C=l.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.m=null,i.l|=4,e.C=i,i.v=s.v=l.shadowRoot||l,Q(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ue(t),ce(n,"componentDidLoad",void 0,t),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>ee(e,!1))),e.l&=-517},re=()=>{w((()=>T(u,"appload",{detail:{namespace:"player-user-consents"}})))},ce=(e,t,n,l)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e,l)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l,o)=>{const i=n(e);if(!i)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 r=i.$hostElement$,c=i.A.get(t),u=i.l,a=i.t;if(l=N(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.A.set(t,l),a)){if(o.N&&128&u){const e=o.N[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&ee(i,!1)}},fe=(e,t,l)=>{var o,s;const i=e.prototype;if(t.L||t.N||e.watchers){e.watchers&&!t.N&&(t.N=e.watchers);const r=Object.entries(null!=(o=t.L)?o:{});if(r.map((([e,[o]])=>{if(31&o||2&l&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,e)||{};s&&(t.L[e][0]|=2048),r&&(t.L[e][0]|=4096),(1&l||!s)&&Object.defineProperty(i,e,{get(){{if(!(2048&t.L[e][0]))return((e,t)=>n(this).A.get(t))(0,e);const l=n(this),o=l?l.t:i;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(s){const i=n(this);if(r){const n=32&o?this[e]:i.$hostElement$[e];return void 0===n&&i.A.get(e)?s=i.A.get(e):!i.A.get(e)&&n&&i.A.set(e,n),r.call(this,N(s,o)),void ae(this,e,s=32&o?this[e]:i.$hostElement$[e],t)}{if(!(1&l&&4096&t.L[e][0]))return ae(this,e,s,t),void(1&l&&!i.t&&i.R.then((()=>{4096&t.L[e][0]&&i.t[e]!==i.A.get(e)&&(i.t[e]=s)})));const n=()=>{const n=i.t[e];!i.A.get(e)&&n&&i.A.set(e,n),i.t[e]=N(s,o),ae(this,e,i.t[e],t)};i.t?n():i.R.then((()=>n()))}}})}})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.N)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.N)?s:{}),...r.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.M)||o.push([e,s])),s}))]))}}return e},he=(e,t)=>{ce(e,"disconnectedCallback",void 0,t||e)},de=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),b=a.createElement("style"),$=[];let w,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],L:l[2],T:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.N=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,A:new Map};l.R=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),S?$.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.R)&&t.R.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.j=n);break}}l.L&&Object.entries(l.L).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.D){const o=((e,t)=>{const n=e.$.replace(/-/g,"_"),l=e.D;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((e=>(i.set(l,e),e[n])),(e=>{s(e,t.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(o&&"then"in o){const e=()=>{};l=await o,e()}else l=o;if(!l)throw Error(`Constructor for "${n.$}#${t.H}" was not found`);l.isProxied||(n.N=l.watchers,fe(l,n,2),l.isProxied=!0);const r=()=>{};t.l|=8;try{new l(t)}catch(t){s(t,e)}t.l&=-9,t.l|=128,r()}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=H(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.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 e=>{if(!(1&f.l)){const t=n(e);(null==t?void 0:t.t)?he(t.t,e):(null==t?void 0:t.R)&&t.R.then((()=>he(t.t,e)))}D.has(e)&&D.delete(e),e.shadowRoot&&D.has(e.shadowRoot)&&D.delete(e.shadowRoot)})(this))),f.raf((()=>{var e;const t=n(this),l=$.findIndex((e=>e===this));l>-1&&$.splice(l,1),(null==(e=null==t?void 0:t.C)?void 0:e.v)instanceof Node&&!t.C.v.isConnected&&delete t.C.v}))}componentOnReady(){return n(this).R}};c.D=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,fe(a,c,1)))}))})),h.length>0&&(g&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,v?v.nextSibling:y.firstChild)}S=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(re,30)))},pe=e=>f.O=e;export{de as b,R as c,P as h,h as p,l as r,pe as s}
@@ -1 +1 @@
1
- import{p as n,b as t}from"./p-e16d0bad.js";export{s as setNonce}from"./p-e16d0bad.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-1475dc71",[[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
1
+ import{p as n,b as t}from"./p-97e255e9.js";export{s as setNonce}from"./p-97e255e9.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-2ea10158",[[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],mbSource:[513,"mb-source"],textContent:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
@@ -39,10 +39,11 @@ export declare class PlayerUserConsents {
39
39
  /**
40
40
  * the text content to be rendered by the component. Determined at runtime
41
41
  */
42
+ mbSource: string;
42
43
  textContent: any;
43
- private limitStylingAppends;
44
44
  private checkboxInput;
45
45
  private stylingContainer;
46
+ private stylingSubscription;
46
47
  handleNewTranslations(): void;
47
48
  handleStylingUrlChange(newValue: string, oldValue: string): void;
48
49
  componentWillLoad(): Promise<void>;
@@ -50,9 +51,8 @@ export declare class PlayerUserConsents {
50
51
  goToPrivacyPolicy: () => void;
51
52
  userLegislationConsent: EventEmitter<object>;
52
53
  userLegislationConsentHandler(): void;
53
- setClientStyling: () => void;
54
- setClientStylingURL: () => void;
55
- componentDidRender(): void;
54
+ componentDidLoad(): void;
55
+ disconnectedCallback(): void;
56
56
  determineTextContent(): any;
57
57
  render(): any;
58
58
  }
@@ -35,6 +35,10 @@ export namespace Components {
35
35
  * wether or not this consent is mandatory. Used for render details
36
36
  */
37
37
  "mandatory": boolean;
38
+ /**
39
+ * the text content to be rendered by the component. Determined at runtime
40
+ */
41
+ "mbSource": string;
38
42
  /**
39
43
  * 'true' when parent expects component to emit it's current value
40
44
  */
@@ -101,6 +105,10 @@ declare namespace LocalJSX {
101
105
  * wether or not this consent is mandatory. Used for render details
102
106
  */
103
107
  "mandatory"?: boolean;
108
+ /**
109
+ * the text content to be rendered by the component. Determined at runtime
110
+ */
111
+ "mbSource"?: string;
104
112
  "onUserLegislationConsent"?: (event: PlayerUserConsentsCustomEvent<object>) => void;
105
113
  /**
106
114
  * 'true' when parent expects component to emit it's current value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-user-consents",
3
- "version": "1.54.12",
3
+ "version": "1.56.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-e16d0bad.js";const a={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{let n=(s=a[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),s));var s;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},r=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){n(this.translationUrl)}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStylingUrl&&this.setClientStylingURL(),this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)),s("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,s("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,s(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"54601e536a075b95277641c2d123f21fb5b9a9e8",ref:t=>this.stylingContainer=t},i("p",{key:"8cceca5a2a2e69a4180e10848d0fea081fe7a78a",class:"ConsentTitle"},this.consentTitle),i("label",{key:"80f41a7876f3831c1030cba896282290f33c14b3",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"7db0bada1af6d9df763f63a4eb92e79615322801",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"ce67fcdf09cfefb48df87d043950fd4fba7fdb00",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};r.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";export{r as player_user_consents}