@siemens/ix-icons 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/READMEOSS.html +10 -10
  2. package/components/index.js +1470 -1
  3. package/components/index.js.map +1 -1
  4. package/components/ix-icon.js +2 -1
  5. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  6. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  7. package/dist/cjs/{index-494dae28.js → index-DUsbo4-K.js} +191 -115
  8. package/dist/cjs/index-DUsbo4-K.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +250 -8
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/ix-icon.cjs.entry.js +4 -7
  12. package/dist/cjs/ix-icon.entry.cjs.js.map +1 -0
  13. package/dist/cjs/ix-icons.cjs.js +8 -9
  14. package/dist/cjs/ix-icons.cjs.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +4 -7
  16. package/dist/cjs/loader.cjs.js.map +1 -1
  17. package/dist/collection/collection-manifest.json +1 -1
  18. package/dist/collection/components/icon/icon.js +6 -6
  19. package/dist/collection/components/icon/icon.js.map +1 -1
  20. package/dist/collection/components/icon/parser.js +8 -1
  21. package/dist/collection/components/icon/parser.js.map +1 -1
  22. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  23. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  24. package/dist/esm/{index-22f745e9.js → index-BiqddxKp.js} +188 -110
  25. package/dist/esm/index-BiqddxKp.js.map +1 -0
  26. package/dist/esm/index.js +252 -3
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/ix-icon.entry.js +3 -4
  29. package/dist/esm/ix-icon.entry.js.map +1 -1
  30. package/dist/esm/ix-icons.js +7 -7
  31. package/dist/esm/ix-icons.js.map +1 -1
  32. package/dist/esm/loader.js +5 -6
  33. package/dist/esm/loader.js.map +1 -1
  34. package/dist/ix-icons/index.esm.js +1 -1
  35. package/dist/ix-icons/index.esm.js.map +1 -1
  36. package/dist/ix-icons/ix-icon.entry.esm.js.map +1 -0
  37. package/dist/ix-icons/ix-icons.esm.js +1 -1
  38. package/dist/ix-icons/ix-icons.esm.js.map +1 -1
  39. package/dist/ix-icons/loader.esm.js.map +1 -0
  40. package/dist/ix-icons/p-6b0af2cb.entry.js +2 -0
  41. package/dist/ix-icons/p-6b0af2cb.entry.js.map +1 -0
  42. package/dist/ix-icons/p-BiqddxKp.js +3 -0
  43. package/dist/ix-icons/p-BiqddxKp.js.map +1 -0
  44. package/dist/ix-icons/p-DQuL1Twl.js +2 -0
  45. package/dist/ix-icons/p-DQuL1Twl.js.map +1 -0
  46. package/dist/ix-icons/svg/app-update.svg +1 -0
  47. package/dist/ix-icons/svg/cam-disk-600-seg.svg +1 -0
  48. package/dist/ix-icons/svg/cam-disk-6k-seg.svg +1 -0
  49. package/dist/ix-icons/svg/chart-error-bar.svg +1 -0
  50. package/dist/ix-icons/svg/collapse-all.svg +1 -0
  51. package/dist/ix-icons/svg/configuration-safety.svg +1 -0
  52. package/dist/ix-icons/svg/connected-circle-filled.svg +1 -0
  53. package/dist/ix-icons/svg/connected-circle.svg +1 -0
  54. package/dist/ix-icons/svg/controller-device-safety.svg +1 -0
  55. package/dist/ix-icons/svg/database-safety.svg +1 -0
  56. package/dist/ix-icons/svg/disconnected-circle-filled.svg +1 -0
  57. package/dist/ix-icons/svg/disconnected-circle.svg +1 -0
  58. package/dist/ix-icons/svg/download-add.svg +1 -1
  59. package/dist/ix-icons/svg/download-list.svg +1 -1
  60. package/dist/ix-icons/svg/download.svg +1 -1
  61. package/dist/ix-icons/svg/drive-safety.svg +1 -0
  62. package/dist/ix-icons/svg/drive.svg +1 -0
  63. package/dist/ix-icons/svg/edit-document-filled.svg +1 -1
  64. package/dist/ix-icons/svg/edit-document.svg +1 -1
  65. package/dist/ix-icons/svg/emergency-stop-filled.svg +1 -0
  66. package/dist/ix-icons/svg/expand-all.svg +1 -0
  67. package/dist/ix-icons/svg/flare.svg +1 -0
  68. package/dist/ix-icons/svg/function-block-safety.svg +1 -0
  69. package/dist/ix-icons/svg/generic-device-alarm.svg +1 -0
  70. package/dist/ix-icons/svg/generic-device-brackets.svg +1 -0
  71. package/dist/ix-icons/svg/generic-device-cancelled.svg +1 -0
  72. package/dist/ix-icons/svg/generic-device-connected.svg +1 -0
  73. package/dist/ix-icons/svg/generic-device-dashed.svg +1 -0
  74. package/dist/ix-icons/svg/generic-device-disconnected.svg +1 -0
  75. package/dist/ix-icons/svg/generic-device-error.svg +1 -0
  76. package/dist/ix-icons/svg/generic-device-flare.svg +1 -0
  77. package/dist/ix-icons/svg/generic-device-forced-mode.svg +1 -0
  78. package/dist/ix-icons/svg/generic-device-incompatible.svg +1 -0
  79. package/dist/ix-icons/svg/generic-device-io-unavailable.svg +1 -0
  80. package/dist/ix-icons/svg/generic-device-lock.svg +1 -0
  81. package/dist/ix-icons/svg/generic-device-maintenance.svg +1 -0
  82. package/dist/ix-icons/svg/generic-device-pause.svg +1 -0
  83. package/dist/ix-icons/svg/generic-device-play.svg +1 -0
  84. package/dist/ix-icons/svg/generic-device-power-saving.svg +1 -0
  85. package/dist/ix-icons/svg/generic-device-published.svg +1 -0
  86. package/dist/ix-icons/svg/generic-device-question.svg +1 -0
  87. package/dist/ix-icons/svg/generic-device-refresh.svg +1 -0
  88. package/dist/ix-icons/svg/generic-device-reset.svg +1 -0
  89. package/dist/ix-icons/svg/generic-device-restart.svg +1 -0
  90. package/dist/ix-icons/svg/generic-device-rocket.svg +1 -0
  91. package/dist/ix-icons/svg/generic-device-safety.svg +1 -0
  92. package/dist/ix-icons/svg/generic-device-shield.svg +1 -0
  93. package/dist/ix-icons/svg/generic-device-shutdown.svg +1 -0
  94. package/dist/ix-icons/svg/generic-device-slash.svg +1 -0
  95. package/dist/ix-icons/svg/generic-device-software-alarm.svg +1 -0
  96. package/dist/ix-icons/svg/generic-device-standby.svg +1 -0
  97. package/dist/ix-icons/svg/generic-device-stop-userprogram.svg +1 -0
  98. package/dist/ix-icons/svg/generic-device-stop.svg +1 -0
  99. package/dist/ix-icons/svg/generic-device-success.svg +1 -0
  100. package/dist/ix-icons/svg/generic-device-synchronized.svg +1 -0
  101. package/dist/ix-icons/svg/generic-device-traffic.svg +1 -0
  102. package/dist/ix-icons/svg/generic-device.svg +1 -0
  103. package/dist/ix-icons/svg/helmet-safety-filled.svg +1 -0
  104. package/dist/ix-icons/svg/helmet-safety.svg +1 -0
  105. package/dist/ix-icons/svg/import-check.svg +1 -0
  106. package/dist/ix-icons/svg/import-failed.svg +1 -0
  107. package/dist/ix-icons/svg/import-progress.svg +1 -0
  108. package/dist/ix-icons/svg/incompatible.svg +1 -0
  109. package/dist/ix-icons/svg/live-feed.svg +1 -0
  110. package/dist/ix-icons/svg/lower-limit.svg +1 -1
  111. package/dist/ix-icons/svg/maintenance-filled.svg +1 -0
  112. package/dist/ix-icons/svg/maintenance-info-filled.svg +1 -0
  113. package/dist/ix-icons/svg/maintenance-info.svg +1 -1
  114. package/dist/ix-icons/svg/maintenance-octagon-filled.svg +1 -0
  115. package/dist/ix-icons/svg/maintenance-octagon.svg +1 -0
  116. package/dist/ix-icons/svg/maintenance-rhomb-filled.svg +1 -0
  117. package/dist/ix-icons/svg/maintenance-rhomb.svg +1 -0
  118. package/dist/ix-icons/svg/maintenance-square-filled.svg +1 -0
  119. package/dist/ix-icons/svg/maintenance-square.svg +1 -0
  120. package/dist/ix-icons/svg/maintenance-triangle-filled.svg +1 -0
  121. package/dist/ix-icons/svg/maintenance-triangle.svg +1 -0
  122. package/dist/ix-icons/svg/maintenance.svg +1 -1
  123. package/dist/ix-icons/svg/output-cam.svg +1 -0
  124. package/dist/ix-icons/svg/profisafe-logo.svg +1 -0
  125. package/dist/ix-icons/svg/restart.svg +1 -0
  126. package/dist/ix-icons/svg/rocket-circle-filled.svg +1 -0
  127. package/dist/ix-icons/svg/rocket-circle.svg +1 -0
  128. package/dist/ix-icons/svg/ruler-diagonal.svg +1 -0
  129. package/dist/ix-icons/svg/safety-settings.svg +1 -0
  130. package/dist/ix-icons/svg/send-right-filled.svg +1 -0
  131. package/dist/ix-icons/svg/send-right.svg +1 -0
  132. package/dist/ix-icons/svg/send-top-right-filled.svg +1 -0
  133. package/dist/ix-icons/svg/send-top-right.svg +1 -0
  134. package/dist/ix-icons/svg/sensor.svg +1 -0
  135. package/dist/ix-icons/svg/shutdown.svg +1 -0
  136. package/dist/ix-icons/svg/tag-safety-filled.svg +1 -0
  137. package/dist/ix-icons/svg/tag-safety.svg +1 -0
  138. package/dist/ix-icons/svg/traffic-left-right.svg +1 -0
  139. package/dist/ix-icons/svg/update-application.svg +1 -0
  140. package/dist/ix-icons/svg/upload-fail.svg +1 -1
  141. package/dist/ix-icons/svg/upload-success.svg +1 -1
  142. package/dist/ix-icons/svg/upload.svg +1 -1
  143. package/dist/ix-icons/svg/upper-limit.svg +1 -1
  144. package/dist/ix-icons/svg/warning-hexagon-filled.svg +1 -0
  145. package/dist/ix-icons/svg/warning-hexagon.svg +1 -0
  146. package/dist/ix-icons/svg/warning-octagon-filled.svg +1 -0
  147. package/dist/ix-icons/svg/warning-octagon.svg +1 -0
  148. package/dist/ix-icons/svg/warning-square-filled.svg +1 -0
  149. package/dist/ix-icons/svg/warning-square.svg +1 -0
  150. package/dist/sample.json +92 -0
  151. package/dist/types/components.d.ts +4 -0
  152. package/dist/types/stencil-public-runtime.d.ts +58 -6
  153. package/icons/index.d.ts +92 -0
  154. package/icons/index.js +104 -12
  155. package/icons/index.mjs +104 -12
  156. package/icons/package.json +1 -1
  157. package/package.json +14 -11
  158. package/svg/app-update.svg +1 -0
  159. package/svg/cam-disk-600-seg.svg +1 -0
  160. package/svg/cam-disk-6k-seg.svg +1 -0
  161. package/svg/chart-error-bar.svg +1 -0
  162. package/svg/collapse-all.svg +1 -0
  163. package/svg/configuration-safety.svg +1 -0
  164. package/svg/connected-circle-filled.svg +1 -0
  165. package/svg/connected-circle.svg +1 -0
  166. package/svg/controller-device-safety.svg +1 -0
  167. package/svg/database-safety.svg +1 -0
  168. package/svg/disconnected-circle-filled.svg +1 -0
  169. package/svg/disconnected-circle.svg +1 -0
  170. package/svg/download-add.svg +1 -1
  171. package/svg/download-list.svg +1 -1
  172. package/svg/download.svg +1 -1
  173. package/svg/drive-safety.svg +1 -0
  174. package/svg/drive.svg +1 -0
  175. package/svg/edit-document-filled.svg +1 -1
  176. package/svg/edit-document.svg +1 -1
  177. package/svg/emergency-stop-filled.svg +1 -0
  178. package/svg/expand-all.svg +1 -0
  179. package/svg/flare.svg +1 -0
  180. package/svg/function-block-safety.svg +1 -0
  181. package/svg/generic-device-alarm.svg +1 -0
  182. package/svg/generic-device-brackets.svg +1 -0
  183. package/svg/generic-device-cancelled.svg +1 -0
  184. package/svg/generic-device-connected.svg +1 -0
  185. package/svg/generic-device-dashed.svg +1 -0
  186. package/svg/generic-device-disconnected.svg +1 -0
  187. package/svg/generic-device-error.svg +1 -0
  188. package/svg/generic-device-flare.svg +1 -0
  189. package/svg/generic-device-forced-mode.svg +1 -0
  190. package/svg/generic-device-incompatible.svg +1 -0
  191. package/svg/generic-device-io-unavailable.svg +1 -0
  192. package/svg/generic-device-lock.svg +1 -0
  193. package/svg/generic-device-maintenance.svg +1 -0
  194. package/svg/generic-device-pause.svg +1 -0
  195. package/svg/generic-device-play.svg +1 -0
  196. package/svg/generic-device-power-saving.svg +1 -0
  197. package/svg/generic-device-published.svg +1 -0
  198. package/svg/generic-device-question.svg +1 -0
  199. package/svg/generic-device-refresh.svg +1 -0
  200. package/svg/generic-device-reset.svg +1 -0
  201. package/svg/generic-device-restart.svg +1 -0
  202. package/svg/generic-device-rocket.svg +1 -0
  203. package/svg/generic-device-safety.svg +1 -0
  204. package/svg/generic-device-shield.svg +1 -0
  205. package/svg/generic-device-shutdown.svg +1 -0
  206. package/svg/generic-device-slash.svg +1 -0
  207. package/svg/generic-device-software-alarm.svg +1 -0
  208. package/svg/generic-device-standby.svg +1 -0
  209. package/svg/generic-device-stop-userprogram.svg +1 -0
  210. package/svg/generic-device-stop.svg +1 -0
  211. package/svg/generic-device-success.svg +1 -0
  212. package/svg/generic-device-synchronized.svg +1 -0
  213. package/svg/generic-device-traffic.svg +1 -0
  214. package/svg/generic-device.svg +1 -0
  215. package/svg/helmet-safety-filled.svg +1 -0
  216. package/svg/helmet-safety.svg +1 -0
  217. package/svg/import-check.svg +1 -0
  218. package/svg/import-failed.svg +1 -0
  219. package/svg/import-progress.svg +1 -0
  220. package/svg/incompatible.svg +1 -0
  221. package/svg/live-feed.svg +1 -0
  222. package/svg/lower-limit.svg +1 -1
  223. package/svg/maintenance-filled.svg +1 -0
  224. package/svg/maintenance-info-filled.svg +1 -0
  225. package/svg/maintenance-info.svg +1 -1
  226. package/svg/maintenance-octagon-filled.svg +1 -0
  227. package/svg/maintenance-octagon.svg +1 -0
  228. package/svg/maintenance-rhomb-filled.svg +1 -0
  229. package/svg/maintenance-rhomb.svg +1 -0
  230. package/svg/maintenance-square-filled.svg +1 -0
  231. package/svg/maintenance-square.svg +1 -0
  232. package/svg/maintenance-triangle-filled.svg +1 -0
  233. package/svg/maintenance-triangle.svg +1 -0
  234. package/svg/maintenance.svg +1 -1
  235. package/svg/output-cam.svg +1 -0
  236. package/svg/profisafe-logo.svg +1 -0
  237. package/svg/restart.svg +1 -0
  238. package/svg/rocket-circle-filled.svg +1 -0
  239. package/svg/rocket-circle.svg +1 -0
  240. package/svg/ruler-diagonal.svg +1 -0
  241. package/svg/safety-settings.svg +1 -0
  242. package/svg/send-right-filled.svg +1 -0
  243. package/svg/send-right.svg +1 -0
  244. package/svg/send-top-right-filled.svg +1 -0
  245. package/svg/send-top-right.svg +1 -0
  246. package/svg/sensor.svg +1 -0
  247. package/svg/shutdown.svg +1 -0
  248. package/svg/tag-safety-filled.svg +1 -0
  249. package/svg/tag-safety.svg +1 -0
  250. package/svg/traffic-left-right.svg +1 -0
  251. package/svg/update-application.svg +1 -0
  252. package/svg/upload-fail.svg +1 -1
  253. package/svg/upload-success.svg +1 -1
  254. package/svg/upload.svg +1 -1
  255. package/svg/upper-limit.svg +1 -1
  256. package/svg/warning-hexagon-filled.svg +1 -0
  257. package/svg/warning-hexagon.svg +1 -0
  258. package/svg/warning-octagon-filled.svg +1 -0
  259. package/svg/warning-octagon.svg +1 -0
  260. package/svg/warning-square-filled.svg +1 -0
  261. package/svg/warning-square.svg +1 -0
  262. package/components/p-aee14f18.js +0 -1391
  263. package/components/p-aee14f18.js.map +0 -1
  264. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  265. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  266. package/dist/cjs/icon-1dc6c206.js +0 -251
  267. package/dist/cjs/icon-1dc6c206.js.map +0 -1
  268. package/dist/cjs/index-494dae28.js.map +0 -1
  269. package/dist/cjs/ix-icon.cjs.entry.js.map +0 -1
  270. package/dist/esm/app-globals-0f993ce5.js +0 -5
  271. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  272. package/dist/esm/icon-1ecd1404.js +0 -247
  273. package/dist/esm/icon-1ecd1404.js.map +0 -1
  274. package/dist/esm/index-22f745e9.js.map +0 -1
  275. package/dist/ix-icons/p-2a1a6384.entry.js +0 -2
  276. package/dist/ix-icons/p-2a1a6384.entry.js.map +0 -1
  277. package/dist/ix-icons/p-580c92f7.js +0 -3
  278. package/dist/ix-icons/p-580c92f7.js.map +0 -1
  279. package/dist/ix-icons/p-e1255160.js +0 -2
  280. package/dist/ix-icons/p-e1255160.js.map +0 -1
  281. package/dist/ix-icons/p-f9830889.js +0 -2
  282. package/dist/ix-icons/p-f9830889.js.map +0 -1
  283. package/loader/package.json +0 -11
@@ -1,1391 +0,0 @@
1
- const NAMESPACE = 'ix-icons';
2
- const BUILD = /* ix-icons */ { 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", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: false, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, 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, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: false, vdomXlink: false, watchCallback: true };
3
-
4
- /*
5
- Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
6
- */
7
- var __defProp = Object.defineProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
-
13
- // src/utils/constants.ts
14
- var SVG_NS = "http://www.w3.org/2000/svg";
15
- var HTML_NS = "http://www.w3.org/1999/xhtml";
16
-
17
- // src/client/client-host-ref.ts
18
- var getHostRef = (ref) => {
19
- if (ref.__stencil__getHostRef) {
20
- return ref.__stencil__getHostRef();
21
- }
22
- return void 0;
23
- };
24
- var registerHost = (hostElement, cmpMeta) => {
25
- const hostRef = {
26
- $flags$: 0,
27
- $hostElement$: hostElement,
28
- $cmpMeta$: cmpMeta,
29
- $instanceValues$: /* @__PURE__ */ new Map()
30
- };
31
- {
32
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
33
- hostElement["s-p"] = [];
34
- hostElement["s-rc"] = [];
35
- }
36
- const ref = hostRef;
37
- hostElement.__stencil__getHostRef = () => ref;
38
- return ref;
39
- };
40
- var isMemberInElement = (elm, memberName) => memberName in elm;
41
- var consoleError = (e, el) => (0, console.error)(e, el);
42
-
43
- // src/client/client-style.ts
44
- var styles = /* @__PURE__ */ new Map();
45
- var HYDRATED_STYLE_ID = "sty-id";
46
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
47
- var win = typeof window !== "undefined" ? window : {};
48
- var H = win.HTMLElement || class {
49
- };
50
- var plt = {
51
- $flags$: 0,
52
- $resourcesUrl$: "",
53
- jmp: (h2) => h2(),
54
- raf: (h2) => requestAnimationFrame(h2),
55
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
56
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
57
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
58
- };
59
- var promiseResolve = (v) => Promise.resolve(v);
60
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
61
- try {
62
- new CSSStyleSheet();
63
- return typeof new CSSStyleSheet().replaceSync === "function";
64
- } catch (e) {
65
- }
66
- return false;
67
- })() ;
68
- var queuePending = false;
69
- var queueDomReads = [];
70
- var queueDomWrites = [];
71
- var queueTask = (queue, write) => (cb) => {
72
- queue.push(cb);
73
- if (!queuePending) {
74
- queuePending = true;
75
- if (write && plt.$flags$ & 4 /* queueSync */) {
76
- nextTick(flush);
77
- } else {
78
- plt.raf(flush);
79
- }
80
- }
81
- };
82
- var consume = (queue) => {
83
- for (let i2 = 0; i2 < queue.length; i2++) {
84
- try {
85
- queue[i2](performance.now());
86
- } catch (e) {
87
- consoleError(e);
88
- }
89
- }
90
- queue.length = 0;
91
- };
92
- var flush = () => {
93
- consume(queueDomReads);
94
- {
95
- consume(queueDomWrites);
96
- if (queuePending = queueDomReads.length > 0) {
97
- plt.raf(flush);
98
- }
99
- }
100
- };
101
- var nextTick = (cb) => promiseResolve().then(cb);
102
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
103
-
104
- // src/runtime/asset-path.ts
105
- var getAssetPath = (path) => {
106
- const assetUrl = new URL(path, plt.$resourcesUrl$);
107
- return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
108
- };
109
- var setAssetPath = (path) => plt.$resourcesUrl$ = path;
110
- var isComplexType = (o) => {
111
- o = typeof o;
112
- return o === "object" || o === "function";
113
- };
114
-
115
- // src/utils/query-nonce-meta-tag-content.ts
116
- function queryNonceMetaTagContent(doc) {
117
- var _a, _b, _c;
118
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
119
- }
120
-
121
- // src/utils/result.ts
122
- var result_exports = {};
123
- __export(result_exports, {
124
- err: () => err,
125
- map: () => map,
126
- ok: () => ok,
127
- unwrap: () => unwrap,
128
- unwrapErr: () => unwrapErr
129
- });
130
- var ok = (value) => ({
131
- isOk: true,
132
- isErr: false,
133
- value
134
- });
135
- var err = (value) => ({
136
- isOk: false,
137
- isErr: true,
138
- value
139
- });
140
- function map(result, fn) {
141
- if (result.isOk) {
142
- const val = fn(result.value);
143
- if (val instanceof Promise) {
144
- return val.then((newVal) => ok(newVal));
145
- } else {
146
- return ok(val);
147
- }
148
- }
149
- if (result.isErr) {
150
- const value = result.value;
151
- return err(value);
152
- }
153
- throw "should never get here";
154
- }
155
- var unwrap = (result) => {
156
- if (result.isOk) {
157
- return result.value;
158
- } else {
159
- throw result.value;
160
- }
161
- };
162
- var unwrapErr = (result) => {
163
- if (result.isErr) {
164
- return result.value;
165
- } else {
166
- throw result.value;
167
- }
168
- };
169
- var createTime = (fnName, tagName = "") => {
170
- {
171
- return () => {
172
- return;
173
- };
174
- }
175
- };
176
- var h = (nodeName, vnodeData, ...children) => {
177
- let child = null;
178
- let key = null;
179
- let simple = false;
180
- let lastSimple = false;
181
- const vNodeChildren = [];
182
- const walk = (c) => {
183
- for (let i2 = 0; i2 < c.length; i2++) {
184
- child = c[i2];
185
- if (Array.isArray(child)) {
186
- walk(child);
187
- } else if (child != null && typeof child !== "boolean") {
188
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
189
- child = String(child);
190
- }
191
- if (simple && lastSimple) {
192
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
193
- } else {
194
- vNodeChildren.push(simple ? newVNode(null, child) : child);
195
- }
196
- lastSimple = simple;
197
- }
198
- }
199
- };
200
- walk(children);
201
- if (vnodeData) {
202
- if (vnodeData.key) {
203
- key = vnodeData.key;
204
- }
205
- {
206
- const classData = vnodeData.className || vnodeData.class;
207
- if (classData) {
208
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
209
- }
210
- }
211
- }
212
- const vnode = newVNode(nodeName, null);
213
- vnode.$attrs$ = vnodeData;
214
- if (vNodeChildren.length > 0) {
215
- vnode.$children$ = vNodeChildren;
216
- }
217
- {
218
- vnode.$key$ = key;
219
- }
220
- return vnode;
221
- };
222
- var newVNode = (tag, text) => {
223
- const vnode = {
224
- $flags$: 0,
225
- $tag$: tag,
226
- $text$: text,
227
- $elm$: null,
228
- $children$: null
229
- };
230
- {
231
- vnode.$attrs$ = null;
232
- }
233
- {
234
- vnode.$key$ = null;
235
- }
236
- return vnode;
237
- };
238
- var Host = {};
239
- var isHost = (node) => node && node.$tag$ === Host;
240
- var parsePropertyValue = (propValue, propType) => {
241
- if (propValue != null && !isComplexType(propValue)) {
242
- if (propType & 4 /* Boolean */) {
243
- return propValue === "false" ? false : propValue === "" || !!propValue;
244
- }
245
- if (propType & 1 /* String */) {
246
- return String(propValue);
247
- }
248
- return propValue;
249
- }
250
- return propValue;
251
- };
252
- var emitEvent = (elm, name, opts) => {
253
- const ev = plt.ce(name, opts);
254
- elm.dispatchEvent(ev);
255
- return ev;
256
- };
257
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
258
- var registerStyle = (scopeId2, cssText, allowCS) => {
259
- let style = styles.get(scopeId2);
260
- if (supportsConstructableStylesheets && allowCS) {
261
- style = style || new CSSStyleSheet();
262
- if (typeof style === "string") {
263
- style = cssText;
264
- } else {
265
- style.replaceSync(cssText);
266
- }
267
- } else {
268
- style = cssText;
269
- }
270
- styles.set(scopeId2, style);
271
- };
272
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
273
- var _a;
274
- const scopeId2 = getScopeId(cmpMeta);
275
- const style = styles.get(scopeId2);
276
- if (!win.document) {
277
- return scopeId2;
278
- }
279
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
280
- if (style) {
281
- if (typeof style === "string") {
282
- styleContainerNode = styleContainerNode.head || styleContainerNode;
283
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
284
- let styleElm;
285
- if (!appliedStyles) {
286
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
287
- }
288
- if (!appliedStyles.has(scopeId2)) {
289
- {
290
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
291
- styleElm.innerHTML = style;
292
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
293
- if (nonce != null) {
294
- styleElm.setAttribute("nonce", nonce);
295
- }
296
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
297
- if (styleContainerNode.nodeName === "HEAD") {
298
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
299
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
300
- styleContainerNode.insertBefore(
301
- styleElm,
302
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
303
- );
304
- } else if ("host" in styleContainerNode) {
305
- if (supportsConstructableStylesheets) {
306
- const stylesheet = new CSSStyleSheet();
307
- stylesheet.replaceSync(style);
308
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
309
- } else {
310
- const existingStyleContainer = styleContainerNode.querySelector("style");
311
- if (existingStyleContainer) {
312
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
313
- } else {
314
- styleContainerNode.prepend(styleElm);
315
- }
316
- }
317
- } else {
318
- styleContainerNode.append(styleElm);
319
- }
320
- }
321
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
322
- styleContainerNode.insertBefore(styleElm, null);
323
- }
324
- }
325
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
326
- styleElm.innerHTML += SLOT_FB_CSS;
327
- }
328
- if (appliedStyles) {
329
- appliedStyles.add(scopeId2);
330
- }
331
- }
332
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
333
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
334
- }
335
- }
336
- return scopeId2;
337
- };
338
- var attachStyles = (hostRef) => {
339
- const cmpMeta = hostRef.$cmpMeta$;
340
- const elm = hostRef.$hostElement$;
341
- const flags = cmpMeta.$flags$;
342
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
343
- const scopeId2 = addStyle(
344
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
345
- cmpMeta);
346
- if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
347
- elm["s-sc"] = scopeId2;
348
- elm.classList.add(scopeId2 + "-h");
349
- }
350
- endAttachStyles();
351
- };
352
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
353
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
354
- if (oldValue === newValue) {
355
- return;
356
- }
357
- let isProp = isMemberInElement(elm, memberName);
358
- memberName.toLowerCase();
359
- if (memberName === "class") {
360
- const classList = elm.classList;
361
- const oldClasses = parseClassList(oldValue);
362
- let newClasses = parseClassList(newValue);
363
- {
364
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
365
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
366
- }
367
- } else if (memberName === "style") {
368
- {
369
- for (const prop in oldValue) {
370
- if (!newValue || newValue[prop] == null) {
371
- if (prop.includes("-")) {
372
- elm.style.removeProperty(prop);
373
- } else {
374
- elm.style[prop] = "";
375
- }
376
- }
377
- }
378
- }
379
- for (const prop in newValue) {
380
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
381
- if (prop.includes("-")) {
382
- elm.style.setProperty(prop, newValue[prop]);
383
- } else {
384
- elm.style[prop] = newValue[prop];
385
- }
386
- }
387
- }
388
- } else if (memberName === "key") ; else {
389
- const isComplex = isComplexType(newValue);
390
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
391
- try {
392
- if (!elm.tagName.includes("-")) {
393
- const n = newValue == null ? "" : newValue;
394
- if (memberName === "list") {
395
- isProp = false;
396
- } else if (oldValue == null || elm[memberName] != n) {
397
- if (typeof elm.__lookupSetter__(memberName) === "function") {
398
- elm[memberName] = n;
399
- } else {
400
- elm.setAttribute(memberName, n);
401
- }
402
- }
403
- } else if (elm[memberName] !== newValue) {
404
- elm[memberName] = newValue;
405
- }
406
- } catch (e) {
407
- }
408
- }
409
- if (newValue == null || newValue === false) {
410
- if (newValue !== false || elm.getAttribute(memberName) === "") {
411
- {
412
- elm.removeAttribute(memberName);
413
- }
414
- }
415
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
416
- newValue = newValue === true ? "" : newValue;
417
- {
418
- elm.setAttribute(memberName, newValue);
419
- }
420
- }
421
- }
422
- };
423
- var parseClassListRegex = /\s/;
424
- var parseClassList = (value) => {
425
- if (typeof value === "object" && value && "baseVal" in value) {
426
- value = value.baseVal;
427
- }
428
- if (!value || typeof value !== "string") {
429
- return [];
430
- }
431
- return value.split(parseClassListRegex);
432
- };
433
-
434
- // src/runtime/vdom/update-element.ts
435
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
436
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
437
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
438
- const newVnodeAttrs = newVnode.$attrs$ || {};
439
- {
440
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
441
- if (!(memberName in newVnodeAttrs)) {
442
- setAccessor(
443
- elm,
444
- memberName,
445
- oldVnodeAttrs[memberName],
446
- void 0,
447
- isSvgMode2,
448
- newVnode.$flags$);
449
- }
450
- }
451
- }
452
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
453
- setAccessor(
454
- elm,
455
- memberName,
456
- oldVnodeAttrs[memberName],
457
- newVnodeAttrs[memberName],
458
- isSvgMode2,
459
- newVnode.$flags$);
460
- }
461
- };
462
- function sortedAttrNames(attrNames) {
463
- return attrNames.includes("ref") ? (
464
- // we need to sort these to ensure that `'ref'` is the last attr
465
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
466
- ) : (
467
- // no need to sort, return the original array
468
- attrNames
469
- );
470
- }
471
- var hostTagName;
472
- var useNativeShadowDom = false;
473
- var isSvgMode = false;
474
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
475
- const newVNode2 = newParentVNode.$children$[childIndex];
476
- let i2 = 0;
477
- let elm;
478
- let childNode;
479
- {
480
- if (!isSvgMode) {
481
- isSvgMode = newVNode2.$tag$ === "svg";
482
- }
483
- if (!win.document) {
484
- throw new Error(
485
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
486
- );
487
- }
488
- elm = newVNode2.$elm$ = win.document.createElementNS(
489
- isSvgMode ? SVG_NS : HTML_NS,
490
- !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
491
- ) ;
492
- if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
493
- isSvgMode = false;
494
- }
495
- {
496
- updateElement(null, newVNode2, isSvgMode);
497
- }
498
- if (newVNode2.$children$) {
499
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
500
- childNode = createElm(oldParentVNode, newVNode2, i2);
501
- if (childNode) {
502
- elm.appendChild(childNode);
503
- }
504
- }
505
- }
506
- {
507
- if (newVNode2.$tag$ === "svg") {
508
- isSvgMode = false;
509
- } else if (elm.tagName === "foreignObject") {
510
- isSvgMode = true;
511
- }
512
- }
513
- }
514
- elm["s-hn"] = hostTagName;
515
- return elm;
516
- };
517
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
518
- let containerElm = parentElm;
519
- let childNode;
520
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
521
- containerElm = containerElm.shadowRoot;
522
- }
523
- for (; startIdx <= endIdx; ++startIdx) {
524
- if (vnodes[startIdx]) {
525
- childNode = createElm(null, parentVNode, startIdx);
526
- if (childNode) {
527
- vnodes[startIdx].$elm$ = childNode;
528
- insertBefore(containerElm, childNode, before);
529
- }
530
- }
531
- }
532
- };
533
- var removeVnodes = (vnodes, startIdx, endIdx) => {
534
- for (let index = startIdx; index <= endIdx; ++index) {
535
- const vnode = vnodes[index];
536
- if (vnode) {
537
- const elm = vnode.$elm$;
538
- if (elm) {
539
- elm.remove();
540
- }
541
- }
542
- }
543
- };
544
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
545
- let oldStartIdx = 0;
546
- let newStartIdx = 0;
547
- let idxInOld = 0;
548
- let i2 = 0;
549
- let oldEndIdx = oldCh.length - 1;
550
- let oldStartVnode = oldCh[0];
551
- let oldEndVnode = oldCh[oldEndIdx];
552
- let newEndIdx = newCh.length - 1;
553
- let newStartVnode = newCh[0];
554
- let newEndVnode = newCh[newEndIdx];
555
- let node;
556
- let elmToMove;
557
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
558
- if (oldStartVnode == null) {
559
- oldStartVnode = oldCh[++oldStartIdx];
560
- } else if (oldEndVnode == null) {
561
- oldEndVnode = oldCh[--oldEndIdx];
562
- } else if (newStartVnode == null) {
563
- newStartVnode = newCh[++newStartIdx];
564
- } else if (newEndVnode == null) {
565
- newEndVnode = newCh[--newEndIdx];
566
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
567
- patch(oldStartVnode, newStartVnode, isInitialRender);
568
- oldStartVnode = oldCh[++oldStartIdx];
569
- newStartVnode = newCh[++newStartIdx];
570
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
571
- patch(oldEndVnode, newEndVnode, isInitialRender);
572
- oldEndVnode = oldCh[--oldEndIdx];
573
- newEndVnode = newCh[--newEndIdx];
574
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
575
- patch(oldStartVnode, newEndVnode, isInitialRender);
576
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
577
- oldStartVnode = oldCh[++oldStartIdx];
578
- newEndVnode = newCh[--newEndIdx];
579
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
580
- patch(oldEndVnode, newStartVnode, isInitialRender);
581
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
582
- oldEndVnode = oldCh[--oldEndIdx];
583
- newStartVnode = newCh[++newStartIdx];
584
- } else {
585
- idxInOld = -1;
586
- {
587
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
588
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
589
- idxInOld = i2;
590
- break;
591
- }
592
- }
593
- }
594
- if (idxInOld >= 0) {
595
- elmToMove = oldCh[idxInOld];
596
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
597
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
598
- } else {
599
- patch(elmToMove, newStartVnode, isInitialRender);
600
- oldCh[idxInOld] = void 0;
601
- node = elmToMove.$elm$;
602
- }
603
- newStartVnode = newCh[++newStartIdx];
604
- } else {
605
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
606
- newStartVnode = newCh[++newStartIdx];
607
- }
608
- if (node) {
609
- {
610
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
611
- }
612
- }
613
- }
614
- }
615
- if (oldStartIdx > oldEndIdx) {
616
- addVnodes(
617
- parentElm,
618
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
619
- newVNode2,
620
- newCh,
621
- newStartIdx,
622
- newEndIdx
623
- );
624
- } else if (newStartIdx > newEndIdx) {
625
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
626
- }
627
- };
628
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
629
- if (leftVNode.$tag$ === rightVNode.$tag$) {
630
- if (!isInitialRender) {
631
- return leftVNode.$key$ === rightVNode.$key$;
632
- }
633
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
634
- leftVNode.$key$ = rightVNode.$key$;
635
- }
636
- return true;
637
- }
638
- return false;
639
- };
640
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
641
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
642
- const oldChildren = oldVNode.$children$;
643
- const newChildren = newVNode2.$children$;
644
- const tag = newVNode2.$tag$;
645
- {
646
- {
647
- isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
648
- }
649
- {
650
- updateElement(oldVNode, newVNode2, isSvgMode);
651
- }
652
- if (oldChildren !== null && newChildren !== null) {
653
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
654
- } else if (newChildren !== null) {
655
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
656
- } else if (
657
- // don't do this on initial render as it can cause non-hydrated content to be removed
658
- !isInitialRender && BUILD.updatable && oldChildren !== null
659
- ) {
660
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
661
- }
662
- if (isSvgMode && tag === "svg") {
663
- isSvgMode = false;
664
- }
665
- }
666
- };
667
- var insertBefore = (parent, newNode, reference) => {
668
- {
669
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
670
- }
671
- };
672
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
673
- const hostElm = hostRef.$hostElement$;
674
- const cmpMeta = hostRef.$cmpMeta$;
675
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
676
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
677
- hostTagName = hostElm.tagName;
678
- if (isInitialLoad && rootVnode.$attrs$) {
679
- for (const key of Object.keys(rootVnode.$attrs$)) {
680
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
681
- rootVnode.$attrs$[key] = hostElm[key];
682
- }
683
- }
684
- }
685
- rootVnode.$tag$ = null;
686
- rootVnode.$flags$ |= 4 /* isHost */;
687
- hostRef.$vnode$ = rootVnode;
688
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
689
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
690
- patch(oldVNode, rootVnode, isInitialLoad);
691
- };
692
-
693
- // src/runtime/update-component.ts
694
- var attachToAncestor = (hostRef, ancestorComponent) => {
695
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
696
- const index = ancestorComponent["s-p"].push(
697
- new Promise(
698
- (r) => hostRef.$onRenderResolve$ = () => {
699
- ancestorComponent["s-p"].splice(index - 1, 1);
700
- r();
701
- }
702
- )
703
- );
704
- }
705
- };
706
- var scheduleUpdate = (hostRef, isInitialLoad) => {
707
- {
708
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
709
- }
710
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
711
- hostRef.$flags$ |= 512 /* needsRerender */;
712
- return;
713
- }
714
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
715
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
716
- return writeTask(dispatch) ;
717
- };
718
- var dispatchHooks = (hostRef, isInitialLoad) => {
719
- const elm = hostRef.$hostElement$;
720
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
721
- const instance = elm;
722
- if (!instance) {
723
- throw new Error(
724
- `Can't render component <${elm.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`
725
- );
726
- }
727
- let maybePromise;
728
- if (isInitialLoad) {
729
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
730
- } else {
731
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
732
- }
733
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
734
- endSchedule();
735
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
736
- };
737
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
738
- console.error(err2);
739
- fn();
740
- }) : fn();
741
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
742
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
743
- var _a;
744
- const elm = hostRef.$hostElement$;
745
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
746
- const rc = elm["s-rc"];
747
- if (isInitialLoad) {
748
- attachStyles(hostRef);
749
- }
750
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
751
- {
752
- callRender(hostRef, instance, elm, isInitialLoad);
753
- }
754
- if (rc) {
755
- rc.map((cb) => cb());
756
- elm["s-rc"] = void 0;
757
- }
758
- endRender();
759
- endUpdate();
760
- {
761
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
762
- const postUpdate = () => postUpdateComponent(hostRef);
763
- if (childrenPromises.length === 0) {
764
- postUpdate();
765
- } else {
766
- Promise.all(childrenPromises).then(postUpdate);
767
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
768
- childrenPromises.length = 0;
769
- }
770
- }
771
- };
772
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
773
- try {
774
- instance = instance.render() ;
775
- {
776
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
777
- }
778
- {
779
- hostRef.$flags$ |= 2 /* hasRendered */;
780
- }
781
- {
782
- {
783
- {
784
- renderVdom(hostRef, instance, isInitialLoad);
785
- }
786
- }
787
- }
788
- } catch (e) {
789
- consoleError(e, hostRef.$hostElement$);
790
- }
791
- return null;
792
- };
793
- var postUpdateComponent = (hostRef) => {
794
- const tagName = hostRef.$cmpMeta$.$tagName$;
795
- const elm = hostRef.$hostElement$;
796
- const endPostUpdate = createTime("postUpdate", tagName);
797
- const instance = elm;
798
- const ancestorComponent = hostRef.$ancestorComponent$;
799
- safeCall(instance, "componentDidRender", void 0, elm);
800
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
801
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
802
- {
803
- addHydratedFlag(elm);
804
- }
805
- safeCall(instance, "componentDidLoad", void 0, elm);
806
- endPostUpdate();
807
- {
808
- hostRef.$onReadyResolve$(elm);
809
- if (!ancestorComponent) {
810
- appDidLoad();
811
- }
812
- }
813
- } else {
814
- safeCall(instance, "componentDidUpdate", void 0, elm);
815
- endPostUpdate();
816
- }
817
- {
818
- if (hostRef.$onRenderResolve$) {
819
- hostRef.$onRenderResolve$();
820
- hostRef.$onRenderResolve$ = void 0;
821
- }
822
- if (hostRef.$flags$ & 512 /* needsRerender */) {
823
- nextTick(() => scheduleUpdate(hostRef, false));
824
- }
825
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
826
- }
827
- };
828
- var appDidLoad = (who) => {
829
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
830
- };
831
- var safeCall = (instance, method, arg, elm) => {
832
- if (instance && instance[method]) {
833
- try {
834
- return instance[method](arg);
835
- } catch (e) {
836
- consoleError(e, elm);
837
- }
838
- }
839
- return void 0;
840
- };
841
- var addHydratedFlag = (elm) => {
842
- var _a;
843
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
844
- };
845
-
846
- // src/runtime/set-value.ts
847
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
848
- var setValue = (ref, propName, newVal, cmpMeta) => {
849
- const hostRef = getHostRef(ref);
850
- const elm = ref;
851
- const oldVal = hostRef.$instanceValues$.get(propName);
852
- const flags = hostRef.$flags$;
853
- const instance = elm;
854
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
855
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
856
- const didValueChange = newVal !== oldVal && !areBothNaN;
857
- if (didValueChange) {
858
- hostRef.$instanceValues$.set(propName, newVal);
859
- {
860
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
861
- const watchMethods = cmpMeta.$watchers$[propName];
862
- if (watchMethods) {
863
- watchMethods.map((watchMethodName) => {
864
- try {
865
- instance[watchMethodName](newVal, oldVal, propName);
866
- } catch (e) {
867
- consoleError(e, elm);
868
- }
869
- });
870
- }
871
- }
872
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
873
- if (instance.componentShouldUpdate) {
874
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
875
- return;
876
- }
877
- }
878
- scheduleUpdate(hostRef, false);
879
- }
880
- }
881
- }
882
- };
883
-
884
- // src/runtime/proxy-component.ts
885
- var proxyComponent = (Cstr, cmpMeta, flags) => {
886
- var _a, _b;
887
- const prototype = Cstr.prototype;
888
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
889
- if (Cstr.watchers && !cmpMeta.$watchers$) {
890
- cmpMeta.$watchers$ = Cstr.watchers;
891
- }
892
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
893
- members.map(([memberName, [memberFlags]]) => {
894
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
895
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
896
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
897
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
898
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
899
- Object.defineProperty(prototype, memberName, {
900
- get() {
901
- {
902
- return origGetter ? origGetter.apply(this) : getValue(this, memberName);
903
- }
904
- },
905
- configurable: true,
906
- enumerable: true
907
- });
908
- }
909
- Object.defineProperty(prototype, memberName, {
910
- set(newValue) {
911
- const ref = getHostRef(this);
912
- if (origSetter) {
913
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
914
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
915
- newValue = ref.$instanceValues$.get(memberName);
916
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
917
- ref.$instanceValues$.set(memberName, currentValue);
918
- }
919
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
920
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
921
- setValue(this, memberName, newValue, cmpMeta);
922
- return;
923
- }
924
- {
925
- setValue(this, memberName, newValue, cmpMeta);
926
- return;
927
- }
928
- }
929
- });
930
- }
931
- });
932
- {
933
- const attrNameToPropName = /* @__PURE__ */ new Map();
934
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
935
- plt.jmp(() => {
936
- var _a2;
937
- const propName = attrNameToPropName.get(attrName);
938
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
939
- newValue = this[propName];
940
- delete this[propName];
941
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
942
- this[propName] == newValue) {
943
- return;
944
- } else if (propName == null) {
945
- const hostRef = getHostRef(this);
946
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
947
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
948
- const elm = this;
949
- const instance = elm;
950
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
951
- entry == null ? void 0 : entry.forEach((callbackName) => {
952
- if (instance[callbackName] != null) {
953
- instance[callbackName].call(instance, newValue, oldValue, attrName);
954
- }
955
- });
956
- }
957
- return;
958
- }
959
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
960
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
961
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
962
- this[propName] = newValue;
963
- }
964
- });
965
- };
966
- Cstr.observedAttributes = Array.from(
967
- /* @__PURE__ */ new Set([
968
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
969
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
970
- const attrName = m[1] || propName;
971
- attrNameToPropName.set(attrName, propName);
972
- return attrName;
973
- })
974
- ])
975
- );
976
- }
977
- }
978
- return Cstr;
979
- };
980
-
981
- // src/runtime/initialize-component.ts
982
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
983
- let Cstr;
984
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
985
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
986
- {
987
- Cstr = elm.constructor;
988
- const cmpTag = elm.localName;
989
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
990
- }
991
- if (Cstr && Cstr.style) {
992
- let style;
993
- if (typeof Cstr.style === "string") {
994
- style = Cstr.style;
995
- }
996
- const scopeId2 = getScopeId(cmpMeta);
997
- if (!styles.has(scopeId2)) {
998
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
999
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1000
- endRegisterStyles();
1001
- }
1002
- }
1003
- }
1004
- const ancestorComponent = hostRef.$ancestorComponent$;
1005
- const schedule = () => scheduleUpdate(hostRef, true);
1006
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1007
- ancestorComponent["s-rc"].push(schedule);
1008
- } else {
1009
- schedule();
1010
- }
1011
- };
1012
- var fireConnectedCallback = (instance, elm) => {
1013
- };
1014
-
1015
- // src/runtime/connected-callback.ts
1016
- var connectedCallback = (elm) => {
1017
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1018
- const hostRef = getHostRef(elm);
1019
- const cmpMeta = hostRef.$cmpMeta$;
1020
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1021
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1022
- hostRef.$flags$ |= 1 /* hasConnected */;
1023
- {
1024
- let ancestorComponent = elm;
1025
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1026
- if (ancestorComponent["s-p"]) {
1027
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1028
- break;
1029
- }
1030
- }
1031
- }
1032
- if (cmpMeta.$members$) {
1033
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1034
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1035
- const value = elm[memberName];
1036
- delete elm[memberName];
1037
- elm[memberName] = value;
1038
- }
1039
- });
1040
- }
1041
- {
1042
- initializeComponent(elm, hostRef, cmpMeta);
1043
- }
1044
- } else {
1045
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1046
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1047
- }
1048
- }
1049
- endConnected();
1050
- }
1051
- };
1052
- var disconnectedCallback = async (elm) => {
1053
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1054
- getHostRef(elm);
1055
- }
1056
- if (rootAppliedStyles.has(elm)) {
1057
- rootAppliedStyles.delete(elm);
1058
- }
1059
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1060
- rootAppliedStyles.delete(elm.shadowRoot);
1061
- }
1062
- };
1063
- var proxyCustomElement = (Cstr, compactMeta) => {
1064
- const cmpMeta = {
1065
- $flags$: compactMeta[0],
1066
- $tagName$: compactMeta[1]
1067
- };
1068
- {
1069
- cmpMeta.$members$ = compactMeta[2];
1070
- }
1071
- {
1072
- cmpMeta.$watchers$ = Cstr.$watchers$;
1073
- }
1074
- const originalConnectedCallback = Cstr.prototype.connectedCallback;
1075
- const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1076
- Object.assign(Cstr.prototype, {
1077
- __hasHostListenerAttached: false,
1078
- __registerHost() {
1079
- registerHost(this, cmpMeta);
1080
- },
1081
- connectedCallback() {
1082
- if (!this.__hasHostListenerAttached) {
1083
- getHostRef(this);
1084
- this.__hasHostListenerAttached = true;
1085
- }
1086
- connectedCallback(this);
1087
- if (originalConnectedCallback) {
1088
- originalConnectedCallback.call(this);
1089
- }
1090
- },
1091
- disconnectedCallback() {
1092
- disconnectedCallback(this);
1093
- if (originalDisconnectedCallback) {
1094
- originalDisconnectedCallback.call(this);
1095
- }
1096
- },
1097
- __attachShadow() {
1098
- {
1099
- if (!this.shadowRoot) {
1100
- {
1101
- this.attachShadow({ mode: "open" });
1102
- }
1103
- } else {
1104
- if (this.shadowRoot.mode !== "open") {
1105
- throw new Error(
1106
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
1107
- );
1108
- }
1109
- }
1110
- }
1111
- }
1112
- });
1113
- Cstr.is = cmpMeta.$tagName$;
1114
- return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
1115
- };
1116
-
1117
- // src/runtime/nonce.ts
1118
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1119
-
1120
- // src/runtime/platform-options.ts
1121
- var setPlatformOptions = (opts) => Object.assign(plt, opts);
1122
-
1123
- /**
1124
- * Provide custom SVG path for icons
1125
- *
1126
- * <meta name="ix-icons:path" content="/build/svg" />
1127
- */
1128
- function getCustomAssetUrl() {
1129
- const assetPath = document.querySelector("meta[name='ix-icons:path']");
1130
- if (assetPath) {
1131
- const path = assetPath.getAttribute('content');
1132
- return path;
1133
- }
1134
- return false;
1135
- }
1136
-
1137
- /*
1138
- * COPYRIGHT (c) Siemens AG 2018-2025 ALL RIGHTS RESERVED.
1139
- */
1140
- let parser = null;
1141
- const errorSymbol = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'><path fill-rule='evenodd' d='M384,0 L384,384 L0,384 L0,0 L384,0 Z M192,207.085 L57.751,341.333 L326.248,341.333 L192,207.085 Z M42.666,57.751 L42.666,326.248 L176.915,192 L42.666,57.751 Z M341.333,57.751 L207.085,192 L341.333,326.248 L341.333,57.751 Z M326.248,42.666 L57.751,42.666 L192,176.915 L326.248,42.666 Z' transform='translate(64 64)'/></svg>";
1142
- function parseSVGDataContent(content, element) {
1143
- if (typeof window['DOMParser'] === 'undefined') {
1144
- console.error('DOMParser not supported by your browser.');
1145
- return '';
1146
- }
1147
- if (parser === null) {
1148
- parser = new window['DOMParser']();
1149
- }
1150
- const svgDocument = parser.parseFromString(decodeURI(content), 'text/html');
1151
- const svgElement = svgDocument.querySelector('svg');
1152
- if (!svgElement) {
1153
- if (element) {
1154
- console.error('No valid svg data provided', element);
1155
- }
1156
- else {
1157
- console.error('No valid svg data provided');
1158
- }
1159
- return '';
1160
- }
1161
- return svgElement.outerHTML;
1162
- }
1163
-
1164
- /*
1165
- * SPDX-FileCopyrightText: 2023 Siemens AG
1166
- *
1167
- * SPDX-License-Identifier: MIT
1168
- *
1169
- * This source code is licensed under the MIT license found in the
1170
- * LICENSE file in the root directory of this source tree.
1171
- */
1172
- let fetchCache;
1173
- const requests = new Map();
1174
- const getIconCacheMap = () => {
1175
- if (typeof window === 'undefined') {
1176
- return new Map();
1177
- }
1178
- if (!fetchCache) {
1179
- window.IxIcons = window.IxIcons || {};
1180
- fetchCache = window.IxIcons.map = window.IxIcons.map || new Map();
1181
- }
1182
- return fetchCache;
1183
- };
1184
- const isSvgDataUrl = (url) => {
1185
- if (!url) {
1186
- return false;
1187
- }
1188
- if (typeof url !== 'string') {
1189
- return false;
1190
- }
1191
- return url.startsWith('data:image/svg+xml');
1192
- };
1193
- async function fetchSVG(url, element) {
1194
- const cache = getIconCacheMap();
1195
- if (cache.has(url)) {
1196
- return cache.get(url);
1197
- }
1198
- if (requests.has(url)) {
1199
- return requests.get(url);
1200
- }
1201
- const fetching = fetch(url)
1202
- .then(async (response) => {
1203
- const responseText = await response.text();
1204
- let svgContent = '';
1205
- if (response.ok) {
1206
- svgContent = parseSVGDataContent(responseText, element);
1207
- cache.set(url, svgContent);
1208
- }
1209
- else {
1210
- console.error('Failed to request svg data from', url, 'with status code', response.status, element);
1211
- }
1212
- return svgContent;
1213
- })
1214
- .catch(() => {
1215
- console.error('Failed to fetch svg data:', url, element);
1216
- cache.set(url, '');
1217
- return '';
1218
- })
1219
- .finally(() => {
1220
- requests.delete(url);
1221
- });
1222
- return fetching;
1223
- }
1224
- const urlRegex = /^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:www\.)?(?:\S+\.\S+)(?:\S*)$/i;
1225
- function isValidUrl(url) {
1226
- return urlRegex.test(url);
1227
- }
1228
- function getIconUrl(name, element) {
1229
- const customAssetUrl = getCustomAssetUrl();
1230
- if (customAssetUrl) {
1231
- return `${customAssetUrl}/${name}.svg`;
1232
- }
1233
- let url = `svg/${name}.svg`;
1234
- try {
1235
- url = getAssetPath(url);
1236
- }
1237
- catch (error) {
1238
- console.warn(`Could not load icon with name "${name}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to property.`, element);
1239
- }
1240
- return url;
1241
- }
1242
- async function resolveIcon(element, iconName) {
1243
- if (!iconName) {
1244
- console.warn('No icon was provided', element);
1245
- return '';
1246
- }
1247
- if (isSvgDataUrl(iconName)) {
1248
- const content = parseSVGDataContent(iconName, element);
1249
- if (!content) {
1250
- console.error('Failed to parse icon data', element);
1251
- }
1252
- return content;
1253
- }
1254
- return loadIcon(iconName, element);
1255
- }
1256
- async function loadIcon(iconName, element) {
1257
- const cache = getIconCacheMap();
1258
- if (cache.has(iconName)) {
1259
- return cache.get(iconName);
1260
- }
1261
- if (isValidUrl(iconName)) {
1262
- return fetchSVG(iconName, element);
1263
- }
1264
- const iconUrl = getIconUrl(iconName, element);
1265
- if (!iconUrl) {
1266
- return '';
1267
- }
1268
- return fetchSVG(iconUrl, element);
1269
- }
1270
- function removePrefix(name, prefix) {
1271
- if (name.startsWith(prefix)) {
1272
- name = name.slice(prefix.length);
1273
- return name.replace(/^(\w)/, (_match, p1) => p1.toLowerCase());
1274
- }
1275
- return name;
1276
- }
1277
- function addIcons(icons) {
1278
- Object.keys(icons).forEach(name => {
1279
- const icon = icons[name];
1280
- name = removePrefix(name, 'icon');
1281
- addIconToCache(name, icon);
1282
- });
1283
- }
1284
- function addIconToCache(name, icon) {
1285
- const cache = getIconCacheMap();
1286
- if (cache.has(name)) {
1287
- console.warn(`Icon name '${name}' already in cache. Overwritting with new icon data.`);
1288
- }
1289
- const svg = parseSVGDataContent(icon);
1290
- cache.set(name, svg);
1291
- const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, '$1-$2').toLowerCase();
1292
- if (name != toKebabCase) {
1293
- cache.set(toKebabCase, svg);
1294
- }
1295
- }
1296
-
1297
- const iconCss = ":host{display:inline-flex;height:1.5rem;width:1.5rem;min-height:1.5rem;min-width:1.5rem;color:inherit}:host .svg-container{display:block;position:relative;width:100%;height:100%}:host .svg-container svg{display:block;position:relative;height:100%;width:100%}:host .svg-container svg,:host .svg-container svg[fill],:host .svg-container svg [fill]{fill:currentColor !important}:host(.size-12){height:0.75rem;width:0.75rem;min-height:0.75rem;min-width:0.75rem}:host(.size-16){height:1rem;width:1rem;min-height:1rem;min-width:1rem}:host(.size-32){height:2rem;width:2rem;min-height:2rem;min-width:2rem}";
1298
- const IxIconStyle0 = iconCss;
1299
-
1300
- const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
1301
- constructor() {
1302
- super();
1303
- this.__registerHost();
1304
- this.__attachShadow();
1305
- /**
1306
- * Size of the icon
1307
- */
1308
- this.size = '24';
1309
- /**
1310
- * Only fetch and parse svg data when icon is visible
1311
- */
1312
- this.lazyLoading = false;
1313
- this.isVisible = false;
1314
- }
1315
- componentWillLoad() {
1316
- this.waitForRendering(() => {
1317
- this.isVisible = true;
1318
- this.loadIconContent();
1319
- });
1320
- }
1321
- async loadIconContent() {
1322
- const content = await resolveIcon(this.hostElement, this.name);
1323
- if (!content) {
1324
- this.svgContent = parseSVGDataContent(errorSymbol);
1325
- return;
1326
- }
1327
- this.svgContent = content;
1328
- }
1329
- waitForRendering(onRender) {
1330
- if (this.lazyLoading && typeof window !== 'undefined' && window.IntersectionObserver) {
1331
- const observer = new IntersectionObserver(entries => {
1332
- entries.forEach(entry => {
1333
- if (entry.isIntersecting) {
1334
- onRender();
1335
- observer.disconnect();
1336
- }
1337
- });
1338
- }, {
1339
- rootMargin: '25px',
1340
- });
1341
- observer.observe(this.hostElement);
1342
- }
1343
- else {
1344
- onRender();
1345
- }
1346
- }
1347
- render() {
1348
- const style = {};
1349
- if (this.color) {
1350
- style['color'] = `var(--theme-${this.color})`;
1351
- }
1352
- return (h(Host, { key: '484071b4f74e0b803b8d36913c866bfdb4b1a259', style: style, class: {
1353
- ['size-12']: this.size === '12',
1354
- ['size-16']: this.size === '16',
1355
- ['size-24']: this.size === '24',
1356
- ['size-32']: this.size === '32',
1357
- } }, h("div", { key: 'd988ef0fcc83087c24c905cf95ff02fe187aed5e', class: 'svg-container', innerHTML: this.svgContent })));
1358
- }
1359
- static get assetsDirs() { return ["svg"]; }
1360
- get hostElement() { return this; }
1361
- static get watchers() { return {
1362
- "name": ["loadIconContent"]
1363
- }; }
1364
- static get style() { return IxIconStyle0; }
1365
- }, [1, "ix-icon", {
1366
- "size": [1],
1367
- "color": [1],
1368
- "name": [1],
1369
- "lazyLoading": [4, "lazy-loading"],
1370
- "svgContent": [32],
1371
- "isVisible": [32]
1372
- }, undefined, {
1373
- "name": ["loadIconContent"]
1374
- }]);
1375
- function defineCustomElement() {
1376
- if (typeof customElements === "undefined") {
1377
- return;
1378
- }
1379
- const components = ["ix-icon"];
1380
- components.forEach(tagName => { switch (tagName) {
1381
- case "ix-icon":
1382
- if (!customElements.get(tagName)) {
1383
- customElements.define(tagName, Icon);
1384
- }
1385
- break;
1386
- } });
1387
- }
1388
-
1389
- export { Icon as I, setNonce as a, setPlatformOptions as b, addIcons as c, addIconToCache as d, defineCustomElement as e, getAssetPath as g, setAssetPath as s };
1390
-
1391
- //# sourceMappingURL=p-aee14f18.js.map