@everymatrix/general-styling-wrapper 1.69.0 → 1.69.3

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0608126f.js');
5
+ const index = require('./index-b3134cb5.js');
6
6
 
7
7
  const mergeTranslations = (url, target) => {
8
8
  return new Promise((resolve) => {
@@ -29,10 +29,71 @@ const mergeTranslations = (url, target) => {
29
29
  });
30
30
  });
31
31
  resolve(true);
32
+ })
33
+ .catch(err => {
34
+ console.error("Failed to load translations:", err);
35
+ resolve(false);
32
36
  });
33
37
  });
34
38
  };
35
39
 
40
+ /**
41
+ * @name setClientStyling
42
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
43
+ * @param {HTMLElement} stylingContainer The reference element of the widget
44
+ * @param {string} clientStyling The style content
45
+ */
46
+ function setClientStyling(stylingContainer, clientStyling) {
47
+ if (stylingContainer) {
48
+ const sheet = document.createElement('style');
49
+ sheet.innerHTML = clientStyling;
50
+ stylingContainer.appendChild(sheet);
51
+ }
52
+ }
53
+
54
+ /**
55
+ * @name setClientStylingURL
56
+ * @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
57
+ * @param {HTMLElement} stylingContainer The reference element of the widget
58
+ * @param {string} clientStylingUrl The URL of the style content
59
+ */
60
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
61
+ const url = new URL(clientStylingUrl);
62
+
63
+ fetch(url.href)
64
+ .then((res) => res.text())
65
+ .then((data) => {
66
+ const cssFile = document.createElement('style');
67
+ cssFile.innerHTML = data;
68
+ if (stylingContainer) {
69
+ stylingContainer.appendChild(cssFile);
70
+ }
71
+ })
72
+ .catch((err) => {
73
+ console.error('There was an error while trying to load client styling from URL', err);
74
+ });
75
+ }
76
+
77
+ /**
78
+ * @name setStreamLibrary
79
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
80
+ * @param {HTMLElement} stylingContainer The highest element of the widget
81
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
82
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
83
+ */
84
+ function setStreamStyling(stylingContainer, domain, subscription) {
85
+ if (window.emMessageBus) {
86
+ const sheet = document.createElement('style');
87
+
88
+ window.emMessageBus.subscribe(domain, (data) => {
89
+ sheet.innerHTML = data;
90
+ if (stylingContainer) {
91
+ stylingContainer.appendChild(sheet);
92
+ }
93
+ });
94
+ }
95
+ }
96
+
36
97
  const generalStylingWrapperCss = ":host{display:block}";
37
98
  const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
38
99
 
@@ -40,38 +101,47 @@ const GeneralStylingWrapper = class {
40
101
  constructor(hostRef) {
41
102
  index.registerInstance(this, hostRef);
42
103
  this.stylingAppends = false;
43
- this.setClientStyling = () => {
44
- let sheet = document.createElement('style');
45
- sheet.innerHTML = this.clientStyling;
46
- this.el.prepend(sheet);
47
- };
48
- this.setClientStylingURL = () => {
49
- let url = new URL(this.clientStylingUrl);
50
- let cssFile = document.createElement('style');
51
- fetch(url.href)
52
- .then((res) => res.text())
53
- .then((data) => {
54
- cssFile.innerHTML = data;
55
- setTimeout(() => {
56
- this.el.prepend(cssFile);
57
- }, 1);
58
- })
59
- .catch((err) => {
60
- console.log('error ', err);
61
- });
62
- };
63
104
  this.clientStyling = '';
64
105
  this.clientStylingUrl = '';
106
+ this.mbSource = undefined;
65
107
  this.translationUrl = '';
66
108
  this.targetTranslations = undefined;
67
109
  }
110
+ componentDidLoad() {
111
+ if (this.el) {
112
+ if (window.emMessageBus != undefined) {
113
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
114
+ }
115
+ else {
116
+ if (this.clientStyling)
117
+ setClientStyling(this.el, this.clientStyling);
118
+ if (this.clientStylingUrl)
119
+ setClientStylingURL(this.el, this.clientStylingUrl);
120
+ this.stylingAppends = true;
121
+ }
122
+ }
123
+ }
124
+ disconnectedCallback() {
125
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
126
+ }
127
+ handleClientStylingChange(newValue, oldValue) {
128
+ if (newValue != oldValue) {
129
+ setClientStyling(this.el, this.clientStyling);
130
+ }
131
+ }
132
+ handleClientStylingUrlChange(newValue, oldValue) {
133
+ if (newValue != oldValue) {
134
+ if (this.clientStylingUrl)
135
+ setClientStylingURL(this.el, this.clientStylingUrl);
136
+ }
137
+ }
68
138
  componentDidRender() {
69
139
  // start custom styling area
70
140
  if (!this.stylingAppends) {
71
141
  if (this.clientStyling)
72
- this.setClientStyling();
142
+ setClientStyling(this.el, this.clientStyling);
73
143
  if (this.clientStylingUrl)
74
- this.setClientStylingURL();
144
+ setClientStylingURL(this.el, this.clientStylingUrl);
75
145
  this.stylingAppends = true;
76
146
  }
77
147
  // end custom styling area
@@ -85,9 +155,13 @@ const GeneralStylingWrapper = class {
85
155
  return await Promise.all(promises);
86
156
  }
87
157
  render() {
88
- return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
158
+ return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
89
159
  }
90
160
  get el() { return index.getElement(this); }
161
+ static get watchers() { return {
162
+ "clientStyling": ["handleClientStylingChange"],
163
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
164
+ }; }
91
165
  };
92
166
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
93
167
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0608126f.js');
5
+ const index = require('./index-b3134cb5.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([["general-styling-wrapper.cjs",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
22
+ return index.bootstrapLazy([["general-styling-wrapper.cjs",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'general-styling-wrapper';
24
- const BUILD = /* general-styling-wrapper */ { 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: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, 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: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -984,6 +984,9 @@ var postUpdateComponent = (hostRef) => {
984
984
  {
985
985
  addHydratedFlag(elm);
986
986
  }
987
+ {
988
+ safeCall(instance, "componentDidLoad");
989
+ }
987
990
  endPostUpdate();
988
991
  {
989
992
  hostRef.$onReadyResolve$(elm);
@@ -1035,6 +1038,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1035
1038
  `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).`
1036
1039
  );
1037
1040
  }
1041
+ const elm = hostRef.$hostElement$ ;
1038
1042
  const oldVal = hostRef.$instanceValues$.get(propName);
1039
1043
  const flags = hostRef.$flags$;
1040
1044
  const instance = hostRef.$lazyInstance$ ;
@@ -1044,6 +1048,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1044
1048
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1045
1049
  hostRef.$instanceValues$.set(propName, newVal);
1046
1050
  if (instance) {
1051
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1052
+ const watchMethods = cmpMeta.$watchers$[propName];
1053
+ if (watchMethods) {
1054
+ watchMethods.map((watchMethodName) => {
1055
+ try {
1056
+ instance[watchMethodName](newVal, oldVal, propName);
1057
+ } catch (e) {
1058
+ consoleError(e, elm);
1059
+ }
1060
+ });
1061
+ }
1062
+ }
1047
1063
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1048
1064
  scheduleUpdate(hostRef, false);
1049
1065
  }
@@ -1055,7 +1071,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1055
1071
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1056
1072
  var _a, _b;
1057
1073
  const prototype = Cstr.prototype;
1058
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
1074
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1075
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1076
+ cmpMeta.$watchers$ = Cstr.watchers;
1077
+ }
1059
1078
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1060
1079
  members.map(([memberName, [memberFlags]]) => {
1061
1080
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1133,6 +1152,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1133
1152
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1134
1153
  }
1135
1154
  if (!Cstr.isProxied) {
1155
+ {
1156
+ cmpMeta.$watchers$ = Cstr.watchers;
1157
+ }
1136
1158
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1137
1159
  Cstr.isProxied = true;
1138
1160
  }
@@ -1148,6 +1170,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1148
1170
  {
1149
1171
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1150
1172
  }
1173
+ {
1174
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1175
+ }
1151
1176
  endNewInstance();
1152
1177
  } else {
1153
1178
  Cstr = elm.constructor;
@@ -1229,12 +1254,17 @@ var setContentReference = (elm) => {
1229
1254
  insertBefore(elm, contentRefElm, elm.firstChild);
1230
1255
  };
1231
1256
  var disconnectInstance = (instance) => {
1257
+ {
1258
+ safeCall(instance, "disconnectedCallback");
1259
+ }
1232
1260
  };
1233
1261
  var disconnectedCallback = async (elm) => {
1234
1262
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1235
1263
  const hostRef = getHostRef(elm);
1236
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1237
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1264
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1265
+ disconnectInstance(hostRef.$lazyInstance$);
1266
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1267
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1238
1268
  }
1239
1269
  }
1240
1270
  };
@@ -1257,6 +1287,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1257
1287
  let hasSlotRelocation = false;
1258
1288
  lazyBundles.map((lazyBundle) => {
1259
1289
  lazyBundle[1].map((compactMeta) => {
1290
+ var _a2;
1260
1291
  const cmpMeta = {
1261
1292
  $flags$: compactMeta[0],
1262
1293
  $tagName$: compactMeta[1],
@@ -1269,6 +1300,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1269
1300
  {
1270
1301
  cmpMeta.$members$ = compactMeta[2];
1271
1302
  }
1303
+ {
1304
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1305
+ }
1272
1306
  const tagName = cmpMeta.$tagName$;
1273
1307
  const HostElement = class extends HTMLElement {
1274
1308
  // StencilLazyHost
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-0608126f.js');
5
+ const index = require('./index-b3134cb5.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([["general-styling-wrapper.cjs",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
11
+ return index.bootstrapLazy([["general-styling-wrapper.cjs",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -1,40 +1,50 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { mergeTranslations } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  export class GeneralStylingWrapper {
4
5
  constructor() {
5
6
  this.stylingAppends = false;
6
- this.setClientStyling = () => {
7
- let sheet = document.createElement('style');
8
- sheet.innerHTML = this.clientStyling;
9
- this.el.prepend(sheet);
10
- };
11
- this.setClientStylingURL = () => {
12
- let url = new URL(this.clientStylingUrl);
13
- let cssFile = document.createElement('style');
14
- fetch(url.href)
15
- .then((res) => res.text())
16
- .then((data) => {
17
- cssFile.innerHTML = data;
18
- setTimeout(() => {
19
- this.el.prepend(cssFile);
20
- }, 1);
21
- })
22
- .catch((err) => {
23
- console.log('error ', err);
24
- });
25
- };
26
7
  this.clientStyling = '';
27
8
  this.clientStylingUrl = '';
9
+ this.mbSource = undefined;
28
10
  this.translationUrl = '';
29
11
  this.targetTranslations = undefined;
30
12
  }
13
+ componentDidLoad() {
14
+ if (this.el) {
15
+ if (window.emMessageBus != undefined) {
16
+ setStreamStyling(this.el, `${this.mbSource}.Style`, this.stylingSubscription);
17
+ }
18
+ else {
19
+ if (this.clientStyling)
20
+ setClientStyling(this.el, this.clientStyling);
21
+ if (this.clientStylingUrl)
22
+ setClientStylingURL(this.el, this.clientStylingUrl);
23
+ this.stylingAppends = true;
24
+ }
25
+ }
26
+ }
27
+ disconnectedCallback() {
28
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
29
+ }
30
+ handleClientStylingChange(newValue, oldValue) {
31
+ if (newValue != oldValue) {
32
+ setClientStyling(this.el, this.clientStyling);
33
+ }
34
+ }
35
+ handleClientStylingUrlChange(newValue, oldValue) {
36
+ if (newValue != oldValue) {
37
+ if (this.clientStylingUrl)
38
+ setClientStylingURL(this.el, this.clientStylingUrl);
39
+ }
40
+ }
31
41
  componentDidRender() {
32
42
  // start custom styling area
33
43
  if (!this.stylingAppends) {
34
44
  if (this.clientStyling)
35
- this.setClientStyling();
45
+ setClientStyling(this.el, this.clientStyling);
36
46
  if (this.clientStylingUrl)
37
- this.setClientStylingURL();
47
+ setClientStylingURL(this.el, this.clientStylingUrl);
38
48
  this.stylingAppends = true;
39
49
  }
40
50
  // end custom styling area
@@ -48,7 +58,7 @@ export class GeneralStylingWrapper {
48
58
  return await Promise.all(promises);
49
59
  }
50
60
  render() {
51
- return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
61
+ return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
52
62
  }
53
63
  static get is() { return "general-styling-wrapper"; }
54
64
  static get originalStyleUrls() {
@@ -99,6 +109,23 @@ export class GeneralStylingWrapper {
99
109
  "reflect": false,
100
110
  "defaultValue": "''"
101
111
  },
112
+ "mbSource": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": false,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": "Client custom styling via streamStyling"
125
+ },
126
+ "attribute": "mb-source",
127
+ "reflect": false
128
+ },
102
129
  "translationUrl": {
103
130
  "type": "string",
104
131
  "mutable": false,
@@ -141,4 +168,13 @@ export class GeneralStylingWrapper {
141
168
  };
142
169
  }
143
170
  static get elementRef() { return "el"; }
171
+ static get watchers() {
172
+ return [{
173
+ "propName": "clientStyling",
174
+ "methodName": "handleClientStylingChange"
175
+ }, {
176
+ "propName": "clientStylingUrl",
177
+ "methodName": "handleClientStylingUrlChange"
178
+ }];
179
+ }
144
180
  }
@@ -23,6 +23,10 @@ export const mergeTranslations = (url, target) => {
23
23
  });
24
24
  });
25
25
  resolve(true);
26
+ })
27
+ .catch(err => {
28
+ console.error("Failed to load translations:", err);
29
+ resolve(false);
26
30
  });
27
31
  });
28
32
  };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement } from './index-5d1b44a7.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-7ef90fae.js';
2
2
 
3
3
  const mergeTranslations = (url, target) => {
4
4
  return new Promise((resolve) => {
@@ -25,10 +25,71 @@ const mergeTranslations = (url, target) => {
25
25
  });
26
26
  });
27
27
  resolve(true);
28
+ })
29
+ .catch(err => {
30
+ console.error("Failed to load translations:", err);
31
+ resolve(false);
28
32
  });
29
33
  });
30
34
  };
31
35
 
36
+ /**
37
+ * @name setClientStyling
38
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
39
+ * @param {HTMLElement} stylingContainer The reference element of the widget
40
+ * @param {string} clientStyling The style content
41
+ */
42
+ function setClientStyling(stylingContainer, clientStyling) {
43
+ if (stylingContainer) {
44
+ const sheet = document.createElement('style');
45
+ sheet.innerHTML = clientStyling;
46
+ stylingContainer.appendChild(sheet);
47
+ }
48
+ }
49
+
50
+ /**
51
+ * @name setClientStylingURL
52
+ * @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
53
+ * @param {HTMLElement} stylingContainer The reference element of the widget
54
+ * @param {string} clientStylingUrl The URL of the style content
55
+ */
56
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
57
+ const url = new URL(clientStylingUrl);
58
+
59
+ fetch(url.href)
60
+ .then((res) => res.text())
61
+ .then((data) => {
62
+ const cssFile = document.createElement('style');
63
+ cssFile.innerHTML = data;
64
+ if (stylingContainer) {
65
+ stylingContainer.appendChild(cssFile);
66
+ }
67
+ })
68
+ .catch((err) => {
69
+ console.error('There was an error while trying to load client styling from URL', err);
70
+ });
71
+ }
72
+
73
+ /**
74
+ * @name setStreamLibrary
75
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
76
+ * @param {HTMLElement} stylingContainer The highest element of the widget
77
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
78
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
79
+ */
80
+ function setStreamStyling(stylingContainer, domain, subscription) {
81
+ if (window.emMessageBus) {
82
+ const sheet = document.createElement('style');
83
+
84
+ window.emMessageBus.subscribe(domain, (data) => {
85
+ sheet.innerHTML = data;
86
+ if (stylingContainer) {
87
+ stylingContainer.appendChild(sheet);
88
+ }
89
+ });
90
+ }
91
+ }
92
+
32
93
  const generalStylingWrapperCss = ":host{display:block}";
33
94
  const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
34
95
 
@@ -36,38 +97,47 @@ const GeneralStylingWrapper = class {
36
97
  constructor(hostRef) {
37
98
  registerInstance(this, hostRef);
38
99
  this.stylingAppends = false;
39
- this.setClientStyling = () => {
40
- let sheet = document.createElement('style');
41
- sheet.innerHTML = this.clientStyling;
42
- this.el.prepend(sheet);
43
- };
44
- this.setClientStylingURL = () => {
45
- let url = new URL(this.clientStylingUrl);
46
- let cssFile = document.createElement('style');
47
- fetch(url.href)
48
- .then((res) => res.text())
49
- .then((data) => {
50
- cssFile.innerHTML = data;
51
- setTimeout(() => {
52
- this.el.prepend(cssFile);
53
- }, 1);
54
- })
55
- .catch((err) => {
56
- console.log('error ', err);
57
- });
58
- };
59
100
  this.clientStyling = '';
60
101
  this.clientStylingUrl = '';
102
+ this.mbSource = undefined;
61
103
  this.translationUrl = '';
62
104
  this.targetTranslations = undefined;
63
105
  }
106
+ componentDidLoad() {
107
+ if (this.el) {
108
+ if (window.emMessageBus != undefined) {
109
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
110
+ }
111
+ else {
112
+ if (this.clientStyling)
113
+ setClientStyling(this.el, this.clientStyling);
114
+ if (this.clientStylingUrl)
115
+ setClientStylingURL(this.el, this.clientStylingUrl);
116
+ this.stylingAppends = true;
117
+ }
118
+ }
119
+ }
120
+ disconnectedCallback() {
121
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
122
+ }
123
+ handleClientStylingChange(newValue, oldValue) {
124
+ if (newValue != oldValue) {
125
+ setClientStyling(this.el, this.clientStyling);
126
+ }
127
+ }
128
+ handleClientStylingUrlChange(newValue, oldValue) {
129
+ if (newValue != oldValue) {
130
+ if (this.clientStylingUrl)
131
+ setClientStylingURL(this.el, this.clientStylingUrl);
132
+ }
133
+ }
64
134
  componentDidRender() {
65
135
  // start custom styling area
66
136
  if (!this.stylingAppends) {
67
137
  if (this.clientStyling)
68
- this.setClientStyling();
138
+ setClientStyling(this.el, this.clientStyling);
69
139
  if (this.clientStylingUrl)
70
- this.setClientStylingURL();
140
+ setClientStylingURL(this.el, this.clientStylingUrl);
71
141
  this.stylingAppends = true;
72
142
  }
73
143
  // end custom styling area
@@ -81,9 +151,13 @@ const GeneralStylingWrapper = class {
81
151
  return await Promise.all(promises);
82
152
  }
83
153
  render() {
84
- return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
154
+ return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
85
155
  }
86
156
  get el() { return getElement(this); }
157
+ static get watchers() { return {
158
+ "clientStyling": ["handleClientStylingChange"],
159
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
160
+ }; }
87
161
  };
88
162
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
89
163
 
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-5d1b44a7.js';
2
- export { s as setNonce } from './index-5d1b44a7.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-7ef90fae.js';
2
+ export { s as setNonce } from './index-7ef90fae.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([["general-styling-wrapper",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
19
+ return bootstrapLazy([["general-styling-wrapper",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'general-styling-wrapper';
2
- const BUILD = /* general-styling-wrapper */ { 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: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* general-styling-wrapper */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, 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: false, 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: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -962,6 +962,9 @@ var postUpdateComponent = (hostRef) => {
962
962
  {
963
963
  addHydratedFlag(elm);
964
964
  }
965
+ {
966
+ safeCall(instance, "componentDidLoad");
967
+ }
965
968
  endPostUpdate();
966
969
  {
967
970
  hostRef.$onReadyResolve$(elm);
@@ -1013,6 +1016,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1013
1016
  `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).`
1014
1017
  );
1015
1018
  }
1019
+ const elm = hostRef.$hostElement$ ;
1016
1020
  const oldVal = hostRef.$instanceValues$.get(propName);
1017
1021
  const flags = hostRef.$flags$;
1018
1022
  const instance = hostRef.$lazyInstance$ ;
@@ -1022,6 +1026,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1022
1026
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1023
1027
  hostRef.$instanceValues$.set(propName, newVal);
1024
1028
  if (instance) {
1029
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1030
+ const watchMethods = cmpMeta.$watchers$[propName];
1031
+ if (watchMethods) {
1032
+ watchMethods.map((watchMethodName) => {
1033
+ try {
1034
+ instance[watchMethodName](newVal, oldVal, propName);
1035
+ } catch (e) {
1036
+ consoleError(e, elm);
1037
+ }
1038
+ });
1039
+ }
1040
+ }
1025
1041
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1026
1042
  scheduleUpdate(hostRef, false);
1027
1043
  }
@@ -1033,7 +1049,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1033
1049
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1034
1050
  var _a, _b;
1035
1051
  const prototype = Cstr.prototype;
1036
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
1052
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1053
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1054
+ cmpMeta.$watchers$ = Cstr.watchers;
1055
+ }
1037
1056
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1038
1057
  members.map(([memberName, [memberFlags]]) => {
1039
1058
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1111,6 +1130,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1111
1130
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1112
1131
  }
1113
1132
  if (!Cstr.isProxied) {
1133
+ {
1134
+ cmpMeta.$watchers$ = Cstr.watchers;
1135
+ }
1114
1136
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1115
1137
  Cstr.isProxied = true;
1116
1138
  }
@@ -1126,6 +1148,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1126
1148
  {
1127
1149
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1128
1150
  }
1151
+ {
1152
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1153
+ }
1129
1154
  endNewInstance();
1130
1155
  } else {
1131
1156
  Cstr = elm.constructor;
@@ -1207,12 +1232,17 @@ var setContentReference = (elm) => {
1207
1232
  insertBefore(elm, contentRefElm, elm.firstChild);
1208
1233
  };
1209
1234
  var disconnectInstance = (instance) => {
1235
+ {
1236
+ safeCall(instance, "disconnectedCallback");
1237
+ }
1210
1238
  };
1211
1239
  var disconnectedCallback = async (elm) => {
1212
1240
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1213
1241
  const hostRef = getHostRef(elm);
1214
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1215
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1242
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1243
+ disconnectInstance(hostRef.$lazyInstance$);
1244
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1245
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1216
1246
  }
1217
1247
  }
1218
1248
  };
@@ -1235,6 +1265,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1235
1265
  let hasSlotRelocation = false;
1236
1266
  lazyBundles.map((lazyBundle) => {
1237
1267
  lazyBundle[1].map((compactMeta) => {
1268
+ var _a2;
1238
1269
  const cmpMeta = {
1239
1270
  $flags$: compactMeta[0],
1240
1271
  $tagName$: compactMeta[1],
@@ -1247,6 +1278,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1247
1278
  {
1248
1279
  cmpMeta.$members$ = compactMeta[2];
1249
1280
  }
1281
+ {
1282
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1283
+ }
1250
1284
  const tagName = cmpMeta.$tagName$;
1251
1285
  const HostElement = class extends HTMLElement {
1252
1286
  // StencilLazyHost
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-5d1b44a7.js';
2
- export { s as setNonce } from './index-5d1b44a7.js';
1
+ import { b as bootstrapLazy } from './index-7ef90fae.js';
2
+ export { s as setNonce } from './index-7ef90fae.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([["general-styling-wrapper",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
8
+ return bootstrapLazy([["general-styling-wrapper",[[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{r as t,h as s,g as e}from"./index-5d1b44a7.js";const i=class{constructor(s){t(this,s),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),s=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{s.innerHTML=t,setTimeout((()=>{this.el.prepend(s)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const i=(s=this.translationUrl,e=this.targetTranslations,new Promise((t=>{fetch(s).then((t=>t.json())).then((s=>{Object.keys(s).forEach((t=>{e[t]=e[t]||e.en,Object.keys(s[t]).forEach((i=>{e.en[i]&&(e[t][i]=e[t][i]||e.en[i],"object"==typeof s[t][i]?Object.keys(s[t][i]).forEach((o=>{e[t][i][o]=s[t][i][o]})):e[t][i]=s[t][i])}))})),t(!0)}))})));t.push(i)}var s,e;return await Promise.all(t)}render(){return s("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},s("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return e(this)}};i.style=":host{display:block}";export{i as general_styling_wrapper}
1
+ import{r as t,h as i,g as n}from"./index-7ef90fae.js";function e(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function s(t,i){const n=new URL(i);fetch(n.href).then((t=>t.text())).then((i=>{const n=document.createElement("style");n.innerHTML=i,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const h=class{constructor(i){t(this,i),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{n.innerHTML=i,t&&t.appendChild(n)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&e(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(t,i){t!=i&&e(this.el,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&this.clientStylingUrl&&s(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&e(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const e=(i=this.translationUrl,n=this.targetTranslations,new Promise((t=>{fetch(i).then((t=>t.json())).then((i=>{Object.keys(i).forEach((t=>{n[t]=n[t]||n.en,Object.keys(i[t]).forEach((e=>{n.en[e]&&(n[t][e]=n[t][e]||n.en[e],"object"==typeof i[t][e]?Object.keys(i[t][e]).forEach((s=>{n[t][e][s]=i[t][e][s]})):n[t][e]=i[t][e])}))})),t(!0)})).catch((i=>{console.error("Failed to load translations:",i),t(!1)}))})));t.push(e)}var i,n;return await Promise.all(t)}render(){return i("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return n(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};h.style=":host{display:block}";export{h as general_styling_wrapper}
@@ -1 +1 @@
1
- import{p as t,b as n}from"./index-5d1b44a7.js";export{s as setNonce}from"./index-5d1b44a7.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),t(a)})().then((async t=>(await a(),n([["general-styling-wrapper",[[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],t))));
1
+ import{p as n,b as l}from"./index-7ef90fae.js";export{s as setNonce}from"./index-7ef90fae.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,e={};return""!==l&&(e.resourcesUrl=new URL(".",l).href),n(e)})().then((async n=>(await e(),l([["general-styling-wrapper",[[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],n))));
@@ -1,2 +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)=>(0,console.error)(t,e),s=new Map,i=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},f=c.document||{head:{}},u={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)},a=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),h=!1,m=[],p=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.l?b(v):u.raf(v))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},v=()=>{$(m),$(p),(h=m.length>0)&&u.raf(v)},b=t=>a().then(t),w=y(p,!0),g={},S=t=>"object"==(t=typeof t)||"function"===t;function k(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:()=>O,map:()=>E,ok:()=>j,unwrap:()=>P,unwrapErr:()=>R});var j=t=>({isOk:!0,isErr:!1,value:t}),O=t=>({isOk:!1,isErr:!0,value:t});function E(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>j(t))):j(n)}if(t.isErr)return O(t.value);throw"should never get here"}var C,M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof t&&!S(l))&&(l+=""),i&&r?c[c.length-1].i+=l:c.push(i?x(null,l):l),r=i)};if(f(n),e){e.key&&(o=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.u=e,c.length>0&&(u.h=c),u.m=o,u.p=s,u},x=(t,e)=>({l:0,$:t,i:e,v:null,h:null,u:null,m:null,p:null}),A={},N=t=>n(t).$hostElement$,L=new WeakMap,W=t=>"sc-"+t.S,D=(t,e,n,l,o,s)=>{if(n!==l){let i=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,o=H(n),s=H(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else{const r=S(l);if((i||r&&null!==l)&&!o)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||o)&&!r&&t.setAttribute(e,l=!0===l?"":l)}}},F=/\s/,H=t=>t?t.split(F):[],U=(t,e,n)=>{const l=11===e.v.nodeType&&e.v.host?e.v.host:e.v,o=t&&t.u||g,s=e.u||g;for(const t of q(Object.keys(o)))t in s||D(l,t,o[t],void 0,n,e.l);for(const t of q(Object.keys(s)))D(l,t,o[t],s[t],n,e.l)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,V=!1,_=!1,z=!1,B=(t,e,n)=>{var l;const o=e.h[n];let s,i,r,c=0;if(G||(_=!0,"slot"===o.$&&(o.l|=o.h?2:1)),1&o.l)s=o.v=f.createTextNode("");else if(s=o.v=f.createElement(!G&&2&o.l?"slot-fb":o.$),U(null,o,z),o.h)for(c=0;c<o.h.length;++c)i=B(t,o,c),i&&s.appendChild(i);return s["s-hn"]=M,3&o.l&&(s["s-sr"]=!0,s["s-cr"]=C,s["s-sn"]=o.p||"",s["s-rf"]=null==(l=o.u)?void 0:l.ref,r=t&&t.h&&t.h[n],r&&r.$===o.$&&t.v&&I(t.v,!1)),s},I=(t,e)=>{u.l|=1;const n=Array.from(t.childNodes);for(let t=n.length-1;t>=0;t--){const l=n[t];l["s-hn"]!==M&&l["s-ol"]&&(ot(Y(l),l,X(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,_=!0),e&&I(l,e)}u.l&=-2},J=(t,e,n,l,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(;o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,ot(r,i,X(e))))},K=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.v;t&&(V=!0,t["s-ol"]?t["s-ol"].remove():I(t,!0),t.remove())}}},Q=(t,e,n=!1)=>t.$===e.$&&("slot"===t.$?t.p===e.p:!!n||t.m===e.m),X=t=>t&&t["s-ol"]||t,Y=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,Z=(t,e,n=!1)=>{const l=e.v=t.v,o=t.h,s=e.h;("slot"!==e.$||G)&&U(t,e,z),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,d=e[0],h=e[a],m=l.length-1,p=l[0],y=l[m];for(;r<=a&&c<=m;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(Q(d,p,o))Z(d,p,o),d=e[++r],p=l[++c];else if(Q(h,y,o))Z(h,y,o),h=e[--a],y=l[--m];else if(Q(d,y,o))"slot"!==d.$&&"slot"!==y.$||I(d.v.parentNode,!1),Z(d,y,o),ot(t,d.v,h.v.nextSibling),d=e[++r],y=l[--m];else if(Q(h,p,o))"slot"!==d.$&&"slot"!==y.$||I(h.v.parentNode,!1),Z(h,p,o),ot(t,h.v,d.v),h=e[--a],p=l[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].m&&e[u].m===p.m){f=u;break}f>=0?(i=e[f],i.$!==p.$?s=B(e&&e[c],n,f):(Z(i,p,o),e[f]=void 0,s=i.v),p=l[++c]):(s=B(e&&e[c],n,c),p=l[++c]),s&&ot(Y(d.v),s,X(d.v))}r>a?J(t,null==l[m+1]?null:l[m+1].v,n,l,c,m):c>m&&K(e,r,a)})(l,o,e,s,n):null!==s?J(l,null,e,s,0,s.length-1):null!==o&&K(o,0,o.length-1)},tt=t=>{const e=t.childNodes;for(const t of e)if(1===t.nodeType){if(t["s-sr"]){const n=t["s-sn"];t.hidden=!1;for(const l of e)if(l!==t)if(l["s-hn"]!==t["s-hn"]||""!==n){if(1===l.nodeType&&(n===l.getAttribute("slot")||n===l["s-sn"])||3===l.nodeType&&n===l["s-sn"]){t.hidden=!0;break}}else if(1===l.nodeType||3===l.nodeType&&""!==l.textContent.trim()){t.hidden=!0;break}}tt(t)}},et=[],nt=t=>{let e,n,l;for(const o of t.childNodes){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){n=e.parentNode.childNodes;const t=o["s-sn"];for(l=n.length-1;l>=0;l--)if(e=n[l],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"])if(lt(e,t)){let n=et.find((t=>t.k===e));V=!0,e["s-sn"]=e["s-sn"]||t,n?(n.k["s-sh"]=o["s-hn"],n.j=o):(e["s-sh"]=o["s-hn"],et.push({j:o,k:e})),e["s-sr"]&&et.map((t=>{lt(t.k,e["s-sn"])&&(n=et.find((t=>t.k===e)),n&&!t.j&&(t.j=n.j))}))}else et.some((t=>t.k===e))||et.push({k:e})}1===o.nodeType&&nt(o)}},lt=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,ot=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),st=(t,e)=>{e&&!t.O&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.O=e)))},it=(t,e)=>{if(t.l|=16,!(4&t.l))return st(t,t.C),w((()=>rt(t,e)));t.l|=512},rt=(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=mt(n,"componentWillLoad")),ct(l,(()=>ut(t,n,e)))},ct=(t,e)=>ft(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ft=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ut=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.M;((t,e)=>{var n;const l=W(e),o=i.get(l);if(t=11===t.nodeType?t:f,o)if("string"==typeof o){let s,i=L.get(t=t.head||t);if(i||L.set(t,i=new Set),!i.has(l)){{s=f.createElement("style"),s.innerHTML=o;const e=null!=(n=u.P)?n:k(f);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.l&&(s.innerHTML+=r),i&&i.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o])})(t.$hostElement$.getRootNode(),e)})(t);at(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>dt(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},at=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{var l,o,s,i;const r=t.$hostElement$,c=t.R||x(null,null),a=(t=>t&&t.$===A)(e)?e:T(null,null,e);if(M=r.tagName,n&&a.u)for(const t of Object.keys(a.u))r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.u[t]=r[t]);if(a.$=null,a.l|=4,t.R=a,a.v=c.v=r,G=!1,C=r["s-cr"],V=!1,Z(c,a,n),u.l|=1,_){nt(a.v);for(const t of et){const e=t.k;if(!e["s-ol"]){const t=f.createTextNode("");t["s-nr"]=e,ot(e.parentNode,e["s-ol"]=t,e)}}for(const t of et){const e=t.k,r=t.j;if(r){const t=r.parentNode;let n=r.nextSibling;{let s=null==(l=e["s-ol"])?void 0:l.previousSibling;for(;s;){let l=null!=(o=s["s-nr"])?o:null;if(l&&l["s-sn"]===e["s-sn"]&&t===l.parentNode){for(l=l.nextSibling;l===e||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){n=l;break}}s=s.previousSibling}}(!n&&t!==e.parentNode||e.nextSibling!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),ot(t,e,n),1===e.nodeType&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}V&&tt(a.v),u.l&=-2,et.length=0,C=void 0})(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},dt=t=>{const e=t.$hostElement$,n=t.C;mt(t.t,"componentDidRender"),64&t.l||(t.l|=64,pt(e),t.T(e),n||ht()),t.O&&(t.O(),t.O=void 0),512&t.l&&b((()=>it(t,!1))),t.l&=-517},ht=()=>{pt(f.documentElement),b((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"general-styling-wrapper"}});return t.dispatchEvent(e),e})(c)))},mt=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t)}},pt=t=>t.classList.add("hydrated"),yt=(t,e,l)=>{var o,s;const i=t.prototype;if(e.A){const r=Object.entries(null!=(o=e.A)?o:{});if(r.map((([t,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).N.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.S}" 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.N.get(e),r=s.l,c=s.t;l=((t,e)=>null==t||S(t)?t:1&e?t+"":t)(l,o.A[e][0]),8&r&&void 0!==i||l===i||Number.isNaN(i)&&Number.isNaN(l)||(s.N.set(e,l),c&&2==(18&r)&&it(s,!1))})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,s){u.jmp((()=>{var r;const c=l.get(t);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=e.L)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,o,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.L)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return l.set(n,t),n}))]))}}return t},$t=(t,l={})=>{var a;const h=[],m=l.exclude||[],p=c.customElements,y=f.head,$=y.querySelector("meta[charset]"),v=f.createElement("style"),b=[];let w,g=!0;Object.assign(u,l),u.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{const r={l:l[0],S:l[1],A:l[2],W:l[3]};4&r.l&&(S=!0),r.A=l[2];const c=r.S,a=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,M:n,N:new Map};l.D=new Promise((t=>l.T=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,r)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):u.jmp((()=>(t=>{if(!(1&u.l)){const e=n(t),l=e.M,r=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}));else{e.l|=1,12&l.l&&(t=>{const e=t["s-cr"]=f.createComment("");e["s-cn"]=!0,ot(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){st(e,e.C=n);break}}l.A&&Object.entries(l.A).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.F){const t=(t=>{const e=t.S.replace(/-/g,"_"),n=t.F;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),o)
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.S}#${e.H}" was not found`);l.isProxied||(yt(l,n,2),l.isProxied=!0);const i=()=>{};e.l|=8;try{new l(e)}catch(t){o(t)}e.l&=-9,i()}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=W(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);d&&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 r=e.C,c=()=>it(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,l)}r()}})(this)))}disconnectedCallback(){u.jmp((()=>(async()=>{if(!(1&u.l)){const t=n(this);(null==t?void 0:t.t)||(null==t?void 0:t.D)&&t.D.then((()=>{}))}})()))}componentOnReady(){return n(this).D}};r.F=t[0],m.includes(c)||p.get(c)||(h.push(c),p.define(c,yt(a,r,1)))}))})),h.length>0&&(S&&(v.textContent+=r),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(a=u.P)?a:k(f);null!=t&&v.setAttribute("nonce",t),y.insertBefore(v,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):u.jmp((()=>w=setTimeout(ht,30)))},vt=t=>u.P=t;export{$t as b,N as g,T as h,a as p,l as r,vt as s}
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)=>(0,console.error)(t,e),s=new Map,i=new Map,r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c="undefined"!=typeof window?window:{},f=c.document||{head:{}},u={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)},a=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),h=!1,m=[],p=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.l?b(v):u.raf(v))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},v=()=>{$(m),$(p),(h=m.length>0)&&u.raf(v)},b=t=>a().then(t),w=y(p,!0),g={},S=t=>"object"==(t=typeof t)||"function"===t;function k(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:()=>O,map:()=>C,ok:()=>j,unwrap:()=>P,unwrapErr:()=>R});var j=t=>({isOk:!0,isErr:!1,value:t}),O=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=>j(t))):j(n)}if(t.isErr)return O(t.value);throw"should never get here"}var E,M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof t&&!S(l))&&(l+=""),i&&r?c[c.length-1].i+=l:c.push(i?x(null,l):l),r=i)};if(f(n),e){e.key&&(o=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.u=e,c.length>0&&(u.h=c),u.m=o,u.p=s,u},x=(t,e)=>({l:0,$:t,i:e,v:null,h:null,u:null,m:null,p:null}),A={},L=t=>n(t).$hostElement$,N=new WeakMap,D=t=>"sc-"+t.S,W=(t,e,n,l,o,s)=>{if(n!==l){let i=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,o=H(n),s=H(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else{const r=S(l);if((i||r&&null!==l)&&!o)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||o)&&!r&&t.setAttribute(e,l=!0===l?"":l)}}},F=/\s/,H=t=>t?t.split(F):[],U=(t,e,n)=>{const l=11===e.v.nodeType&&e.v.host?e.v.host:e.v,o=t&&t.u||g,s=e.u||g;for(const t of q(Object.keys(o)))t in s||W(l,t,o[t],void 0,n,e.l);for(const t of q(Object.keys(s)))W(l,t,o[t],s[t],n,e.l)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,V=!1,_=!1,z=!1,B=(t,e,n)=>{var l;const o=e.h[n];let s,i,r,c=0;if(G||(_=!0,"slot"===o.$&&(o.l|=o.h?2:1)),1&o.l)s=o.v=f.createTextNode("");else if(s=o.v=f.createElement(!G&&2&o.l?"slot-fb":o.$),U(null,o,z),o.h)for(c=0;c<o.h.length;++c)i=B(t,o,c),i&&s.appendChild(i);return s["s-hn"]=M,3&o.l&&(s["s-sr"]=!0,s["s-cr"]=E,s["s-sn"]=o.p||"",s["s-rf"]=null==(l=o.u)?void 0:l.ref,r=t&&t.h&&t.h[n],r&&r.$===o.$&&t.v&&I(t.v,!1)),s},I=(t,e)=>{u.l|=1;const n=Array.from(t.childNodes);for(let t=n.length-1;t>=0;t--){const l=n[t];l["s-hn"]!==M&&l["s-ol"]&&(ot(Y(l),l,X(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,_=!0),e&&I(l,e)}u.l&=-2},J=(t,e,n,l,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(;o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,ot(r,i,X(e))))},K=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.v;t&&(V=!0,t["s-ol"]?t["s-ol"].remove():I(t,!0),t.remove())}}},Q=(t,e,n=!1)=>t.$===e.$&&("slot"===t.$?t.p===e.p:!!n||t.m===e.m),X=t=>t&&t["s-ol"]||t,Y=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,Z=(t,e,n=!1)=>{const l=e.v=t.v,o=t.h,s=e.h;("slot"!==e.$||G)&&U(t,e,z),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,d=e[0],h=e[a],m=l.length-1,p=l[0],y=l[m];for(;r<=a&&c<=m;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(Q(d,p,o))Z(d,p,o),d=e[++r],p=l[++c];else if(Q(h,y,o))Z(h,y,o),h=e[--a],y=l[--m];else if(Q(d,y,o))"slot"!==d.$&&"slot"!==y.$||I(d.v.parentNode,!1),Z(d,y,o),ot(t,d.v,h.v.nextSibling),d=e[++r],y=l[--m];else if(Q(h,p,o))"slot"!==d.$&&"slot"!==y.$||I(h.v.parentNode,!1),Z(h,p,o),ot(t,h.v,d.v),h=e[--a],p=l[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].m&&e[u].m===p.m){f=u;break}f>=0?(i=e[f],i.$!==p.$?s=B(e&&e[c],n,f):(Z(i,p,o),e[f]=void 0,s=i.v),p=l[++c]):(s=B(e&&e[c],n,c),p=l[++c]),s&&ot(Y(d.v),s,X(d.v))}r>a?J(t,null==l[m+1]?null:l[m+1].v,n,l,c,m):c>m&&K(e,r,a)})(l,o,e,s,n):null!==s?J(l,null,e,s,0,s.length-1):null!==o&&K(o,0,o.length-1)},tt=t=>{const e=t.childNodes;for(const t of e)if(1===t.nodeType){if(t["s-sr"]){const n=t["s-sn"];t.hidden=!1;for(const l of e)if(l!==t)if(l["s-hn"]!==t["s-hn"]||""!==n){if(1===l.nodeType&&(n===l.getAttribute("slot")||n===l["s-sn"])||3===l.nodeType&&n===l["s-sn"]){t.hidden=!0;break}}else if(1===l.nodeType||3===l.nodeType&&""!==l.textContent.trim()){t.hidden=!0;break}}tt(t)}},et=[],nt=t=>{let e,n,l;for(const o of t.childNodes){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){n=e.parentNode.childNodes;const t=o["s-sn"];for(l=n.length-1;l>=0;l--)if(e=n[l],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"])if(lt(e,t)){let n=et.find((t=>t.k===e));V=!0,e["s-sn"]=e["s-sn"]||t,n?(n.k["s-sh"]=o["s-hn"],n.j=o):(e["s-sh"]=o["s-hn"],et.push({j:o,k:e})),e["s-sr"]&&et.map((t=>{lt(t.k,e["s-sn"])&&(n=et.find((t=>t.k===e)),n&&!t.j&&(t.j=n.j))}))}else et.some((t=>t.k===e))||et.push({k:e})}1===o.nodeType&&nt(o)}},lt=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,ot=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),st=(t,e)=>{e&&!t.O&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.O=e)))},it=(t,e)=>{if(t.l|=16,!(4&t.l))return st(t,t.C),w((()=>rt(t,e)));t.l|=512},rt=(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=mt(n,"componentWillLoad")),ct(l,(()=>ut(t,n,e)))},ct=(t,e)=>ft(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ft=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ut=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.M;((t,e)=>{var n;const l=D(e),o=i.get(l);if(t=11===t.nodeType?t:f,o)if("string"==typeof o){let s,i=N.get(t=t.head||t);if(i||N.set(t,i=new Set),!i.has(l)){{s=f.createElement("style"),s.innerHTML=o;const e=null!=(n=u.P)?n:k(f);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.l&&(s.innerHTML+=r),i&&i.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o])})(t.$hostElement$.getRootNode(),e)})(t);at(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>dt(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},at=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{var l,o,s,i;const r=t.$hostElement$,c=t.R||x(null,null),a=(t=>t&&t.$===A)(e)?e:T(null,null,e);if(M=r.tagName,n&&a.u)for(const t of Object.keys(a.u))r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.u[t]=r[t]);if(a.$=null,a.l|=4,t.R=a,a.v=c.v=r,G=!1,E=r["s-cr"],V=!1,Z(c,a,n),u.l|=1,_){nt(a.v);for(const t of et){const e=t.k;if(!e["s-ol"]){const t=f.createTextNode("");t["s-nr"]=e,ot(e.parentNode,e["s-ol"]=t,e)}}for(const t of et){const e=t.k,r=t.j;if(r){const t=r.parentNode;let n=r.nextSibling;{let s=null==(l=e["s-ol"])?void 0:l.previousSibling;for(;s;){let l=null!=(o=s["s-nr"])?o:null;if(l&&l["s-sn"]===e["s-sn"]&&t===l.parentNode){for(l=l.nextSibling;l===e||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){n=l;break}}s=s.previousSibling}}(!n&&t!==e.parentNode||e.nextSibling!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),ot(t,e,n),1===e.nodeType&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}V&&tt(a.v),u.l&=-2,et.length=0,E=void 0})(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},dt=t=>{const e=t.$hostElement$,n=t.t,l=t.C;mt(n,"componentDidRender"),64&t.l||(t.l|=64,pt(e),mt(n,"componentDidLoad"),t.T(e),l||ht()),t.O&&(t.O(),t.O=void 0),512&t.l&&b((()=>it(t,!1))),t.l&=-517},ht=()=>{pt(f.documentElement),b((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"general-styling-wrapper"}});return t.dispatchEvent(e),e})(c)))},mt=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t)}},pt=t=>t.classList.add("hydrated"),yt=(t,e,l)=>{var s,i;const r=t.prototype;if(e.A||e.L||t.watchers){t.watchers&&!e.L&&(e.L=t.watchers);const c=Object.entries(null!=(s=e.A)?s:{});if(c.map((([t,[s]])=>{(31&s||2&l&&32&s)&&Object.defineProperty(r,t,{get(){return((t,e)=>n(this).N.get(e))(0,t)},set(l){((t,e,l,s)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${s.S}" 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.N.get(e),f=i.l,u=i.t;if(l=((t,e)=>null==t||S(t)?t:1&e?t+"":t)(l,s.A[e][0]),(!(8&f)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.N.set(e,l),u)){if(s.L&&128&f){const t=s.L[e];t&&t.map((t=>{try{u[t](l,c,e)}catch(t){o(t,r)}}))}2==(18&f)&&it(i,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(t,o,s){u.jmp((()=>{var i;const c=l.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=e.L)?void 0:i[t];null==r||r.forEach((e=>{null!=n[e]&&n[e].call(n,s,o,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.L)?i:{}),...c.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return l.set(n,t),n}))]))}}return t},$t=t=>{mt(t,"disconnectedCallback")},vt=(t,l={})=>{var a;const h=[],m=l.exclude||[],p=c.customElements,y=f.head,$=y.querySelector("meta[charset]"),v=f.createElement("style"),b=[];let w,g=!0;Object.assign(u,l),u.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{var r;const c={l:l[0],S:l[1],A:l[2],D:l[3]};4&c.l&&(S=!0),c.A=l[2],c.L=null!=(r=l[4])?r:{};const a=c.S,y=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,M:n,N:new Map};l.W=new Promise((t=>l.T=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):u.jmp((()=>(t=>{if(!(1&u.l)){const e=n(t),l=e.M,r=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.W)&&e.W.then((()=>{}));else{e.l|=1,12&l.l&&(t=>{const e=t["s-cr"]=f.createComment("");e["s-cn"]=!0,ot(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){st(e,e.C=n);break}}l.A&&Object.entries(l.A).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.F){const t=(t=>{const e=t.S.replace(/-/g,"_"),n=t.F;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),o)
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.S}#${e.H}" was not found`);l.isProxied||(n.L=l.watchers,yt(l,n,2),l.isProxied=!0);const i=()=>{};e.l|=8;try{new l(e)}catch(t){o(t)}e.l&=-9,e.l|=128,i()}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=D(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);d&&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 r=e.C,c=()=>it(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,l)}r()}})(this)))}disconnectedCallback(){u.jmp((()=>(async()=>{if(!(1&u.l)){const t=n(this);(null==t?void 0:t.t)?$t(t.t):(null==t?void 0:t.W)&&t.W.then((()=>$t(t.t)))}})()))}componentOnReady(){return n(this).W}};c.F=t[0],m.includes(a)||p.get(a)||(h.push(a),p.define(a,yt(y,c,1)))}))})),h.length>0&&(S&&(v.textContent+=r),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(a=u.P)?a:k(f);null!=t&&v.setAttribute("nonce",t),y.insertBefore(v,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):u.jmp((()=>w=setTimeout(ht,30)))},bt=t=>u.P=t;export{vt as b,L as g,T as h,a as p,l as r,bt as s}
@@ -8,6 +8,8 @@ export declare class GeneralStylingWrapper {
8
8
  * Client custom styling via url
9
9
  */
10
10
  clientStylingUrl: string;
11
+ /** Client custom styling via streamStyling */
12
+ mbSource: string;
11
13
  /**
12
14
  * Translation via url
13
15
  */
@@ -17,10 +19,13 @@ export declare class GeneralStylingWrapper {
17
19
  */
18
20
  targetTranslations: Translations;
19
21
  el: HTMLElement;
20
- stylingAppends: boolean;
22
+ private stylingSubscription;
23
+ private stylingAppends;
24
+ componentDidLoad(): void;
25
+ disconnectedCallback(): void;
26
+ handleClientStylingChange(newValue: any, oldValue: any): void;
27
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
21
28
  componentDidRender(): void;
22
29
  componentWillLoad(): Promise<any[]>;
23
- setClientStyling: () => void;
24
- setClientStylingURL: () => void;
25
30
  render(): any;
26
31
  }
@@ -17,6 +17,10 @@ export namespace Components {
17
17
  * Client custom styling via url
18
18
  */
19
19
  "clientStylingUrl": string;
20
+ /**
21
+ * Client custom styling via streamStyling
22
+ */
23
+ "mbSource": string;
20
24
  /**
21
25
  * Translation be merged to
22
26
  */
@@ -48,6 +52,10 @@ declare namespace LocalJSX {
48
52
  * Client custom styling via url
49
53
  */
50
54
  "clientStylingUrl"?: string;
55
+ /**
56
+ * Client custom styling via streamStyling
57
+ */
58
+ "mbSource"?: string;
51
59
  /**
52
60
  * Translation be merged to
53
61
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-styling-wrapper",
3
- "version": "1.69.0",
3
+ "version": "1.69.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",