@baloise/ds-core 20.0.0-next.4 → 20.0.0-next.7

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 (1040) hide show
  1. package/LICENSE +9 -0
  2. package/components/all.d.ts +58 -0
  3. package/components/all.js +87 -0
  4. package/components/ds-accordion.js +1 -1
  5. package/components/ds-alert-container.js +1 -1
  6. package/components/ds-app.js +1 -1
  7. package/components/ds-badge.js +1 -1
  8. package/components/ds-button-group.js +1 -1
  9. package/components/ds-button.js +1 -1
  10. package/components/ds-card-actions.js +1 -1
  11. package/components/ds-card-content.js +1 -1
  12. package/components/ds-card-header.js +1 -1
  13. package/components/ds-card-subtitle.js +1 -1
  14. package/components/ds-card-title.js +1 -1
  15. package/components/ds-card.js +1 -1
  16. package/components/ds-carousel-item.d.ts +11 -0
  17. package/components/ds-carousel-item.js +4 -0
  18. package/components/ds-carousel.d.ts +11 -0
  19. package/components/ds-carousel.js +4 -0
  20. package/components/ds-checkbox-group.js +1 -1
  21. package/components/ds-checkbox.js +1 -1
  22. package/components/ds-close.js +1 -1
  23. package/components/ds-content.js +1 -1
  24. package/components/ds-data-item.d.ts +11 -0
  25. package/components/ds-data-item.js +4 -0
  26. package/components/ds-data-label.d.ts +11 -0
  27. package/components/ds-data-label.js +4 -0
  28. package/components/ds-data-value.d.ts +11 -0
  29. package/components/ds-data-value.js +4 -0
  30. package/components/ds-data.d.ts +11 -0
  31. package/components/ds-data.js +4 -0
  32. package/components/ds-date.d.ts +11 -0
  33. package/components/ds-date.js +4 -0
  34. package/components/ds-divider.js +1 -1
  35. package/components/ds-drawer.d.ts +11 -0
  36. package/components/ds-drawer.js +4 -0
  37. package/components/ds-file-upload.d.ts +11 -0
  38. package/components/ds-file-upload.js +4 -0
  39. package/components/ds-footer.d.ts +11 -0
  40. package/components/ds-footer.js +4 -0
  41. package/components/ds-heading.js +1 -1
  42. package/components/ds-hint-text.d.ts +11 -0
  43. package/components/ds-hint-text.js +4 -0
  44. package/components/ds-hint-title.d.ts +11 -0
  45. package/components/ds-hint-title.js +4 -0
  46. package/components/ds-hint.d.ts +11 -0
  47. package/components/ds-hint.js +4 -0
  48. package/components/ds-icon.js +1 -1
  49. package/components/ds-input-slider.d.ts +11 -0
  50. package/components/ds-input-slider.js +4 -0
  51. package/components/ds-input.js +1 -1
  52. package/components/ds-item.js +1 -1
  53. package/components/ds-label.js +1 -1
  54. package/components/ds-list.js +1 -1
  55. package/components/ds-logo.js +1 -1
  56. package/components/ds-modal-body.d.ts +11 -0
  57. package/components/ds-modal-body.js +4 -0
  58. package/components/ds-modal-header.d.ts +11 -0
  59. package/components/ds-modal-header.js +4 -0
  60. package/components/ds-modal.d.ts +11 -0
  61. package/components/ds-modal.js +4 -0
  62. package/components/ds-navbar.d.ts +11 -0
  63. package/components/ds-navbar.js +4 -0
  64. package/components/ds-notification.js +1 -1
  65. package/components/ds-number-input.js +1 -1
  66. package/components/ds-pagination.js +1 -1
  67. package/components/ds-popup.d.ts +11 -0
  68. package/components/ds-popup.js +4 -0
  69. package/components/ds-progress-bar.js +1 -1
  70. package/components/ds-radio-group.js +1 -1
  71. package/components/ds-radio.js +1 -1
  72. package/components/ds-segment-item.js +1 -1
  73. package/components/ds-segment.js +1 -1
  74. package/components/ds-select-optgroup.d.ts +11 -0
  75. package/components/ds-select-optgroup.js +4 -0
  76. package/components/ds-select-option.d.ts +11 -0
  77. package/components/ds-select-option.js +4 -0
  78. package/components/ds-select.d.ts +11 -0
  79. package/components/ds-select.js +4 -0
  80. package/components/ds-shape.js +1 -1
  81. package/components/ds-snackbar.js +1 -1
  82. package/components/ds-spinner.js +1 -1
  83. package/components/ds-stack.js +1 -1
  84. package/components/ds-step-panel.d.ts +11 -0
  85. package/components/ds-step-panel.js +4 -0
  86. package/components/ds-step.d.ts +11 -0
  87. package/components/ds-step.js +4 -0
  88. package/components/ds-steps.d.ts +11 -0
  89. package/components/ds-steps.js +4 -0
  90. package/components/ds-tab-panel.d.ts +11 -0
  91. package/components/ds-tab-panel.js +4 -0
  92. package/components/ds-tab.d.ts +11 -0
  93. package/components/ds-tab.js +4 -0
  94. package/components/ds-tabs.d.ts +11 -0
  95. package/components/ds-tabs.js +4 -0
  96. package/components/ds-tag-group.js +1 -1
  97. package/components/ds-tag.js +1 -1
  98. package/components/ds-text.js +1 -1
  99. package/components/ds-textarea.js +1 -1
  100. package/components/ds-toast.js +1 -1
  101. package/components/ds-toggle.js +1 -1
  102. package/components/ds-tooltip.d.ts +11 -0
  103. package/components/ds-tooltip.js +4 -0
  104. package/components/index.js +1 -1
  105. package/components/p--EKmxaBS.js +4 -0
  106. package/components/p-3Mi9vpmB.js +4 -0
  107. package/components/p-ABj0eATe.js +4 -0
  108. package/components/p-B-en4B17.js +4 -0
  109. package/components/p-BgzU1loG.js +4 -0
  110. package/components/p-BhbWmCTu.js +4 -0
  111. package/components/p-BqY0KzJC.js +4 -0
  112. package/components/p-BrIcCcce.js +4 -0
  113. package/components/p-BrJFPhMA.js +4 -0
  114. package/components/{p-Urcs7-vS.js → p-BwfAXfmz.js} +1 -1
  115. package/components/p-BwwAKEvn.js +4 -0
  116. package/components/p-ByX1_7SF.js +4 -0
  117. package/components/p-C1jqbZdf.js +4 -0
  118. package/{dist/design-system/p-15bc012833.entry.js → components/p-CA7G72wZ.js} +1 -1
  119. package/components/p-CQHwI4iD.js +4 -0
  120. package/components/p-CWDuQL1i.js +4 -0
  121. package/components/p-CvaNxQtw.js +4 -0
  122. package/components/p-D5zw5ezD.js +4 -0
  123. package/components/p-D9ILiUgm.js +4 -0
  124. package/{dist/design-system/p-BATOumsf.js → components/p-D9YYP2SG.js} +1 -1
  125. package/components/p-DAYd9ty0.js +4 -0
  126. package/components/p-DIK6Zkg6.js +4 -0
  127. package/{dist/design-system/p-BkESlUMc.js → components/p-DQBzmbR6.js} +1 -1
  128. package/components/p-DSeYzuO7.js +4 -0
  129. package/components/{p-z1jJgtep.js → p-DU7t9H9h.js} +1 -1
  130. package/components/p-DY0y8uLL.js +4 -0
  131. package/components/p-DYTOWDAA.js +4 -0
  132. package/components/p-DYlqkAWn.js +4 -0
  133. package/components/p-DbM7ALm9.js +14 -0
  134. package/{dist/design-system/p-D2tr7015.js → components/p-DbY6Pfeh.js} +1 -1
  135. package/components/{p-DZqqelPH.js → p-DcSNuA8W.js} +1 -1
  136. package/components/p-DenZRIeA.js +4 -0
  137. package/{dist/design-system/p-BwrOVItb.js → components/p-Dr4MUfss.js} +1 -1
  138. package/components/p-Du7QOHtz.js +5 -0
  139. package/components/{p-E8U6M5ii.js → p-FBQaJyH0.js} +1 -1
  140. package/components/{p-Dr4dquer.js → p-J0mxIuTt.js} +1 -1
  141. package/{dist/design-system/p-DJxr2Dcd.js → components/p-UCeQ1JCs.js} +1 -1
  142. package/components/p-Uy_dVz21.js +4 -0
  143. package/components/p-VsWv65bD.js +4 -0
  144. package/components/p-WO0X5Vmy.js +4 -0
  145. package/components/p-gz0Nxl39.js +4 -0
  146. package/components/{p-Bt20CEww.js → p-n3_2KEz0.js} +1 -1
  147. package/components/p-qaSW94OG.js +4 -0
  148. package/components/p-u5aa74vh.js +4 -0
  149. package/dist/cjs/{_getTag-B468r9bu.js → _getTag-DxZgmSPS.js} +1 -1
  150. package/dist/cjs/array-CYn4ALBt.js +1986 -0
  151. package/dist/cjs/{breakpoints.decorator-qaoHOU6Q.js → breakpoints.decorator-DY5iYsA5.js} +1 -1
  152. package/dist/cjs/{breakpoints.subject-DhAN_ZAn.js → breakpoints.subject-CzhLlIwN.js} +3 -3
  153. package/dist/cjs/{button.interfaces-BueDWsuH.js → button.interfaces-CqlUGR-N.js} +1 -1
  154. package/dist/cjs/carousel.interfaces-BFQpUNrw.js +12 -0
  155. package/dist/cjs/{config.decorator-Qmrq4ZYj.js → config.decorator-C64wi-MA.js} +1 -1
  156. package/dist/cjs/{config.utils-Cv4cx_Xa.js → config.utils-BhWbrVRz.js} +1 -1
  157. package/dist/cjs/create-validator-decorator-Ctd288ve.js +212 -0
  158. package/dist/cjs/design-system.cjs.js +3 -3
  159. package/dist/cjs/{device-CptgCtVc.js → device-CIliLOe9.js} +1 -1
  160. package/dist/cjs/ds-accordion.cjs.entry.js +30 -34
  161. package/dist/cjs/ds-alert-container.cjs.entry.js +12 -15
  162. package/dist/cjs/ds-app.cjs.entry.js +16 -6
  163. package/dist/cjs/ds-badge.cjs.entry.js +33 -26
  164. package/dist/cjs/ds-button-group.cjs.entry.js +14 -17
  165. package/dist/cjs/ds-button_2.cjs.entry.js +58 -73
  166. package/dist/cjs/ds-card-actions.cjs.entry.js +6 -8
  167. package/dist/cjs/ds-card-content.cjs.entry.js +3 -3
  168. package/dist/cjs/ds-card-header.cjs.entry.js +8 -5
  169. package/dist/cjs/ds-card-subtitle.cjs.entry.js +13 -13
  170. package/dist/cjs/ds-card-title.cjs.entry.js +11 -7
  171. package/dist/cjs/ds-card.cjs.entry.js +32 -43
  172. package/dist/cjs/ds-carousel-item.cjs.entry.js +128 -0
  173. package/dist/cjs/ds-carousel.cjs.entry.js +473 -0
  174. package/dist/cjs/ds-checkbox-group.cjs.entry.js +60 -2013
  175. package/dist/cjs/ds-checkbox.cjs.entry.js +33 -20
  176. package/dist/cjs/ds-content_2.cjs.entry.js +330 -0
  177. package/dist/cjs/ds-data-item.cjs.entry.js +146 -0
  178. package/dist/cjs/ds-data-label.cjs.entry.js +41 -0
  179. package/dist/cjs/ds-data-value.cjs.entry.js +31 -0
  180. package/dist/cjs/ds-data.cjs.entry.js +43 -0
  181. package/dist/cjs/ds-date.cjs.entry.js +5334 -0
  182. package/dist/cjs/{ds-logo.cjs.entry.js → ds-divider_2.cjs.entry.js} +130 -25
  183. package/dist/cjs/ds-drawer_2.cjs.entry.js +602 -0
  184. package/dist/cjs/ds-file-upload.cjs.entry.js +516 -0
  185. package/dist/cjs/ds-footer.cjs.entry.js +159 -0
  186. package/dist/cjs/ds-heading.cjs.entry.js +22 -20
  187. package/dist/cjs/ds-hint-text.cjs.entry.js +28 -0
  188. package/dist/cjs/ds-hint-title.cjs.entry.js +31 -0
  189. package/dist/cjs/ds-hint.cjs.entry.js +243 -0
  190. package/dist/cjs/ds-icon_2.cjs.entry.js +82 -73
  191. package/dist/cjs/ds-input-slider.cjs.entry.js +2885 -0
  192. package/dist/cjs/ds-input.cjs.entry.js +45 -43
  193. package/dist/cjs/ds-item.cjs.entry.js +29 -34
  194. package/dist/cjs/ds-label.cjs.entry.js +23 -31
  195. package/dist/cjs/ds-list.cjs.entry.js +6 -12
  196. package/dist/cjs/ds-modal-body.cjs.entry.js +34 -0
  197. package/dist/cjs/ds-modal-header.cjs.entry.js +31 -0
  198. package/dist/cjs/ds-modal.cjs.entry.js +201 -0
  199. package/dist/cjs/ds-navbar.cjs.entry.js +359 -0
  200. package/dist/cjs/ds-notification.cjs.entry.js +20 -28
  201. package/dist/cjs/ds-number-input.cjs.entry.js +107 -119
  202. package/dist/cjs/ds-pagination.cjs.entry.js +41 -37
  203. package/dist/cjs/ds-progress-bar.cjs.entry.js +25 -29
  204. package/dist/cjs/ds-radio-group.cjs.entry.js +48 -30
  205. package/dist/cjs/ds-radio.cjs.entry.js +36 -34
  206. package/dist/cjs/ds-segment-item.cjs.entry.js +9 -9
  207. package/dist/cjs/ds-segment.cjs.entry.js +29 -117
  208. package/dist/cjs/ds-select-optgroup.cjs.entry.js +49 -0
  209. package/dist/cjs/ds-select-option.cjs.entry.js +57 -0
  210. package/dist/cjs/ds-select.cjs.entry.js +2772 -0
  211. package/dist/cjs/ds-shape.cjs.entry.js +10 -16
  212. package/dist/cjs/ds-snackbar.cjs.entry.js +41 -58
  213. package/dist/cjs/ds-step-panel.cjs.entry.js +55 -0
  214. package/dist/cjs/ds-step.cjs.entry.js +170 -0
  215. package/dist/cjs/ds-steps.cjs.entry.js +227 -0
  216. package/dist/cjs/ds-tab-panel.cjs.entry.js +55 -0
  217. package/dist/cjs/ds-tab.cjs.entry.js +120 -0
  218. package/dist/cjs/ds-tabs.cjs.entry.js +364 -0
  219. package/dist/cjs/ds-tag-group.cjs.entry.js +3 -3
  220. package/dist/cjs/ds-tag.cjs.entry.js +19 -26
  221. package/dist/cjs/ds-text.cjs.entry.js +29 -33
  222. package/dist/cjs/ds-textarea.cjs.entry.js +32 -31
  223. package/dist/cjs/ds-toast.cjs.entry.js +41 -55
  224. package/dist/cjs/ds-toggle.cjs.entry.js +22 -21
  225. package/dist/cjs/ds-tooltip.cjs.entry.js +182 -0
  226. package/dist/cjs/{field.util-RjuvTLNZ.js → field.util-g9nhtuZH.js} +1 -1
  227. package/dist/cjs/floating-ui.dom-Cu3dZdFD.js +1628 -0
  228. package/dist/cjs/focus-BUszBnbl.js +1958 -0
  229. package/dist/cjs/footer.i18n-CpGxizgm.js +162 -0
  230. package/dist/cjs/{form-control-Bno2tBGf.js → form-control-B4Qf8fg-.js} +2 -2
  231. package/dist/cjs/has-value-rj502MLA.js +12 -0
  232. package/dist/cjs/{index-CdD-TT_n.js → index-CqInh7Vc.js} +502 -175
  233. package/dist/cjs/index.cjs.js +26 -8283
  234. package/dist/cjs/isArray-DvQst6zQ.js +42 -0
  235. package/dist/cjs/isNaN-DOSPWDkt.js +106 -0
  236. package/dist/cjs/{isObjectLike-h-ta_ikf.js → isObjectLike-BNz6hnAu.js} +0 -37
  237. package/dist/cjs/keyboard-C7y0jXYb.js +23 -0
  238. package/dist/cjs/{listener-DgVWqfa1.js → listener-1PZJDuOW.js} +1 -1
  239. package/dist/cjs/loader.cjs.js +2 -2
  240. package/dist/cjs/luxon-q23LOWrr.js +8137 -0
  241. package/dist/cjs/one-of-BotLfpAZ.js +30 -0
  242. package/dist/cjs/popup.interfaces-B-mwd9rh.js +23 -0
  243. package/dist/cjs/required-BAhZ8oRM.js +38 -0
  244. package/dist/cjs/resize.decorator-Sqefy8ta.js +98 -0
  245. package/dist/cjs/scroll--5tnvpG1.js +89 -0
  246. package/dist/cjs/svg-D9RbiR8R.js +2443 -0
  247. package/dist/cjs/{tslib.es6-BTi-SLnA.js → tslib.es6-BIB10hMZ.js} +1 -1
  248. package/dist/cjs/type-Br_NbeTX.js +33 -0
  249. package/dist/collection/collection-manifest.json +31 -2
  250. package/dist/collection/components/accordion/accordion.host.css +1 -1
  251. package/dist/collection/components/accordion/accordion.js +22 -29
  252. package/dist/collection/components/alert/alert-container.js +8 -14
  253. package/dist/collection/components/alert/alert.controller.js +1 -1
  254. package/dist/collection/components/alert/snackbar/snackbar.host.css +1 -1
  255. package/dist/collection/components/alert/snackbar/snackbar.js +30 -53
  256. package/dist/collection/components/alert/toast/toast.host.css +1 -1
  257. package/dist/collection/components/alert/toast/toast.js +32 -53
  258. package/dist/collection/components/app/app.js +11 -3
  259. package/dist/collection/components/badge/badge.host.css +1 -1
  260. package/dist/collection/components/badge/badge.interfaces.js +1 -1
  261. package/dist/collection/components/badge/badge.js +28 -25
  262. package/dist/collection/components/button/button-group/button-group.js +8 -14
  263. package/dist/collection/components/button/button.host.css +1 -1
  264. package/dist/collection/components/button/button.interfaces.js +1 -1
  265. package/dist/collection/components/button/button.js +44 -54
  266. package/dist/collection/components/card/card-actions/card-actions.js +3 -6
  267. package/dist/collection/components/card/card-content/card-content.host.css +1 -1
  268. package/dist/collection/components/card/card-header/card-header.js +4 -3
  269. package/dist/collection/components/card/card-subtitle/card-subtitle.js +8 -11
  270. package/dist/collection/components/card/card-title/card-title.js +6 -5
  271. package/dist/collection/components/card/card.host.css +1 -1
  272. package/dist/collection/components/card/card.js +30 -42
  273. package/dist/collection/components/carousel/carousel/carousel.host.css +1 -0
  274. package/dist/collection/components/carousel/carousel/carousel.i18n.js +65 -0
  275. package/dist/collection/components/carousel/carousel/carousel.js +631 -0
  276. package/dist/collection/components/carousel/carousel-item/carousel-item.host.css +1 -0
  277. package/dist/collection/components/carousel/carousel-item/carousel-item.js +313 -0
  278. package/dist/collection/components/carousel/carousel.interfaces.js +6 -0
  279. package/dist/collection/components/carousel/test/carousel.a11y.play.js +34 -0
  280. package/dist/collection/components/carousel/test/carousel.component.play.js +57 -0
  281. package/dist/collection/components/carousel/test/carousel.visual.play.js +24 -0
  282. package/dist/collection/components/checkbox/checkbox-group/checkbox-group.host.css +1 -1
  283. package/dist/collection/components/checkbox/checkbox-group/checkbox-group.js +63 -27
  284. package/dist/collection/components/checkbox/checkbox.host.css +1 -1
  285. package/dist/collection/components/checkbox/checkbox.js +47 -18
  286. package/dist/collection/components/checkbox/test/checkbox.visual.play.js +3 -0
  287. package/dist/collection/components/close/close.js +10 -21
  288. package/dist/collection/components/content/content.js +38 -52
  289. package/dist/collection/components/data/data-item.host.css +1 -0
  290. package/dist/collection/components/data/data-item.i18n.js +35 -0
  291. package/dist/collection/components/data/data-item.js +244 -0
  292. package/dist/collection/components/data/data-label.host.css +1 -0
  293. package/dist/collection/components/data/data-label.js +72 -0
  294. package/dist/collection/components/data/data-value.host.css +1 -0
  295. package/dist/collection/components/data/data-value.js +38 -0
  296. package/dist/collection/components/data/data.host.css +1 -0
  297. package/dist/collection/components/data/data.js +75 -0
  298. package/dist/collection/components/data/test/data.a11y.play.js +31 -0
  299. package/dist/collection/components/data/test/data.component.play.js +104 -0
  300. package/dist/collection/components/data/test/data.visual.play.js +25 -0
  301. package/dist/collection/components/date/date.host.css +1 -0
  302. package/dist/collection/components/date/date.i18n.js +105 -0
  303. package/dist/collection/components/date/date.interfaces.js +4 -0
  304. package/dist/collection/components/date/date.js +1241 -0
  305. package/dist/collection/components/date/date.mask.js +189 -0
  306. package/dist/collection/components/date/date.picker.js +536 -0
  307. package/dist/collection/components/date/test/date.a11y.play.js +27 -0
  308. package/dist/collection/components/date/test/date.component.play.js +69 -0
  309. package/dist/collection/components/date/test/date.visual.play.js +43 -0
  310. package/dist/collection/components/divider/divider.host.css +1 -1
  311. package/dist/collection/components/divider/divider.js +11 -24
  312. package/dist/collection/components/drawer/drawer.host.css +1 -0
  313. package/dist/collection/{utils/property-checkers/constants.js → components/drawer/drawer.interfaces.js} +1 -1
  314. package/dist/collection/components/drawer/drawer.js +492 -0
  315. package/dist/collection/components/drawer/test/drawer.a11y.play.js +39 -0
  316. package/dist/collection/components/drawer/test/drawer.component.play.js +131 -0
  317. package/dist/collection/components/drawer/test/drawer.visual.play.js +31 -0
  318. package/dist/collection/components/file-upload/file-upload.host.css +1 -0
  319. package/dist/collection/components/file-upload/file-upload.i18n.js +55 -0
  320. package/dist/collection/components/file-upload/file-upload.interfaces.js +10 -0
  321. package/dist/collection/components/file-upload/file-upload.js +1030 -0
  322. package/dist/collection/components/file-upload/test/file-upload.a11y.play.js +52 -0
  323. package/dist/collection/components/file-upload/test/file-upload.component.play.js +124 -0
  324. package/dist/collection/components/file-upload/test/file-upload.visual.play.js +18 -0
  325. package/dist/collection/components/file-upload/utils/file-list.util.js +13 -0
  326. package/dist/collection/components/file-upload/utils/file-size.util.js +10 -0
  327. package/dist/collection/components/file-upload/utils/file-validation.util.js +48 -0
  328. package/dist/collection/components/footer/footer.host.css +1 -0
  329. package/dist/collection/components/footer/footer.i18n.js +155 -0
  330. package/dist/collection/components/footer/footer.interfaces.js +4 -0
  331. package/dist/collection/components/footer/footer.js +350 -0
  332. package/dist/collection/components/footer/test/footer.a11y.play.js +17 -0
  333. package/dist/collection/components/footer/test/footer.component.play.js +74 -0
  334. package/dist/collection/components/footer/test/footer.visual.play.js +16 -0
  335. package/dist/collection/components/form/test/form.visual.play.js +13 -1
  336. package/dist/collection/components/heading/heading.host.css +1 -1
  337. package/dist/collection/components/heading/heading.js +16 -17
  338. package/dist/collection/components/hint/hint-text/hint-text.js +28 -0
  339. package/dist/collection/components/hint/hint-title/hint-title.js +31 -0
  340. package/dist/collection/components/hint/hint.host.css +1 -0
  341. package/dist/collection/components/hint/hint.i18n.js +35 -0
  342. package/dist/collection/components/hint/hint.interfaces.js +1 -0
  343. package/dist/collection/components/hint/hint.js +410 -0
  344. package/dist/collection/components/hint/test/hint.a11y.play.js +41 -0
  345. package/dist/collection/components/hint/test/hint.component.play.js +110 -0
  346. package/dist/collection/components/hint/test/hint.visual.play.js +39 -0
  347. package/dist/collection/components/icon/icon.host.css +1 -1
  348. package/dist/collection/components/icon/icon.interfaces.js +1 -0
  349. package/dist/collection/components/icon/icon.js +73 -42
  350. package/dist/collection/components/icon/test/icon.component.play.js +23 -1
  351. package/dist/collection/components/input/clear-button.i18n.js +35 -0
  352. package/dist/collection/components/input/clear-button.util.js +11 -0
  353. package/dist/collection/components/input/input.host.css +1 -1
  354. package/dist/collection/components/input/input.js +36 -37
  355. package/dist/collection/components/input/test/input.component.play.js +1 -1
  356. package/dist/collection/components/input/trigger-button.i18n.js +45 -0
  357. package/dist/collection/components/input-slider/input-slider.host.css +1 -0
  358. package/dist/collection/components/input-slider/input-slider.interfaces.js +4 -0
  359. package/dist/collection/components/input-slider/input-slider.js +961 -0
  360. package/dist/collection/components/input-slider/input-slider.picker.js +124 -0
  361. package/dist/collection/components/input-slider/input-slider.utils.js +32 -0
  362. package/dist/collection/components/input-slider/test/input-slider.a11y.play.js +36 -0
  363. package/dist/collection/components/input-slider/test/input-slider.component.play.js +87 -0
  364. package/dist/collection/components/input-slider/test/input-slider.visual.play.js +27 -0
  365. package/dist/collection/components/label/label.host.css +1 -1
  366. package/dist/collection/components/label/label.js +16 -28
  367. package/dist/collection/components/list/item/item.host.css +1 -1
  368. package/dist/collection/components/list/item/item.interfaces.js +1 -1
  369. package/dist/collection/components/list/item/item.js +27 -34
  370. package/dist/collection/components/list/list.js +3 -10
  371. package/dist/collection/components/list/test/list.visual.play.js +30 -0
  372. package/dist/collection/components/logo/logo.js +11 -18
  373. package/dist/collection/components/modal/modal-body/modal-body.host.css +1 -0
  374. package/dist/collection/components/modal/modal-body/modal-body.js +41 -0
  375. package/dist/collection/components/modal/modal-header/modal-header.js +32 -0
  376. package/dist/collection/components/modal/modal.controller.js +31 -0
  377. package/dist/collection/components/modal/modal.host.css +1 -0
  378. package/dist/collection/components/modal/modal.interfaces.js +1 -0
  379. package/dist/collection/components/modal/modal.js +461 -0
  380. package/dist/collection/components/modal/test/modal.a11y.play.js +59 -0
  381. package/dist/collection/components/modal/test/modal.component.play.js +196 -0
  382. package/dist/collection/components/modal/test/modal.visual.play.js +36 -0
  383. package/dist/collection/components/navbar/navbar.host.css +1 -0
  384. package/dist/collection/components/navbar/navbar.i18n.js +65 -0
  385. package/dist/collection/components/navbar/navbar.interfaces.js +6 -0
  386. package/dist/collection/components/navbar/navbar.js +544 -0
  387. package/dist/collection/components/navbar/test/navbar.a11y.play.js +26 -0
  388. package/dist/collection/components/navbar/test/navbar.component.play.js +76 -0
  389. package/dist/collection/components/navbar/test/navbar.visual.play.js +14 -0
  390. package/dist/collection/components/notification/notification.host.css +1 -1
  391. package/dist/collection/components/notification/notification.js +14 -26
  392. package/dist/collection/components/number-input/number-input.host.css +1 -1
  393. package/dist/collection/components/number-input/number-input.js +23 -24
  394. package/dist/collection/components/pagination/pagination.host.css +1 -1
  395. package/dist/collection/components/pagination/pagination.js +29 -28
  396. package/dist/collection/components/popup/popup.host.css +1 -0
  397. package/dist/collection/components/popup/popup.interfaces.js +18 -0
  398. package/dist/collection/components/popup/popup.js +869 -0
  399. package/dist/collection/components/popup/test/popup.a11y.play.js +50 -0
  400. package/dist/collection/components/popup/test/popup.component.play.js +168 -0
  401. package/dist/collection/components/popup/test/popup.visual.play.js +33 -0
  402. package/dist/collection/components/progress-bar/progress-bar.host.css +1 -1
  403. package/dist/collection/components/progress-bar/progress-bar.js +13 -20
  404. package/dist/collection/components/radio/radio-group/radio-group.host.css +1 -1
  405. package/dist/collection/components/radio/radio-group/radio-group.js +60 -24
  406. package/dist/collection/components/radio/radio.host.css +1 -1
  407. package/dist/collection/components/radio/radio.js +48 -20
  408. package/dist/collection/components/radio/test/radio.visual.play.js +3 -0
  409. package/dist/collection/components/segment/segment/segment.host.css +1 -1
  410. package/dist/collection/components/segment/segment/segment.js +19 -20
  411. package/dist/collection/components/segment/segment-item.js +6 -7
  412. package/dist/collection/components/select/select-optgroup.host.css +1 -0
  413. package/dist/collection/components/select/select-optgroup.js +82 -0
  414. package/dist/collection/components/select/select-option.host.css +1 -0
  415. package/dist/collection/components/select/select-option.js +112 -0
  416. package/dist/collection/components/select/select.host.css +1 -0
  417. package/dist/collection/components/select/select.i18n.js +45 -0
  418. package/dist/collection/components/select/select.interfaces.js +4 -0
  419. package/dist/collection/components/select/select.js +1024 -0
  420. package/dist/collection/components/select/select.picker.js +276 -0
  421. package/dist/collection/components/select/test/select.a11y.play.js +81 -0
  422. package/dist/collection/components/select/test/select.component.play.js +184 -0
  423. package/dist/collection/components/select/test/select.visual.play.js +70 -0
  424. package/dist/collection/components/shape/shape.js +7 -14
  425. package/dist/collection/components/spinner/spinner.js +18 -26
  426. package/dist/collection/components/stack/stack.host.css +1 -1
  427. package/dist/collection/components/stack/stack.js +41 -153
  428. package/dist/collection/components/steps/step/step.host.css +1 -0
  429. package/dist/collection/components/steps/step/step.js +431 -0
  430. package/dist/collection/components/steps/step-panel/step-panel.host.css +1 -0
  431. package/dist/collection/components/steps/step-panel/step-panel.js +104 -0
  432. package/dist/collection/components/steps/steps/steps.host.css +1 -0
  433. package/dist/collection/components/steps/steps/steps.js +356 -0
  434. package/dist/collection/components/steps/steps.interfaces.js +4 -0
  435. package/dist/collection/components/steps/test/steps.a11y.play.js +73 -0
  436. package/dist/collection/components/steps/test/steps.component.play.js +182 -0
  437. package/dist/collection/components/steps/test/steps.visual.play.js +18 -0
  438. package/dist/collection/components/tabs/tab/tab.host.css +1 -0
  439. package/dist/collection/components/tabs/tab/tab.js +278 -0
  440. package/dist/collection/components/tabs/tab-panel/tab-panel.host.css +1 -0
  441. package/dist/collection/components/tabs/tab-panel/tab-panel.js +104 -0
  442. package/dist/collection/components/tabs/tabs/tabs.host.css +1 -0
  443. package/dist/collection/components/tabs/tabs/tabs.i18n.js +45 -0
  444. package/dist/collection/components/tabs/tabs/tabs.js +552 -0
  445. package/dist/collection/components/tabs/tabs.interfaces.js +12 -0
  446. package/dist/collection/components/tabs/test/tabs.a11y.play.js +60 -0
  447. package/dist/collection/components/tabs/test/tabs.component.play.js +129 -0
  448. package/dist/collection/components/tabs/test/tabs.visual.play.js +31 -0
  449. package/dist/collection/components/tag/tag-group/tag-group.js +1 -1
  450. package/dist/collection/components/tag/tag.js +15 -26
  451. package/dist/collection/components/text/text.host.css +1 -1
  452. package/dist/collection/components/text/text.js +23 -30
  453. package/dist/collection/components/textarea/textarea.host.css +1 -1
  454. package/dist/collection/components/textarea/textarea.js +24 -25
  455. package/dist/collection/components/time-input/test/time-input.visual.play.js +18 -0
  456. package/dist/collection/components/toggle/toggle.js +19 -20
  457. package/dist/collection/components/tooltip/test/tooltip.a11y.play.js +32 -0
  458. package/dist/collection/components/tooltip/test/tooltip.component.play.js +51 -0
  459. package/dist/collection/components/tooltip/test/tooltip.visual.play.js +16 -0
  460. package/dist/collection/components/tooltip/tooltip.host.css +1 -0
  461. package/dist/collection/components/tooltip/tooltip.interfaces.js +4 -0
  462. package/dist/collection/components/tooltip/tooltip.js +407 -0
  463. package/dist/collection/foundation/colors.visual.play.js +18 -0
  464. package/dist/collection/global/config/config.const.js +11 -0
  465. package/dist/collection/global/config/config.default.js +92 -42
  466. package/dist/collection/global/config/config.js +1 -1
  467. package/dist/collection/global/config/config.meta.js +27 -0
  468. package/dist/collection/global/config/index.js +1 -0
  469. package/dist/collection/global/config/initialize.js +2 -1
  470. package/dist/collection/global/constants/tags.constant.js +30 -1
  471. package/dist/collection/global/constants/version.constant.js +1 -1
  472. package/dist/collection/global/index.js +0 -1
  473. package/dist/collection/global/initialize.js +2 -0
  474. package/dist/collection/index.js +5 -20
  475. package/dist/collection/utils/attributes.js +0 -15
  476. package/dist/collection/utils/focus.js +72 -0
  477. package/dist/collection/utils/form-control.js +1 -1
  478. package/dist/collection/utils/has-value.js +7 -0
  479. package/dist/collection/utils/helpers.js +14 -74
  480. package/dist/collection/utils/index.js +7 -5
  481. package/dist/collection/utils/{property-checkers/is-value-empty.js → is-value-empty.js} +1 -1
  482. package/dist/collection/utils/number.js +6 -25
  483. package/dist/collection/utils/property-decorators/array-of.js +25 -0
  484. package/dist/collection/utils/property-decorators/bound.js +79 -0
  485. package/dist/collection/utils/property-decorators/create-validator-decorator.js +212 -0
  486. package/dist/collection/utils/property-decorators/date.js +24 -0
  487. package/dist/collection/utils/property-decorators/index.js +12 -0
  488. package/dist/collection/utils/property-decorators/iso-date.js +24 -0
  489. package/dist/collection/utils/property-decorators/one-of.js +25 -0
  490. package/dist/collection/utils/property-decorators/pattern.js +25 -0
  491. package/dist/collection/utils/property-decorators/required.js +44 -0
  492. package/dist/collection/utils/property-decorators/type.js +28 -0
  493. package/dist/collection/utils/property-decorators/url.js +32 -0
  494. package/dist/collection/utils/property-types.js +1 -0
  495. package/dist/collection/utils/svg.js +19 -0
  496. package/dist/design-system/design-system.esm.js +1 -1
  497. package/dist/design-system/index.esm.js +1 -1
  498. package/dist/design-system/p-00e6b1b780.entry.js +4 -0
  499. package/dist/design-system/p-0bf3d4d939.entry.js +4 -0
  500. package/dist/design-system/p-0ea6cdd218.entry.js +4 -0
  501. package/dist/design-system/p-0f2a87fa39.entry.js +4 -0
  502. package/dist/design-system/p-138be1f0cc.entry.js +4 -0
  503. package/dist/design-system/p-16b03e0b02.entry.js +4 -0
  504. package/dist/design-system/p-1750b3c4f1.entry.js +4 -0
  505. package/dist/design-system/p-1A9jKraP.js +4 -0
  506. package/dist/design-system/p-1b1e3ad99c.entry.js +4 -0
  507. package/dist/design-system/p-24c85e99f5.entry.js +4 -0
  508. package/dist/design-system/p-2b038255c5.entry.js +4 -0
  509. package/dist/design-system/p-2bb98dfa2f.entry.js +4 -0
  510. package/dist/design-system/p-2eb6067210.entry.js +4 -0
  511. package/dist/design-system/p-32e156bc72.entry.js +4 -0
  512. package/dist/design-system/p-3824068ae7.entry.js +4 -0
  513. package/dist/design-system/p-3aa3841834.entry.js +4 -0
  514. package/dist/design-system/p-3d2539929c.entry.js +4 -0
  515. package/dist/design-system/p-3d675c6507.entry.js +4 -0
  516. package/dist/design-system/p-3e3a6799d6.entry.js +4 -0
  517. package/dist/design-system/p-3e43fa2bc6.entry.js +4 -0
  518. package/dist/design-system/p-4284d6d646.entry.js +4 -0
  519. package/dist/design-system/{p-1d312498a6.entry.js → p-44981aaf8d.entry.js} +1 -1
  520. package/dist/design-system/p-4b2a59576c.entry.js +4 -0
  521. package/dist/design-system/p-4bfc094a03.entry.js +4 -0
  522. package/dist/design-system/p-53d9a40010.entry.js +4 -0
  523. package/dist/design-system/p-564ee4d78f.entry.js +4 -0
  524. package/dist/design-system/p-599a693db3.entry.js +4 -0
  525. package/dist/design-system/p-5a6c6959fa.entry.js +4 -0
  526. package/dist/design-system/p-5d4a5d0b61.entry.js +4 -0
  527. package/dist/design-system/p-5ded2b6438.entry.js +4 -0
  528. package/dist/design-system/p-5f1a8be21c.entry.js +4 -0
  529. package/dist/design-system/p-5f28436626.entry.js +4 -0
  530. package/dist/design-system/p-6c60833550.entry.js +4 -0
  531. package/dist/design-system/p-7246bfb9a0.entry.js +4 -0
  532. package/dist/design-system/p-77e7a6a068.entry.js +4 -0
  533. package/dist/design-system/p-78112e7b35.entry.js +4 -0
  534. package/dist/design-system/p-7ebdd14afc.entry.js +4 -0
  535. package/dist/design-system/p-7f42c18249.entry.js +4 -0
  536. package/dist/design-system/p-85bf3794f9.entry.js +4 -0
  537. package/dist/design-system/p-8a9d617f75.entry.js +4 -0
  538. package/dist/design-system/p-908e7b073a.entry.js +4 -0
  539. package/dist/design-system/p-9f9364d7df.entry.js +4 -0
  540. package/dist/design-system/p-B-en4B17.js +4 -0
  541. package/dist/design-system/p-B-v2Wm-V.js +5 -0
  542. package/dist/design-system/p-B8KVoKrH.js +5 -0
  543. package/dist/design-system/p-B8PCdo6e.js +4 -0
  544. package/dist/design-system/p-BAY6Z8bT.js +4 -0
  545. package/dist/design-system/{p-C7EnKCpl.js → p-BMM6Nxeh.js} +1 -1
  546. package/{components/p-Diz11uvt.js → dist/design-system/p-BPGfTrrM.js} +1 -1
  547. package/dist/design-system/p-BqY0KzJC.js +4 -0
  548. package/dist/design-system/p-BrJFPhMA.js +4 -0
  549. package/dist/design-system/p-C1jqbZdf.js +4 -0
  550. package/dist/design-system/{p-DCf2fJmI.js → p-C5Rtikeh.js} +1 -1
  551. package/dist/design-system/p-CDhvZoCt.js +4 -0
  552. package/dist/design-system/p-CGHN-3RC.js +4 -0
  553. package/dist/design-system/{p-CAcwu8uP.js → p-CfgwSore.js} +1 -1
  554. package/dist/design-system/p-ChSKXFK5.js +4 -0
  555. package/dist/design-system/{p-BLPSziW-.js → p-Chgme2NJ.js} +1 -1
  556. package/{components/p-5Sp1eJOt.js → dist/design-system/p-CrYAd3JT.js} +1 -1
  557. package/dist/design-system/p-CziF75uh.js +4 -0
  558. package/dist/design-system/p-DJBD4skP.js +14 -0
  559. package/{components/p-E1SnOz0L.js → dist/design-system/p-DOvdnojj.js} +1 -1
  560. package/dist/design-system/p-DYPX3A8m.js +4 -0
  561. package/dist/design-system/p-DiUgZKWs.js +4 -0
  562. package/dist/design-system/p-Dk0GEN2t.js +4 -0
  563. package/dist/design-system/p-DkhJaoXg.js +4 -0
  564. package/dist/design-system/p-DoHCSvjl.js +4 -0
  565. package/dist/design-system/p-DypNSUAh.js +4 -0
  566. package/dist/design-system/p-Uy_dVz21.js +4 -0
  567. package/dist/design-system/{p-Dnjznncd.js → p-Y0rKqVvm.js} +1 -1
  568. package/dist/design-system/p-Z0zrglhd.js +4 -0
  569. package/dist/design-system/p-a42ecb68a0.entry.js +4 -0
  570. package/dist/design-system/p-a782c877ea.entry.js +4 -0
  571. package/dist/design-system/p-a8df8f067b.entry.js +4 -0
  572. package/dist/design-system/p-aa3aee2591.entry.js +4 -0
  573. package/dist/design-system/p-aa3c0ff536.entry.js +4 -0
  574. package/dist/design-system/p-ab8bee7022.entry.js +4 -0
  575. package/dist/design-system/p-adc58b2821.entry.js +4 -0
  576. package/dist/design-system/p-b390490b0d.entry.js +4 -0
  577. package/dist/design-system/p-b44641ec28.entry.js +4 -0
  578. package/dist/design-system/p-b4738dc266.entry.js +4 -0
  579. package/dist/design-system/p-b851a43fff.entry.js +4 -0
  580. package/dist/design-system/p-b8669a617c.entry.js +4 -0
  581. package/dist/design-system/p-b8f626bf28.entry.js +4 -0
  582. package/dist/design-system/p-bd543e1baf.entry.js +4 -0
  583. package/dist/design-system/p-ce67cbbed5.entry.js +4 -0
  584. package/dist/design-system/p-d3a80b8422.entry.js +4 -0
  585. package/dist/design-system/p-d4d9205dda.entry.js +4 -0
  586. package/dist/design-system/p-dbd3d3b3d3.entry.js +4 -0
  587. package/{components/p-BATOumsf.js → dist/design-system/p-dziB1ufg.js} +1 -1
  588. package/dist/design-system/p-e0b2d6e296.entry.js +4 -0
  589. package/dist/design-system/p-e94ee7391c.entry.js +4 -0
  590. package/dist/design-system/p-ee76bf354e.entry.js +4 -0
  591. package/dist/design-system/p-f7be5b6114.entry.js +4 -0
  592. package/dist/design-system/p-fa613cd0d1.entry.js +4 -0
  593. package/dist/design-system/p-faf75173db.entry.js +4 -0
  594. package/dist/design-system/p-fff38e1ca7.entry.js +4 -0
  595. package/dist/design-system/p-x2KazRjl.js +4 -0
  596. package/dist/esm/{_getTag-DFxL3s3h.js → _getTag-BkweuRJc.js} +1 -1
  597. package/dist/esm/array-BJZA868l.js +1984 -0
  598. package/dist/esm/{breakpoints.decorator-L2xeP46f.js → breakpoints.decorator-D9M4v98c.js} +1 -1
  599. package/dist/esm/{breakpoints.subject-BhbzG-rl.js → breakpoints.subject-DHZ7TzYV.js} +3 -3
  600. package/dist/esm/{button.interfaces-BkESlUMc.js → button.interfaces-BPGfTrrM.js} +1 -1
  601. package/dist/esm/carousel.interfaces-B-en4B17.js +8 -0
  602. package/dist/esm/{config.decorator-BQNIja4k.js → config.decorator-CRYVBTkX.js} +1 -1
  603. package/dist/esm/{config.utils-COlKFRlV.js → config.utils-CR4Xudpz.js} +1 -1
  604. package/dist/esm/create-validator-decorator-fUav5byo.js +208 -0
  605. package/dist/esm/design-system.js +4 -4
  606. package/dist/esm/{device-Dhwt3m7W.js → device-CapioAfe.js} +1 -1
  607. package/dist/esm/ds-accordion.entry.js +30 -34
  608. package/dist/esm/ds-alert-container.entry.js +12 -15
  609. package/dist/esm/ds-app.entry.js +16 -6
  610. package/dist/esm/ds-badge.entry.js +33 -26
  611. package/dist/esm/ds-button-group.entry.js +14 -17
  612. package/dist/esm/ds-button_2.entry.js +58 -73
  613. package/dist/esm/ds-card-actions.entry.js +6 -8
  614. package/dist/esm/ds-card-content.entry.js +3 -3
  615. package/dist/esm/ds-card-header.entry.js +8 -5
  616. package/dist/esm/ds-card-subtitle.entry.js +13 -13
  617. package/dist/esm/ds-card-title.entry.js +11 -7
  618. package/dist/esm/ds-card.entry.js +32 -43
  619. package/dist/esm/ds-carousel-item.entry.js +126 -0
  620. package/dist/esm/ds-carousel.entry.js +471 -0
  621. package/dist/esm/ds-checkbox-group.entry.js +59 -2012
  622. package/dist/esm/ds-checkbox.entry.js +33 -20
  623. package/dist/esm/ds-content_2.entry.js +327 -0
  624. package/dist/esm/ds-data-item.entry.js +144 -0
  625. package/dist/esm/ds-data-label.entry.js +39 -0
  626. package/dist/esm/ds-data-value.entry.js +29 -0
  627. package/dist/esm/ds-data.entry.js +41 -0
  628. package/dist/esm/ds-date.entry.js +5332 -0
  629. package/dist/esm/{ds-logo.entry.js → ds-divider_2.entry.js} +130 -26
  630. package/dist/esm/ds-drawer_2.entry.js +599 -0
  631. package/dist/esm/ds-file-upload.entry.js +514 -0
  632. package/dist/esm/ds-footer.entry.js +157 -0
  633. package/dist/esm/ds-heading.entry.js +22 -20
  634. package/dist/esm/ds-hint-text.entry.js +26 -0
  635. package/dist/esm/ds-hint-title.entry.js +29 -0
  636. package/dist/esm/ds-hint.entry.js +241 -0
  637. package/dist/esm/ds-icon_2.entry.js +80 -71
  638. package/dist/esm/ds-input-slider.entry.js +2883 -0
  639. package/dist/esm/ds-input.entry.js +46 -44
  640. package/dist/esm/ds-item.entry.js +29 -34
  641. package/dist/esm/ds-label.entry.js +23 -31
  642. package/dist/esm/ds-list.entry.js +6 -12
  643. package/dist/esm/ds-modal-body.entry.js +32 -0
  644. package/dist/esm/ds-modal-header.entry.js +29 -0
  645. package/dist/esm/ds-modal.entry.js +199 -0
  646. package/dist/esm/ds-navbar.entry.js +357 -0
  647. package/dist/esm/ds-notification.entry.js +20 -28
  648. package/dist/esm/ds-number-input.entry.js +102 -114
  649. package/dist/esm/ds-pagination.entry.js +41 -37
  650. package/dist/esm/ds-progress-bar.entry.js +25 -29
  651. package/dist/esm/ds-radio-group.entry.js +49 -31
  652. package/dist/esm/ds-radio.entry.js +35 -33
  653. package/dist/esm/ds-segment-item.entry.js +9 -9
  654. package/dist/esm/ds-segment.entry.js +28 -116
  655. package/dist/esm/ds-select-optgroup.entry.js +47 -0
  656. package/dist/esm/ds-select-option.entry.js +55 -0
  657. package/dist/esm/ds-select.entry.js +2770 -0
  658. package/dist/esm/ds-shape.entry.js +10 -16
  659. package/dist/esm/ds-snackbar.entry.js +41 -58
  660. package/dist/esm/ds-step-panel.entry.js +53 -0
  661. package/dist/esm/ds-step.entry.js +168 -0
  662. package/dist/esm/ds-steps.entry.js +225 -0
  663. package/dist/esm/ds-tab-panel.entry.js +53 -0
  664. package/dist/esm/ds-tab.entry.js +118 -0
  665. package/dist/esm/ds-tabs.entry.js +362 -0
  666. package/dist/esm/ds-tag-group.entry.js +3 -3
  667. package/dist/esm/ds-tag.entry.js +19 -26
  668. package/dist/esm/ds-text.entry.js +29 -33
  669. package/dist/esm/ds-textarea.entry.js +33 -32
  670. package/dist/esm/ds-toast.entry.js +41 -55
  671. package/dist/esm/ds-toggle.entry.js +22 -21
  672. package/dist/esm/ds-tooltip.entry.js +180 -0
  673. package/dist/esm/{field.util-BXxRO7CD.js → field.util-neIQBS-h.js} +1 -1
  674. package/dist/esm/floating-ui.dom-BqY0KzJC.js +1621 -0
  675. package/dist/esm/focus-6OAqvfus.js +1956 -0
  676. package/dist/esm/footer.i18n-BrJFPhMA.js +159 -0
  677. package/dist/esm/{form-control-D2O-sb65.js → form-control-DhinyMa9.js} +2 -2
  678. package/dist/esm/has-value-Dmsj8ZQw.js +10 -0
  679. package/dist/esm/{index-CuwLeg-T.js → index-B-v2Wm-V.js} +501 -175
  680. package/dist/esm/index.js +13 -8273
  681. package/dist/esm/{input.interfaces-C7EnKCpl.js → input.interfaces-BMM6Nxeh.js} +1 -1
  682. package/dist/esm/isArray-B8PCdo6e.js +40 -0
  683. package/dist/esm/isNaN-BrbqGXXw.js +104 -0
  684. package/dist/esm/{isObjectLike-BAYao9w7.js → isObjectLike-BnBXjF_n.js} +1 -37
  685. package/dist/esm/keyboard-Uy_dVz21.js +20 -0
  686. package/dist/esm/{listener-C_kjUVTE.js → listener-DIZDQOuO.js} +1 -1
  687. package/dist/esm/loader.js +3 -3
  688. package/dist/esm/luxon-C1jqbZdf.js +8133 -0
  689. package/dist/esm/one-of-CjRvS2Tk.js +28 -0
  690. package/dist/esm/popup.interfaces-BAY6Z8bT.js +20 -0
  691. package/dist/esm/required-Dtml5IID.js +36 -0
  692. package/dist/esm/resize.decorator-eogZBBk6.js +96 -0
  693. package/dist/esm/scroll-v2MaEkiZ.js +87 -0
  694. package/dist/esm/svg-B8KVoKrH.js +2440 -0
  695. package/dist/esm/{tslib.es6-tdchDLyb.js → tslib.es6-n47B6oUi.js} +1 -1
  696. package/dist/esm/type-7qEQcw90.js +31 -0
  697. package/dist/types/components/accordion/accordion.d.ts +0 -5
  698. package/dist/types/components/alert/alert-container.d.ts +0 -5
  699. package/dist/types/components/alert/snackbar/snackbar.d.ts +0 -5
  700. package/dist/types/components/alert/toast/toast.d.ts +0 -5
  701. package/dist/types/components/badge/badge.d.ts +1 -3
  702. package/dist/types/components/badge/badge.interfaces.d.ts +1 -1
  703. package/dist/types/components/button/button-group/button-group.d.ts +0 -5
  704. package/dist/types/components/button/button.d.ts +1 -3
  705. package/dist/types/components/button/button.interfaces.d.ts +1 -1
  706. package/dist/types/components/card/card-actions/card-actions.d.ts +0 -1
  707. package/dist/types/components/card/card-subtitle/card-subtitle.d.ts +0 -1
  708. package/dist/types/components/card/card.d.ts +2 -4
  709. package/dist/types/components/carousel/carousel/carousel.d.ts +114 -0
  710. package/dist/types/components/carousel/carousel/carousel.i18n.d.ts +9 -0
  711. package/dist/types/components/carousel/carousel-item/carousel-item.d.ts +70 -0
  712. package/dist/types/components/carousel/carousel.interfaces.d.ts +14 -0
  713. package/dist/types/components/carousel/test/carousel.a11y.play.d.ts +1 -0
  714. package/dist/types/components/carousel/test/carousel.component.play.d.ts +1 -0
  715. package/dist/types/components/carousel/test/carousel.visual.play.d.ts +1 -0
  716. package/dist/types/components/checkbox/checkbox-group/checkbox-group.d.ts +6 -0
  717. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  718. package/dist/types/components/close/close.d.ts +1 -3
  719. package/dist/types/components/content/content.d.ts +2 -5
  720. package/dist/types/components/data/data-item.d.ts +43 -0
  721. package/dist/types/components/data/data-item.i18n.d.ts +6 -0
  722. package/dist/types/components/data/data-item.interfaces.d.ts +4 -0
  723. package/dist/types/components/data/data-label.d.ts +19 -0
  724. package/dist/types/components/data/data-label.interfaces.d.ts +3 -0
  725. package/dist/types/components/data/data-value.d.ts +15 -0
  726. package/dist/types/components/data/data-value.interfaces.d.ts +5 -0
  727. package/dist/types/components/data/data.d.ts +19 -0
  728. package/dist/types/components/data/data.interfaces.d.ts +4 -0
  729. package/dist/types/components/data/test/data.a11y.play.d.ts +1 -0
  730. package/dist/types/components/data/test/data.component.play.d.ts +1 -0
  731. package/dist/types/components/data/test/data.visual.play.d.ts +1 -0
  732. package/dist/types/components/date/date.d.ts +214 -0
  733. package/dist/types/components/date/date.i18n.d.ts +13 -0
  734. package/dist/types/components/date/date.interfaces.d.ts +18 -0
  735. package/dist/types/components/date/date.mask.d.ts +29 -0
  736. package/dist/types/components/date/date.picker.d.ts +67 -0
  737. package/dist/types/components/date/test/date.a11y.play.d.ts +1 -0
  738. package/dist/types/components/date/test/date.component.play.d.ts +1 -0
  739. package/dist/types/components/date/test/date.visual.play.d.ts +1 -0
  740. package/dist/types/components/divider/divider.d.ts +1 -3
  741. package/dist/types/components/drawer/drawer.d.ts +102 -0
  742. package/dist/types/components/drawer/drawer.interfaces.d.ts +8 -0
  743. package/dist/types/components/drawer/test/drawer.a11y.play.d.ts +1 -0
  744. package/dist/types/components/drawer/test/drawer.component.play.d.ts +1 -0
  745. package/dist/types/components/drawer/test/drawer.visual.play.d.ts +1 -0
  746. package/dist/types/components/file-upload/file-upload.d.ts +192 -0
  747. package/dist/types/components/file-upload/file-upload.i18n.d.ts +8 -0
  748. package/dist/types/components/file-upload/file-upload.interfaces.d.ts +24 -0
  749. package/dist/types/components/file-upload/test/file-upload.a11y.play.d.ts +1 -0
  750. package/dist/types/components/file-upload/test/file-upload.component.play.d.ts +1 -0
  751. package/dist/types/components/file-upload/test/file-upload.visual.play.d.ts +1 -0
  752. package/dist/types/components/file-upload/utils/file-list.util.d.ts +2 -0
  753. package/dist/types/components/file-upload/utils/file-size.util.d.ts +1 -0
  754. package/dist/types/components/file-upload/utils/file-validation.util.d.ts +13 -0
  755. package/dist/types/components/footer/footer.d.ts +68 -0
  756. package/dist/types/components/footer/footer.i18n.d.ts +7 -0
  757. package/dist/types/components/footer/footer.interfaces.d.ts +19 -0
  758. package/dist/types/components/footer/test/footer.a11y.play.d.ts +1 -0
  759. package/dist/types/components/footer/test/footer.component.play.d.ts +1 -0
  760. package/dist/types/components/footer/test/footer.visual.play.d.ts +1 -0
  761. package/dist/types/components/hint/hint-text/hint-text.d.ts +15 -0
  762. package/dist/types/components/hint/hint-title/hint-title.d.ts +16 -0
  763. package/dist/types/components/hint/hint.d.ts +87 -0
  764. package/dist/types/components/hint/hint.i18n.d.ts +6 -0
  765. package/dist/types/components/hint/hint.interfaces.d.ts +4 -0
  766. package/dist/types/components/hint/test/hint.a11y.play.d.ts +1 -0
  767. package/dist/types/components/hint/test/hint.component.play.d.ts +1 -0
  768. package/dist/types/components/hint/test/hint.visual.play.d.ts +1 -0
  769. package/dist/types/components/icon/icon.d.ts +7 -3
  770. package/dist/types/components/icon/icon.interfaces.d.ts +1 -1
  771. package/dist/types/components/input/clear-button.i18n.d.ts +6 -0
  772. package/dist/types/components/input/clear-button.util.d.ts +10 -0
  773. package/dist/types/components/input/trigger-button.i18n.d.ts +7 -0
  774. package/dist/types/components/input-slider/input-slider.d.ts +186 -0
  775. package/dist/types/components/input-slider/input-slider.interfaces.d.ts +18 -0
  776. package/dist/types/components/input-slider/input-slider.picker.d.ts +37 -0
  777. package/dist/types/components/input-slider/input-slider.utils.d.ts +18 -0
  778. package/dist/types/components/input-slider/test/input-slider.a11y.play.d.ts +1 -0
  779. package/dist/types/components/input-slider/test/input-slider.component.play.d.ts +1 -0
  780. package/dist/types/components/input-slider/test/input-slider.visual.play.d.ts +1 -0
  781. package/dist/types/components/label/label.d.ts +3 -5
  782. package/dist/types/components/list/item/item.d.ts +0 -5
  783. package/dist/types/components/list/item/item.interfaces.d.ts +1 -1
  784. package/dist/types/components/list/list.d.ts +0 -5
  785. package/dist/types/components/list/test/list.visual.play.d.ts +1 -0
  786. package/dist/types/components/logo/logo.d.ts +1 -2
  787. package/dist/types/components/modal/modal-body/modal-body.d.ts +15 -0
  788. package/dist/types/components/modal/modal-header/modal-header.d.ts +17 -0
  789. package/dist/types/components/modal/modal.controller.d.ts +3 -0
  790. package/dist/types/components/modal/modal.d.ts +97 -0
  791. package/dist/types/components/modal/modal.interfaces.d.ts +15 -0
  792. package/dist/types/components/modal/test/modal.a11y.play.d.ts +1 -0
  793. package/dist/types/components/modal/test/modal.component.play.d.ts +1 -0
  794. package/dist/types/components/modal/test/modal.visual.play.d.ts +1 -0
  795. package/dist/types/components/navbar/navbar.d.ts +128 -0
  796. package/dist/types/components/navbar/navbar.i18n.d.ts +9 -0
  797. package/dist/types/components/navbar/navbar.interfaces.d.ts +10 -0
  798. package/dist/types/components/navbar/test/navbar.a11y.play.d.ts +1 -0
  799. package/dist/types/components/navbar/test/navbar.component.play.d.ts +1 -0
  800. package/dist/types/components/navbar/test/navbar.visual.play.d.ts +1 -0
  801. package/dist/types/components/notification/notification.d.ts +1 -3
  802. package/dist/types/components/pagination/pagination.d.ts +0 -5
  803. package/dist/types/components/popup/popup.d.ts +152 -0
  804. package/dist/types/components/popup/popup.interfaces.d.ts +14 -0
  805. package/dist/types/components/popup/test/popup.a11y.play.d.ts +1 -0
  806. package/dist/types/components/popup/test/popup.component.play.d.ts +1 -0
  807. package/dist/types/components/popup/test/popup.visual.play.d.ts +1 -0
  808. package/dist/types/components/progress-bar/progress-bar.d.ts +0 -5
  809. package/dist/types/components/radio/radio-group/radio-group.d.ts +6 -0
  810. package/dist/types/components/radio/radio.d.ts +4 -0
  811. package/dist/types/components/select/select-optgroup.d.ts +28 -0
  812. package/dist/types/components/select/select-option.d.ts +34 -0
  813. package/dist/types/components/select/select.d.ts +193 -0
  814. package/dist/types/components/select/select.i18n.d.ts +7 -0
  815. package/dist/types/components/select/select.interfaces.d.ts +16 -0
  816. package/dist/types/components/select/select.picker.d.ts +57 -0
  817. package/dist/types/components/select/test/select.a11y.play.d.ts +1 -0
  818. package/dist/types/components/select/test/select.component.play.d.ts +1 -0
  819. package/dist/types/components/select/test/select.visual.play.d.ts +1 -0
  820. package/dist/types/components/shape/shape.d.ts +2 -7
  821. package/dist/types/components/spinner/spinner.d.ts +0 -2
  822. package/dist/types/components/stack/stack.d.ts +7 -19
  823. package/dist/types/components/steps/step/step.d.ts +89 -0
  824. package/dist/types/components/steps/step-panel/step-panel.d.ts +34 -0
  825. package/dist/types/components/steps/steps/steps.d.ts +77 -0
  826. package/dist/types/components/steps/steps.interfaces.d.ts +10 -0
  827. package/dist/types/components/steps/test/steps.a11y.play.d.ts +1 -0
  828. package/dist/types/components/steps/test/steps.component.play.d.ts +1 -0
  829. package/dist/types/components/steps/test/steps.visual.play.d.ts +1 -0
  830. package/dist/types/components/tabs/tab/tab.d.ts +67 -0
  831. package/dist/types/components/tabs/tab-panel/tab-panel.d.ts +34 -0
  832. package/dist/types/components/tabs/tabs/tabs.d.ts +97 -0
  833. package/dist/types/components/tabs/tabs/tabs.i18n.d.ts +7 -0
  834. package/dist/types/components/tabs/tabs.interfaces.d.ts +12 -0
  835. package/dist/types/components/tabs/test/tabs.a11y.play.d.ts +1 -0
  836. package/dist/types/components/tabs/test/tabs.component.play.d.ts +1 -0
  837. package/dist/types/components/tabs/test/tabs.visual.play.d.ts +1 -0
  838. package/dist/types/components/tag/tag.d.ts +1 -3
  839. package/dist/types/components/text/text.d.ts +2 -7
  840. package/dist/types/components/time-input/test/time-input.visual.play.d.ts +1 -0
  841. package/dist/types/components/tooltip/test/tooltip.a11y.play.d.ts +1 -0
  842. package/dist/types/components/tooltip/test/tooltip.component.play.d.ts +1 -0
  843. package/dist/types/components/tooltip/test/tooltip.visual.play.d.ts +1 -0
  844. package/dist/types/components/tooltip/tooltip.d.ts +85 -0
  845. package/dist/types/components/tooltip/tooltip.interfaces.d.ts +10 -0
  846. package/dist/types/components.d.ts +5162 -1870
  847. package/dist/types/foundation/colors.visual.play.d.ts +1 -0
  848. package/dist/types/global/config/config.const.d.ts +3 -0
  849. package/dist/types/global/config/config.default.d.ts +0 -40
  850. package/dist/types/global/config/config.meta.d.ts +2 -0
  851. package/dist/types/global/config/config.types.d.ts +27 -0
  852. package/dist/types/global/config/index.d.ts +1 -0
  853. package/dist/types/global/index.d.ts +0 -1
  854. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/carousel.po.d.ts +12 -0
  855. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/data-item.po.d.ts +16 -0
  856. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/data.po.d.ts +12 -0
  857. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/date.po.d.ts +15 -0
  858. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/drawer.po.d.ts +11 -0
  859. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/file-upload.po.d.ts +16 -0
  860. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/footer.po.d.ts +16 -0
  861. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/hint.po.d.ts +10 -0
  862. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/index.d.ts +16 -0
  863. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/input-slider.po.d.ts +18 -0
  864. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/modal.po.d.ts +15 -0
  865. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/navbar.po.d.ts +13 -0
  866. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/popup.po.d.ts +11 -0
  867. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/select.po.d.ts +24 -0
  868. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/steps.po.d.ts +13 -0
  869. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/tabs.po.d.ts +13 -0
  870. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/components/tooltip.po.d.ts +6 -0
  871. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/playwright/src/lib/page/utils/goto.d.ts +1 -1
  872. package/dist/types/index.d.ts +4 -1
  873. package/dist/types/stencil-public-runtime.d.ts +1 -0
  874. package/dist/types/utils/attributes.d.ts +0 -8
  875. package/dist/types/utils/focus.d.ts +18 -0
  876. package/dist/types/utils/form-control.d.ts +2 -2
  877. package/dist/types/utils/has-value.d.ts +1 -0
  878. package/dist/types/utils/index.d.ts +7 -5
  879. package/dist/types/utils/number.d.ts +0 -3
  880. package/dist/types/utils/property-decorators/array-of.d.ts +9 -0
  881. package/dist/types/utils/property-decorators/bound.d.ts +36 -0
  882. package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +48 -0
  883. package/dist/types/utils/property-decorators/date.d.ts +6 -0
  884. package/dist/types/utils/property-decorators/index.d.ts +9 -0
  885. package/dist/types/utils/property-decorators/iso-date.d.ts +6 -0
  886. package/dist/types/utils/property-decorators/one-of.d.ts +8 -0
  887. package/dist/types/utils/property-decorators/pattern.d.ts +8 -0
  888. package/dist/types/utils/property-decorators/required.d.ts +17 -0
  889. package/dist/types/utils/property-decorators/type.d.ts +9 -0
  890. package/dist/types/utils/property-decorators/url.d.ts +6 -0
  891. package/dist/types/utils/svg.d.ts +2 -0
  892. package/docs/cem.json +18228 -0
  893. package/docs/components.json +39621 -17240
  894. package/docs/html.html-data.json +1664 -159
  895. package/docs/tags.json +30 -1
  896. package/package.json +46 -38
  897. package/sbom.cdx.json +58887 -0
  898. package/README.md +0 -33
  899. package/components/p-82RSSk25.js +0 -4
  900. package/components/p-BEngECpF.js +0 -4
  901. package/components/p-BMBthpLd.js +0 -4
  902. package/components/p-BNY3JzuV.js +0 -4
  903. package/components/p-BOTkpyFe.js +0 -5
  904. package/components/p-BOgMmRCt.js +0 -4
  905. package/components/p-CDYlUuhB.js +0 -4
  906. package/components/p-Cb75Rr6o.js +0 -4
  907. package/components/p-CojUmpFm.js +0 -4
  908. package/components/p-DHeVI6dR.js +0 -4
  909. package/components/p-DTPbL3uY.js +0 -4
  910. package/components/p-DnnGnukM.js +0 -4
  911. package/components/p-DtuTnY5l.js +0 -4
  912. package/components/p-JZ1uDtZv.js +0 -4
  913. package/components/p-cSbDziZm.js +0 -4
  914. package/components/p-gA-94RPS.js +0 -4
  915. package/components/p-xDEngwqW.js +0 -4
  916. package/dist/cjs/contact-SPfz2A_q.js +0 -1647
  917. package/dist/cjs/ds-content.cjs.entry.js +0 -154
  918. package/dist/cjs/ds-divider.cjs.entry.js +0 -131
  919. package/dist/cjs/ds-stack.cjs.entry.js +0 -224
  920. package/dist/cjs/isEmpty-BmKp4bH4.js +0 -99
  921. package/dist/cjs/stack.interfaces-6vlKvBmb.js +0 -68
  922. package/dist/cjs/svg-D7Mwbcvp.js +0 -1482
  923. package/dist/cjs/validate.decorator-C9-9HA0Y.js +0 -115
  924. package/dist/collection/global/constants/icons.constant.js +0 -42
  925. package/dist/collection/utils/element-states/element-states.decorator.js +0 -23
  926. package/dist/collection/utils/element-states/element-states.listener.js +0 -55
  927. package/dist/collection/utils/element-states/element-states.subject.js +0 -24
  928. package/dist/collection/utils/element-states/index.js +0 -5
  929. package/dist/collection/utils/keyboard/index.js +0 -6
  930. package/dist/collection/utils/keyboard/keyboard.decorator.js +0 -23
  931. package/dist/collection/utils/keyboard/keyboard.listener.js +0 -34
  932. package/dist/collection/utils/keyboard/keyboard.subject.js +0 -24
  933. package/dist/collection/utils/property-checkers/check-array-of.js +0 -13
  934. package/dist/collection/utils/property-checkers/check-date.js +0 -18
  935. package/dist/collection/utils/property-checkers/check-iso-date.js +0 -14
  936. package/dist/collection/utils/property-checkers/check-one-of.js +0 -13
  937. package/dist/collection/utils/property-checkers/check-pattern.js +0 -13
  938. package/dist/collection/utils/property-checkers/check-type.js +0 -20
  939. package/dist/collection/utils/property-checkers/check-url.js +0 -20
  940. package/dist/collection/utils/property-checkers/empty-or.js +0 -15
  941. package/dist/collection/utils/property-checkers/index.js +0 -57
  942. package/dist/collection/utils/property-checkers/required-and.js +0 -20
  943. package/dist/collection/utils/swipe/index.js +0 -6
  944. package/dist/collection/utils/swipe/swipe.decorator.js +0 -23
  945. package/dist/collection/utils/swipe/swipe.listener.js +0 -33
  946. package/dist/collection/utils/swipe/swipe.subject.js +0 -28
  947. package/dist/collection/utils/validate.decorator.js +0 -203
  948. package/dist/design-system/p-03bbcdf9de.entry.js +0 -4
  949. package/dist/design-system/p-1154323457.entry.js +0 -4
  950. package/dist/design-system/p-1f0601a4f4.entry.js +0 -4
  951. package/dist/design-system/p-21b080a49a.entry.js +0 -4
  952. package/dist/design-system/p-27c34c4e5f.entry.js +0 -4
  953. package/dist/design-system/p-2b91de302f.entry.js +0 -4
  954. package/dist/design-system/p-31c1235ac5.entry.js +0 -4
  955. package/dist/design-system/p-3259acaa64.entry.js +0 -4
  956. package/dist/design-system/p-339d85cca0.entry.js +0 -4
  957. package/dist/design-system/p-35e63b52e7.entry.js +0 -4
  958. package/dist/design-system/p-363f3a7ab4.entry.js +0 -4
  959. package/dist/design-system/p-3d901720f7.entry.js +0 -4
  960. package/dist/design-system/p-40ba8b9812.entry.js +0 -4
  961. package/dist/design-system/p-432430e14f.entry.js +0 -4
  962. package/dist/design-system/p-487807f228.entry.js +0 -4
  963. package/dist/design-system/p-4a049d1b7f.entry.js +0 -4
  964. package/dist/design-system/p-4f4cce8ce4.entry.js +0 -4
  965. package/dist/design-system/p-5a901a9b8e.entry.js +0 -4
  966. package/dist/design-system/p-5d3330bf93.entry.js +0 -4
  967. package/dist/design-system/p-640223834c.entry.js +0 -4
  968. package/dist/design-system/p-6b9aab417f.entry.js +0 -4
  969. package/dist/design-system/p-799705af3a.entry.js +0 -4
  970. package/dist/design-system/p-7e6ed497e7.entry.js +0 -4
  971. package/dist/design-system/p-82RSSk25.js +0 -4
  972. package/dist/design-system/p-8e0872fef0.entry.js +0 -4
  973. package/dist/design-system/p-9617d56181.entry.js +0 -4
  974. package/dist/design-system/p-BaIoYrFa.js +0 -5
  975. package/dist/design-system/p-Cb75Rr6o.js +0 -4
  976. package/dist/design-system/p-CqZ6YSy9.js +0 -4
  977. package/dist/design-system/p-CqzM3doy.js +0 -4
  978. package/dist/design-system/p-CuwLeg-T.js +0 -5
  979. package/dist/design-system/p-DHeVI6dR.js +0 -4
  980. package/dist/design-system/p-DTPbL3uY.js +0 -4
  981. package/dist/design-system/p-aff68865ee.entry.js +0 -4
  982. package/dist/design-system/p-b3c6327744.entry.js +0 -4
  983. package/dist/design-system/p-be9023a38b.entry.js +0 -4
  984. package/dist/design-system/p-c031d1dce5.entry.js +0 -4
  985. package/dist/design-system/p-c3ae96e220.entry.js +0 -4
  986. package/dist/design-system/p-d430812a57.entry.js +0 -4
  987. package/dist/design-system/p-de1354f022.entry.js +0 -4
  988. package/dist/design-system/p-e3d0c82e2a.entry.js +0 -4
  989. package/dist/design-system/p-ea1a5e1f75.entry.js +0 -4
  990. package/dist/design-system/p-ea7169501c.entry.js +0 -4
  991. package/dist/design-system/p-eab397e041.entry.js +0 -4
  992. package/dist/design-system/p-ecba4deb9a.entry.js +0 -4
  993. package/dist/design-system/p-fe0dbd4b03.entry.js +0 -4
  994. package/dist/design-system/p-ng5ZzTOj.js +0 -4
  995. package/dist/esm/contact-Cb75Rr6o.js +0 -1636
  996. package/dist/esm/ds-content.entry.js +0 -152
  997. package/dist/esm/ds-divider.entry.js +0 -129
  998. package/dist/esm/ds-stack.entry.js +0 -222
  999. package/dist/esm/isEmpty-DmZYZqE9.js +0 -97
  1000. package/dist/esm/stack.interfaces-ng5ZzTOj.js +0 -62
  1001. package/dist/esm/svg-BaIoYrFa.js +0 -1480
  1002. package/dist/esm/validate.decorator-82RSSk25.js +0 -110
  1003. package/dist/types/global/constants/icons.constant.d.ts +0 -38
  1004. package/dist/types/utils/element-states/element-states.decorator.d.ts +0 -3
  1005. package/dist/types/utils/element-states/element-states.interfaces.d.ts +0 -10
  1006. package/dist/types/utils/element-states/element-states.listener.d.ts +0 -15
  1007. package/dist/types/utils/element-states/element-states.subject.d.ts +0 -8
  1008. package/dist/types/utils/element-states/index.d.ts +0 -2
  1009. package/dist/types/utils/keyboard/index.d.ts +0 -3
  1010. package/dist/types/utils/keyboard/keyboard.decorator.d.ts +0 -3
  1011. package/dist/types/utils/keyboard/keyboard.interfaces.d.ts +0 -8
  1012. package/dist/types/utils/keyboard/keyboard.listener.d.ts +0 -9
  1013. package/dist/types/utils/keyboard/keyboard.subject.d.ts +0 -8
  1014. package/dist/types/utils/property-checkers/check-array-of.d.ts +0 -2
  1015. package/dist/types/utils/property-checkers/check-date.d.ts +0 -1
  1016. package/dist/types/utils/property-checkers/check-iso-date.d.ts +0 -1
  1017. package/dist/types/utils/property-checkers/check-one-of.d.ts +0 -1
  1018. package/dist/types/utils/property-checkers/check-pattern.d.ts +0 -1
  1019. package/dist/types/utils/property-checkers/check-type.d.ts +0 -2
  1020. package/dist/types/utils/property-checkers/check-url.d.ts +0 -1
  1021. package/dist/types/utils/property-checkers/constants.d.ts +0 -1
  1022. package/dist/types/utils/property-checkers/empty-or.d.ts +0 -1
  1023. package/dist/types/utils/property-checkers/index.d.ts +0 -19
  1024. package/dist/types/utils/property-checkers/required-and.d.ts +0 -1
  1025. package/dist/types/utils/swipe/index.d.ts +0 -3
  1026. package/dist/types/utils/swipe/swipe.decorator.d.ts +0 -5
  1027. package/dist/types/utils/swipe/swipe.interfaces.d.ts +0 -10
  1028. package/dist/types/utils/swipe/swipe.listener.d.ts +0 -10
  1029. package/dist/types/utils/swipe/swipe.subject.d.ts +0 -11
  1030. package/dist/types/utils/validate.decorator.d.ts +0 -114
  1031. /package/dist/collection/{utils/element-states/element-states.interfaces.js → components/data/data-item.interfaces.js} +0 -0
  1032. /package/dist/collection/{utils/keyboard/keyboard.interfaces.js → components/data/data-label.interfaces.js} +0 -0
  1033. /package/dist/collection/{utils/property-checkers/property-types.js → components/data/data-value.interfaces.js} +0 -0
  1034. /package/dist/collection/{utils/swipe/swipe.interfaces.js → components/data/data.interfaces.js} +0 -0
  1035. /package/dist/collection/utils/{property-checkers/is-iso-date.js → is-iso-date.js} +0 -0
  1036. /package/dist/collection/utils/{keyboard/keyboard.helpers.js → keyboard.js} +0 -0
  1037. /package/dist/types/utils/{property-checkers/is-iso-date.d.ts → is-iso-date.d.ts} +0 -0
  1038. /package/dist/types/utils/{property-checkers/is-value-empty.d.ts → is-value-empty.d.ts} +0 -0
  1039. /package/dist/types/utils/{keyboard/keyboard.helpers.d.ts → keyboard.d.ts} +0 -0
  1040. /package/dist/types/utils/{property-checkers/property-types.d.ts → property-types.d.ts} +0 -0
@@ -1,1482 +0,0 @@
1
- /*!
2
- * (C) Helvetia Design System https://design.baloise.dev/ - Apache License 2.0
3
- */
4
- 'use strict';
5
-
6
- /*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */
7
-
8
- const {
9
- entries,
10
- setPrototypeOf,
11
- isFrozen,
12
- getPrototypeOf,
13
- getOwnPropertyDescriptor
14
- } = Object;
15
- let {
16
- freeze,
17
- seal,
18
- create
19
- } = Object; // eslint-disable-line import/no-mutable-exports
20
- let {
21
- apply,
22
- construct
23
- } = typeof Reflect !== 'undefined' && Reflect;
24
- if (!freeze) {
25
- freeze = function freeze(x) {
26
- return x;
27
- };
28
- }
29
- if (!seal) {
30
- seal = function seal(x) {
31
- return x;
32
- };
33
- }
34
- if (!apply) {
35
- apply = function apply(func, thisArg) {
36
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
37
- args[_key - 2] = arguments[_key];
38
- }
39
- return func.apply(thisArg, args);
40
- };
41
- }
42
- if (!construct) {
43
- construct = function construct(Func) {
44
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
45
- args[_key2 - 1] = arguments[_key2];
46
- }
47
- return new Func(...args);
48
- };
49
- }
50
- const arrayForEach = unapply(Array.prototype.forEach);
51
- const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
52
- const arrayPop = unapply(Array.prototype.pop);
53
- const arrayPush = unapply(Array.prototype.push);
54
- const arraySplice = unapply(Array.prototype.splice);
55
- const arrayIsArray = Array.isArray;
56
- const stringToLowerCase = unapply(String.prototype.toLowerCase);
57
- const stringToString = unapply(String.prototype.toString);
58
- const stringMatch = unapply(String.prototype.match);
59
- const stringReplace = unapply(String.prototype.replace);
60
- const stringIndexOf = unapply(String.prototype.indexOf);
61
- const stringTrim = unapply(String.prototype.trim);
62
- const numberToString = unapply(Number.prototype.toString);
63
- const booleanToString = unapply(Boolean.prototype.toString);
64
- const bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);
65
- const symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);
66
- const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
67
- const objectToString = unapply(Object.prototype.toString);
68
- const regExpTest = unapply(RegExp.prototype.test);
69
- const typeErrorCreate = unconstruct(TypeError);
70
- /**
71
- * Creates a new function that calls the given function with a specified thisArg and arguments.
72
- *
73
- * @param func - The function to be wrapped and called.
74
- * @returns A new function that calls the given function with a specified thisArg and arguments.
75
- */
76
- function unapply(func) {
77
- return function (thisArg) {
78
- if (thisArg instanceof RegExp) {
79
- thisArg.lastIndex = 0;
80
- }
81
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
82
- args[_key3 - 1] = arguments[_key3];
83
- }
84
- return apply(func, thisArg, args);
85
- };
86
- }
87
- /**
88
- * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
89
- *
90
- * @param func - The constructor function to be wrapped and called.
91
- * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
92
- */
93
- function unconstruct(Func) {
94
- return function () {
95
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
96
- args[_key4] = arguments[_key4];
97
- }
98
- return construct(Func, args);
99
- };
100
- }
101
- /**
102
- * Add properties to a lookup table
103
- *
104
- * @param set - The set to which elements will be added.
105
- * @param array - The array containing elements to be added to the set.
106
- * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
107
- * @returns The modified set with added elements.
108
- */
109
- function addToSet(set, array) {
110
- let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
111
- if (setPrototypeOf) {
112
- // Make 'in' and truthy checks like Boolean(set.constructor)
113
- // independent of any properties defined on Object.prototype.
114
- // Prevent prototype setters from intercepting set as a this value.
115
- setPrototypeOf(set, null);
116
- }
117
- if (!arrayIsArray(array)) {
118
- return set;
119
- }
120
- let l = array.length;
121
- while (l--) {
122
- let element = array[l];
123
- if (typeof element === 'string') {
124
- const lcElement = transformCaseFunc(element);
125
- if (lcElement !== element) {
126
- // Config presets (e.g. tags.js, attrs.js) are immutable.
127
- if (!isFrozen(array)) {
128
- array[l] = lcElement;
129
- }
130
- element = lcElement;
131
- }
132
- }
133
- set[element] = true;
134
- }
135
- return set;
136
- }
137
- /**
138
- * Clean up an array to harden against CSPP
139
- *
140
- * @param array - The array to be cleaned.
141
- * @returns The cleaned version of the array
142
- */
143
- function cleanArray(array) {
144
- for (let index = 0; index < array.length; index++) {
145
- const isPropertyExist = objectHasOwnProperty(array, index);
146
- if (!isPropertyExist) {
147
- array[index] = null;
148
- }
149
- }
150
- return array;
151
- }
152
- /**
153
- * Shallow clone an object
154
- *
155
- * @param object - The object to be cloned.
156
- * @returns A new object that copies the original.
157
- */
158
- function clone(object) {
159
- const newObject = create(null);
160
- for (const [property, value] of entries(object)) {
161
- const isPropertyExist = objectHasOwnProperty(object, property);
162
- if (isPropertyExist) {
163
- if (arrayIsArray(value)) {
164
- newObject[property] = cleanArray(value);
165
- } else if (value && typeof value === 'object' && value.constructor === Object) {
166
- newObject[property] = clone(value);
167
- } else {
168
- newObject[property] = value;
169
- }
170
- }
171
- }
172
- return newObject;
173
- }
174
- /**
175
- * Convert non-node values into strings without depending on direct property access.
176
- *
177
- * @param value - The value to stringify.
178
- * @returns A string representation of the provided value.
179
- */
180
- function stringifyValue(value) {
181
- switch (typeof value) {
182
- case 'string':
183
- {
184
- return value;
185
- }
186
- case 'number':
187
- {
188
- return numberToString(value);
189
- }
190
- case 'boolean':
191
- {
192
- return booleanToString(value);
193
- }
194
- case 'bigint':
195
- {
196
- return bigintToString ? bigintToString(value) : '0';
197
- }
198
- case 'symbol':
199
- {
200
- return symbolToString ? symbolToString(value) : 'Symbol()';
201
- }
202
- case 'undefined':
203
- {
204
- return objectToString(value);
205
- }
206
- case 'function':
207
- case 'object':
208
- {
209
- if (value === null) {
210
- return objectToString(value);
211
- }
212
- const valueAsRecord = value;
213
- const valueToString = lookupGetter(valueAsRecord, 'toString');
214
- if (typeof valueToString === 'function') {
215
- const stringified = valueToString(valueAsRecord);
216
- return typeof stringified === 'string' ? stringified : objectToString(stringified);
217
- }
218
- return objectToString(value);
219
- }
220
- default:
221
- {
222
- return objectToString(value);
223
- }
224
- }
225
- }
226
- /**
227
- * This method automatically checks if the prop is function or getter and behaves accordingly.
228
- *
229
- * @param object - The object to look up the getter function in its prototype chain.
230
- * @param prop - The property name for which to find the getter function.
231
- * @returns The getter function found in the prototype chain or a fallback function.
232
- */
233
- function lookupGetter(object, prop) {
234
- while (object !== null) {
235
- const desc = getOwnPropertyDescriptor(object, prop);
236
- if (desc) {
237
- if (desc.get) {
238
- return unapply(desc.get);
239
- }
240
- if (typeof desc.value === 'function') {
241
- return unapply(desc.value);
242
- }
243
- }
244
- object = getPrototypeOf(object);
245
- }
246
- function fallbackValue() {
247
- return null;
248
- }
249
- return fallbackValue;
250
- }
251
- function isRegex(value) {
252
- try {
253
- regExpTest(value, '');
254
- return true;
255
- } catch (_unused) {
256
- return false;
257
- }
258
- }
259
-
260
- const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
261
- const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
262
- const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
263
- // List of SVG elements that are disallowed by default.
264
- // We still need to know them so that we can do namespace
265
- // checks properly in case one wants to add them to
266
- // allow-list.
267
- const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
268
- const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
269
- // Similarly to SVG, we want to know all MathML elements,
270
- // even those that we disallow by default.
271
- const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
272
- const text = freeze(['#text']);
273
-
274
- const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);
275
- const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
276
- const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
277
- const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
278
-
279
- // eslint-disable-next-line unicorn/better-regex
280
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
281
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
282
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
283
- const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
284
- const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
285
- const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
286
- );
287
- const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
288
- const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
289
- );
290
- const DOCTYPE_NAME = seal(/^html$/i);
291
- const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
292
-
293
- var EXPRESSIONS = /*#__PURE__*/Object.freeze({
294
- __proto__: null,
295
- ARIA_ATTR: ARIA_ATTR,
296
- ATTR_WHITESPACE: ATTR_WHITESPACE,
297
- CUSTOM_ELEMENT: CUSTOM_ELEMENT,
298
- DATA_ATTR: DATA_ATTR,
299
- DOCTYPE_NAME: DOCTYPE_NAME,
300
- ERB_EXPR: ERB_EXPR,
301
- IS_ALLOWED_URI: IS_ALLOWED_URI,
302
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
303
- MUSTACHE_EXPR: MUSTACHE_EXPR,
304
- TMPLIT_EXPR: TMPLIT_EXPR
305
- });
306
-
307
- /* eslint-disable @typescript-eslint/indent */
308
- // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
309
- const NODE_TYPE = {
310
- element: 1,
311
- text: 3,
312
- // Deprecated
313
- progressingInstruction: 7,
314
- comment: 8,
315
- document: 9};
316
- const getGlobal = function getGlobal() {
317
- return typeof window === 'undefined' ? null : window;
318
- };
319
- /**
320
- * Creates a no-op policy for internal use only.
321
- * Don't export this function outside this module!
322
- * @param trustedTypes The policy factory.
323
- * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
324
- * @return The policy created (or null, if Trusted Types
325
- * are not supported or creating the policy failed).
326
- */
327
- const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
328
- if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
329
- return null;
330
- }
331
- // Allow the callers to control the unique policy name
332
- // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
333
- // Policy creation with duplicate names throws in Trusted Types.
334
- let suffix = null;
335
- const ATTR_NAME = 'data-tt-policy-suffix';
336
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
337
- suffix = purifyHostElement.getAttribute(ATTR_NAME);
338
- }
339
- const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
340
- try {
341
- return trustedTypes.createPolicy(policyName, {
342
- createHTML(html) {
343
- return html;
344
- },
345
- createScriptURL(scriptUrl) {
346
- return scriptUrl;
347
- }
348
- });
349
- } catch (_) {
350
- // Policy creation failed (most likely another DOMPurify script has
351
- // already run). Skip creating the policy, as this will only cause errors
352
- // if TT are enforced.
353
- console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
354
- return null;
355
- }
356
- };
357
- const _createHooksMap = function _createHooksMap() {
358
- return {
359
- afterSanitizeAttributes: [],
360
- afterSanitizeElements: [],
361
- afterSanitizeShadowDOM: [],
362
- beforeSanitizeAttributes: [],
363
- beforeSanitizeElements: [],
364
- beforeSanitizeShadowDOM: [],
365
- uponSanitizeAttribute: [],
366
- uponSanitizeElement: [],
367
- uponSanitizeShadowNode: []
368
- };
369
- };
370
- function createDOMPurify() {
371
- let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
372
- const DOMPurify = root => createDOMPurify(root);
373
- DOMPurify.version = '3.4.2';
374
- DOMPurify.removed = [];
375
- if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
376
- // Not running in a browser, provide a factory function
377
- // so that you can pass your own Window
378
- DOMPurify.isSupported = false;
379
- return DOMPurify;
380
- }
381
- let {
382
- document
383
- } = window;
384
- const originalDocument = document;
385
- const currentScript = originalDocument.currentScript;
386
- const {
387
- DocumentFragment,
388
- HTMLTemplateElement,
389
- Node,
390
- Element,
391
- NodeFilter,
392
- NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
393
- HTMLFormElement,
394
- DOMParser,
395
- trustedTypes
396
- } = window;
397
- const ElementPrototype = Element.prototype;
398
- const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
399
- const remove = lookupGetter(ElementPrototype, 'remove');
400
- const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
401
- const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
402
- const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
403
- // As per issue #47, the web-components registry is inherited by a
404
- // new document created via createHTMLDocument. As per the spec
405
- // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
406
- // a new empty registry is used when creating a template contents owner
407
- // document, so we use that as our parent document to ensure nothing
408
- // is inherited.
409
- if (typeof HTMLTemplateElement === 'function') {
410
- const template = document.createElement('template');
411
- if (template.content && template.content.ownerDocument) {
412
- document = template.content.ownerDocument;
413
- }
414
- }
415
- let trustedTypesPolicy;
416
- let emptyHTML = '';
417
- const {
418
- implementation,
419
- createNodeIterator,
420
- createDocumentFragment,
421
- getElementsByTagName
422
- } = document;
423
- const {
424
- importNode
425
- } = originalDocument;
426
- let hooks = _createHooksMap();
427
- /**
428
- * Expose whether this browser supports running the full DOMPurify.
429
- */
430
- DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
431
- const {
432
- MUSTACHE_EXPR,
433
- ERB_EXPR,
434
- TMPLIT_EXPR,
435
- DATA_ATTR,
436
- ARIA_ATTR,
437
- IS_SCRIPT_OR_DATA,
438
- ATTR_WHITESPACE,
439
- CUSTOM_ELEMENT
440
- } = EXPRESSIONS;
441
- let {
442
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
443
- } = EXPRESSIONS;
444
- /**
445
- * We consider the elements and attributes below to be safe. Ideally
446
- * don't add any new ones but feel free to remove unwanted ones.
447
- */
448
- /* allowed element names */
449
- let ALLOWED_TAGS = null;
450
- const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
451
- /* Allowed attribute names */
452
- let ALLOWED_ATTR = null;
453
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
454
- /*
455
- * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
456
- * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
457
- * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
458
- * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
459
- */
460
- let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
461
- tagNameCheck: {
462
- writable: true,
463
- configurable: false,
464
- enumerable: true,
465
- value: null
466
- },
467
- attributeNameCheck: {
468
- writable: true,
469
- configurable: false,
470
- enumerable: true,
471
- value: null
472
- },
473
- allowCustomizedBuiltInElements: {
474
- writable: true,
475
- configurable: false,
476
- enumerable: true,
477
- value: false
478
- }
479
- }));
480
- /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
481
- let FORBID_TAGS = null;
482
- /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
483
- let FORBID_ATTR = null;
484
- /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
485
- const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
486
- tagCheck: {
487
- writable: true,
488
- configurable: false,
489
- enumerable: true,
490
- value: null
491
- },
492
- attributeCheck: {
493
- writable: true,
494
- configurable: false,
495
- enumerable: true,
496
- value: null
497
- }
498
- }));
499
- /* Decide if ARIA attributes are okay */
500
- let ALLOW_ARIA_ATTR = true;
501
- /* Decide if custom data attributes are okay */
502
- let ALLOW_DATA_ATTR = true;
503
- /* Decide if unknown protocols are okay */
504
- let ALLOW_UNKNOWN_PROTOCOLS = false;
505
- /* Decide if self-closing tags in attributes are allowed.
506
- * Usually removed due to a mXSS issue in jQuery 3.0 */
507
- let ALLOW_SELF_CLOSE_IN_ATTR = true;
508
- /* Output should be safe for common template engines.
509
- * This means, DOMPurify removes data attributes, mustaches and ERB
510
- */
511
- let SAFE_FOR_TEMPLATES = false;
512
- /* Output should be safe even for XML used within HTML and alike.
513
- * This means, DOMPurify removes comments when containing risky content.
514
- */
515
- let SAFE_FOR_XML = true;
516
- /* Decide if document with <html>... should be returned */
517
- let WHOLE_DOCUMENT = false;
518
- /* Track whether config is already set on this instance of DOMPurify. */
519
- let SET_CONFIG = false;
520
- /* Decide if all elements (e.g. style, script) must be children of
521
- * document.body. By default, browsers might move them to document.head */
522
- let FORCE_BODY = false;
523
- /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
524
- * string (or a TrustedHTML object if Trusted Types are supported).
525
- * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
526
- */
527
- let RETURN_DOM = false;
528
- /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
529
- * string (or a TrustedHTML object if Trusted Types are supported) */
530
- let RETURN_DOM_FRAGMENT = false;
531
- /* Try to return a Trusted Type object instead of a string, return a string in
532
- * case Trusted Types are not supported */
533
- let RETURN_TRUSTED_TYPE = false;
534
- /* Output should be free from DOM clobbering attacks?
535
- * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
536
- */
537
- let SANITIZE_DOM = true;
538
- /* Achieve full DOM Clobbering protection by isolating the namespace of named
539
- * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
540
- *
541
- * HTML/DOM spec rules that enable DOM Clobbering:
542
- * - Named Access on Window (§7.3.3)
543
- * - DOM Tree Accessors (§3.1.5)
544
- * - Form Element Parent-Child Relations (§4.10.3)
545
- * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
546
- * - HTMLCollection (§4.2.10.2)
547
- *
548
- * Namespace isolation is implemented by prefixing `id` and `name` attributes
549
- * with a constant string, i.e., `user-content-`
550
- */
551
- let SANITIZE_NAMED_PROPS = false;
552
- const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
553
- /* Keep element content when removing element? */
554
- let KEEP_CONTENT = true;
555
- /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
556
- * of importing it into a new Document and returning a sanitized copy */
557
- let IN_PLACE = false;
558
- /* Allow usage of profiles like html, svg and mathMl */
559
- let USE_PROFILES = {};
560
- /* Tags to ignore content of when KEEP_CONTENT is true */
561
- let FORBID_CONTENTS = null;
562
- const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
563
- /* Tags that are safe for data: URIs */
564
- let DATA_URI_TAGS = null;
565
- const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
566
- /* Attributes safe for values like "javascript:" */
567
- let URI_SAFE_ATTRIBUTES = null;
568
- const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
569
- const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
570
- const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
571
- const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
572
- /* Document namespace */
573
- let NAMESPACE = HTML_NAMESPACE;
574
- let IS_EMPTY_INPUT = false;
575
- /* Allowed XHTML+XML namespaces */
576
- let ALLOWED_NAMESPACES = null;
577
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
578
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
579
- let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
580
- // Certain elements are allowed in both SVG and HTML
581
- // namespace. We need to specify them explicitly
582
- // so that they don't get erroneously deleted from
583
- // HTML namespace.
584
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
585
- /* Parsing of strict XHTML documents */
586
- let PARSER_MEDIA_TYPE = null;
587
- const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
588
- const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
589
- let transformCaseFunc = null;
590
- /* Keep a reference to config to pass to hooks */
591
- let CONFIG = null;
592
- /* Ideally, do not touch anything below this line */
593
- /* ______________________________________________ */
594
- const formElement = document.createElement('form');
595
- const isRegexOrFunction = function isRegexOrFunction(testValue) {
596
- return testValue instanceof RegExp || testValue instanceof Function;
597
- };
598
- /**
599
- * _parseConfig
600
- *
601
- * @param cfg optional config literal
602
- */
603
- // eslint-disable-next-line complexity
604
- const _parseConfig = function _parseConfig() {
605
- let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
606
- if (CONFIG && CONFIG === cfg) {
607
- return;
608
- }
609
- /* Shield configuration object from tampering */
610
- if (!cfg || typeof cfg !== 'object') {
611
- cfg = {};
612
- }
613
- /* Shield configuration object from prototype pollution */
614
- cfg = clone(cfg);
615
- PARSER_MEDIA_TYPE =
616
- // eslint-disable-next-line unicorn/prefer-includes
617
- SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
618
- // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
619
- transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
620
- /* Set configuration parameters */
621
- ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
622
- ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
623
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
624
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
625
- DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
626
- FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
627
- FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
628
- FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
629
- USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
630
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
631
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
632
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
633
- ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
634
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
635
- SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
636
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
637
- RETURN_DOM = cfg.RETURN_DOM || false; // Default false
638
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
639
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
640
- FORCE_BODY = cfg.FORCE_BODY || false; // Default false
641
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
642
- SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
643
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
644
- IN_PLACE = cfg.IN_PLACE || false; // Default false
645
- IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp
646
- NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace
647
- MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); // Default built-in map
648
- HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ['annotation-xml']); // Default built-in map
649
- const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
650
- CUSTOM_ELEMENT_HANDLING = create(null);
651
- if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {
652
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined
653
- }
654
- if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
655
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined
656
- }
657
- if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {
658
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined
659
- }
660
- if (SAFE_FOR_TEMPLATES) {
661
- ALLOW_DATA_ATTR = false;
662
- }
663
- if (RETURN_DOM_FRAGMENT) {
664
- RETURN_DOM = true;
665
- }
666
- /* Parse profile info */
667
- if (USE_PROFILES) {
668
- ALLOWED_TAGS = addToSet({}, text);
669
- ALLOWED_ATTR = create(null);
670
- if (USE_PROFILES.html === true) {
671
- addToSet(ALLOWED_TAGS, html$1);
672
- addToSet(ALLOWED_ATTR, html);
673
- }
674
- if (USE_PROFILES.svg === true) {
675
- addToSet(ALLOWED_TAGS, svg$1);
676
- addToSet(ALLOWED_ATTR, svg);
677
- addToSet(ALLOWED_ATTR, xml);
678
- }
679
- if (USE_PROFILES.svgFilters === true) {
680
- addToSet(ALLOWED_TAGS, svgFilters);
681
- addToSet(ALLOWED_ATTR, svg);
682
- addToSet(ALLOWED_ATTR, xml);
683
- }
684
- if (USE_PROFILES.mathMl === true) {
685
- addToSet(ALLOWED_TAGS, mathMl$1);
686
- addToSet(ALLOWED_ATTR, mathMl);
687
- addToSet(ALLOWED_ATTR, xml);
688
- }
689
- }
690
- /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent
691
- * leaking across calls when switching from function to array config */
692
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
693
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
694
- /* Merge configuration parameters */
695
- if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {
696
- if (typeof cfg.ADD_TAGS === 'function') {
697
- EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
698
- } else if (arrayIsArray(cfg.ADD_TAGS)) {
699
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
700
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
701
- }
702
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
703
- }
704
- }
705
- if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {
706
- if (typeof cfg.ADD_ATTR === 'function') {
707
- EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
708
- } else if (arrayIsArray(cfg.ADD_ATTR)) {
709
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
710
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
711
- }
712
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
713
- }
714
- }
715
- if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
716
- addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
717
- }
718
- if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {
719
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
720
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
721
- }
722
- addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
723
- }
724
- if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
725
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
726
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
727
- }
728
- addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
729
- }
730
- /* Add #text in case KEEP_CONTENT is set to true */
731
- if (KEEP_CONTENT) {
732
- ALLOWED_TAGS['#text'] = true;
733
- }
734
- /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
735
- if (WHOLE_DOCUMENT) {
736
- addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
737
- }
738
- /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
739
- if (ALLOWED_TAGS.table) {
740
- addToSet(ALLOWED_TAGS, ['tbody']);
741
- delete FORBID_TAGS.tbody;
742
- }
743
- if (cfg.TRUSTED_TYPES_POLICY) {
744
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
745
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
746
- }
747
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
748
- throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
749
- }
750
- // Overwrite existing TrustedTypes policy.
751
- trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
752
- // Sign local variables required by `sanitize`.
753
- emptyHTML = trustedTypesPolicy.createHTML('');
754
- } else {
755
- // Uninitialized policy, attempt to initialize the internal dompurify policy.
756
- if (trustedTypesPolicy === undefined) {
757
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
758
- }
759
- // If creating the internal policy succeeded sign internal variables.
760
- if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
761
- emptyHTML = trustedTypesPolicy.createHTML('');
762
- }
763
- }
764
- // Prevent further manipulation of configuration.
765
- // Not available in IE8, Safari 5, etc.
766
- if (freeze) {
767
- freeze(cfg);
768
- }
769
- CONFIG = cfg;
770
- };
771
- /* Keep track of all possible SVG and MathML tags
772
- * so that we can perform the namespace checks
773
- * correctly. */
774
- const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
775
- const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
776
- /**
777
- * @param element a DOM element whose namespace is being checked
778
- * @returns Return false if the element has a
779
- * namespace that a spec-compliant parser would never
780
- * return. Return true otherwise.
781
- */
782
- const _checkValidNamespace = function _checkValidNamespace(element) {
783
- let parent = getParentNode(element);
784
- // In JSDOM, if we're inside shadow DOM, then parentNode
785
- // can be null. We just simulate parent in this case.
786
- if (!parent || !parent.tagName) {
787
- parent = {
788
- namespaceURI: NAMESPACE,
789
- tagName: 'template'
790
- };
791
- }
792
- const tagName = stringToLowerCase(element.tagName);
793
- const parentTagName = stringToLowerCase(parent.tagName);
794
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
795
- return false;
796
- }
797
- if (element.namespaceURI === SVG_NAMESPACE) {
798
- // The only way to switch from HTML namespace to SVG
799
- // is via <svg>. If it happens via any other tag, then
800
- // it should be killed.
801
- if (parent.namespaceURI === HTML_NAMESPACE) {
802
- return tagName === 'svg';
803
- }
804
- // The only way to switch from MathML to SVG is via`
805
- // svg if parent is either <annotation-xml> or MathML
806
- // text integration points.
807
- if (parent.namespaceURI === MATHML_NAMESPACE) {
808
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
809
- }
810
- // We only allow elements that are defined in SVG
811
- // spec. All others are disallowed in SVG namespace.
812
- return Boolean(ALL_SVG_TAGS[tagName]);
813
- }
814
- if (element.namespaceURI === MATHML_NAMESPACE) {
815
- // The only way to switch from HTML namespace to MathML
816
- // is via <math>. If it happens via any other tag, then
817
- // it should be killed.
818
- if (parent.namespaceURI === HTML_NAMESPACE) {
819
- return tagName === 'math';
820
- }
821
- // The only way to switch from SVG to MathML is via
822
- // <math> and HTML integration points
823
- if (parent.namespaceURI === SVG_NAMESPACE) {
824
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
825
- }
826
- // We only allow elements that are defined in MathML
827
- // spec. All others are disallowed in MathML namespace.
828
- return Boolean(ALL_MATHML_TAGS[tagName]);
829
- }
830
- if (element.namespaceURI === HTML_NAMESPACE) {
831
- // The only way to switch from SVG to HTML is via
832
- // HTML integration points, and from MathML to HTML
833
- // is via MathML text integration points
834
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
835
- return false;
836
- }
837
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
838
- return false;
839
- }
840
- // We disallow tags that are specific for MathML
841
- // or SVG and should never appear in HTML namespace
842
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
843
- }
844
- // For XHTML and XML documents that support custom namespaces
845
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
846
- return true;
847
- }
848
- // The code should never reach this place (this means
849
- // that the element somehow got namespace that is not
850
- // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
851
- // Return false just in case.
852
- return false;
853
- };
854
- /**
855
- * _forceRemove
856
- *
857
- * @param node a DOM node
858
- */
859
- const _forceRemove = function _forceRemove(node) {
860
- arrayPush(DOMPurify.removed, {
861
- element: node
862
- });
863
- try {
864
- // eslint-disable-next-line unicorn/prefer-dom-node-remove
865
- getParentNode(node).removeChild(node);
866
- } catch (_) {
867
- remove(node);
868
- }
869
- };
870
- /**
871
- * _removeAttribute
872
- *
873
- * @param name an Attribute name
874
- * @param element a DOM node
875
- */
876
- const _removeAttribute = function _removeAttribute(name, element) {
877
- try {
878
- arrayPush(DOMPurify.removed, {
879
- attribute: element.getAttributeNode(name),
880
- from: element
881
- });
882
- } catch (_) {
883
- arrayPush(DOMPurify.removed, {
884
- attribute: null,
885
- from: element
886
- });
887
- }
888
- element.removeAttribute(name);
889
- // We void attribute values for unremovable "is" attributes
890
- if (name === 'is') {
891
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
892
- try {
893
- _forceRemove(element);
894
- } catch (_) {}
895
- } else {
896
- try {
897
- element.setAttribute(name, '');
898
- } catch (_) {}
899
- }
900
- }
901
- };
902
- /**
903
- * _initDocument
904
- *
905
- * @param dirty - a string of dirty markup
906
- * @return a DOM, filled with the dirty markup
907
- */
908
- const _initDocument = function _initDocument(dirty) {
909
- /* Create a HTML document */
910
- let doc = null;
911
- let leadingWhitespace = null;
912
- if (FORCE_BODY) {
913
- dirty = '<remove></remove>' + dirty;
914
- } else {
915
- /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
916
- const matches = stringMatch(dirty, /^[\r\n\t ]+/);
917
- leadingWhitespace = matches && matches[0];
918
- }
919
- if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
920
- // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
921
- dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
922
- }
923
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
924
- /*
925
- * Use the DOMParser API by default, fallback later if needs be
926
- * DOMParser not work for svg when has multiple root element.
927
- */
928
- if (NAMESPACE === HTML_NAMESPACE) {
929
- try {
930
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
931
- } catch (_) {}
932
- }
933
- /* Use createHTMLDocument in case DOMParser is not available */
934
- if (!doc || !doc.documentElement) {
935
- doc = implementation.createDocument(NAMESPACE, 'template', null);
936
- try {
937
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
938
- } catch (_) {
939
- // Syntax error if dirtyPayload is invalid xml
940
- }
941
- }
942
- const body = doc.body || doc.documentElement;
943
- if (dirty && leadingWhitespace) {
944
- body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
945
- }
946
- /* Work on whole document or just its body */
947
- if (NAMESPACE === HTML_NAMESPACE) {
948
- return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
949
- }
950
- return WHOLE_DOCUMENT ? doc.documentElement : body;
951
- };
952
- /**
953
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
954
- *
955
- * @param root The root element or node to start traversing on.
956
- * @return The created NodeIterator
957
- */
958
- const _createNodeIterator = function _createNodeIterator(root) {
959
- return createNodeIterator.call(root.ownerDocument || root, root,
960
- // eslint-disable-next-line no-bitwise
961
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
962
- };
963
- /**
964
- * _isClobbered
965
- *
966
- * @param element element to check for clobbering attacks
967
- * @return true if clobbered, false if safe
968
- */
969
- const _isClobbered = function _isClobbered(element) {
970
- return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
971
- };
972
- /**
973
- * Checks whether the given object is a DOM node.
974
- *
975
- * @param value object to check whether it's a DOM node
976
- * @return true is object is a DOM node
977
- */
978
- const _isNode = function _isNode(value) {
979
- return typeof Node === 'function' && value instanceof Node;
980
- };
981
- function _executeHooks(hooks, currentNode, data) {
982
- arrayForEach(hooks, hook => {
983
- hook.call(DOMPurify, currentNode, data, CONFIG);
984
- });
985
- }
986
- /**
987
- * _sanitizeElements
988
- *
989
- * @protect nodeName
990
- * @protect textContent
991
- * @protect removeChild
992
- * @param currentNode to check for permission to exist
993
- * @return true if node was killed, false if left alive
994
- */
995
- const _sanitizeElements = function _sanitizeElements(currentNode) {
996
- let content = null;
997
- /* Execute a hook if present */
998
- _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
999
- /* Check if element is clobbered or can clobber */
1000
- if (_isClobbered(currentNode)) {
1001
- _forceRemove(currentNode);
1002
- return true;
1003
- }
1004
- /* Now let's check the element's type and name */
1005
- const tagName = transformCaseFunc(currentNode.nodeName);
1006
- /* Execute a hook if present */
1007
- _executeHooks(hooks.uponSanitizeElement, currentNode, {
1008
- tagName,
1009
- allowedTags: ALLOWED_TAGS
1010
- });
1011
- /* Detect mXSS attempts abusing namespace confusion */
1012
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
1013
- _forceRemove(currentNode);
1014
- return true;
1015
- }
1016
- /* Remove risky CSS construction leading to mXSS */
1017
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
1018
- _forceRemove(currentNode);
1019
- return true;
1020
- }
1021
- /* Remove any occurrence of processing instructions */
1022
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
1023
- _forceRemove(currentNode);
1024
- return true;
1025
- }
1026
- /* Remove any kind of possibly harmful comments */
1027
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
1028
- _forceRemove(currentNode);
1029
- return true;
1030
- }
1031
- /* Remove element if anything forbids its presence */
1032
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
1033
- /* Check if we have a custom element to handle */
1034
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
1035
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
1036
- return false;
1037
- }
1038
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
1039
- return false;
1040
- }
1041
- }
1042
- /* Keep content except for bad-listed elements */
1043
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1044
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
1045
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
1046
- if (childNodes && parentNode) {
1047
- const childCount = childNodes.length;
1048
- for (let i = childCount - 1; i >= 0; --i) {
1049
- const childClone = cloneNode(childNodes[i], true);
1050
- parentNode.insertBefore(childClone, getNextSibling(currentNode));
1051
- }
1052
- }
1053
- }
1054
- _forceRemove(currentNode);
1055
- return true;
1056
- }
1057
- /* Check whether element has a valid namespace */
1058
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
1059
- _forceRemove(currentNode);
1060
- return true;
1061
- }
1062
- /* Make sure that older browsers don't get fallback-tag mXSS */
1063
- if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
1064
- _forceRemove(currentNode);
1065
- return true;
1066
- }
1067
- /* Sanitize element content to be template-safe */
1068
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
1069
- /* Get the element's text content */
1070
- content = currentNode.textContent;
1071
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1072
- content = stringReplace(content, expr, ' ');
1073
- });
1074
- if (currentNode.textContent !== content) {
1075
- arrayPush(DOMPurify.removed, {
1076
- element: currentNode.cloneNode()
1077
- });
1078
- currentNode.textContent = content;
1079
- }
1080
- }
1081
- /* Execute a hook if present */
1082
- _executeHooks(hooks.afterSanitizeElements, currentNode, null);
1083
- return false;
1084
- };
1085
- /**
1086
- * _isValidAttribute
1087
- *
1088
- * @param lcTag Lowercase tag name of containing element.
1089
- * @param lcName Lowercase attribute name.
1090
- * @param value Attribute value.
1091
- * @return Returns true if `value` is valid, otherwise false.
1092
- */
1093
- // eslint-disable-next-line complexity
1094
- const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1095
- /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */
1096
- if (FORBID_ATTR[lcName]) {
1097
- return false;
1098
- }
1099
- /* Make sure attribute cannot clobber */
1100
- if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1101
- return false;
1102
- }
1103
- const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
1104
- /* Allow valid data-* attributes: At least one character after "-"
1105
- (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1106
- XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1107
- We don't need to check the value; it's always URI safe. */
1108
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
1109
- if (
1110
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1111
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1112
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1113
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||
1114
- // Alternative, second condition checks if it's an `is`-attribute, AND
1115
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1116
- lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1117
- return false;
1118
- }
1119
- /* Check value is safe. First, is attr inert? If so, is safe */
1120
- } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1121
- return false;
1122
- } else ;
1123
- return true;
1124
- };
1125
- /* Names the HTML spec reserves from valid-custom-element-name; these must
1126
- * never be treated as basic custom elements even when a permissive
1127
- * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */
1128
- const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);
1129
- /**
1130
- * _isBasicCustomElement
1131
- * checks if at least one dash is included in tagName, and it's not the first char
1132
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1133
- *
1134
- * @param tagName name of the tag of the node to sanitize
1135
- * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1136
- */
1137
- const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1138
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT, tagName);
1139
- };
1140
- /**
1141
- * _sanitizeAttributes
1142
- *
1143
- * @protect attributes
1144
- * @protect nodeName
1145
- * @protect removeAttribute
1146
- * @protect setAttribute
1147
- *
1148
- * @param currentNode to sanitize
1149
- */
1150
- const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1151
- /* Execute a hook if present */
1152
- _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1153
- const {
1154
- attributes
1155
- } = currentNode;
1156
- /* Check if we have attributes; if not we might have a text node */
1157
- if (!attributes || _isClobbered(currentNode)) {
1158
- return;
1159
- }
1160
- const hookEvent = {
1161
- attrName: '',
1162
- attrValue: '',
1163
- keepAttr: true,
1164
- allowedAttributes: ALLOWED_ATTR,
1165
- forceKeepAttr: undefined
1166
- };
1167
- let l = attributes.length;
1168
- /* Go backwards over all attributes; safely remove bad ones */
1169
- while (l--) {
1170
- const attr = attributes[l];
1171
- const {
1172
- name,
1173
- namespaceURI,
1174
- value: attrValue
1175
- } = attr;
1176
- const lcName = transformCaseFunc(name);
1177
- const initValue = attrValue;
1178
- let value = name === 'value' ? initValue : stringTrim(initValue);
1179
- /* Execute a hook if present */
1180
- hookEvent.attrName = lcName;
1181
- hookEvent.attrValue = value;
1182
- hookEvent.keepAttr = true;
1183
- hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1184
- _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1185
- value = hookEvent.attrValue;
1186
- /* Full DOM Clobbering protection via namespace isolation,
1187
- * Prefix id and name attributes with `user-content-`
1188
- */
1189
- if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
1190
- // Remove the attribute with this value
1191
- _removeAttribute(name, currentNode);
1192
- // Prefix the value and later re-create the attribute with the sanitized value
1193
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
1194
- }
1195
- // Else: already prefixed, leave the attribute alone — the prefix is
1196
- // itself the clobbering protection, and re-applying it is incorrect.
1197
- /* Work around a security issue with comments inside attributes */
1198
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
1199
- _removeAttribute(name, currentNode);
1200
- continue;
1201
- }
1202
- /* Make sure we cannot easily use animated hrefs, even if animations are allowed */
1203
- if (lcName === 'attributename' && stringMatch(value, 'href')) {
1204
- _removeAttribute(name, currentNode);
1205
- continue;
1206
- }
1207
- /* Did the hooks approve of the attribute? */
1208
- if (hookEvent.forceKeepAttr) {
1209
- continue;
1210
- }
1211
- /* Did the hooks approve of the attribute? */
1212
- if (!hookEvent.keepAttr) {
1213
- _removeAttribute(name, currentNode);
1214
- continue;
1215
- }
1216
- /* Work around a security issue in jQuery 3.0 */
1217
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1218
- _removeAttribute(name, currentNode);
1219
- continue;
1220
- }
1221
- /* Sanitize attribute content to be template-safe */
1222
- if (SAFE_FOR_TEMPLATES) {
1223
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1224
- value = stringReplace(value, expr, ' ');
1225
- });
1226
- }
1227
- /* Is `value` valid for this attribute? */
1228
- const lcTag = transformCaseFunc(currentNode.nodeName);
1229
- if (!_isValidAttribute(lcTag, lcName, value)) {
1230
- _removeAttribute(name, currentNode);
1231
- continue;
1232
- }
1233
- /* Handle attributes that require Trusted Types */
1234
- if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1235
- if (namespaceURI) ; else {
1236
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1237
- case 'TrustedHTML':
1238
- {
1239
- value = trustedTypesPolicy.createHTML(value);
1240
- break;
1241
- }
1242
- case 'TrustedScriptURL':
1243
- {
1244
- value = trustedTypesPolicy.createScriptURL(value);
1245
- break;
1246
- }
1247
- }
1248
- }
1249
- }
1250
- /* Handle invalid data-* attribute set by try-catching it */
1251
- if (value !== initValue) {
1252
- try {
1253
- if (namespaceURI) {
1254
- currentNode.setAttributeNS(namespaceURI, name, value);
1255
- } else {
1256
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1257
- currentNode.setAttribute(name, value);
1258
- }
1259
- if (_isClobbered(currentNode)) {
1260
- _forceRemove(currentNode);
1261
- } else {
1262
- arrayPop(DOMPurify.removed);
1263
- }
1264
- } catch (_) {
1265
- _removeAttribute(name, currentNode);
1266
- }
1267
- }
1268
- }
1269
- /* Execute a hook if present */
1270
- _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1271
- };
1272
- /**
1273
- * _sanitizeShadowDOM
1274
- *
1275
- * @param fragment to iterate over recursively
1276
- */
1277
- const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
1278
- let shadowNode = null;
1279
- const shadowIterator = _createNodeIterator(fragment);
1280
- /* Execute a hook if present */
1281
- _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1282
- while (shadowNode = shadowIterator.nextNode()) {
1283
- /* Execute a hook if present */
1284
- _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1285
- /* Sanitize tags and elements */
1286
- _sanitizeElements(shadowNode);
1287
- /* Check attributes next */
1288
- _sanitizeAttributes(shadowNode);
1289
- /* Deep shadow DOM detected */
1290
- if (shadowNode.content instanceof DocumentFragment) {
1291
- _sanitizeShadowDOM2(shadowNode.content);
1292
- }
1293
- }
1294
- /* Execute a hook if present */
1295
- _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1296
- };
1297
- // eslint-disable-next-line complexity
1298
- DOMPurify.sanitize = function (dirty) {
1299
- let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1300
- let body = null;
1301
- let importedNode = null;
1302
- let currentNode = null;
1303
- let returnNode = null;
1304
- /* Make sure we have a string to sanitize.
1305
- DO NOT return early, as this will return the wrong type if
1306
- the user has requested a DOM object rather than a string */
1307
- IS_EMPTY_INPUT = !dirty;
1308
- if (IS_EMPTY_INPUT) {
1309
- dirty = '<!-->';
1310
- }
1311
- /* Stringify, in case dirty is an object */
1312
- if (typeof dirty !== 'string' && !_isNode(dirty)) {
1313
- dirty = stringifyValue(dirty);
1314
- if (typeof dirty !== 'string') {
1315
- throw typeErrorCreate('dirty is not a string, aborting');
1316
- }
1317
- }
1318
- /* Return dirty HTML if DOMPurify cannot run */
1319
- if (!DOMPurify.isSupported) {
1320
- return dirty;
1321
- }
1322
- /* Assign config vars */
1323
- if (!SET_CONFIG) {
1324
- _parseConfig(cfg);
1325
- }
1326
- /* Clean up removed elements */
1327
- DOMPurify.removed = [];
1328
- /* Check if dirty is correctly typed for IN_PLACE */
1329
- if (typeof dirty === 'string') {
1330
- IN_PLACE = false;
1331
- }
1332
- if (IN_PLACE) {
1333
- /* Do some early pre-sanitization to avoid unsafe root nodes */
1334
- const nn = dirty.nodeName;
1335
- if (typeof nn === 'string') {
1336
- const tagName = transformCaseFunc(nn);
1337
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1338
- throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1339
- }
1340
- }
1341
- } else if (dirty instanceof Node) {
1342
- /* If dirty is a DOM element, append to an empty document to avoid
1343
- elements being stripped by the parser */
1344
- body = _initDocument('<!---->');
1345
- importedNode = body.ownerDocument.importNode(dirty, true);
1346
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1347
- /* Node is already a body, use as is */
1348
- body = importedNode;
1349
- } else if (importedNode.nodeName === 'HTML') {
1350
- body = importedNode;
1351
- } else {
1352
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1353
- body.appendChild(importedNode);
1354
- }
1355
- } else {
1356
- /* Exit directly if we have nothing to do */
1357
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1358
- // eslint-disable-next-line unicorn/prefer-includes
1359
- dirty.indexOf('<') === -1) {
1360
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1361
- }
1362
- /* Initialize the document to work on */
1363
- body = _initDocument(dirty);
1364
- /* Check we have a DOM node from the data */
1365
- if (!body) {
1366
- return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1367
- }
1368
- }
1369
- /* Remove first element node (ours) if FORCE_BODY is set */
1370
- if (body && FORCE_BODY) {
1371
- _forceRemove(body.firstChild);
1372
- }
1373
- /* Get node iterator */
1374
- const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1375
- /* Now start iterating over the created document */
1376
- while (currentNode = nodeIterator.nextNode()) {
1377
- /* Sanitize tags and elements */
1378
- _sanitizeElements(currentNode);
1379
- /* Check attributes next */
1380
- _sanitizeAttributes(currentNode);
1381
- /* Shadow DOM detected, sanitize it */
1382
- if (currentNode.content instanceof DocumentFragment) {
1383
- _sanitizeShadowDOM2(currentNode.content);
1384
- }
1385
- }
1386
- /* If we sanitized `dirty` in-place, return it. */
1387
- if (IN_PLACE) {
1388
- return dirty;
1389
- }
1390
- /* Return sanitized string or DOM */
1391
- if (RETURN_DOM) {
1392
- if (SAFE_FOR_TEMPLATES) {
1393
- body.normalize();
1394
- let html = body.innerHTML;
1395
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1396
- html = stringReplace(html, expr, ' ');
1397
- });
1398
- body.innerHTML = html;
1399
- }
1400
- if (RETURN_DOM_FRAGMENT) {
1401
- returnNode = createDocumentFragment.call(body.ownerDocument);
1402
- while (body.firstChild) {
1403
- // eslint-disable-next-line unicorn/prefer-dom-node-append
1404
- returnNode.appendChild(body.firstChild);
1405
- }
1406
- } else {
1407
- returnNode = body;
1408
- }
1409
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1410
- /*
1411
- AdoptNode() is not used because internal state is not reset
1412
- (e.g. the past names map of a HTMLFormElement), this is safe
1413
- in theory but we would rather not risk another attack vector.
1414
- The state that is cloned by importNode() is explicitly defined
1415
- by the specs.
1416
- */
1417
- returnNode = importNode.call(originalDocument, returnNode, true);
1418
- }
1419
- return returnNode;
1420
- }
1421
- let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1422
- /* Serialize doctype if allowed */
1423
- if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1424
- serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1425
- }
1426
- /* Sanitize final string template-safe */
1427
- if (SAFE_FOR_TEMPLATES) {
1428
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1429
- serializedHTML = stringReplace(serializedHTML, expr, ' ');
1430
- });
1431
- }
1432
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1433
- };
1434
- DOMPurify.setConfig = function () {
1435
- let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1436
- _parseConfig(cfg);
1437
- SET_CONFIG = true;
1438
- };
1439
- DOMPurify.clearConfig = function () {
1440
- CONFIG = null;
1441
- SET_CONFIG = false;
1442
- };
1443
- DOMPurify.isValidAttribute = function (tag, attr, value) {
1444
- /* Initialize shared config vars if necessary. */
1445
- if (!CONFIG) {
1446
- _parseConfig({});
1447
- }
1448
- const lcTag = transformCaseFunc(tag);
1449
- const lcName = transformCaseFunc(attr);
1450
- return _isValidAttribute(lcTag, lcName, value);
1451
- };
1452
- DOMPurify.addHook = function (entryPoint, hookFunction) {
1453
- if (typeof hookFunction !== 'function') {
1454
- return;
1455
- }
1456
- arrayPush(hooks[entryPoint], hookFunction);
1457
- };
1458
- DOMPurify.removeHook = function (entryPoint, hookFunction) {
1459
- if (hookFunction !== undefined) {
1460
- const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1461
- return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1462
- }
1463
- return arrayPop(hooks[entryPoint]);
1464
- };
1465
- DOMPurify.removeHooks = function (entryPoint) {
1466
- hooks[entryPoint] = [];
1467
- };
1468
- DOMPurify.removeAllHooks = function () {
1469
- hooks = _createHooksMap();
1470
- };
1471
- return DOMPurify;
1472
- }
1473
- var purify = createDOMPurify();
1474
-
1475
- const sanitizeSvg = (svg) => {
1476
- return purify.sanitize(svg, {
1477
- USE_PROFILES: { svg: true },
1478
- FORBID_ATTR: ['height', 'width'],
1479
- });
1480
- };
1481
-
1482
- exports.sanitizeSvg = sanitizeSvg;