proto-ikons-wc 0.1.0 → 0.1.1

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-5079b1b1.js');
5
+ const index = require('./index-6c2fd3c8.js');
6
6
 
7
7
  const acuraIkonCss = "";
8
8
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'proto-ikons-wc';
24
- const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: 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: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, 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: true, vdomXlink: true, watchCallback: false };
24
+ const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: 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: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, 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: true, vdomXlink: true, watchCallback: false };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.27.0 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -37,10 +37,15 @@ var SVG_NS = "http://www.w3.org/2000/svg";
37
37
  var HTML_NS = "http://www.w3.org/1999/xhtml";
38
38
 
39
39
  // src/client/client-host-ref.ts
40
- var hostRefs = /* @__PURE__ */ new WeakMap();
41
- var getHostRef = (ref) => hostRefs.get(ref);
40
+ var getHostRef = (ref) => {
41
+ if (ref.__stencil__getHostRef) {
42
+ return ref.__stencil__getHostRef();
43
+ }
44
+ return void 0;
45
+ };
42
46
  var registerInstance = (lazyInstance, hostRef) => {
43
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
47
+ lazyInstance.__stencil__getHostRef = () => hostRef;
48
+ hostRef.$lazyInstance$ = lazyInstance;
44
49
  };
45
50
  var registerHost = (hostElement, cmpMeta) => {
46
51
  const hostRef = {
@@ -54,7 +59,8 @@ var registerHost = (hostElement, cmpMeta) => {
54
59
  hostElement["s-p"] = [];
55
60
  hostElement["s-rc"] = [];
56
61
  }
57
- const ref = hostRefs.set(hostElement, hostRef);
62
+ const ref = hostRef;
63
+ hostElement.__stencil__getHostRef = () => ref;
58
64
  return ref;
59
65
  };
60
66
  var isMemberInElement = (elm, memberName) => memberName in elm;
@@ -400,61 +406,62 @@ var attachStyles = (hostRef) => {
400
406
  };
401
407
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
402
408
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
403
- if (oldValue !== newValue) {
404
- let isProp = isMemberInElement(elm, memberName);
405
- let ln = memberName.toLowerCase();
406
- if (memberName === "class") {
407
- const classList = elm.classList;
408
- const oldClasses = parseClassList(oldValue);
409
- let newClasses = parseClassList(newValue);
410
- {
411
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
412
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
413
- }
414
- } else if (memberName === "key") ; else {
415
- const isComplex = isComplexType(newValue);
416
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
417
- try {
418
- if (!elm.tagName.includes("-")) {
419
- const n = newValue == null ? "" : newValue;
420
- if (memberName === "list") {
421
- isProp = false;
422
- } else if (oldValue == null || elm[memberName] != n) {
423
- if (typeof elm.__lookupSetter__(memberName) === "function") {
424
- elm[memberName] = n;
425
- } else {
426
- elm.setAttribute(memberName, n);
427
- }
409
+ if (oldValue === newValue) {
410
+ return;
411
+ }
412
+ let isProp = isMemberInElement(elm, memberName);
413
+ let ln = memberName.toLowerCase();
414
+ if (memberName === "class") {
415
+ const classList = elm.classList;
416
+ const oldClasses = parseClassList(oldValue);
417
+ let newClasses = parseClassList(newValue);
418
+ {
419
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
420
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
421
+ }
422
+ } else if (memberName === "key") ; else {
423
+ const isComplex = isComplexType(newValue);
424
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
425
+ try {
426
+ if (!elm.tagName.includes("-")) {
427
+ const n = newValue == null ? "" : newValue;
428
+ if (memberName === "list") {
429
+ isProp = false;
430
+ } else if (oldValue == null || elm[memberName] != n) {
431
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
432
+ elm[memberName] = n;
433
+ } else {
434
+ elm.setAttribute(memberName, n);
428
435
  }
429
- } else if (elm[memberName] !== newValue) {
430
- elm[memberName] = newValue;
431
436
  }
432
- } catch (e) {
437
+ } else if (elm[memberName] !== newValue) {
438
+ elm[memberName] = newValue;
433
439
  }
440
+ } catch (e) {
434
441
  }
435
- let xlink = false;
436
- {
437
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
438
- memberName = ln;
439
- xlink = true;
440
- }
442
+ }
443
+ let xlink = false;
444
+ {
445
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
446
+ memberName = ln;
447
+ xlink = true;
441
448
  }
442
- if (newValue == null || newValue === false) {
443
- if (newValue !== false || elm.getAttribute(memberName) === "") {
444
- if (xlink) {
445
- elm.removeAttributeNS(XLINK_NS, memberName);
446
- } else {
447
- elm.removeAttribute(memberName);
448
- }
449
- }
450
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
451
- newValue = newValue === true ? "" : newValue;
449
+ }
450
+ if (newValue == null || newValue === false) {
451
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
452
452
  if (xlink) {
453
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
453
+ elm.removeAttributeNS(XLINK_NS, memberName);
454
454
  } else {
455
- elm.setAttribute(memberName, newValue);
455
+ elm.removeAttribute(memberName);
456
456
  }
457
457
  }
458
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
459
+ newValue = newValue === true ? "" : newValue;
460
+ if (xlink) {
461
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
462
+ } else {
463
+ elm.setAttribute(memberName, newValue);
464
+ }
458
465
  }
459
466
  }
460
467
  };
@@ -680,9 +687,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
680
687
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
681
688
  }
682
689
  {
683
- {
684
- updateElement(oldVNode, newVNode2, isSvgMode);
685
- }
690
+ updateElement(oldVNode, newVNode2, isSvgMode);
686
691
  }
687
692
  if (oldChildren !== null && newChildren !== null) {
688
693
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -764,6 +769,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
764
769
  );
765
770
  }
766
771
  let maybePromise;
772
+ if (isInitialLoad) {
773
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
774
+ } else {
775
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
776
+ }
777
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
767
778
  endSchedule();
768
779
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
769
780
  };
@@ -827,12 +838,15 @@ var postUpdateComponent = (hostRef) => {
827
838
  const tagName = hostRef.$cmpMeta$.$tagName$;
828
839
  const elm = hostRef.$hostElement$;
829
840
  const endPostUpdate = createTime("postUpdate", tagName);
841
+ const instance = hostRef.$lazyInstance$ ;
830
842
  const ancestorComponent = hostRef.$ancestorComponent$;
843
+ safeCall(instance, "componentDidRender", void 0, elm);
831
844
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
832
845
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
833
846
  {
834
847
  addHydratedFlag(elm);
835
848
  }
849
+ safeCall(instance, "componentDidLoad", void 0, elm);
836
850
  endPostUpdate();
837
851
  {
838
852
  hostRef.$onReadyResolve$(elm);
@@ -841,6 +855,7 @@ var postUpdateComponent = (hostRef) => {
841
855
  }
842
856
  }
843
857
  } else {
858
+ safeCall(instance, "componentDidUpdate", void 0, elm);
844
859
  endPostUpdate();
845
860
  }
846
861
  {
@@ -857,6 +872,16 @@ var postUpdateComponent = (hostRef) => {
857
872
  var appDidLoad = (who) => {
858
873
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
859
874
  };
875
+ var safeCall = (instance, method, arg, elm) => {
876
+ if (instance && instance[method]) {
877
+ try {
878
+ return instance[method](arg);
879
+ } catch (e) {
880
+ consoleError(e, elm);
881
+ }
882
+ }
883
+ return void 0;
884
+ };
860
885
  var addHydratedFlag = (elm) => {
861
886
  var _a;
862
887
  return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
@@ -881,6 +906,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
881
906
  hostRef.$instanceValues$.set(propName, newVal);
882
907
  if (instance) {
883
908
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
909
+ if (instance.componentShouldUpdate) {
910
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
911
+ return;
912
+ }
913
+ }
884
914
  scheduleUpdate(hostRef, false);
885
915
  }
886
916
  }
@@ -1043,6 +1073,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1043
1073
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1044
1074
  }
1045
1075
  endNewInstance();
1076
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1046
1077
  } else {
1047
1078
  Cstr = elm.constructor;
1048
1079
  const cmpTag = elm.localName;
@@ -1070,6 +1101,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1070
1101
  }
1071
1102
  };
1072
1103
  var fireConnectedCallback = (instance, elm) => {
1104
+ {
1105
+ safeCall(instance, "connectedCallback", void 0, elm);
1106
+ }
1073
1107
  };
1074
1108
 
1075
1109
  // src/runtime/connected-callback.ts
@@ -1102,20 +1136,27 @@ var connectedCallback = (elm) => {
1102
1136
  initializeComponent(elm, hostRef, cmpMeta);
1103
1137
  }
1104
1138
  } else {
1105
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1106
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1139
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1140
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1141
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1142
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1107
1143
  }
1108
1144
  }
1109
1145
  endConnected();
1110
1146
  }
1111
1147
  };
1112
1148
  var disconnectInstance = (instance, elm) => {
1149
+ {
1150
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1151
+ }
1113
1152
  };
1114
1153
  var disconnectedCallback = async (elm) => {
1115
1154
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1116
1155
  const hostRef = getHostRef(elm);
1117
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1118
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1156
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1157
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1158
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1159
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1119
1160
  }
1120
1161
  }
1121
1162
  if (rootAppliedStyles.has(elm)) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5079b1b1.js');
5
+ const index = require('./index-6c2fd3c8.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5079b1b1.js');
5
+ const index = require('./index-6c2fd3c8.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.27.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('proto-ikons-wc.cjs.js', document.baseURI).href));
@@ -122,7 +122,7 @@
122
122
  ],
123
123
  "compiler": {
124
124
  "name": "@stencil/core",
125
- "version": "4.26.0",
125
+ "version": "4.27.0",
126
126
  "typescriptVersion": "5.5.4"
127
127
  },
128
128
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-9f1252b7.js';
1
+ import { r as registerInstance, h } from './index-11bb37f0.js';
2
2
 
3
3
  const acuraIkonCss = "";
4
4
  const AcuraIkonStyle0 = acuraIkonCss;
@@ -1,8 +1,8 @@
1
1
  const NAMESPACE = 'proto-ikons-wc';
2
- const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: 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: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, 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: true, vdomXlink: true, watchCallback: false };
2
+ const BUILD = /* proto-ikons-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: 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: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: 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: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, 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: true, vdomXlink: true, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.27.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -15,10 +15,15 @@ var SVG_NS = "http://www.w3.org/2000/svg";
15
15
  var HTML_NS = "http://www.w3.org/1999/xhtml";
16
16
 
17
17
  // src/client/client-host-ref.ts
18
- var hostRefs = /* @__PURE__ */ new WeakMap();
19
- var getHostRef = (ref) => hostRefs.get(ref);
18
+ var getHostRef = (ref) => {
19
+ if (ref.__stencil__getHostRef) {
20
+ return ref.__stencil__getHostRef();
21
+ }
22
+ return void 0;
23
+ };
20
24
  var registerInstance = (lazyInstance, hostRef) => {
21
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
25
+ lazyInstance.__stencil__getHostRef = () => hostRef;
26
+ hostRef.$lazyInstance$ = lazyInstance;
22
27
  };
23
28
  var registerHost = (hostElement, cmpMeta) => {
24
29
  const hostRef = {
@@ -32,7 +37,8 @@ var registerHost = (hostElement, cmpMeta) => {
32
37
  hostElement["s-p"] = [];
33
38
  hostElement["s-rc"] = [];
34
39
  }
35
- const ref = hostRefs.set(hostElement, hostRef);
40
+ const ref = hostRef;
41
+ hostElement.__stencil__getHostRef = () => ref;
36
42
  return ref;
37
43
  };
38
44
  var isMemberInElement = (elm, memberName) => memberName in elm;
@@ -378,61 +384,62 @@ var attachStyles = (hostRef) => {
378
384
  };
379
385
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
380
386
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
381
- if (oldValue !== newValue) {
382
- let isProp = isMemberInElement(elm, memberName);
383
- let ln = memberName.toLowerCase();
384
- if (memberName === "class") {
385
- const classList = elm.classList;
386
- const oldClasses = parseClassList(oldValue);
387
- let newClasses = parseClassList(newValue);
388
- {
389
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
390
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
391
- }
392
- } else if (memberName === "key") ; else {
393
- const isComplex = isComplexType(newValue);
394
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
395
- try {
396
- if (!elm.tagName.includes("-")) {
397
- const n = newValue == null ? "" : newValue;
398
- if (memberName === "list") {
399
- isProp = false;
400
- } else if (oldValue == null || elm[memberName] != n) {
401
- if (typeof elm.__lookupSetter__(memberName) === "function") {
402
- elm[memberName] = n;
403
- } else {
404
- elm.setAttribute(memberName, n);
405
- }
387
+ if (oldValue === newValue) {
388
+ return;
389
+ }
390
+ let isProp = isMemberInElement(elm, memberName);
391
+ let ln = memberName.toLowerCase();
392
+ if (memberName === "class") {
393
+ const classList = elm.classList;
394
+ const oldClasses = parseClassList(oldValue);
395
+ let newClasses = parseClassList(newValue);
396
+ {
397
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
398
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
399
+ }
400
+ } else if (memberName === "key") ; else {
401
+ const isComplex = isComplexType(newValue);
402
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
403
+ try {
404
+ if (!elm.tagName.includes("-")) {
405
+ const n = newValue == null ? "" : newValue;
406
+ if (memberName === "list") {
407
+ isProp = false;
408
+ } else if (oldValue == null || elm[memberName] != n) {
409
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
410
+ elm[memberName] = n;
411
+ } else {
412
+ elm.setAttribute(memberName, n);
406
413
  }
407
- } else if (elm[memberName] !== newValue) {
408
- elm[memberName] = newValue;
409
414
  }
410
- } catch (e) {
415
+ } else if (elm[memberName] !== newValue) {
416
+ elm[memberName] = newValue;
411
417
  }
418
+ } catch (e) {
412
419
  }
413
- let xlink = false;
414
- {
415
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
416
- memberName = ln;
417
- xlink = true;
418
- }
420
+ }
421
+ let xlink = false;
422
+ {
423
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
424
+ memberName = ln;
425
+ xlink = true;
419
426
  }
420
- if (newValue == null || newValue === false) {
421
- if (newValue !== false || elm.getAttribute(memberName) === "") {
422
- if (xlink) {
423
- elm.removeAttributeNS(XLINK_NS, memberName);
424
- } else {
425
- elm.removeAttribute(memberName);
426
- }
427
- }
428
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
429
- newValue = newValue === true ? "" : newValue;
427
+ }
428
+ if (newValue == null || newValue === false) {
429
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
430
430
  if (xlink) {
431
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
431
+ elm.removeAttributeNS(XLINK_NS, memberName);
432
432
  } else {
433
- elm.setAttribute(memberName, newValue);
433
+ elm.removeAttribute(memberName);
434
434
  }
435
435
  }
436
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
437
+ newValue = newValue === true ? "" : newValue;
438
+ if (xlink) {
439
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
440
+ } else {
441
+ elm.setAttribute(memberName, newValue);
442
+ }
436
443
  }
437
444
  }
438
445
  };
@@ -658,9 +665,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
658
665
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
659
666
  }
660
667
  {
661
- {
662
- updateElement(oldVNode, newVNode2, isSvgMode);
663
- }
668
+ updateElement(oldVNode, newVNode2, isSvgMode);
664
669
  }
665
670
  if (oldChildren !== null && newChildren !== null) {
666
671
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -742,6 +747,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
742
747
  );
743
748
  }
744
749
  let maybePromise;
750
+ if (isInitialLoad) {
751
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
752
+ } else {
753
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
754
+ }
755
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
745
756
  endSchedule();
746
757
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
747
758
  };
@@ -805,12 +816,15 @@ var postUpdateComponent = (hostRef) => {
805
816
  const tagName = hostRef.$cmpMeta$.$tagName$;
806
817
  const elm = hostRef.$hostElement$;
807
818
  const endPostUpdate = createTime("postUpdate", tagName);
819
+ const instance = hostRef.$lazyInstance$ ;
808
820
  const ancestorComponent = hostRef.$ancestorComponent$;
821
+ safeCall(instance, "componentDidRender", void 0, elm);
809
822
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
810
823
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
811
824
  {
812
825
  addHydratedFlag(elm);
813
826
  }
827
+ safeCall(instance, "componentDidLoad", void 0, elm);
814
828
  endPostUpdate();
815
829
  {
816
830
  hostRef.$onReadyResolve$(elm);
@@ -819,6 +833,7 @@ var postUpdateComponent = (hostRef) => {
819
833
  }
820
834
  }
821
835
  } else {
836
+ safeCall(instance, "componentDidUpdate", void 0, elm);
822
837
  endPostUpdate();
823
838
  }
824
839
  {
@@ -835,6 +850,16 @@ var postUpdateComponent = (hostRef) => {
835
850
  var appDidLoad = (who) => {
836
851
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
837
852
  };
853
+ var safeCall = (instance, method, arg, elm) => {
854
+ if (instance && instance[method]) {
855
+ try {
856
+ return instance[method](arg);
857
+ } catch (e) {
858
+ consoleError(e, elm);
859
+ }
860
+ }
861
+ return void 0;
862
+ };
838
863
  var addHydratedFlag = (elm) => {
839
864
  var _a;
840
865
  return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
@@ -859,6 +884,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
859
884
  hostRef.$instanceValues$.set(propName, newVal);
860
885
  if (instance) {
861
886
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
887
+ if (instance.componentShouldUpdate) {
888
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
889
+ return;
890
+ }
891
+ }
862
892
  scheduleUpdate(hostRef, false);
863
893
  }
864
894
  }
@@ -1021,6 +1051,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1021
1051
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
1022
1052
  }
1023
1053
  endNewInstance();
1054
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1024
1055
  } else {
1025
1056
  Cstr = elm.constructor;
1026
1057
  const cmpTag = elm.localName;
@@ -1048,6 +1079,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1048
1079
  }
1049
1080
  };
1050
1081
  var fireConnectedCallback = (instance, elm) => {
1082
+ {
1083
+ safeCall(instance, "connectedCallback", void 0, elm);
1084
+ }
1051
1085
  };
1052
1086
 
1053
1087
  // src/runtime/connected-callback.ts
@@ -1080,20 +1114,27 @@ var connectedCallback = (elm) => {
1080
1114
  initializeComponent(elm, hostRef, cmpMeta);
1081
1115
  }
1082
1116
  } else {
1083
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1084
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1117
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1118
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1119
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1120
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1085
1121
  }
1086
1122
  }
1087
1123
  endConnected();
1088
1124
  }
1089
1125
  };
1090
1126
  var disconnectInstance = (instance, elm) => {
1127
+ {
1128
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1129
+ }
1091
1130
  };
1092
1131
  var disconnectedCallback = async (elm) => {
1093
1132
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1094
1133
  const hostRef = getHostRef(elm);
1095
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1096
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1134
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1135
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1136
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1137
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1097
1138
  }
1098
1139
  }
1099
1140
  if (rootAppliedStyles.has(elm)) {
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-9f1252b7.js';
2
- export { s as setNonce } from './index-9f1252b7.js';
1
+ import { b as bootstrapLazy } from './index-11bb37f0.js';
2
+ export { s as setNonce } from './index-11bb37f0.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-9f1252b7.js';
2
- export { s as setNonce } from './index-9f1252b7.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-11bb37f0.js';
2
+ export { s as setNonce } from './index-11bb37f0.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.26.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.27.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;