@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,3 +1,1472 @@
1
- export { I as Icon, d as addIconToCache, c as addIcons, e as defineCustomElement, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-aee14f18.js';
1
+ const NAMESPACE = 'ix-icons';
2
+ const BUILD = /* ix-icons */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true};
3
+
4
+ /*
5
+ Stencil Client Platform v4.37.1 | 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 SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
46
+ var win = typeof window !== "undefined" ? window : {};
47
+ var H = win.HTMLElement || class {
48
+ };
49
+ var plt = {
50
+ $flags$: 0,
51
+ $resourcesUrl$: "",
52
+ jmp: (h2) => h2(),
53
+ raf: (h2) => requestAnimationFrame(h2),
54
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
55
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
56
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
57
+ };
58
+ var promiseResolve = (v) => Promise.resolve(v);
59
+ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
60
+ try {
61
+ new CSSStyleSheet();
62
+ return typeof new CSSStyleSheet().replaceSync === "function";
63
+ } catch (e) {
64
+ }
65
+ return false;
66
+ })() ;
67
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
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/regular-expression.ts
122
+ var escapeRegExpSpecialCharacters = (text) => {
123
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
124
+ };
125
+
126
+ // src/utils/result.ts
127
+ var result_exports = {};
128
+ __export(result_exports, {
129
+ err: () => err,
130
+ map: () => map,
131
+ ok: () => ok,
132
+ unwrap: () => unwrap,
133
+ unwrapErr: () => unwrapErr
134
+ });
135
+ var ok = (value) => ({
136
+ isOk: true,
137
+ isErr: false,
138
+ value
139
+ });
140
+ var err = (value) => ({
141
+ isOk: false,
142
+ isErr: true,
143
+ value
144
+ });
145
+ function map(result, fn) {
146
+ if (result.isOk) {
147
+ const val = fn(result.value);
148
+ if (val instanceof Promise) {
149
+ return val.then((newVal) => ok(newVal));
150
+ } else {
151
+ return ok(val);
152
+ }
153
+ }
154
+ if (result.isErr) {
155
+ const value = result.value;
156
+ return err(value);
157
+ }
158
+ throw "should never get here";
159
+ }
160
+ var unwrap = (result) => {
161
+ if (result.isOk) {
162
+ return result.value;
163
+ } else {
164
+ throw result.value;
165
+ }
166
+ };
167
+ var unwrapErr = (result) => {
168
+ if (result.isErr) {
169
+ return result.value;
170
+ } else {
171
+ throw result.value;
172
+ }
173
+ };
174
+
175
+ // src/utils/style.ts
176
+ function createStyleSheetIfNeededAndSupported(styles2) {
177
+ return void 0;
178
+ }
179
+
180
+ // src/utils/shadow-root.ts
181
+ var globalStyleSheet;
182
+ function createShadowRoot(cmpMeta) {
183
+ var _a;
184
+ const shadowRoot = this.attachShadow({ mode: "open" });
185
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
186
+ if (globalStyleSheet) {
187
+ if (supportsMutableAdoptedStyleSheets) {
188
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
189
+ } else {
190
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
191
+ }
192
+ }
193
+ }
194
+ var createTime = (fnName, tagName = "") => {
195
+ {
196
+ return () => {
197
+ return;
198
+ };
199
+ }
200
+ };
201
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
202
+ var registerStyle = (scopeId2, cssText, allowCS) => {
203
+ let style = styles.get(scopeId2);
204
+ if (supportsConstructableStylesheets && allowCS) {
205
+ style = style || new CSSStyleSheet();
206
+ if (typeof style === "string") {
207
+ style = cssText;
208
+ } else {
209
+ style.replaceSync(cssText);
210
+ }
211
+ } else {
212
+ style = cssText;
213
+ }
214
+ styles.set(scopeId2, style);
215
+ };
216
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
217
+ var _a;
218
+ const scopeId2 = getScopeId(cmpMeta);
219
+ const style = styles.get(scopeId2);
220
+ if (!win.document) {
221
+ return scopeId2;
222
+ }
223
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
224
+ if (style) {
225
+ if (typeof style === "string") {
226
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
227
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
228
+ let styleElm;
229
+ if (!appliedStyles) {
230
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
231
+ }
232
+ if (!appliedStyles.has(scopeId2)) {
233
+ {
234
+ styleElm = win.document.createElement("style");
235
+ styleElm.innerHTML = style;
236
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
237
+ if (nonce != null) {
238
+ styleElm.setAttribute("nonce", nonce);
239
+ }
240
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
241
+ if (styleContainerNode.nodeName === "HEAD") {
242
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
243
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
244
+ styleContainerNode.insertBefore(
245
+ styleElm,
246
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
247
+ );
248
+ } else if ("host" in styleContainerNode) {
249
+ if (supportsConstructableStylesheets) {
250
+ const stylesheet = new CSSStyleSheet();
251
+ stylesheet.replaceSync(style);
252
+ if (supportsMutableAdoptedStyleSheets) {
253
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
254
+ } else {
255
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
256
+ }
257
+ } else {
258
+ const existingStyleContainer = styleContainerNode.querySelector("style");
259
+ if (existingStyleContainer) {
260
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
261
+ } else {
262
+ styleContainerNode.prepend(styleElm);
263
+ }
264
+ }
265
+ } else {
266
+ styleContainerNode.append(styleElm);
267
+ }
268
+ }
269
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
270
+ styleContainerNode.insertBefore(styleElm, null);
271
+ }
272
+ }
273
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
274
+ styleElm.innerHTML += SLOT_FB_CSS;
275
+ }
276
+ if (appliedStyles) {
277
+ appliedStyles.add(scopeId2);
278
+ }
279
+ }
280
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
281
+ if (supportsMutableAdoptedStyleSheets) {
282
+ styleContainerNode.adoptedStyleSheets.push(style);
283
+ } else {
284
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
285
+ }
286
+ }
287
+ }
288
+ return scopeId2;
289
+ };
290
+ var attachStyles = (hostRef) => {
291
+ const cmpMeta = hostRef.$cmpMeta$;
292
+ const elm = hostRef.$hostElement$;
293
+ const flags = cmpMeta.$flags$;
294
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
295
+ const scopeId2 = addStyle(
296
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
297
+ cmpMeta);
298
+ if (flags & 10 /* needsScopedEncapsulation */) {
299
+ elm["s-sc"] = scopeId2;
300
+ elm.classList.add(scopeId2 + "-h");
301
+ }
302
+ endAttachStyles();
303
+ };
304
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
305
+ var h = (nodeName, vnodeData, ...children) => {
306
+ let child = null;
307
+ let key = null;
308
+ let simple = false;
309
+ let lastSimple = false;
310
+ const vNodeChildren = [];
311
+ const walk = (c) => {
312
+ for (let i2 = 0; i2 < c.length; i2++) {
313
+ child = c[i2];
314
+ if (Array.isArray(child)) {
315
+ walk(child);
316
+ } else if (child != null && typeof child !== "boolean") {
317
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
318
+ child = String(child);
319
+ }
320
+ if (simple && lastSimple) {
321
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
322
+ } else {
323
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
324
+ }
325
+ lastSimple = simple;
326
+ }
327
+ }
328
+ };
329
+ walk(children);
330
+ if (vnodeData) {
331
+ if (vnodeData.key) {
332
+ key = vnodeData.key;
333
+ }
334
+ {
335
+ const classData = vnodeData.className || vnodeData.class;
336
+ if (classData) {
337
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
338
+ }
339
+ }
340
+ }
341
+ const vnode = newVNode(nodeName, null);
342
+ vnode.$attrs$ = vnodeData;
343
+ if (vNodeChildren.length > 0) {
344
+ vnode.$children$ = vNodeChildren;
345
+ }
346
+ {
347
+ vnode.$key$ = key;
348
+ }
349
+ return vnode;
350
+ };
351
+ var newVNode = (tag, text) => {
352
+ const vnode = {
353
+ $flags$: 0,
354
+ $tag$: tag,
355
+ $text$: text,
356
+ $elm$: null,
357
+ $children$: null
358
+ };
359
+ {
360
+ vnode.$attrs$ = null;
361
+ }
362
+ {
363
+ vnode.$key$ = null;
364
+ }
365
+ return vnode;
366
+ };
367
+ var Host = {};
368
+ var isHost = (node) => node && node.$tag$ === Host;
369
+ var createSupportsRuleRe = (selector) => {
370
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
371
+ return new RegExp(
372
+ // First capture group: match any context before the selector that's not inside @supports selector()
373
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
374
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
375
+ "g"
376
+ );
377
+ };
378
+ createSupportsRuleRe("::slotted");
379
+ createSupportsRuleRe(":host");
380
+ createSupportsRuleRe(":host-context");
381
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
382
+ if (propValue != null && !isComplexType(propValue)) {
383
+ if (propType & 4 /* Boolean */) {
384
+ {
385
+ return propValue === "false" ? false : propValue === "" || !!propValue;
386
+ }
387
+ }
388
+ if (propType & 1 /* String */) {
389
+ return String(propValue);
390
+ }
391
+ return propValue;
392
+ }
393
+ return propValue;
394
+ };
395
+ var emitEvent = (elm, name, opts) => {
396
+ const ev = plt.ce(name, opts);
397
+ elm.dispatchEvent(ev);
398
+ return ev;
399
+ };
400
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
401
+ if (oldValue === newValue) {
402
+ return;
403
+ }
404
+ let isProp = isMemberInElement(elm, memberName);
405
+ 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 === "style") {
415
+ {
416
+ for (const prop in oldValue) {
417
+ if (!newValue || newValue[prop] == null) {
418
+ if (prop.includes("-")) {
419
+ elm.style.removeProperty(prop);
420
+ } else {
421
+ elm.style[prop] = "";
422
+ }
423
+ }
424
+ }
425
+ }
426
+ for (const prop in newValue) {
427
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
428
+ if (prop.includes("-")) {
429
+ elm.style.setProperty(prop, newValue[prop]);
430
+ } else {
431
+ elm.style[prop] = newValue[prop];
432
+ }
433
+ }
434
+ }
435
+ } else if (memberName === "key") ; else {
436
+ const isComplex = isComplexType(newValue);
437
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
438
+ try {
439
+ if (!elm.tagName.includes("-")) {
440
+ const n = newValue == null ? "" : newValue;
441
+ if (memberName === "list") {
442
+ isProp = false;
443
+ } else if (oldValue == null || elm[memberName] != n) {
444
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
445
+ elm[memberName] = n;
446
+ } else {
447
+ elm.setAttribute(memberName, n);
448
+ }
449
+ }
450
+ } else if (elm[memberName] !== newValue) {
451
+ elm[memberName] = newValue;
452
+ }
453
+ } catch (e) {
454
+ }
455
+ }
456
+ if (newValue == null || newValue === false) {
457
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
458
+ {
459
+ elm.removeAttribute(memberName);
460
+ }
461
+ }
462
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
463
+ newValue = newValue === true ? "" : newValue;
464
+ {
465
+ elm.setAttribute(memberName, newValue);
466
+ }
467
+ }
468
+ }
469
+ };
470
+ var parseClassListRegex = /\s/;
471
+ var parseClassList = (value) => {
472
+ if (typeof value === "object" && value && "baseVal" in value) {
473
+ value = value.baseVal;
474
+ }
475
+ if (!value || typeof value !== "string") {
476
+ return [];
477
+ }
478
+ return value.split(parseClassListRegex);
479
+ };
480
+
481
+ // src/runtime/vdom/update-element.ts
482
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
483
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
484
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
485
+ const newVnodeAttrs = newVnode.$attrs$ || {};
486
+ {
487
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
488
+ if (!(memberName in newVnodeAttrs)) {
489
+ setAccessor(
490
+ elm,
491
+ memberName,
492
+ oldVnodeAttrs[memberName],
493
+ void 0,
494
+ isSvgMode2,
495
+ newVnode.$flags$);
496
+ }
497
+ }
498
+ }
499
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
500
+ setAccessor(
501
+ elm,
502
+ memberName,
503
+ oldVnodeAttrs[memberName],
504
+ newVnodeAttrs[memberName],
505
+ isSvgMode2,
506
+ newVnode.$flags$);
507
+ }
508
+ };
509
+ function sortedAttrNames(attrNames) {
510
+ return attrNames.includes("ref") ? (
511
+ // we need to sort these to ensure that `'ref'` is the last attr
512
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
513
+ ) : (
514
+ // no need to sort, return the original array
515
+ attrNames
516
+ );
517
+ }
518
+ var hostTagName;
519
+ var isSvgMode = false;
520
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
521
+ const newVNode2 = newParentVNode.$children$[childIndex];
522
+ let i2 = 0;
523
+ let elm;
524
+ let childNode;
525
+ {
526
+ if (!isSvgMode) {
527
+ isSvgMode = newVNode2.$tag$ === "svg";
528
+ }
529
+ if (!win.document) {
530
+ throw new Error(
531
+ "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."
532
+ );
533
+ }
534
+ elm = newVNode2.$elm$ = win.document.createElementNS(
535
+ isSvgMode ? SVG_NS : HTML_NS,
536
+ newVNode2.$tag$
537
+ ) ;
538
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
539
+ isSvgMode = false;
540
+ }
541
+ {
542
+ updateElement(null, newVNode2, isSvgMode);
543
+ }
544
+ if (newVNode2.$children$) {
545
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
546
+ childNode = createElm(oldParentVNode, newVNode2, i2);
547
+ if (childNode) {
548
+ elm.appendChild(childNode);
549
+ }
550
+ }
551
+ }
552
+ {
553
+ if (newVNode2.$tag$ === "svg") {
554
+ isSvgMode = false;
555
+ } else if (elm.tagName === "foreignObject") {
556
+ isSvgMode = true;
557
+ }
558
+ }
559
+ }
560
+ elm["s-hn"] = hostTagName;
561
+ return elm;
562
+ };
563
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
564
+ let containerElm = parentElm;
565
+ let childNode;
566
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
567
+ containerElm = containerElm.shadowRoot;
568
+ }
569
+ for (; startIdx <= endIdx; ++startIdx) {
570
+ if (vnodes[startIdx]) {
571
+ childNode = createElm(null, parentVNode, startIdx);
572
+ if (childNode) {
573
+ vnodes[startIdx].$elm$ = childNode;
574
+ insertBefore(containerElm, childNode, before);
575
+ }
576
+ }
577
+ }
578
+ };
579
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
580
+ for (let index = startIdx; index <= endIdx; ++index) {
581
+ const vnode = vnodes[index];
582
+ if (vnode) {
583
+ const elm = vnode.$elm$;
584
+ if (elm) {
585
+ elm.remove();
586
+ }
587
+ }
588
+ }
589
+ };
590
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
591
+ let oldStartIdx = 0;
592
+ let newStartIdx = 0;
593
+ let idxInOld = 0;
594
+ let i2 = 0;
595
+ let oldEndIdx = oldCh.length - 1;
596
+ let oldStartVnode = oldCh[0];
597
+ let oldEndVnode = oldCh[oldEndIdx];
598
+ let newEndIdx = newCh.length - 1;
599
+ let newStartVnode = newCh[0];
600
+ let newEndVnode = newCh[newEndIdx];
601
+ let node;
602
+ let elmToMove;
603
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
604
+ if (oldStartVnode == null) {
605
+ oldStartVnode = oldCh[++oldStartIdx];
606
+ } else if (oldEndVnode == null) {
607
+ oldEndVnode = oldCh[--oldEndIdx];
608
+ } else if (newStartVnode == null) {
609
+ newStartVnode = newCh[++newStartIdx];
610
+ } else if (newEndVnode == null) {
611
+ newEndVnode = newCh[--newEndIdx];
612
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
613
+ patch(oldStartVnode, newStartVnode, isInitialRender);
614
+ oldStartVnode = oldCh[++oldStartIdx];
615
+ newStartVnode = newCh[++newStartIdx];
616
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
617
+ patch(oldEndVnode, newEndVnode, isInitialRender);
618
+ oldEndVnode = oldCh[--oldEndIdx];
619
+ newEndVnode = newCh[--newEndIdx];
620
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
621
+ patch(oldStartVnode, newEndVnode, isInitialRender);
622
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
623
+ oldStartVnode = oldCh[++oldStartIdx];
624
+ newEndVnode = newCh[--newEndIdx];
625
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
626
+ patch(oldEndVnode, newStartVnode, isInitialRender);
627
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
628
+ oldEndVnode = oldCh[--oldEndIdx];
629
+ newStartVnode = newCh[++newStartIdx];
630
+ } else {
631
+ idxInOld = -1;
632
+ {
633
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
634
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
635
+ idxInOld = i2;
636
+ break;
637
+ }
638
+ }
639
+ }
640
+ if (idxInOld >= 0) {
641
+ elmToMove = oldCh[idxInOld];
642
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
643
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
644
+ } else {
645
+ patch(elmToMove, newStartVnode, isInitialRender);
646
+ oldCh[idxInOld] = void 0;
647
+ node = elmToMove.$elm$;
648
+ }
649
+ newStartVnode = newCh[++newStartIdx];
650
+ } else {
651
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
652
+ newStartVnode = newCh[++newStartIdx];
653
+ }
654
+ if (node) {
655
+ {
656
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
657
+ }
658
+ }
659
+ }
660
+ }
661
+ if (oldStartIdx > oldEndIdx) {
662
+ addVnodes(
663
+ parentElm,
664
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
665
+ newVNode2,
666
+ newCh,
667
+ newStartIdx,
668
+ newEndIdx
669
+ );
670
+ } else if (newStartIdx > newEndIdx) {
671
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
672
+ }
673
+ };
674
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
675
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
676
+ if (!isInitialRender) {
677
+ return leftVNode.$key$ === rightVNode.$key$;
678
+ }
679
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
680
+ leftVNode.$key$ = rightVNode.$key$;
681
+ }
682
+ return true;
683
+ }
684
+ return false;
685
+ };
686
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
687
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
688
+ const oldChildren = oldVNode.$children$;
689
+ const newChildren = newVNode2.$children$;
690
+ const tag = newVNode2.$tag$;
691
+ {
692
+ {
693
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
694
+ }
695
+ {
696
+ updateElement(oldVNode, newVNode2, isSvgMode);
697
+ }
698
+ if (oldChildren !== null && newChildren !== null) {
699
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
700
+ } else if (newChildren !== null) {
701
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
702
+ } else if (
703
+ // don't do this on initial render as it can cause non-hydrated content to be removed
704
+ !isInitialRender && BUILD.updatable && oldChildren !== null
705
+ ) {
706
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
707
+ } else ;
708
+ if (isSvgMode && tag === "svg") {
709
+ isSvgMode = false;
710
+ }
711
+ }
712
+ };
713
+ var insertBefore = (parent, newNode, reference) => {
714
+ {
715
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
716
+ }
717
+ };
718
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
719
+ const hostElm = hostRef.$hostElement$;
720
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
721
+ const isHostElement = isHost(renderFnResults);
722
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
723
+ hostTagName = hostElm.tagName;
724
+ if (isInitialLoad && rootVnode.$attrs$) {
725
+ for (const key of Object.keys(rootVnode.$attrs$)) {
726
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
727
+ rootVnode.$attrs$[key] = hostElm[key];
728
+ }
729
+ }
730
+ }
731
+ rootVnode.$tag$ = null;
732
+ rootVnode.$flags$ |= 4 /* isHost */;
733
+ hostRef.$vnode$ = rootVnode;
734
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
735
+ patch(oldVNode, rootVnode, isInitialLoad);
736
+ };
737
+
738
+ // src/runtime/update-component.ts
739
+ var attachToAncestor = (hostRef, ancestorComponent) => {
740
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
741
+ const index = ancestorComponent["s-p"].push(
742
+ new Promise(
743
+ (r) => hostRef.$onRenderResolve$ = () => {
744
+ ancestorComponent["s-p"].splice(index - 1, 1);
745
+ r();
746
+ }
747
+ )
748
+ );
749
+ }
750
+ };
751
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
752
+ {
753
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
754
+ }
755
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
756
+ hostRef.$flags$ |= 512 /* needsRerender */;
757
+ return;
758
+ }
759
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
760
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
761
+ if (isInitialLoad) {
762
+ queueMicrotask(() => {
763
+ dispatch();
764
+ });
765
+ return;
766
+ }
767
+ return writeTask(dispatch) ;
768
+ };
769
+ var dispatchHooks = (hostRef, isInitialLoad) => {
770
+ const elm = hostRef.$hostElement$;
771
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
772
+ const instance = elm;
773
+ if (!instance) {
774
+ throw new Error(
775
+ `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`
776
+ );
777
+ }
778
+ let maybePromise;
779
+ if (isInitialLoad) {
780
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
781
+ } else {
782
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
783
+ }
784
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
785
+ endSchedule();
786
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
787
+ };
788
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
789
+ console.error(err2);
790
+ fn();
791
+ }) : fn();
792
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
793
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
794
+ var _a;
795
+ const elm = hostRef.$hostElement$;
796
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
797
+ const rc = elm["s-rc"];
798
+ if (isInitialLoad) {
799
+ attachStyles(hostRef);
800
+ }
801
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
802
+ {
803
+ callRender(hostRef, instance, elm, isInitialLoad);
804
+ }
805
+ if (rc) {
806
+ rc.map((cb) => cb());
807
+ elm["s-rc"] = void 0;
808
+ }
809
+ endRender();
810
+ endUpdate();
811
+ {
812
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
813
+ const postUpdate = () => postUpdateComponent(hostRef);
814
+ if (childrenPromises.length === 0) {
815
+ postUpdate();
816
+ } else {
817
+ Promise.all(childrenPromises).then(postUpdate);
818
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
819
+ childrenPromises.length = 0;
820
+ }
821
+ }
822
+ };
823
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
824
+ try {
825
+ instance = instance.render() ;
826
+ {
827
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
828
+ }
829
+ {
830
+ hostRef.$flags$ |= 2 /* hasRendered */;
831
+ }
832
+ {
833
+ {
834
+ {
835
+ renderVdom(hostRef, instance, isInitialLoad);
836
+ }
837
+ }
838
+ }
839
+ } catch (e) {
840
+ consoleError(e, hostRef.$hostElement$);
841
+ }
842
+ return null;
843
+ };
844
+ var postUpdateComponent = (hostRef) => {
845
+ const tagName = hostRef.$cmpMeta$.$tagName$;
846
+ const elm = hostRef.$hostElement$;
847
+ const endPostUpdate = createTime("postUpdate", tagName);
848
+ const instance = elm;
849
+ const ancestorComponent = hostRef.$ancestorComponent$;
850
+ safeCall(instance, "componentDidRender", void 0, elm);
851
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
852
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
853
+ {
854
+ addHydratedFlag(elm);
855
+ }
856
+ safeCall(instance, "componentDidLoad", void 0, elm);
857
+ endPostUpdate();
858
+ {
859
+ hostRef.$onReadyResolve$(elm);
860
+ if (!ancestorComponent) {
861
+ appDidLoad();
862
+ }
863
+ }
864
+ } else {
865
+ safeCall(instance, "componentDidUpdate", void 0, elm);
866
+ endPostUpdate();
867
+ }
868
+ {
869
+ if (hostRef.$onRenderResolve$) {
870
+ hostRef.$onRenderResolve$();
871
+ hostRef.$onRenderResolve$ = void 0;
872
+ }
873
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
874
+ nextTick(() => scheduleUpdate(hostRef, false));
875
+ }
876
+ hostRef.$flags$ &= -517;
877
+ }
878
+ };
879
+ var appDidLoad = (who) => {
880
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
881
+ };
882
+ var safeCall = (instance, method, arg, elm) => {
883
+ if (instance && instance[method]) {
884
+ try {
885
+ return instance[method](arg);
886
+ } catch (e) {
887
+ consoleError(e, elm);
888
+ }
889
+ }
890
+ return void 0;
891
+ };
892
+ var addHydratedFlag = (elm) => {
893
+ var _a;
894
+ return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
895
+ };
896
+
897
+ // src/runtime/set-value.ts
898
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
899
+ var setValue = (ref, propName, newVal, cmpMeta) => {
900
+ const hostRef = getHostRef(ref);
901
+ if (!hostRef) {
902
+ return;
903
+ }
904
+ const elm = ref;
905
+ const oldVal = hostRef.$instanceValues$.get(propName);
906
+ const flags = hostRef.$flags$;
907
+ const instance = elm;
908
+ newVal = parsePropertyValue(
909
+ newVal,
910
+ cmpMeta.$members$[propName][0]);
911
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
912
+ const didValueChange = newVal !== oldVal && !areBothNaN;
913
+ if (didValueChange) {
914
+ hostRef.$instanceValues$.set(propName, newVal);
915
+ {
916
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
917
+ const watchMethods = cmpMeta.$watchers$[propName];
918
+ if (watchMethods) {
919
+ watchMethods.map((watchMethodName) => {
920
+ try {
921
+ instance[watchMethodName](newVal, oldVal, propName);
922
+ } catch (e) {
923
+ consoleError(e, elm);
924
+ }
925
+ });
926
+ }
927
+ }
928
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
929
+ if (instance.componentShouldUpdate) {
930
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
931
+ return;
932
+ }
933
+ }
934
+ scheduleUpdate(hostRef, false);
935
+ }
936
+ }
937
+ }
938
+ };
939
+
940
+ // src/runtime/proxy-component.ts
941
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
942
+ var _a, _b;
943
+ const prototype = Cstr.prototype;
944
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
945
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
946
+ cmpMeta.$watchers$ = Cstr.watchers;
947
+ }
948
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
949
+ members.map(([memberName, [memberFlags]]) => {
950
+ if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
951
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
952
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
953
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
954
+ {
955
+ Object.defineProperty(prototype, memberName, {
956
+ get() {
957
+ {
958
+ return origGetter ? origGetter.apply(this) : getValue(this, memberName);
959
+ }
960
+ },
961
+ configurable: true,
962
+ enumerable: true
963
+ });
964
+ }
965
+ Object.defineProperty(prototype, memberName, {
966
+ set(newValue) {
967
+ const ref = getHostRef(this);
968
+ if (!ref) {
969
+ return;
970
+ }
971
+ if (origSetter) {
972
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
973
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
974
+ newValue = ref.$instanceValues$.get(memberName);
975
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
976
+ ref.$instanceValues$.set(memberName, currentValue);
977
+ }
978
+ origSetter.apply(this, [
979
+ parsePropertyValue(
980
+ newValue,
981
+ memberFlags)
982
+ ]);
983
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
984
+ setValue(this, memberName, newValue, cmpMeta);
985
+ return;
986
+ }
987
+ {
988
+ setValue(this, memberName, newValue, cmpMeta);
989
+ return;
990
+ }
991
+ }
992
+ });
993
+ }
994
+ });
995
+ {
996
+ const attrNameToPropName = /* @__PURE__ */ new Map();
997
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
998
+ plt.jmp(() => {
999
+ var _a2;
1000
+ const propName = attrNameToPropName.get(attrName);
1001
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1002
+ this[propName] == newValue) {
1003
+ return;
1004
+ } else if (propName == null) {
1005
+ const hostRef = getHostRef(this);
1006
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1007
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1008
+ const elm = this;
1009
+ const instance = elm;
1010
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1011
+ entry == null ? void 0 : entry.forEach((callbackName) => {
1012
+ if (instance[callbackName] != null) {
1013
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
1014
+ }
1015
+ });
1016
+ }
1017
+ return;
1018
+ }
1019
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1020
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1021
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1022
+ this[propName] = newValue;
1023
+ }
1024
+ });
1025
+ };
1026
+ Cstr.observedAttributes = Array.from(
1027
+ /* @__PURE__ */ new Set([
1028
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1029
+ ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1030
+ const attrName = m[1] || propName;
1031
+ attrNameToPropName.set(attrName, propName);
1032
+ return attrName;
1033
+ })
1034
+ ])
1035
+ );
1036
+ }
1037
+ }
1038
+ return Cstr;
1039
+ };
1040
+
1041
+ // src/runtime/initialize-component.ts
1042
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1043
+ let Cstr;
1044
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1045
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1046
+ {
1047
+ Cstr = elm.constructor;
1048
+ const cmpTag = elm.localName;
1049
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1050
+ }
1051
+ if (Cstr && Cstr.style) {
1052
+ let style;
1053
+ if (typeof Cstr.style === "string") {
1054
+ style = Cstr.style;
1055
+ }
1056
+ const scopeId2 = getScopeId(cmpMeta);
1057
+ if (!styles.has(scopeId2)) {
1058
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1059
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1060
+ endRegisterStyles();
1061
+ }
1062
+ }
1063
+ }
1064
+ const ancestorComponent = hostRef.$ancestorComponent$;
1065
+ const schedule = () => scheduleUpdate(hostRef, true);
1066
+ if (ancestorComponent && ancestorComponent["s-rc"]) {
1067
+ ancestorComponent["s-rc"].push(schedule);
1068
+ } else {
1069
+ schedule();
1070
+ }
1071
+ };
1072
+ var fireConnectedCallback = (instance, elm) => {
1073
+ };
1074
+
1075
+ // src/runtime/connected-callback.ts
1076
+ var connectedCallback = (elm) => {
1077
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1078
+ const hostRef = getHostRef(elm);
1079
+ if (!hostRef) {
1080
+ return;
1081
+ }
1082
+ const cmpMeta = hostRef.$cmpMeta$;
1083
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1084
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1085
+ hostRef.$flags$ |= 1 /* hasConnected */;
1086
+ {
1087
+ let ancestorComponent = elm;
1088
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1089
+ if (ancestorComponent["s-p"]) {
1090
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1091
+ break;
1092
+ }
1093
+ }
1094
+ }
1095
+ if (cmpMeta.$members$) {
1096
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1097
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1098
+ const value = elm[memberName];
1099
+ delete elm[memberName];
1100
+ elm[memberName] = value;
1101
+ }
1102
+ });
1103
+ }
1104
+ {
1105
+ initializeComponent(elm, hostRef, cmpMeta);
1106
+ }
1107
+ } else {
1108
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1109
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1110
+ }
1111
+ }
1112
+ endConnected();
1113
+ }
1114
+ };
1115
+ var disconnectedCallback = async (elm) => {
1116
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1117
+ getHostRef(elm);
1118
+ }
1119
+ if (rootAppliedStyles.has(elm)) {
1120
+ rootAppliedStyles.delete(elm);
1121
+ }
1122
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1123
+ rootAppliedStyles.delete(elm.shadowRoot);
1124
+ }
1125
+ };
1126
+ var proxyCustomElement = (Cstr, compactMeta) => {
1127
+ const cmpMeta = {
1128
+ $flags$: compactMeta[0],
1129
+ $tagName$: compactMeta[1]
1130
+ };
1131
+ {
1132
+ cmpMeta.$members$ = compactMeta[2];
1133
+ }
1134
+ {
1135
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1136
+ }
1137
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
1138
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1139
+ Object.assign(Cstr.prototype, {
1140
+ __hasHostListenerAttached: false,
1141
+ __registerHost() {
1142
+ registerHost(this, cmpMeta);
1143
+ },
1144
+ connectedCallback() {
1145
+ if (!this.__hasHostListenerAttached) {
1146
+ const hostRef = getHostRef(this);
1147
+ if (!hostRef) {
1148
+ return;
1149
+ }
1150
+ this.__hasHostListenerAttached = true;
1151
+ }
1152
+ connectedCallback(this);
1153
+ if (originalConnectedCallback) {
1154
+ originalConnectedCallback.call(this);
1155
+ }
1156
+ },
1157
+ disconnectedCallback() {
1158
+ disconnectedCallback(this);
1159
+ if (originalDisconnectedCallback) {
1160
+ originalDisconnectedCallback.call(this);
1161
+ }
1162
+ },
1163
+ __attachShadow() {
1164
+ {
1165
+ if (!this.shadowRoot) {
1166
+ createShadowRoot.call(this, cmpMeta);
1167
+ } else {
1168
+ if (this.shadowRoot.mode !== "open") {
1169
+ throw new Error(
1170
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
1171
+ );
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ });
1177
+ Cstr.is = cmpMeta.$tagName$;
1178
+ return proxyComponent(Cstr, cmpMeta);
1179
+ };
1180
+
1181
+ // src/runtime/nonce.ts
1182
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
1183
+
1184
+ // src/runtime/platform-options.ts
1185
+ var setPlatformOptions = (opts) => Object.assign(plt, opts);
1186
+
1187
+ // src/runtime/render.ts
1188
+ function render(vnode, container) {
1189
+ const ref = {
1190
+ $hostElement$: container
1191
+ };
1192
+ renderVdom(ref, vnode);
1193
+ }
1194
+
1195
+ /**
1196
+ * Provide custom SVG path for icons
1197
+ *
1198
+ * <meta name="ix-icons:path" content="/build/svg" />
1199
+ */
1200
+ function getCustomAssetUrl() {
1201
+ const assetPath = document.querySelector("meta[name='ix-icons:path']");
1202
+ if (assetPath) {
1203
+ const path = assetPath.getAttribute('content');
1204
+ return path;
1205
+ }
1206
+ return false;
1207
+ }
1208
+
1209
+ /*
1210
+ * COPYRIGHT (c) Siemens AG 2018-2025 ALL RIGHTS RESERVED.
1211
+ */
1212
+ let parser = null;
1213
+ 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>";
1214
+ function parseSVGDataContent(content, element) {
1215
+ if (typeof window['DOMParser'] === 'undefined') {
1216
+ console.error('DOMParser not supported by your browser.');
1217
+ return '';
1218
+ }
1219
+ if (parser === null) {
1220
+ parser = new window['DOMParser']();
1221
+ }
1222
+ // decode URI component if needed
1223
+ try {
1224
+ content = decodeURI(content);
1225
+ }
1226
+ catch (_a) {
1227
+ // Content is not a valid URI component, which can happen if it's already decoded. Proceed with the original content.
1228
+ }
1229
+ const svgDocument = parser.parseFromString(content, 'text/html');
1230
+ const svgElement = svgDocument.querySelector('svg');
1231
+ if (!svgElement) {
1232
+ if (element) {
1233
+ console.error('No valid svg data provided', element);
1234
+ }
1235
+ else {
1236
+ console.error('No valid svg data provided');
1237
+ }
1238
+ return '';
1239
+ }
1240
+ return svgElement.outerHTML;
1241
+ }
1242
+
1243
+ /*
1244
+ * SPDX-FileCopyrightText: 2023 Siemens AG
1245
+ *
1246
+ * SPDX-License-Identifier: MIT
1247
+ *
1248
+ * This source code is licensed under the MIT license found in the
1249
+ * LICENSE file in the root directory of this source tree.
1250
+ */
1251
+ let fetchCache;
1252
+ const requests = new Map();
1253
+ const getIconCacheMap = () => {
1254
+ if (typeof window === 'undefined') {
1255
+ return new Map();
1256
+ }
1257
+ if (!fetchCache) {
1258
+ window.IxIcons = window.IxIcons || {};
1259
+ fetchCache = window.IxIcons.map = window.IxIcons.map || new Map();
1260
+ }
1261
+ return fetchCache;
1262
+ };
1263
+ const isSvgDataUrl = (url) => {
1264
+ if (!url) {
1265
+ return false;
1266
+ }
1267
+ if (typeof url !== 'string') {
1268
+ return false;
1269
+ }
1270
+ return url.startsWith('data:image/svg+xml');
1271
+ };
1272
+ async function fetchSVG(url, element) {
1273
+ const cache = getIconCacheMap();
1274
+ if (cache.has(url)) {
1275
+ return cache.get(url);
1276
+ }
1277
+ if (requests.has(url)) {
1278
+ return requests.get(url);
1279
+ }
1280
+ const fetching = fetch(url)
1281
+ .then(async (response) => {
1282
+ const responseText = await response.text();
1283
+ let svgContent = '';
1284
+ if (response.ok) {
1285
+ svgContent = parseSVGDataContent(responseText, element);
1286
+ cache.set(url, svgContent);
1287
+ }
1288
+ else {
1289
+ console.error('Failed to request svg data from', url, 'with status code', response.status, element);
1290
+ }
1291
+ return svgContent;
1292
+ })
1293
+ .catch(() => {
1294
+ console.error('Failed to fetch svg data:', url, element);
1295
+ cache.set(url, '');
1296
+ return '';
1297
+ })
1298
+ .finally(() => {
1299
+ requests.delete(url);
1300
+ });
1301
+ return fetching;
1302
+ }
1303
+ const urlRegex = /^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:www\.)?(?:\S+\.\S+)(?:\S*)$/i;
1304
+ function isValidUrl(url) {
1305
+ return urlRegex.test(url);
1306
+ }
1307
+ function getIconUrl(name, element) {
1308
+ const customAssetUrl = getCustomAssetUrl();
1309
+ if (customAssetUrl) {
1310
+ return `${customAssetUrl}/${name}.svg`;
1311
+ }
1312
+ let url = `svg/${name}.svg`;
1313
+ try {
1314
+ url = getAssetPath(url);
1315
+ }
1316
+ catch (error) {
1317
+ 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);
1318
+ }
1319
+ return url;
1320
+ }
1321
+ async function resolveIcon(element, iconName) {
1322
+ if (!iconName) {
1323
+ console.warn('No icon was provided', element);
1324
+ return '';
1325
+ }
1326
+ if (isSvgDataUrl(iconName)) {
1327
+ const content = parseSVGDataContent(iconName, element);
1328
+ if (!content) {
1329
+ console.error('Failed to parse icon data', element);
1330
+ }
1331
+ return content;
1332
+ }
1333
+ return loadIcon(iconName, element);
1334
+ }
1335
+ async function loadIcon(iconName, element) {
1336
+ const cache = getIconCacheMap();
1337
+ if (cache.has(iconName)) {
1338
+ return cache.get(iconName);
1339
+ }
1340
+ if (isValidUrl(iconName)) {
1341
+ return fetchSVG(iconName, element);
1342
+ }
1343
+ const iconUrl = getIconUrl(iconName, element);
1344
+ if (!iconUrl) {
1345
+ return '';
1346
+ }
1347
+ return fetchSVG(iconUrl, element);
1348
+ }
1349
+ function removePrefix(name, prefix) {
1350
+ if (name.startsWith(prefix)) {
1351
+ name = name.slice(prefix.length);
1352
+ return name.replace(/^(\w)/, (_match, p1) => p1.toLowerCase());
1353
+ }
1354
+ return name;
1355
+ }
1356
+ function addIcons(icons) {
1357
+ Object.keys(icons).forEach(name => {
1358
+ const icon = icons[name];
1359
+ name = removePrefix(name, 'icon');
1360
+ addIconToCache(name, icon);
1361
+ });
1362
+ }
1363
+ function addIconToCache(name, icon) {
1364
+ const cache = getIconCacheMap();
1365
+ if (cache.has(name)) {
1366
+ console.warn(`Icon name '${name}' already in cache. Overwritting with new icon data.`);
1367
+ }
1368
+ const svg = parseSVGDataContent(icon);
1369
+ cache.set(name, svg);
1370
+ const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, '$1-$2').toLowerCase();
1371
+ if (name != toKebabCase) {
1372
+ cache.set(toKebabCase, svg);
1373
+ }
1374
+ }
1375
+
1376
+ 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}";
1377
+
1378
+ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {
1379
+ constructor(registerHost) {
1380
+ super();
1381
+ if (registerHost !== false) {
1382
+ this.__registerHost();
1383
+ }
1384
+ this.__attachShadow();
1385
+ /**
1386
+ * Size of the icon
1387
+ */
1388
+ this.size = '24';
1389
+ /**
1390
+ * Only fetch and parse svg data when icon is visible
1391
+ */
1392
+ this.lazyLoading = false;
1393
+ this.isVisible = false;
1394
+ }
1395
+ componentWillLoad() {
1396
+ this.waitForRendering(() => {
1397
+ this.isVisible = true;
1398
+ this.loadIconContent();
1399
+ });
1400
+ }
1401
+ async loadIconContent() {
1402
+ const content = await resolveIcon(this.hostElement, this.name);
1403
+ if (!content) {
1404
+ this.svgContent = parseSVGDataContent(errorSymbol);
1405
+ return;
1406
+ }
1407
+ this.svgContent = content;
1408
+ }
1409
+ waitForRendering(onRender) {
1410
+ if (this.lazyLoading && typeof window !== 'undefined' && window.IntersectionObserver) {
1411
+ const observer = new IntersectionObserver(entries => {
1412
+ entries.forEach(entry => {
1413
+ if (entry.isIntersecting) {
1414
+ onRender();
1415
+ observer.disconnect();
1416
+ }
1417
+ });
1418
+ }, {
1419
+ rootMargin: '25px',
1420
+ });
1421
+ observer.observe(this.hostElement);
1422
+ }
1423
+ else {
1424
+ onRender();
1425
+ }
1426
+ }
1427
+ render() {
1428
+ const style = {};
1429
+ if (this.color) {
1430
+ style['color'] = `var(--theme-${this.color})`;
1431
+ }
1432
+ return (h(Host, { key: '83462a7d7da16587faaa0600b4c13ec8ad106a77', role: "img", style: style, class: {
1433
+ ['size-12']: this.size === '12',
1434
+ ['size-16']: this.size === '16',
1435
+ ['size-24']: this.size === '24',
1436
+ ['size-32']: this.size === '32',
1437
+ } }, h("div", { key: '570efdb71fcdd0c61b7c854c6ab3662508aae804', class: 'svg-container', innerHTML: this.svgContent, "aria-hidden": "true" })));
1438
+ }
1439
+ static get assetsDirs() { return ["svg"]; }
1440
+ get hostElement() { return this; }
1441
+ static get watchers() { return {
1442
+ "name": ["loadIconContent"]
1443
+ }; }
1444
+ static get style() { return iconCss; }
1445
+ }, [257, "ix-icon", {
1446
+ "size": [1],
1447
+ "color": [1],
1448
+ "name": [1],
1449
+ "lazyLoading": [4, "lazy-loading"],
1450
+ "svgContent": [32],
1451
+ "isVisible": [32]
1452
+ }, undefined, {
1453
+ "name": ["loadIconContent"]
1454
+ }]);
1455
+ function defineCustomElement() {
1456
+ if (typeof customElements === "undefined") {
1457
+ return;
1458
+ }
1459
+ const components = ["ix-icon"];
1460
+ components.forEach(tagName => { switch (tagName) {
1461
+ case "ix-icon":
1462
+ if (!customElements.get(tagName)) {
1463
+ customElements.define(tagName, Icon);
1464
+ }
1465
+ break;
1466
+ } });
1467
+ }
1468
+
1469
+ export { Icon, addIconToCache, addIcons, defineCustomElement, getAssetPath, render, setAssetPath, setNonce, setPlatformOptions };
1470
+ //# sourceMappingURL=index.js.map
2
1471
 
3
1472
  //# sourceMappingURL=index.js.map