@everymatrix/general-news-notification 1.63.0 → 1.63.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-a2d41176.js');
3
+ const index = require('./index-1feedc36.js');
4
4
 
5
5
  const getDevice = () => {
6
6
  let userAgent = window.navigator.userAgent;
@@ -128,11 +128,6 @@ const GeneralNewsNotificationStyle0 = generalNewsNotificationCss;
128
128
  const GeneralNewsNotification = class {
129
129
  constructor(hostRef) {
130
130
  index.registerInstance(this, hostRef);
131
- this.connectedCallback = () => {
132
- if (this.cmsEndpoint && this.language) {
133
- this.getNotificationMessage();
134
- }
135
- };
136
131
  this.getNotificationMessage = () => {
137
132
  this.isLoading = true;
138
133
  try {
@@ -228,6 +223,11 @@ const GeneralNewsNotification = class {
228
223
  disconnectedCallback() {
229
224
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
230
225
  }
226
+ connectedCallback() {
227
+ if (this.cmsEndpoint && this.language) {
228
+ this.getNotificationMessage();
229
+ }
230
+ }
231
231
  render() {
232
232
  if (this.isClosed)
233
233
  return null;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const generalNewsNotification = require('./general-news-notification-4a15ce82.js');
6
- require('./index-a2d41176.js');
5
+ const generalNewsNotification = require('./general-news-notification-9fe115ad.js');
6
+ require('./index-1feedc36.js');
7
7
 
8
8
 
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a2d41176.js');
5
+ const index = require('./index-1feedc36.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'general-news-notification';
24
- const BUILD = /* general-news-notification */ { 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: 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: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* general-news-notification */ { 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: true, 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: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -990,6 +990,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
990
990
  hostRef.$flags$ |= 128 /* isWatchReady */;
991
991
  }
992
992
  endNewInstance();
993
+ fireConnectedCallback(hostRef.$lazyInstance$);
993
994
  } else {
994
995
  Cstr = elm.constructor;
995
996
  const cmpTag = elm.localName;
@@ -1017,6 +1018,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1017
1018
  }
1018
1019
  };
1019
1020
  var fireConnectedCallback = (instance) => {
1021
+ {
1022
+ safeCall(instance, "connectedCallback");
1023
+ }
1020
1024
  };
1021
1025
 
1022
1026
  // src/runtime/connected-callback.ts
@@ -1049,8 +1053,10 @@ var connectedCallback = (elm) => {
1049
1053
  initializeComponent(elm, hostRef, cmpMeta);
1050
1054
  }
1051
1055
  } else {
1052
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1053
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1056
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1057
+ fireConnectedCallback(hostRef.$lazyInstance$);
1058
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1059
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1054
1060
  }
1055
1061
  }
1056
1062
  endConnected();
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const generalNewsNotification = require('./general-news-notification-4a15ce82.js');
6
- require('./index-a2d41176.js');
5
+ const generalNewsNotification = require('./general-news-notification-9fe115ad.js');
6
+ require('./index-1feedc36.js');
7
7
 
8
8
 
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a2d41176.js');
5
+ const index = require('./index-1feedc36.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -4,11 +4,6 @@ import { getTranslations, translate } from "../../utils/locale.utils";
4
4
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
5
5
  export class GeneralNewsNotification {
6
6
  constructor() {
7
- this.connectedCallback = () => {
8
- if (this.cmsEndpoint && this.language) {
9
- this.getNotificationMessage();
10
- }
11
- };
12
7
  this.getNotificationMessage = () => {
13
8
  this.isLoading = true;
14
9
  try {
@@ -104,6 +99,11 @@ export class GeneralNewsNotification {
104
99
  disconnectedCallback() {
105
100
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
106
101
  }
102
+ connectedCallback() {
103
+ if (this.cmsEndpoint && this.language) {
104
+ this.getNotificationMessage();
105
+ }
106
+ }
107
107
  render() {
108
108
  if (this.isClosed)
109
109
  return null;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-4f53ce97.js';
1
+ import { r as registerInstance, h } from './index-4a2a97f1.js';
2
2
 
3
3
  const getDevice = () => {
4
4
  let userAgent = window.navigator.userAgent;
@@ -126,11 +126,6 @@ const GeneralNewsNotificationStyle0 = generalNewsNotificationCss;
126
126
  const GeneralNewsNotification = class {
127
127
  constructor(hostRef) {
128
128
  registerInstance(this, hostRef);
129
- this.connectedCallback = () => {
130
- if (this.cmsEndpoint && this.language) {
131
- this.getNotificationMessage();
132
- }
133
- };
134
129
  this.getNotificationMessage = () => {
135
130
  this.isLoading = true;
136
131
  try {
@@ -226,6 +221,11 @@ const GeneralNewsNotification = class {
226
221
  disconnectedCallback() {
227
222
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
228
223
  }
224
+ connectedCallback() {
225
+ if (this.cmsEndpoint && this.language) {
226
+ this.getNotificationMessage();
227
+ }
228
+ }
229
229
  render() {
230
230
  if (this.isClosed)
231
231
  return null;
@@ -1,2 +1,2 @@
1
- export { G as general_news_notification } from './general-news-notification-ed25ca2d.js';
2
- import './index-4f53ce97.js';
1
+ export { G as general_news_notification } from './general-news-notification-ddb349a7.js';
2
+ import './index-4a2a97f1.js';
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-4f53ce97.js';
2
- export { s as setNonce } from './index-4f53ce97.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-4a2a97f1.js';
2
+ export { s as setNonce } from './index-4a2a97f1.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'general-news-notification';
2
- const BUILD = /* general-news-notification */ { 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: 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: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* general-news-notification */ { 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: true, 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: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -968,6 +968,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
968
968
  hostRef.$flags$ |= 128 /* isWatchReady */;
969
969
  }
970
970
  endNewInstance();
971
+ fireConnectedCallback(hostRef.$lazyInstance$);
971
972
  } else {
972
973
  Cstr = elm.constructor;
973
974
  const cmpTag = elm.localName;
@@ -995,6 +996,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
995
996
  }
996
997
  };
997
998
  var fireConnectedCallback = (instance) => {
999
+ {
1000
+ safeCall(instance, "connectedCallback");
1001
+ }
998
1002
  };
999
1003
 
1000
1004
  // src/runtime/connected-callback.ts
@@ -1027,8 +1031,10 @@ var connectedCallback = (elm) => {
1027
1031
  initializeComponent(elm, hostRef, cmpMeta);
1028
1032
  }
1029
1033
  } else {
1030
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1031
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1034
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1035
+ fireConnectedCallback(hostRef.$lazyInstance$);
1036
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1037
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1032
1038
  }
1033
1039
  }
1034
1040
  endConnected();
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { G as GeneralNewsNotification } from './general-news-notification-ed25ca2d.js';
2
- import './index-4f53ce97.js';
1
+ export { G as GeneralNewsNotification } from './general-news-notification-ddb349a7.js';
2
+ import './index-4a2a97f1.js';
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-4f53ce97.js';
2
- export { s as setNonce } from './index-4f53ce97.js';
1
+ import { b as bootstrapLazy } from './index-4a2a97f1.js';
2
+ export { s as setNonce } from './index-4a2a97f1.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1 +1 @@
1
- import{p as n,b as i}from"./p-b1020fc5.js";export{s as setNonce}from"./p-b1020fc5.js";import{g as t}from"./p-e1255160.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),n(t)})().then((async n=>(await t(),i([["p-7204f890",[[1,"general-news-notification",{cmsEndpoint:[1,"cms-endpoint"],language:[1],animationType:[1,"animation-type"],speed:[2],canMinimize:[4,"can-minimize"],canClose:[4,"can-close"],mbSource:[1,"mb-source"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],message:[32],isMinimized:[32],isClosed:[32],isLoading:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}]]]],n))));
1
+ import{p as n,b as i}from"./p-949e16b6.js";export{s as setNonce}from"./p-949e16b6.js";import{g as e}from"./p-e1255160.js";(()=>{const i=import.meta.url,e={};return""!==i&&(e.resourcesUrl=new URL(".",i).href),n(e)})().then((async n=>(await e(),i([["p-059e71a2",[[1,"general-news-notification",{cmsEndpoint:[1,"cms-endpoint"],language:[1],animationType:[1,"animation-type"],speed:[2],canMinimize:[4,"can-minimize"],canClose:[4,"can-close"],mbSource:[1,"mb-source"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],message:[32],isMinimized:[32],isClosed:[32],isLoading:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}]]]],n))));
@@ -1 +1 @@
1
- export{G as GeneralNewsNotification}from"./p-1d13531c.js";import"./p-b1020fc5.js";
1
+ export{G as GeneralNewsNotification}from"./p-d689c95a.js";import"./p-949e16b6.js";
@@ -0,0 +1 @@
1
+ export{G as general_news_notification}from"./p-d689c95a.js";import"./p-949e16b6.js";
@@ -1,2 +1,2 @@
1
- var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,d=[],w=[],y=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&f.o?b(v):f.raf(v))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},v=()=>{$(d),$(w),(m=d.length>0)&&f.raf(v)},b=t=>h().then(t),g=y(w,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>L});var k=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},L=t=>{if(t.isErr)return t.value;throw t.value},R=(t,e,...n)=>{let o=null,l=!1,s=!1;const r=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&s?r[r.length-1].i+=o:r.push(l?T(null,o):o),s=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=T(t,null);return c.u=e,r.length>0&&(c.h=r),c},T=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},F=new WeakMap,N=t=>"sc-"+t.$,U=(t,e,n,o,s,r)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=D(n),s=D(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&r||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(H);e=e.replace(q,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},W=/\s/,D=t=>t?t.split(W):[],H="Capture",q=RegExp(H+"$"),G=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,s=e.u||S;for(const t of V(Object.keys(l)))t in s||U(o,t,l[t],void 0,n,e.o);for(const t of V(Object.keys(s)))U(o,t,l[t],s[t],n,e.o)};function V(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,z=(t,e,n)=>{const o=e.h[n];let l,s,r=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),G(null,o,_),null!=M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.h)for(r=0;r<o.h.length;++r)s=z(t,o,r),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=x,l},B=(t,e,n,o,l,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=z(null,n,l),r&&(o[l].m=r,X(i,r,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e)=>t.p===e.p,K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,r=e.p,i=e.i;null===i?(G(t,e,_="svg"===r||"foreignObject"!==r&&_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r=0,i=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],p=o[f];for(;r<=c&&i<=f;)null==u?u=e[++r]:null==a?a=e[--c]:null==h?h=o[++i]:null==p?p=o[--f]:J(u,h)?(K(u,h,l),u=e[++r],h=o[++i]):J(a,p)?(K(a,p,l),a=e[--c],p=o[--f]):J(u,p)?(K(u,p,l),X(t,u.m,a.m.nextSibling),u=e[++r],p=o[--f]):J(a,h)?(K(a,h,l),X(t,a.m,u.m),a=e[--c],h=o[++i]):(s=z(e&&e[i],n,i),h=o[++i],s&&X(u.m.parentNode,s,u.m));r>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&I(e,r,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),B(o,null,e,s,0,s.length-1)):null!==l&&I(l,0,l.length-1),_&&"svg"===r&&(_=!1)):t.i!==i&&(o.data=i)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.S),g((()=>tt(t,e)));t.o|=512},tt=(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 o;return e&&(o=it(n,"componentWillLoad")),et(o,(()=>ot(t,n,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=N(e),l=i.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,r=F.get(t=t.head||t);if(r||F.set(t,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const e=null!=(n=f.O)?n:O(a);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.o&&(s.innerHTML+=c),r&&r.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.j,s=t.k||T(null,null),r=(t=>t&&t.p===A)(e)?e:R(null,null,e);if(x=o.tagName,n&&r.u)for(const t of Object.keys(r.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.u[t]=o[t]);r.p=null,r.o|=4,t.k=r,r.m=s.m=o.shadowRoot||o,M=o["s-sc"],K(s,r,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.t,o=t.S;64&t.o||(t.o|=64,ct(e),it(n,"componentDidLoad"),t.C(e),o||rt()),t.v&&(t.v(),t.v=void 0),512&t.o&&b((()=>Z(t,!1))),t.o&=-517},rt=()=>{ct(a.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-news-notification"}});return t.dispatchEvent(e),e})(u)))},it=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,o)=>{var l,r;const i=t.prototype;if(e.M||e.P||t.watchers){t.watchers&&!e.P&&(e.P=t.watchers);const c=Object.entries(null!=(l=e.M)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).L.get(e))(0,t)},set(o){((t,e,o,l)=>{const r=n(t);if(!r)throw Error(`Couldn't find host element for "${l.$}" 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=r.$hostElement$,c=r.L.get(e),u=r.o,a=r.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.M[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.L.set(e,o),a)){if(l.P&&128&u){const t=l.P[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,i)}}))}2==(18&u)&&Z(r,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.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 o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.P)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.P)?r:{}),...c.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},at=t=>{it(t,"disconnectedCallback")},ft=(t,o={})=>{var l;const h=[],m=o.exclude||[],d=u.customElements,w=a.head,y=w.querySelector("meta[charset]"),$=a.createElement("style"),v=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],$:o[1],M:o[2],R:o[3]};4&c.o&&(S=!0),c.M=o[2],c.P=null!=(l=o[4])?l:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,j:n,L:new Map};o.T=new Promise((t=>o.C=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?v.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.j,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.S=n);break}}o.M&&Object.entries(o.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.A){const t=(t=>{const e=t.$.replace(/-/g,"_"),n=t.A;if(!n)return;const o=r.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(r.set(n,t),t[e])),s)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.$}#${e.F}" was not found`);o.isProxied||(n.P=o.watchers,ut(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){s(t)}e.o&=-9,e.o|=128,l()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=N(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.S,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);(null==t?void 0:t.t)?at(t.t):(null==t?void 0:t.T)&&t.T.then((()=>at(t.t)))}})()))}componentOnReady(){return n(this).T}};c.A=t[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ut(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.O)?l:O(a);null!=t&&$.setAttribute("nonce",t),w.insertBefore($,y?y.nextSibling:w.firstChild)}g=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(rt,30)))},ht=t=>f.O=t;export{ft as b,R as h,h as p,o as r,ht as s}
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],w=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.o?b(v):f.raf(v))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},v=()=>{$(m),$(w),(d=m.length>0)&&f.raf(v)},b=t=>h().then(t),g=y(w,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>E,ok:()=>k,unwrap:()=>P,unwrapErr:()=>L});var k=t=>({isOk:!0,isErr:!1,value:t}),C=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=>k(t))):k(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},L=t=>{if(t.isErr)return t.value;throw t.value},R=(t,e,...n)=>{let o=null,l=!1,s=!1;const r=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&s?r[r.length-1].i+=o:r.push(l?T(null,o):o),s=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=T(t,null);return c.u=e,r.length>0&&(c.h=r),c},T=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},F=new WeakMap,N=t=>"sc-"+t.$,U=(t,e,n,o,s,r)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=D(n),s=D(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&r||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(H);e=e.replace(q,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},W=/\s/,D=t=>t?t.split(W):[],H="Capture",q=RegExp(H+"$"),G=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,s=e.u||S;for(const t of V(Object.keys(l)))t in s||U(o,t,l[t],void 0,n,e.o);for(const t of V(Object.keys(s)))U(o,t,l[t],s[t],n,e.o)};function V(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var _=!1,z=(t,e,n)=>{const o=e.h[n];let l,s,r=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),G(null,o,_),null!=M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.h)for(r=0;r<o.h.length;++r)s=z(t,o,r),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=x,l},B=(t,e,n,o,l,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=z(null,n,l),r&&(o[l].m=r,X(i,r,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e)=>t.p===e.p,K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,r=e.p,i=e.i;null===i?(G(t,e,_="svg"===r||"foreignObject"!==r&&_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r=0,i=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],p=o[f];for(;r<=c&&i<=f;)null==u?u=e[++r]:null==a?a=e[--c]:null==h?h=o[++i]:null==p?p=o[--f]:J(u,h)?(K(u,h,l),u=e[++r],h=o[++i]):J(a,p)?(K(a,p,l),a=e[--c],p=o[--f]):J(u,p)?(K(u,p,l),X(t,u.m,a.m.nextSibling),u=e[++r],p=o[--f]):J(a,h)?(K(a,h,l),X(t,a.m,u.m),a=e[--c],h=o[++i]):(s=z(e&&e[i],n,i),h=o[++i],s&&X(u.m.parentNode,s,u.m));r>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&I(e,r,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),B(o,null,e,s,0,s.length-1)):null!==l&&I(l,0,l.length-1),_&&"svg"===r&&(_=!1)):t.i!==i&&(o.data=i)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.S),g((()=>tt(t,e)));t.o|=512},tt=(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 o;return e&&(o=it(n,"componentWillLoad")),et(o,(()=>ot(t,n,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=N(e),l=i.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,r=F.get(t=t.head||t);if(r||F.set(t,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const e=null!=(n=f.O)?n:O(a);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.o&&(s.innerHTML+=c),r&&r.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.j,s=t.k||T(null,null),r=(t=>t&&t.p===A)(e)?e:R(null,null,e);if(x=o.tagName,n&&r.u)for(const t of Object.keys(r.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.u[t]=o[t]);r.p=null,r.o|=4,t.k=r,r.m=s.m=o.shadowRoot||o,M=o["s-sc"],K(s,r,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.t,o=t.S;64&t.o||(t.o|=64,ct(e),it(n,"componentDidLoad"),t.C(e),o||rt()),t.v&&(t.v(),t.v=void 0),512&t.o&&b((()=>Z(t,!1))),t.o&=-517},rt=()=>{ct(a.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-news-notification"}});return t.dispatchEvent(e),e})(u)))},it=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,o)=>{var l,r;const i=t.prototype;if(e.M||e.P||t.watchers){t.watchers&&!e.P&&(e.P=t.watchers);const c=Object.entries(null!=(l=e.M)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).L.get(e))(0,t)},set(o){((t,e,o,l)=>{const r=n(t);if(!r)throw Error(`Couldn't find host element for "${l.$}" 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=r.$hostElement$,c=r.L.get(e),u=r.o,a=r.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.M[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.L.set(e,o),a)){if(l.P&&128&u){const t=l.P[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,i)}}))}2==(18&u)&&Z(r,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.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 o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.P)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.P)?r:{}),...c.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},at=t=>{it(t,"connectedCallback")},ft=t=>{it(t,"disconnectedCallback")},ht=(t,o={})=>{var l;const h=[],d=o.exclude||[],m=u.customElements,w=a.head,y=w.querySelector("meta[charset]"),$=a.createElement("style"),v=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],$:o[1],M:o[2],R:o[3]};4&c.o&&(S=!0),c.M=o[2],c.P=null!=(l=o[4])?l:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,j:n,L:new Map};o.T=new Promise((t=>o.C=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?v.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.j,l=()=>{};if(1&e.o)(null==e?void 0:e.t)?at(e.t):(null==e?void 0:e.T)&&e.T.then((()=>at(e.t)));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.S=n);break}}o.M&&Object.entries(o.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.A){const t=(t=>{const e=t.$.replace(/-/g,"_"),n=t.A;if(!n)return;const o=r.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(r.set(n,t),t[e])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.$}#${e.F}" was not found`);o.isProxied||(n.P=o.watchers,ut(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){s(t)}e.o&=-9,e.o|=128,l(),at(e.t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=N(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.S,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);(null==t?void 0:t.t)?ft(t.t):(null==t?void 0:t.T)&&t.T.then((()=>ft(t.t)))}})()))}componentOnReady(){return n(this).T}};c.A=t[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ut(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.O)?l:O(a);null!=t&&$.setAttribute("nonce",t),w.insertBefore($,y?y.nextSibling:w.firstChild)}g=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(rt,30)))},pt=t=>f.O=t;export{ht as b,R as h,h as p,o as r,pt as s}
@@ -0,0 +1 @@
1
+ import{r as t,h as i}from"./p-949e16b6.js";const e=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"},o={en:{loading:"Is Loading ..."}},s=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{o[i]||(o[i]={});for(let e in t[i])o[i][e]=t[i][e]})),i(!0)}))}));function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function a(t,i){const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const r=class{constructor(i){t(this,i),this.getNotificationMessage=()=>{this.isLoading=!0;try{let t=new URL(`${this.cmsEndpoint}/${this.language}/header-notification`);t.searchParams.append("device",e()),t.searchParams.append("platform",e()),fetch(t.href).then((t=>{if(200===t.status)return t.json();throw new Error("HTTP status "+t.status)})).then((t=>{this.message=t.message})).catch((t=>{console.error(t)})).finally((()=>this.isLoading=!1))}catch(t){console.error("Error fetching message:",t)}},this.toggleMinimize=()=>{this.isMinimized=!this.isMinimized,window.postMessage({type:"NewsWidgetResize",status:"minimized"},window.location.href)},this.closeNotification=()=>{this.isClosed=!0,window.postMessage({type:"NewsWidgetResize",status:"closed"},window.location.href)},this.cmsEndpoint=void 0,this.language=void 0,this.animationType="static",this.speed=30,this.canMinimize=!1,this.canClose=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.message=void 0,this.isMinimized=!1,this.isClosed=!1,this.isLoading=!0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.language&&this.getNotificationMessage()}handleClientStylingChange(t,i){t!=i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!=i&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}handleNewTranslations(){this.isLoading=!0,s(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}componentDidLoad(){window.postMessage({type:"NewsWidgetResize",status:"loaded"},window.location.href),this.stylingContainer&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{e.innerHTML=i,t&&t.appendChild(e)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.cmsEndpoint&&this.language&&this.getNotificationMessage()}render(){if(this.isClosed)return null;const t=`${this.speed}s`;return i("div",{ref:t=>this.stylingContainer=t},this.canMinimize&&i("button",{class:"ToggleButton",onClick:this.toggleMinimize},i("span",{class:this.isMinimized?"TriangleActive":"TriangleInactive"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},i("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),i("div",{class:{NotificationWrapper:!0,Minimized:this.isMinimized}},i("div",{class:{SlidingBar:!0,Minimized:this.isMinimized,ScrollLeft:"scroll-left"===this.animationType,ScrollRight:"scroll-right"===this.animationType,VisibleButtons:this.canMinimize||!0===this.canClose}},i("div",{class:"Message",style:{animationDuration:t}},this.isLoading?((t,i)=>{let e=o[void 0!==i&&i in o?i:"en"].loading;return e})(0,this.language):this.message)),this.canClose&&i("div",{class:"CloseButton"},i("button",{onClick:this.closeNotification},"X"))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}}};r.style=":host{display:block}.NotificationWrapper{background:var(--emw--header-color-background, var(--emw--color-background, #000000));color:var(--emw--color-white, #FFFFFF);position:sticky;width:100%;text-align:center;overflow:hidden;display:flex;justify-content:flex-end;align-items:center;border-bottom:6px solid var(--emw--color-primary, #22B04E);max-height:40px}.SlidingBar{transition:all 0.3s ease-in-out;width:100%}.Message{will-change:transform;margin:0 auto;padding:10px;width:90%}.ScrollLeft .Message{white-space:nowrap;animation:scroll-left 10s linear infinite;width:100%}.ScrollRight .Message{white-space:nowrap;animation:scroll-right 10s linear infinite;width:100%}.VisibleButtons .Message{display:flex}@keyframes scroll-left{from{transform:translateX(100%)}to{transform:translateX(-100%)}}@keyframes scroll-right{from{transform:translateX(-100%)}to{transform:translateX(100%)}}.SlidingBar:hover .Message{animation-play-state:paused}.CloseButton{padding-left:10px;background-color:var(--emw--header-color-background, var(--emw--color-background, #000000));display:flex;gap:10px}.ToggleButton{position:absolute;left:0}.ToggleButton .TriangleActive,.ToggleButton .TriangleInactive{display:block;transition:all 0.2s}.ToggleButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:8px}.ToggleButton svg{fill:var(--emw--header-color-background, var(--emw--color-background, #000000));width:16px;transform:rotate(180deg)}.CloseButton{right:10px}button{background-color:var(--emw--color-primary, #22B04E);color:var(--emw--header-color-background, var(--emw--color-background, #000000));border:none;width:40px;height:40px;cursor:pointer}.NotificationWrapper.Minimized{visibility:hidden}";export{r as G}
@@ -52,7 +52,7 @@ export declare class GeneralNewsNotification {
52
52
  componentWillLoad(): Promise<void>;
53
53
  componentDidLoad(): void;
54
54
  disconnectedCallback(): void;
55
- connectedCallback: () => void;
55
+ connectedCallback(): void;
56
56
  getNotificationMessage: () => void;
57
57
  toggleMinimize: () => void;
58
58
  closeNotification: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-news-notification",
3
- "version": "1.63.0",
3
+ "version": "1.63.2",
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,h as i}from"./p-b1020fc5.js";const e=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"},s={en:{loading:"Is Loading ..."}},o=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{s[i]||(s[i]={});for(let e in t[i])s[i][e]=t[i][e]})),i(!0)}))}));function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function a(t,i){const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const r=class{constructor(i){t(this,i),this.connectedCallback=()=>{this.cmsEndpoint&&this.language&&this.getNotificationMessage()},this.getNotificationMessage=()=>{this.isLoading=!0;try{let t=new URL(`${this.cmsEndpoint}/${this.language}/header-notification`);t.searchParams.append("device",e()),t.searchParams.append("platform",e()),fetch(t.href).then((t=>{if(200===t.status)return t.json();throw new Error("HTTP status "+t.status)})).then((t=>{this.message=t.message})).catch((t=>{console.error(t)})).finally((()=>this.isLoading=!1))}catch(t){console.error("Error fetching message:",t)}},this.toggleMinimize=()=>{this.isMinimized=!this.isMinimized,window.postMessage({type:"NewsWidgetResize",status:"minimized"},window.location.href)},this.closeNotification=()=>{this.isClosed=!0,window.postMessage({type:"NewsWidgetResize",status:"closed"},window.location.href)},this.cmsEndpoint=void 0,this.language=void 0,this.animationType="static",this.speed=30,this.canMinimize=!1,this.canClose=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.message=void 0,this.isMinimized=!1,this.isClosed=!1,this.isLoading=!0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.language&&this.getNotificationMessage()}handleClientStylingChange(t,i){t!=i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!=i&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}handleNewTranslations(){this.isLoading=!0,o(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await o(this.translationUrl)}componentDidLoad(){window.postMessage({type:"NewsWidgetResize",status:"loaded"},window.location.href),this.stylingContainer&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{e.innerHTML=i,t&&t.appendChild(e)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){if(this.isClosed)return null;const t=`${this.speed}s`;return i("div",{ref:t=>this.stylingContainer=t},this.canMinimize&&i("button",{class:"ToggleButton",onClick:this.toggleMinimize},i("span",{class:this.isMinimized?"TriangleActive":"TriangleInactive"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},i("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),i("div",{class:{NotificationWrapper:!0,Minimized:this.isMinimized}},i("div",{class:{SlidingBar:!0,Minimized:this.isMinimized,ScrollLeft:"scroll-left"===this.animationType,ScrollRight:"scroll-right"===this.animationType,VisibleButtons:this.canMinimize||!0===this.canClose}},i("div",{class:"Message",style:{animationDuration:t}},this.isLoading?((t,i)=>{let e=s[void 0!==i&&i in s?i:"en"].loading;return e})(0,this.language):this.message)),this.canClose&&i("div",{class:"CloseButton"},i("button",{onClick:this.closeNotification},"X"))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["handleNewTranslations"]}}};r.style=":host{display:block}.NotificationWrapper{background:var(--emw--header-color-background, var(--emw--color-background, #000000));color:var(--emw--color-white, #FFFFFF);position:sticky;width:100%;text-align:center;overflow:hidden;display:flex;justify-content:flex-end;align-items:center;border-bottom:6px solid var(--emw--color-primary, #22B04E);max-height:40px}.SlidingBar{transition:all 0.3s ease-in-out;width:100%}.Message{will-change:transform;margin:0 auto;padding:10px;width:90%}.ScrollLeft .Message{white-space:nowrap;animation:scroll-left 10s linear infinite;width:100%}.ScrollRight .Message{white-space:nowrap;animation:scroll-right 10s linear infinite;width:100%}.VisibleButtons .Message{display:flex}@keyframes scroll-left{from{transform:translateX(100%)}to{transform:translateX(-100%)}}@keyframes scroll-right{from{transform:translateX(-100%)}to{transform:translateX(100%)}}.SlidingBar:hover .Message{animation-play-state:paused}.CloseButton{padding-left:10px;background-color:var(--emw--header-color-background, var(--emw--color-background, #000000));display:flex;gap:10px}.ToggleButton{position:absolute;left:0}.ToggleButton .TriangleActive,.ToggleButton .TriangleInactive{display:block;transition:all 0.2s}.ToggleButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:8px}.ToggleButton svg{fill:var(--emw--header-color-background, var(--emw--color-background, #000000));width:16px;transform:rotate(180deg)}.CloseButton{right:10px}button{background-color:var(--emw--color-primary, #22B04E);color:var(--emw--header-color-background, var(--emw--color-background, #000000));border:none;width:40px;height:40px;cursor:pointer}.NotificationWrapper.Minimized{visibility:hidden}";export{r as G}
@@ -1 +0,0 @@
1
- export{G as general_news_notification}from"./p-1d13531c.js";import"./p-b1020fc5.js";