@govbr-ds/webcomponents 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (866) hide show
  1. package/README.md +0 -11
  2. package/cem/custom-elements.json +272 -71
  3. package/dist/cjs/app-globals-DcqHuMBv.js +9 -0
  4. package/dist/cjs/br-avatar.cjs.entry.js +248 -0
  5. package/dist/cjs/br-breadcrumb-item.cjs.entry.js +45 -0
  6. package/dist/cjs/br-breadcrumb.cjs.entry.js +443 -0
  7. package/dist/cjs/br-button_2.cjs.entry.js +280 -0
  8. package/dist/cjs/br-card.cjs.entry.js +111 -0
  9. package/dist/cjs/br-carousel-page.cjs.entry.js +80 -0
  10. package/dist/cjs/br-carousel.cjs.entry.js +565 -0
  11. package/dist/cjs/br-checkbox-group.cjs.entry.js +118 -0
  12. package/dist/cjs/br-checkbox.cjs.entry.js +288 -0
  13. package/dist/cjs/br-checkgroup.cjs.entry.js +20 -0
  14. package/dist/cjs/br-collapse_2.cjs.entry.js +683 -0
  15. package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +83 -0
  16. package/dist/cjs/br-cookiebar-group.cjs.entry.js +309 -0
  17. package/dist/cjs/br-cookiebar-header.cjs.entry.js +39 -0
  18. package/dist/cjs/br-cookiebar-link.cjs.entry.js +55 -0
  19. package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +70 -0
  20. package/dist/cjs/br-cookiebar-note.cjs.entry.js +25 -0
  21. package/dist/cjs/br-cookiebar.cjs.entry.js +758 -0
  22. package/dist/cjs/br-crumb.cjs.entry.js +51 -0
  23. package/dist/cjs/br-date-picker_3.cjs.entry.js +2447 -0
  24. package/dist/cjs/br-datetime-picker.cjs.entry.js +1886 -0
  25. package/dist/cjs/br-divider.cjs.entry.js +225 -0
  26. package/dist/cjs/br-dropdown_2.cjs.entry.js +2000 -0
  27. package/dist/cjs/br-footer-category.cjs.entry.js +102 -0
  28. package/dist/cjs/br-footer-item.cjs.entry.js +52 -0
  29. package/dist/cjs/br-footer-legal.cjs.entry.js +41 -0
  30. package/dist/cjs/br-footer-logo.cjs.entry.js +104 -0
  31. package/dist/cjs/br-footer-social.cjs.entry.js +71 -0
  32. package/dist/cjs/br-footer.cjs.entry.js +92 -0
  33. package/dist/cjs/br-header-function.cjs.entry.js +142 -0
  34. package/dist/cjs/br-header-link.cjs.entry.js +60 -0
  35. package/dist/cjs/br-header-list.cjs.entry.js +279 -0
  36. package/dist/cjs/br-header-logo.cjs.entry.js +178 -0
  37. package/dist/cjs/br-header.cjs.entry.js +642 -0
  38. package/dist/cjs/br-icon.cjs.entry.js +485 -0
  39. package/dist/cjs/br-input.cjs.entry.js +599 -0
  40. package/dist/cjs/br-item.cjs.entry.js +367 -0
  41. package/dist/cjs/br-link.cjs.entry.js +133 -0
  42. package/dist/cjs/br-loading.cjs.entry.js +505 -0
  43. package/dist/cjs/br-magic-button.cjs.entry.js +93 -0
  44. package/dist/cjs/br-menu-group.cjs.entry.js +23 -0
  45. package/dist/cjs/br-menu-header.cjs.entry.js +47 -0
  46. package/dist/cjs/br-menu-info.cjs.entry.js +38 -0
  47. package/dist/cjs/br-menu-item.cjs.entry.js +79 -0
  48. package/dist/cjs/br-menu-link.cjs.entry.js +56 -0
  49. package/dist/cjs/br-menu-list.cjs.entry.js +149 -0
  50. package/dist/cjs/br-menu-logo.cjs.entry.js +75 -0
  51. package/dist/cjs/br-menu-social.cjs.entry.js +65 -0
  52. package/dist/cjs/br-menu.cjs.entry.js +993 -0
  53. package/dist/cjs/br-modal.cjs.entry.js +496 -0
  54. package/dist/cjs/br-notification-body.cjs.entry.js +71 -0
  55. package/dist/cjs/br-notification-header.cjs.entry.js +48 -0
  56. package/dist/cjs/br-notification-item.cjs.entry.js +110 -0
  57. package/dist/cjs/br-notification.cjs.entry.js +334 -0
  58. package/dist/cjs/br-pagination.cjs.entry.js +884 -0
  59. package/dist/cjs/br-radio-group.cjs.entry.js +428 -0
  60. package/dist/cjs/br-radio.cjs.entry.js +357 -0
  61. package/dist/cjs/br-scrim.cjs.entry.js +1336 -0
  62. package/dist/cjs/br-select-input_3.cjs.entry.js +988 -0
  63. package/dist/cjs/br-sign-in.cjs.entry.js +126 -0
  64. package/dist/cjs/br-skip-link-item.cjs.entry.js +20 -0
  65. package/dist/cjs/br-skip-link.cjs.entry.js +362 -0
  66. package/dist/cjs/br-skiplink-item.cjs.entry.js +192 -0
  67. package/dist/cjs/br-slider.cjs.entry.js +687 -0
  68. package/dist/cjs/br-step_2.cjs.entry.js +628 -0
  69. package/dist/cjs/br-switch.cjs.entry.js +245 -0
  70. package/dist/cjs/br-tab-item.cjs.entry.js +185 -0
  71. package/dist/cjs/br-tab.cjs.entry.js +397 -0
  72. package/dist/cjs/br-table-body.cjs.entry.js +37 -0
  73. package/dist/cjs/br-table-cell.cjs.entry.js +184 -0
  74. package/dist/cjs/br-table-header-cell.cjs.entry.js +173 -0
  75. package/dist/cjs/br-table-header.cjs.entry.js +37 -0
  76. package/dist/cjs/br-table-row.cjs.entry.js +81 -0
  77. package/dist/cjs/br-table.cjs.entry.js +680 -0
  78. package/dist/cjs/br-tag.cjs.entry.js +493 -0
  79. package/dist/cjs/br-textarea.cjs.entry.js +306 -0
  80. package/dist/cjs/br-tooltip.cjs.entry.js +627 -0
  81. package/dist/cjs/br-upload.cjs.entry.js +581 -0
  82. package/dist/cjs/br-wizard-panel.cjs.entry.js +54 -0
  83. package/dist/cjs/br-wizard.cjs.entry.js +708 -0
  84. package/dist/cjs/breakpoint-observer-P8veqXg7.js +144 -0
  85. package/dist/cjs/clamp-Co_hWptd.js +25 -0
  86. package/dist/cjs/cookiebar.utils-CB1gQwZ4.js +18 -0
  87. package/dist/cjs/datetime-picker-constants-B5pWeOn1.js +3827 -0
  88. package/dist/cjs/event-CmVdNHxl.js +56 -0
  89. package/dist/cjs/floating-surface-dismiss-ccdiD0KF.js +63 -0
  90. package/dist/cjs/floating-ui-MBI1osio.js +136 -0
  91. package/dist/cjs/floating-ui.dom-BUSTaaxR.js +1715 -0
  92. package/dist/cjs/focus-DuywwJPR.js +30 -0
  93. package/dist/cjs/getNextElement-R9l3JtM9.js +31 -0
  94. package/dist/cjs/iconify-icon-DfODV9bf.js +2307 -0
  95. package/dist/cjs/id-CjRFMzf6.js +20 -0
  96. package/dist/cjs/index-C92n55ch.js +678 -0
  97. package/dist/cjs/index-CRdcutym.js +3287 -0
  98. package/dist/cjs/index.cjs.js +12 -0
  99. package/dist/cjs/isNil-DO5zWc3l.js +19 -0
  100. package/dist/cjs/isValid-Fu3kaWNn.js +3694 -0
  101. package/dist/cjs/loader.cjs.js +17 -0
  102. package/dist/cjs/native-dialog--Ewqm4w0.js +49 -0
  103. package/dist/cjs/navigation-AbzwcRCU.js +25 -0
  104. package/dist/cjs/parts-D5K3ae2C.js +19 -0
  105. package/dist/cjs/props-CScmBvKd.js +24 -0
  106. package/dist/cjs/raf-batcher-yc87a4dS.js +55 -0
  107. package/dist/cjs/slot-DAllytTj.js +48 -0
  108. package/dist/cjs/swipe-BU8_XE9f.js +345 -0
  109. package/dist/cjs/table-constants-BOPSay0B.js +183 -0
  110. package/dist/cjs/validator-CTCajtT9.js +123 -0
  111. package/dist/cjs/webcomponents.cjs.js +50 -0
  112. package/dist/collection/assets/icon-search.svg +6 -0
  113. package/dist/collection/assets/logo-negative.svg +1 -0
  114. package/dist/collection/assets/logo-positive.svg +1 -0
  115. package/dist/collection/assets/wc.svg +1 -0
  116. package/dist/collection/collection-manifest.json +113 -0
  117. package/dist/collection/components/avatar/avatar.css +1 -0
  118. package/dist/collection/components/avatar/avatar.js +589 -0
  119. package/dist/collection/components/avatar/avatar.types.js +1 -0
  120. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +166 -0
  121. package/dist/collection/components/breadcrumb/breadcrumb.css +1 -0
  122. package/dist/collection/components/breadcrumb/breadcrumb.js +619 -0
  123. package/dist/collection/components/breadcrumb/breadcrumb.types.js +1 -0
  124. package/dist/collection/components/breadcrumb/crumb/crumb.js +175 -0
  125. package/dist/collection/components/button/button.css +1 -0
  126. package/dist/collection/components/button/button.js +546 -0
  127. package/dist/collection/components/button/button.types.js +1 -0
  128. package/dist/collection/components/card/card.css +1 -0
  129. package/dist/collection/components/card/card.js +225 -0
  130. package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -0
  131. package/dist/collection/components/carousel/carousel-page/carousel-page.js +195 -0
  132. package/dist/collection/components/carousel/carousel.css +1 -0
  133. package/dist/collection/components/carousel/carousel.js +1217 -0
  134. package/dist/collection/components/carousel/carousel.types.js +1 -0
  135. package/dist/collection/components/checkbox/checkbox.css +1 -0
  136. package/dist/collection/components/checkbox/checkbox.js +823 -0
  137. package/dist/collection/components/checkbox/checkbox.types.js +1 -0
  138. package/dist/collection/components/checkbox-group/checkbox-group.css +1 -0
  139. package/dist/collection/components/checkbox-group/checkbox-group.js +268 -0
  140. package/dist/collection/components/checkgroup/checkgroup.js +166 -0
  141. package/dist/collection/components/collapse/collapse.css +1 -0
  142. package/dist/collection/components/collapse/collapse.js +642 -0
  143. package/dist/collection/components/collapse/collapse.types.js +1 -0
  144. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -0
  145. package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +529 -0
  146. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -0
  147. package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +628 -0
  148. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -0
  149. package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +165 -0
  150. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -0
  151. package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +201 -0
  152. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -0
  153. package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +100 -0
  154. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -0
  155. package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +172 -0
  156. package/dist/collection/components/cookiebar/cookiebar.css +1 -0
  157. package/dist/collection/components/cookiebar/cookiebar.js +1419 -0
  158. package/dist/collection/components/cookiebar/cookiebar.types.js +1 -0
  159. package/dist/collection/components/cookiebar/cookiebar.utils.js +14 -0
  160. package/dist/collection/components/datetime-picker/date-picker/date-picker-locale.js +94 -0
  161. package/dist/collection/components/datetime-picker/date-picker/date-picker-props-validation.js +57 -0
  162. package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -0
  163. package/dist/collection/components/datetime-picker/date-picker/date-picker.js +913 -0
  164. package/dist/collection/components/datetime-picker/datetime-input/datetime-input-props-validation.js +65 -0
  165. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -0
  166. package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +826 -0
  167. package/dist/collection/components/datetime-picker/datetime-picker-constants.js +36 -0
  168. package/dist/collection/components/datetime-picker/datetime-picker-form-associated.js +112 -0
  169. package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +202 -0
  170. package/dist/collection/components/datetime-picker/datetime-picker.css +1 -0
  171. package/dist/collection/components/datetime-picker/datetime-picker.js +1924 -0
  172. package/dist/collection/components/datetime-picker/datetime-picker.types.js +1 -0
  173. package/dist/collection/components/datetime-picker/datetime-picker.utils.js +250 -0
  174. package/dist/collection/components/datetime-picker/time-picker/time-picker-constants.js +13 -0
  175. package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -0
  176. package/dist/collection/components/datetime-picker/time-picker/time-picker.js +456 -0
  177. package/dist/collection/components/divider/divider.css +1 -0
  178. package/dist/collection/components/divider/divider.js +537 -0
  179. package/dist/collection/components/divider/divider.types.js +1 -0
  180. package/dist/collection/components/dropdown/dropdown.css +1 -0
  181. package/dist/collection/components/dropdown/dropdown.js +939 -0
  182. package/dist/collection/components/dropdown/dropdown.types.js +1 -0
  183. package/dist/collection/components/footer/footer-category/footer-category.css +1 -0
  184. package/dist/collection/components/footer/footer-category/footer-category.js +160 -0
  185. package/dist/collection/components/footer/footer-item/footer-item.css +1 -0
  186. package/dist/collection/components/footer/footer-item/footer-item.js +154 -0
  187. package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -0
  188. package/dist/collection/components/footer/footer-legal/footer-legal.js +75 -0
  189. package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -0
  190. package/dist/collection/components/footer/footer-logo/footer-logo.js +342 -0
  191. package/dist/collection/components/footer/footer-logo/footer-logo.types.js +1 -0
  192. package/dist/collection/components/footer/footer-social/footer-social.css +1 -0
  193. package/dist/collection/components/footer/footer-social/footer-social.js +239 -0
  194. package/dist/collection/components/footer/footer.css +1 -0
  195. package/dist/collection/components/footer/footer.js +245 -0
  196. package/dist/collection/components/footer/footer.types.js +1 -0
  197. package/dist/collection/components/global.types.js +1 -0
  198. package/dist/collection/components/header/header-function/header-function.css +1 -0
  199. package/dist/collection/components/header/header-function/header-function.js +311 -0
  200. package/dist/collection/components/header/header-link/header-link.css +1 -0
  201. package/dist/collection/components/header/header-link/header-link.js +189 -0
  202. package/dist/collection/components/header/header-list/header-list.css +1 -0
  203. package/dist/collection/components/header/header-list/header-list.js +452 -0
  204. package/dist/collection/components/header/header-logo/header-logo.css +1 -0
  205. package/dist/collection/components/header/header-logo/header-logo.js +421 -0
  206. package/dist/collection/components/header/header.css +1 -0
  207. package/dist/collection/components/header/header.js +1131 -0
  208. package/dist/collection/components/header/header.types.js +1 -0
  209. package/dist/collection/components/icon/default-icons-cache.js +233 -0
  210. package/dist/collection/components/icon/icon.css +1 -0
  211. package/dist/collection/components/icon/icon.js +598 -0
  212. package/dist/collection/components/icon/icon.types.js +1 -0
  213. package/dist/collection/components/icon/icon.utils.js +33 -0
  214. package/dist/collection/components/input/input.css +1 -0
  215. package/dist/collection/components/input/input.js +1642 -0
  216. package/dist/collection/components/input/input.types.js +1 -0
  217. package/dist/collection/components/item/item.css +1 -0
  218. package/dist/collection/components/item/item.js +917 -0
  219. package/dist/collection/components/item/item.types.js +1 -0
  220. package/dist/collection/components/link/link.css +1 -0
  221. package/dist/collection/components/link/link.js +699 -0
  222. package/dist/collection/components/list/list.css +1 -0
  223. package/dist/collection/components/list/list.js +728 -0
  224. package/dist/collection/components/loading/loading.css +1 -0
  225. package/dist/collection/components/loading/loading.js +1169 -0
  226. package/dist/collection/components/loading/loading.types.js +1 -0
  227. package/dist/collection/components/magic-button/magic-button.css +1 -0
  228. package/dist/collection/components/magic-button/magic-button.js +238 -0
  229. package/dist/collection/components/menu/menu-group/menu-group.css +1 -0
  230. package/dist/collection/components/menu/menu-group/menu-group.js +77 -0
  231. package/dist/collection/components/menu/menu-header/menu-header.css +1 -0
  232. package/dist/collection/components/menu/menu-header/menu-header.js +161 -0
  233. package/dist/collection/components/menu/menu-info/menu-info.css +1 -0
  234. package/dist/collection/components/menu/menu-info/menu-info.js +94 -0
  235. package/dist/collection/components/menu/menu-item/menu-item.css +1 -0
  236. package/dist/collection/components/menu/menu-item/menu-item.js +306 -0
  237. package/dist/collection/components/menu/menu-item/menu-item.types.js +1 -0
  238. package/dist/collection/components/menu/menu-link/menu-link.css +1 -0
  239. package/dist/collection/components/menu/menu-link/menu-link.js +260 -0
  240. package/dist/collection/components/menu/menu-list/menu-list.css +1 -0
  241. package/dist/collection/components/menu/menu-list/menu-list.js +311 -0
  242. package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -0
  243. package/dist/collection/components/menu/menu-logo/menu-logo.js +230 -0
  244. package/dist/collection/components/menu/menu-social/menu-social.css +1 -0
  245. package/dist/collection/components/menu/menu-social/menu-social.js +263 -0
  246. package/dist/collection/components/menu/menu.css +1 -0
  247. package/dist/collection/components/menu/menu.js +1372 -0
  248. package/dist/collection/components/menu/menu.types.js +1 -0
  249. package/dist/collection/components/menu/menu.utils.js +279 -0
  250. package/dist/collection/components/message/message.css +1 -0
  251. package/dist/collection/components/message/message.js +508 -0
  252. package/dist/collection/components/modal/modal.css +1 -0
  253. package/dist/collection/components/modal/modal.js +842 -0
  254. package/dist/collection/components/modal/modal.types.js +1 -0
  255. package/dist/collection/components/notification/notification-body/notification-body.css +1 -0
  256. package/dist/collection/components/notification/notification-body/notification-body.js +153 -0
  257. package/dist/collection/components/notification/notification-header/notification-header.css +1 -0
  258. package/dist/collection/components/notification/notification-header/notification-header.js +181 -0
  259. package/dist/collection/components/notification/notification-item/notification-item.css +1 -0
  260. package/dist/collection/components/notification/notification-item/notification-item.js +351 -0
  261. package/dist/collection/components/notification/notification-item/notification-item.types.js +1 -0
  262. package/dist/collection/components/notification/notification.css +1 -0
  263. package/dist/collection/components/notification/notification.js +838 -0
  264. package/dist/collection/components/notification/notification.types.js +1 -0
  265. package/dist/collection/components/pagination/pagination.css +1 -0
  266. package/dist/collection/components/pagination/pagination.js +1470 -0
  267. package/dist/collection/components/pagination/pagination.types.js +1 -0
  268. package/dist/collection/components/radio/radio.css +1 -0
  269. package/dist/collection/components/radio/radio.js +847 -0
  270. package/dist/collection/components/radio/radio.types.js +1 -0
  271. package/dist/collection/components/radio-group/radio-group.css +1 -0
  272. package/dist/collection/components/radio-group/radio-group.js +862 -0
  273. package/dist/collection/components/radio-group/radio-group.types.js +1 -0
  274. package/dist/collection/components/scrim/scrim.css +1 -0
  275. package/dist/collection/components/scrim/scrim.js +1825 -0
  276. package/dist/collection/components/scrim/scrim.types.js +1 -0
  277. package/dist/collection/components/scrim/scrim.utils.js +132 -0
  278. package/dist/collection/components/select/select-input/select-input.css +1 -0
  279. package/dist/collection/components/select/select-input/select-input.js +586 -0
  280. package/dist/collection/components/select/select-list/select-list.css +1 -0
  281. package/dist/collection/components/select/select-list/select-list.js +1159 -0
  282. package/dist/collection/components/select/select-option/select-option.css +1 -0
  283. package/dist/collection/components/select/select-option/select-option.js +564 -0
  284. package/dist/collection/components/select/select.constants.js +6 -0
  285. package/dist/collection/components/select/select.css +1 -0
  286. package/dist/collection/components/select/select.js +2692 -0
  287. package/dist/collection/components/select/select.types.js +1 -0
  288. package/dist/collection/components/select/select.utils.js +34 -0
  289. package/dist/collection/components/sign-in/sign-in.css +1 -0
  290. package/dist/collection/components/sign-in/sign-in.js +401 -0
  291. package/dist/collection/components/sign-in/sign-in.types.js +1 -0
  292. package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +103 -0
  293. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -0
  294. package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +450 -0
  295. package/dist/collection/components/skip-link/skip-link.css +1 -0
  296. package/dist/collection/components/skip-link/skip-link.js +699 -0
  297. package/dist/collection/components/skip-link/skip-link.types.js +1 -0
  298. package/dist/collection/components/slider/slider.css +1 -0
  299. package/dist/collection/components/slider/slider.js +1324 -0
  300. package/dist/collection/components/slider/slider.types.js +1 -0
  301. package/dist/collection/components/step/step-item/step-item.css +1 -0
  302. package/dist/collection/components/step/step-item/step-item.js +604 -0
  303. package/dist/collection/components/step/step-item/step-item.types.js +1 -0
  304. package/dist/collection/components/step/step.css +1 -0
  305. package/dist/collection/components/step/step.js +896 -0
  306. package/dist/collection/components/step/step.types.js +1 -0
  307. package/dist/collection/components/switch/switch.css +1 -0
  308. package/dist/collection/components/switch/switch.js +715 -0
  309. package/dist/collection/components/switch/switch.types.js +1 -0
  310. package/dist/collection/components/tab/tab-item/tab-item.css +1 -0
  311. package/dist/collection/components/tab/tab-item/tab-item.js +425 -0
  312. package/dist/collection/components/tab/tab.css +1 -0
  313. package/dist/collection/components/tab/tab.js +724 -0
  314. package/dist/collection/components/tab/tab.types.js +1 -0
  315. package/dist/collection/components/table/table-body/table-body.css +1 -0
  316. package/dist/collection/components/table/table-body/table-body.js +51 -0
  317. package/dist/collection/components/table/table-cell/table-cell.css +1 -0
  318. package/dist/collection/components/table/table-cell/table-cell.js +373 -0
  319. package/dist/collection/components/table/table-constants.js +171 -0
  320. package/dist/collection/components/table/table-header/table-header.css +1 -0
  321. package/dist/collection/components/table/table-header/table-header.js +51 -0
  322. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  323. package/dist/collection/components/table/table-header-cell/table-header-cell.js +402 -0
  324. package/dist/collection/components/table/table-row/table-row.css +1 -0
  325. package/dist/collection/components/table/table-row/table-row.js +261 -0
  326. package/dist/collection/components/table/table-tokens.js +50 -0
  327. package/dist/collection/components/table/table-types.js +1 -0
  328. package/dist/collection/components/table/table-utils.js +44 -0
  329. package/dist/collection/components/table/table.css +1 -0
  330. package/dist/collection/components/table/table.js +1030 -0
  331. package/dist/collection/components/tag/tag.css +1 -0
  332. package/dist/collection/components/tag/tag.js +1152 -0
  333. package/dist/collection/components/tag/tag.types.js +1 -0
  334. package/dist/collection/components/textarea/textarea.css +1 -0
  335. package/dist/collection/components/textarea/textarea.js +985 -0
  336. package/dist/collection/components/textarea/textarea.types.js +1 -0
  337. package/dist/collection/components/tooltip/tooltip.css +1 -0
  338. package/dist/collection/components/tooltip/tooltip.js +1024 -0
  339. package/dist/collection/components/tooltip/tooltip.types.js +1 -0
  340. package/dist/collection/components/upload/upload.css +1 -0
  341. package/dist/collection/components/upload/upload.js +1314 -0
  342. package/dist/collection/components/upload/upload.types.js +1 -0
  343. package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -0
  344. package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +167 -0
  345. package/dist/collection/components/wizard/wizard.css +1 -0
  346. package/dist/collection/components/wizard/wizard.js +1228 -0
  347. package/dist/collection/index.js +14 -0
  348. package/dist/collection/pages/components/cookiebar/index.js +26 -0
  349. package/dist/collection/pages/components/link/index.js +29 -0
  350. package/dist/collection/pages/components/pagination/index.js +12 -0
  351. package/dist/collection/pages/components/slider/index.js +18 -0
  352. package/dist/collection/pages/scripts/code-editor.js +101 -0
  353. package/dist/collection/pages/scripts/component-controls.js +600 -0
  354. package/dist/collection/pages/scripts/dev-event-console.js +47 -0
  355. package/dist/collection/pages/scripts/menu.js +192 -0
  356. package/dist/collection/pages/scripts/pageLoader.js +1422 -0
  357. package/dist/collection/shared/utils/assetsPath.js +75 -0
  358. package/dist/collection/shared/utils/breakpoint-observer.js +139 -0
  359. package/dist/collection/shared/utils/clamp.js +21 -0
  360. package/dist/collection/shared/utils/css-variables.js +12 -0
  361. package/dist/collection/shared/utils/cssVariables.js +37 -0
  362. package/dist/collection/shared/utils/date.js +405 -0
  363. package/dist/collection/shared/utils/debounce.js +39 -0
  364. package/dist/collection/shared/utils/event.js +55 -0
  365. package/dist/collection/shared/utils/floating-surface-dismiss.js +59 -0
  366. package/dist/collection/shared/utils/floating-ui.js +131 -0
  367. package/dist/collection/shared/utils/focus.js +24 -0
  368. package/dist/collection/shared/utils/form.js +82 -0
  369. package/dist/collection/shared/utils/format-bytes.js +20 -0
  370. package/dist/collection/shared/utils/getNextElement.js +30 -0
  371. package/dist/collection/shared/utils/getRandom.js +27 -0
  372. package/dist/collection/shared/utils/helpers.js +31 -0
  373. package/dist/collection/shared/utils/id.js +16 -0
  374. package/dist/collection/shared/utils/index.js +60 -0
  375. package/dist/collection/shared/utils/interfaces.js +1 -0
  376. package/dist/collection/shared/utils/isClient.js +14 -0
  377. package/dist/collection/shared/utils/isDefined.js +19 -0
  378. package/dist/collection/shared/utils/isEmpty.js +30 -0
  379. package/dist/collection/shared/utils/isHTMLElement.js +16 -0
  380. package/dist/collection/shared/utils/isNil.js +15 -0
  381. package/dist/collection/shared/utils/isString.js +20 -0
  382. package/dist/collection/shared/utils/native-dialog.js +44 -0
  383. package/dist/collection/shared/utils/navigation.js +21 -0
  384. package/dist/collection/shared/utils/parts.js +15 -0
  385. package/dist/collection/shared/utils/prop-warning.js +7 -0
  386. package/dist/collection/shared/utils/props.js +37 -0
  387. package/dist/collection/shared/utils/raf-batcher.js +51 -0
  388. package/dist/collection/shared/utils/scrollLock.js +141 -0
  389. package/dist/collection/shared/utils/setRafTimeout.js +38 -0
  390. package/dist/collection/shared/utils/slot.js +113 -0
  391. package/dist/collection/shared/utils/ssr-date.js +33 -0
  392. package/dist/collection/shared/utils/stringToArray.js +29 -0
  393. package/dist/collection/shared/utils/swipe.js +342 -0
  394. package/dist/collection/shared/utils/transition.js +127 -0
  395. package/dist/collection/shared/utils/types.js +1 -0
  396. package/dist/collection/shared/utils/validator.js +51 -0
  397. package/dist/collection/value-accessors/angular-value-accessor-config.js +41 -0
  398. package/dist/collection/value-accessors/index.js +6 -0
  399. package/dist/collection/value-accessors/vue-model-config.js +43 -0
  400. package/dist/components/br-avatar.d.ts +11 -0
  401. package/dist/components/br-avatar.js +5 -0
  402. package/dist/components/br-breadcrumb-item.d.ts +11 -0
  403. package/dist/components/br-breadcrumb-item.js +5 -0
  404. package/dist/components/br-breadcrumb.d.ts +11 -0
  405. package/dist/components/br-breadcrumb.js +5 -0
  406. package/dist/components/br-button.d.ts +11 -0
  407. package/dist/components/br-button.js +5 -0
  408. package/dist/components/br-card.d.ts +11 -0
  409. package/dist/components/br-card.js +5 -0
  410. package/dist/components/br-carousel-page.d.ts +11 -0
  411. package/dist/components/br-carousel-page.js +5 -0
  412. package/dist/components/br-carousel.d.ts +11 -0
  413. package/dist/components/br-carousel.js +5 -0
  414. package/dist/components/br-checkbox-group.d.ts +11 -0
  415. package/dist/components/br-checkbox-group.js +5 -0
  416. package/dist/components/br-checkbox.d.ts +11 -0
  417. package/dist/components/br-checkbox.js +5 -0
  418. package/dist/components/br-checkgroup.d.ts +11 -0
  419. package/dist/components/br-checkgroup.js +5 -0
  420. package/dist/components/br-collapse.d.ts +11 -0
  421. package/dist/components/br-collapse.js +5 -0
  422. package/dist/components/br-cookiebar-cookie.d.ts +11 -0
  423. package/dist/components/br-cookiebar-cookie.js +5 -0
  424. package/dist/components/br-cookiebar-group.d.ts +11 -0
  425. package/dist/components/br-cookiebar-group.js +5 -0
  426. package/dist/components/br-cookiebar-header.d.ts +11 -0
  427. package/dist/components/br-cookiebar-header.js +5 -0
  428. package/dist/components/br-cookiebar-link.d.ts +11 -0
  429. package/dist/components/br-cookiebar-link.js +5 -0
  430. package/dist/components/br-cookiebar-note-group.d.ts +11 -0
  431. package/dist/components/br-cookiebar-note-group.js +5 -0
  432. package/dist/components/br-cookiebar-note.d.ts +11 -0
  433. package/dist/components/br-cookiebar-note.js +5 -0
  434. package/dist/components/br-cookiebar.d.ts +11 -0
  435. package/dist/components/br-cookiebar.js +5 -0
  436. package/dist/components/br-crumb.d.ts +11 -0
  437. package/dist/components/br-crumb.js +5 -0
  438. package/dist/components/br-date-picker.d.ts +11 -0
  439. package/dist/components/br-date-picker.js +5 -0
  440. package/dist/components/br-datetime-input.d.ts +11 -0
  441. package/dist/components/br-datetime-input.js +5 -0
  442. package/dist/components/br-datetime-picker.d.ts +11 -0
  443. package/dist/components/br-datetime-picker.js +5 -0
  444. package/dist/components/br-divider.d.ts +11 -0
  445. package/dist/components/br-divider.js +5 -0
  446. package/dist/components/br-dropdown.d.ts +11 -0
  447. package/dist/components/br-dropdown.js +5 -0
  448. package/dist/components/br-footer-category.d.ts +11 -0
  449. package/dist/components/br-footer-category.js +5 -0
  450. package/dist/components/br-footer-item.d.ts +11 -0
  451. package/dist/components/br-footer-item.js +5 -0
  452. package/dist/components/br-footer-legal.d.ts +11 -0
  453. package/dist/components/br-footer-legal.js +5 -0
  454. package/dist/components/br-footer-logo.d.ts +11 -0
  455. package/dist/components/br-footer-logo.js +5 -0
  456. package/dist/components/br-footer-social.d.ts +11 -0
  457. package/dist/components/br-footer-social.js +5 -0
  458. package/dist/components/br-footer.d.ts +11 -0
  459. package/dist/components/br-footer.js +5 -0
  460. package/dist/components/br-header-function.d.ts +11 -0
  461. package/dist/components/br-header-function.js +5 -0
  462. package/dist/components/br-header-link.d.ts +11 -0
  463. package/dist/components/br-header-link.js +5 -0
  464. package/dist/components/br-header-list.d.ts +11 -0
  465. package/dist/components/br-header-list.js +5 -0
  466. package/dist/components/br-header-logo.d.ts +11 -0
  467. package/dist/components/br-header-logo.js +5 -0
  468. package/dist/components/br-header.d.ts +11 -0
  469. package/dist/components/br-header.js +5 -0
  470. package/dist/components/br-icon.d.ts +11 -0
  471. package/dist/components/br-icon.js +5 -0
  472. package/dist/components/br-input.d.ts +11 -0
  473. package/dist/components/br-input.js +5 -0
  474. package/dist/components/br-item.d.ts +11 -0
  475. package/dist/components/br-item.js +5 -0
  476. package/dist/components/br-link.d.ts +11 -0
  477. package/dist/components/br-link.js +5 -0
  478. package/dist/components/br-list.d.ts +11 -0
  479. package/dist/components/br-list.js +5 -0
  480. package/dist/components/br-loading.d.ts +11 -0
  481. package/dist/components/br-loading.js +5 -0
  482. package/dist/components/br-magic-button.d.ts +11 -0
  483. package/dist/components/br-magic-button.js +5 -0
  484. package/dist/components/br-menu-group.d.ts +11 -0
  485. package/dist/components/br-menu-group.js +5 -0
  486. package/dist/components/br-menu-header.d.ts +11 -0
  487. package/dist/components/br-menu-header.js +5 -0
  488. package/dist/components/br-menu-info.d.ts +11 -0
  489. package/dist/components/br-menu-info.js +5 -0
  490. package/dist/components/br-menu-item.d.ts +11 -0
  491. package/dist/components/br-menu-item.js +5 -0
  492. package/dist/components/br-menu-link.d.ts +11 -0
  493. package/dist/components/br-menu-link.js +5 -0
  494. package/dist/components/br-menu-list.d.ts +11 -0
  495. package/dist/components/br-menu-list.js +5 -0
  496. package/dist/components/br-menu-logo.d.ts +11 -0
  497. package/dist/components/br-menu-logo.js +5 -0
  498. package/dist/components/br-menu-social.d.ts +11 -0
  499. package/dist/components/br-menu-social.js +5 -0
  500. package/dist/components/br-menu.d.ts +11 -0
  501. package/dist/components/br-menu.js +5 -0
  502. package/dist/components/br-message.d.ts +11 -0
  503. package/dist/components/br-message.js +5 -0
  504. package/dist/components/br-modal.d.ts +11 -0
  505. package/dist/components/br-modal.js +5 -0
  506. package/dist/components/br-notification-body.d.ts +11 -0
  507. package/dist/components/br-notification-body.js +5 -0
  508. package/dist/components/br-notification-header.d.ts +11 -0
  509. package/dist/components/br-notification-header.js +5 -0
  510. package/dist/components/br-notification-item.d.ts +11 -0
  511. package/dist/components/br-notification-item.js +5 -0
  512. package/dist/components/br-notification.d.ts +11 -0
  513. package/dist/components/br-notification.js +5 -0
  514. package/dist/components/br-pagination.d.ts +11 -0
  515. package/dist/components/br-pagination.js +5 -0
  516. package/dist/components/br-radio-group.d.ts +11 -0
  517. package/dist/components/br-radio-group.js +5 -0
  518. package/dist/components/br-radio.d.ts +11 -0
  519. package/dist/components/br-radio.js +5 -0
  520. package/dist/components/br-scrim.d.ts +11 -0
  521. package/dist/components/br-scrim.js +5 -0
  522. package/dist/components/br-select-input.d.ts +11 -0
  523. package/dist/components/br-select-input.js +5 -0
  524. package/dist/components/br-select-list.d.ts +11 -0
  525. package/dist/components/br-select-list.js +5 -0
  526. package/dist/components/br-select-option.d.ts +11 -0
  527. package/dist/components/br-select-option.js +5 -0
  528. package/dist/components/br-select.d.ts +11 -0
  529. package/dist/components/br-select.js +5 -0
  530. package/dist/components/br-sign-in.d.ts +11 -0
  531. package/dist/components/br-sign-in.js +5 -0
  532. package/dist/components/br-skip-link-item.d.ts +11 -0
  533. package/dist/components/br-skip-link-item.js +5 -0
  534. package/dist/components/br-skip-link.d.ts +11 -0
  535. package/dist/components/br-skip-link.js +5 -0
  536. package/dist/components/br-skiplink-item.d.ts +11 -0
  537. package/dist/components/br-skiplink-item.js +5 -0
  538. package/dist/components/br-slider.d.ts +11 -0
  539. package/dist/components/br-slider.js +5 -0
  540. package/dist/components/br-step-item.d.ts +11 -0
  541. package/dist/components/br-step-item.js +5 -0
  542. package/dist/components/br-step.d.ts +11 -0
  543. package/dist/components/br-step.js +5 -0
  544. package/dist/components/br-switch.d.ts +11 -0
  545. package/dist/components/br-switch.js +5 -0
  546. package/dist/components/br-tab-item.d.ts +11 -0
  547. package/dist/components/br-tab-item.js +5 -0
  548. package/dist/components/br-tab.d.ts +11 -0
  549. package/dist/components/br-tab.js +5 -0
  550. package/dist/components/br-table-body.d.ts +11 -0
  551. package/dist/components/br-table-body.js +5 -0
  552. package/dist/components/br-table-cell.d.ts +11 -0
  553. package/dist/components/br-table-cell.js +5 -0
  554. package/dist/components/br-table-header-cell.d.ts +11 -0
  555. package/dist/components/br-table-header-cell.js +5 -0
  556. package/dist/components/br-table-header.d.ts +11 -0
  557. package/dist/components/br-table-header.js +5 -0
  558. package/dist/components/br-table-row.d.ts +11 -0
  559. package/dist/components/br-table-row.js +5 -0
  560. package/dist/components/br-table.d.ts +11 -0
  561. package/dist/components/br-table.js +5 -0
  562. package/dist/components/br-tag.d.ts +11 -0
  563. package/dist/components/br-tag.js +5 -0
  564. package/dist/components/br-textarea.d.ts +11 -0
  565. package/dist/components/br-textarea.js +5 -0
  566. package/dist/components/br-time-picker.d.ts +11 -0
  567. package/dist/components/br-time-picker.js +5 -0
  568. package/dist/components/br-tooltip.d.ts +11 -0
  569. package/dist/components/br-tooltip.js +5 -0
  570. package/dist/components/br-upload.d.ts +11 -0
  571. package/dist/components/br-upload.js +5 -0
  572. package/dist/components/br-wizard-panel.d.ts +11 -0
  573. package/dist/components/br-wizard-panel.js +5 -0
  574. package/dist/components/br-wizard.d.ts +11 -0
  575. package/dist/components/br-wizard.js +5 -0
  576. package/dist/components/index.d.ts +213 -0
  577. package/dist/components/index.js +5 -0
  578. package/dist/components/p-34Jfn-U-.js +5 -0
  579. package/dist/components/p-5z6jgH1D.js +5 -0
  580. package/dist/components/p-6OdfnwnK.js +5 -0
  581. package/dist/components/p-9S9bgUT0.js +5 -0
  582. package/dist/components/p-B-qLmYZC.js +5 -0
  583. package/dist/components/p-B55qsau4.js +5 -0
  584. package/dist/components/p-B7Amgxkp.js +5 -0
  585. package/dist/components/p-BC7f6MK8.js +5 -0
  586. package/dist/components/p-BKuMQJrQ.js +5 -0
  587. package/dist/components/p-BPJpHGOW.js +5 -0
  588. package/dist/components/p-BWXfdbQH.js +5 -0
  589. package/dist/components/p-Bb-nLtTG.js +5 -0
  590. package/dist/components/p-BeE7R9nu.js +5 -0
  591. package/dist/components/p-BkS6ujyf.js +5 -0
  592. package/dist/components/p-Bo0QYHJO.js +5 -0
  593. package/dist/components/p-C1yRmdso.js +5 -0
  594. package/dist/components/p-C2i2c_io.js +5 -0
  595. package/dist/components/p-C7v0lVlX.js +5 -0
  596. package/dist/components/p-CMBsvswx.js +5 -0
  597. package/dist/components/p-CRrimdz6.js +5 -0
  598. package/dist/components/p-CWORw84-.js +5 -0
  599. package/dist/components/p-CXMwM9m4.js +5 -0
  600. package/dist/components/p-CdDwqbBv.js +5 -0
  601. package/dist/components/p-CvUMXJCl.js +5 -0
  602. package/dist/components/p-D3usVJE2.js +16 -0
  603. package/dist/components/p-D6zroLx5.js +5 -0
  604. package/dist/components/p-DA5GS53D.js +5 -0
  605. package/dist/components/p-DBP6K_aq.js +5 -0
  606. package/dist/components/p-DBmwzG9E.js +5 -0
  607. package/dist/components/p-DCrVo-8T.js +5 -0
  608. package/dist/components/p-DFUKDNck.js +5 -0
  609. package/dist/components/p-DHicj0By.js +5 -0
  610. package/dist/components/p-DIK54tTj.js +5 -0
  611. package/dist/components/p-DQRSHR-D.js +5 -0
  612. package/dist/components/p-DRVMm1Py.js +5 -0
  613. package/dist/components/p-DWPmUV72.js +5 -0
  614. package/dist/components/p-DXjQyH6s.js +5 -0
  615. package/dist/components/p-DYA74R1r.js +5 -0
  616. package/dist/components/p-DmCxdB9P.js +5 -0
  617. package/dist/components/p-Dmfk7eEe.js +5 -0
  618. package/dist/components/p-Dp0xy_3n.js +5 -0
  619. package/dist/components/p-DxZJrIyL.js +5 -0
  620. package/dist/components/p-JAkkThgf.js +5 -0
  621. package/dist/components/p-Ud-WB0hx.js +5 -0
  622. package/dist/components/p-bhULC15U.js +5 -0
  623. package/dist/components/p-cF3ia5e9.js +5 -0
  624. package/dist/components/p-fpMNttbg.js +5 -0
  625. package/dist/components/p-gvnfuTjd.js +5 -0
  626. package/dist/components/p-qYONSNcf.js +5 -0
  627. package/dist/components/p-qhhHGJY1.js +5 -0
  628. package/dist/components/p-ttI0nvv_.js +5 -0
  629. package/dist/components/p-ukNmfGNP.js +5 -0
  630. package/dist/components/p-xa8e1kSW.js +5 -0
  631. package/dist/esm/app-globals-DVjNHTTs.js +7 -0
  632. package/dist/esm/br-avatar.entry.js +246 -0
  633. package/dist/esm/br-breadcrumb-item.entry.js +43 -0
  634. package/dist/esm/br-breadcrumb.entry.js +441 -0
  635. package/dist/esm/br-button_2.entry.js +277 -0
  636. package/dist/esm/br-card.entry.js +109 -0
  637. package/dist/esm/br-carousel-page.entry.js +78 -0
  638. package/dist/esm/br-carousel.entry.js +563 -0
  639. package/dist/esm/br-checkbox-group.entry.js +116 -0
  640. package/dist/esm/br-checkbox.entry.js +286 -0
  641. package/dist/esm/br-checkgroup.entry.js +18 -0
  642. package/dist/esm/br-collapse_2.entry.js +680 -0
  643. package/dist/esm/br-cookiebar-cookie.entry.js +81 -0
  644. package/dist/esm/br-cookiebar-group.entry.js +307 -0
  645. package/dist/esm/br-cookiebar-header.entry.js +37 -0
  646. package/dist/esm/br-cookiebar-link.entry.js +53 -0
  647. package/dist/esm/br-cookiebar-note-group.entry.js +68 -0
  648. package/dist/esm/br-cookiebar-note.entry.js +23 -0
  649. package/dist/esm/br-cookiebar.entry.js +756 -0
  650. package/dist/esm/br-crumb.entry.js +49 -0
  651. package/dist/esm/br-date-picker_3.entry.js +2443 -0
  652. package/dist/esm/br-datetime-picker.entry.js +1884 -0
  653. package/dist/esm/br-divider.entry.js +223 -0
  654. package/dist/esm/br-dropdown_2.entry.js +1997 -0
  655. package/dist/esm/br-footer-category.entry.js +100 -0
  656. package/dist/esm/br-footer-item.entry.js +50 -0
  657. package/dist/esm/br-footer-legal.entry.js +39 -0
  658. package/dist/esm/br-footer-logo.entry.js +102 -0
  659. package/dist/esm/br-footer-social.entry.js +69 -0
  660. package/dist/esm/br-footer.entry.js +90 -0
  661. package/dist/esm/br-header-function.entry.js +140 -0
  662. package/dist/esm/br-header-link.entry.js +58 -0
  663. package/dist/esm/br-header-list.entry.js +277 -0
  664. package/dist/esm/br-header-logo.entry.js +176 -0
  665. package/dist/esm/br-header.entry.js +640 -0
  666. package/dist/esm/br-icon.entry.js +483 -0
  667. package/dist/esm/br-input.entry.js +597 -0
  668. package/dist/esm/br-item.entry.js +365 -0
  669. package/dist/esm/br-link.entry.js +131 -0
  670. package/dist/esm/br-loading.entry.js +503 -0
  671. package/dist/esm/br-magic-button.entry.js +91 -0
  672. package/dist/esm/br-menu-group.entry.js +21 -0
  673. package/dist/esm/br-menu-header.entry.js +45 -0
  674. package/dist/esm/br-menu-info.entry.js +36 -0
  675. package/dist/esm/br-menu-item.entry.js +77 -0
  676. package/dist/esm/br-menu-link.entry.js +54 -0
  677. package/dist/esm/br-menu-list.entry.js +147 -0
  678. package/dist/esm/br-menu-logo.entry.js +73 -0
  679. package/dist/esm/br-menu-social.entry.js +63 -0
  680. package/dist/esm/br-menu.entry.js +991 -0
  681. package/dist/esm/br-modal.entry.js +494 -0
  682. package/dist/esm/br-notification-body.entry.js +69 -0
  683. package/dist/esm/br-notification-header.entry.js +46 -0
  684. package/dist/esm/br-notification-item.entry.js +108 -0
  685. package/dist/esm/br-notification.entry.js +332 -0
  686. package/dist/esm/br-pagination.entry.js +882 -0
  687. package/dist/esm/br-radio-group.entry.js +426 -0
  688. package/dist/esm/br-radio.entry.js +355 -0
  689. package/dist/esm/br-scrim.entry.js +1334 -0
  690. package/dist/esm/br-select-input_3.entry.js +984 -0
  691. package/dist/esm/br-sign-in.entry.js +124 -0
  692. package/dist/esm/br-skip-link-item.entry.js +18 -0
  693. package/dist/esm/br-skip-link.entry.js +360 -0
  694. package/dist/esm/br-skiplink-item.entry.js +190 -0
  695. package/dist/esm/br-slider.entry.js +685 -0
  696. package/dist/esm/br-step_2.entry.js +625 -0
  697. package/dist/esm/br-switch.entry.js +243 -0
  698. package/dist/esm/br-tab-item.entry.js +183 -0
  699. package/dist/esm/br-tab.entry.js +395 -0
  700. package/dist/esm/br-table-body.entry.js +35 -0
  701. package/dist/esm/br-table-cell.entry.js +182 -0
  702. package/dist/esm/br-table-header-cell.entry.js +171 -0
  703. package/dist/esm/br-table-header.entry.js +35 -0
  704. package/dist/esm/br-table-row.entry.js +79 -0
  705. package/dist/esm/br-table.entry.js +678 -0
  706. package/dist/esm/br-tag.entry.js +491 -0
  707. package/dist/esm/br-textarea.entry.js +304 -0
  708. package/dist/esm/br-tooltip.entry.js +625 -0
  709. package/dist/esm/br-upload.entry.js +579 -0
  710. package/dist/esm/br-wizard-panel.entry.js +52 -0
  711. package/dist/esm/br-wizard.entry.js +706 -0
  712. package/dist/esm/breakpoint-observer-DBmwzG9E.js +141 -0
  713. package/dist/esm/clamp-gvnfuTjd.js +23 -0
  714. package/dist/esm/cookiebar.utils-DYA74R1r.js +16 -0
  715. package/dist/esm/datetime-picker-constants-Bfm58jO6.js +3798 -0
  716. package/dist/esm/event-DFN_so7I.js +48 -0
  717. package/dist/esm/floating-surface-dismiss-BWXfdbQH.js +61 -0
  718. package/dist/esm/floating-ui-BavFwMnx.js +134 -0
  719. package/dist/esm/floating-ui.dom-DIK54tTj.js +1707 -0
  720. package/dist/esm/focus-DxZJrIyL.js +26 -0
  721. package/dist/esm/getNextElement-9S9bgUT0.js +28 -0
  722. package/dist/esm/iconify-icon-D3usVJE2.js +2303 -0
  723. package/dist/esm/id-BkS6ujyf.js +18 -0
  724. package/dist/esm/index-Bo-2igoO.js +671 -0
  725. package/dist/esm/index-C2RBydfd.js +3258 -0
  726. package/dist/esm/index.js +6 -0
  727. package/dist/esm/isNil-B-qLmYZC.js +17 -0
  728. package/dist/esm/isValid-DIUZX1qS.js +3684 -0
  729. package/dist/esm/loader.js +15 -0
  730. package/dist/esm/native-dialog-B55qsau4.js +46 -0
  731. package/dist/esm/navigation-bhULC15U.js +23 -0
  732. package/dist/esm/parts-Bb5vVlCC.js +17 -0
  733. package/dist/esm/props-DRVMm1Py.js +22 -0
  734. package/dist/esm/raf-batcher-cF3ia5e9.js +53 -0
  735. package/dist/esm/slot-BIG-yees.js +44 -0
  736. package/dist/esm/swipe-Dmfk7eEe.js +343 -0
  737. package/dist/esm/table-constants-CXMwM9m4.js +170 -0
  738. package/dist/esm/validator-D3tVP32U.js +113 -0
  739. package/dist/esm/webcomponents.js +46 -0
  740. package/dist/hydrate/index.d.ts +287 -0
  741. package/dist/hydrate/index.js +67516 -0
  742. package/dist/hydrate/index.mjs +67506 -0
  743. package/dist/hydrate/package.json +12 -0
  744. package/dist/index.cjs.js +1 -0
  745. package/dist/index.js +1 -0
  746. package/dist/loader/cdn.js +5 -0
  747. package/dist/loader/index.cjs.js +5 -0
  748. package/dist/loader/index.d.ts +24 -0
  749. package/dist/loader/index.es2017.js +5 -0
  750. package/dist/loader/index.js +6 -0
  751. package/dist/types/components/item/item.d.ts +1 -0
  752. package/dist/types/components/select/select-list/select-list.d.ts +1 -0
  753. package/dist/types/components/select/select-option/select-option.d.ts +1 -0
  754. package/dist/types/components/select/select.d.ts +14 -0
  755. package/dist/types/components/select/select.types.d.ts +2 -0
  756. package/dist/types/components/select/select.utils.d.ts +13 -0
  757. package/dist/webcomponents/index.esm.js +5 -0
  758. package/dist/webcomponents/p-0196804a.entry.js +5 -0
  759. package/dist/webcomponents/p-0410186a.entry.js +5 -0
  760. package/dist/webcomponents/p-0415ef22.entry.js +5 -0
  761. package/dist/webcomponents/p-0777c7b1.entry.js +5 -0
  762. package/dist/webcomponents/p-0caa4d12.entry.js +5 -0
  763. package/dist/webcomponents/p-0d4f718d.entry.js +5 -0
  764. package/dist/webcomponents/p-0e84c9e8.entry.js +5 -0
  765. package/dist/webcomponents/p-12286e73.entry.js +5 -0
  766. package/dist/webcomponents/p-147ac8d3.entry.js +5 -0
  767. package/dist/webcomponents/p-1580beee.entry.js +5 -0
  768. package/dist/webcomponents/p-18ee6175.entry.js +5 -0
  769. package/dist/webcomponents/p-1bca4499.entry.js +5 -0
  770. package/dist/webcomponents/p-1c303a4e.entry.js +5 -0
  771. package/dist/webcomponents/p-1d6b0b6f.entry.js +5 -0
  772. package/dist/webcomponents/p-1d8cb8fd.entry.js +5 -0
  773. package/dist/webcomponents/p-224daaac.entry.js +5 -0
  774. package/dist/webcomponents/p-28426d2a.entry.js +5 -0
  775. package/dist/webcomponents/p-2abd2da0.entry.js +5 -0
  776. package/dist/webcomponents/p-2fdc51ae.entry.js +5 -0
  777. package/dist/webcomponents/p-30c428b6.entry.js +5 -0
  778. package/dist/webcomponents/p-36bbea4e.entry.js +5 -0
  779. package/dist/webcomponents/p-3907ebfa.entry.js +5 -0
  780. package/dist/webcomponents/p-39a16f9d.entry.js +5 -0
  781. package/dist/webcomponents/p-3ebbd2f5.entry.js +5 -0
  782. package/dist/webcomponents/p-3ef7eac8.entry.js +5 -0
  783. package/dist/webcomponents/p-45356e9a.entry.js +5 -0
  784. package/dist/webcomponents/p-46513db4.entry.js +5 -0
  785. package/dist/webcomponents/p-4c13221a.entry.js +5 -0
  786. package/dist/webcomponents/p-51ce2c31.entry.js +5 -0
  787. package/dist/webcomponents/p-52df61cb.entry.js +5 -0
  788. package/dist/webcomponents/p-569134cf.entry.js +5 -0
  789. package/dist/webcomponents/p-5ce7db4a.entry.js +5 -0
  790. package/dist/webcomponents/p-5f373708.entry.js +5 -0
  791. package/dist/webcomponents/p-5f6afb79.entry.js +5 -0
  792. package/dist/webcomponents/p-5fc7ba4c.entry.js +5 -0
  793. package/dist/webcomponents/p-66006312.entry.js +5 -0
  794. package/dist/webcomponents/p-66b13fd9.entry.js +5 -0
  795. package/dist/webcomponents/p-6OdfnwnK.js +5 -0
  796. package/dist/webcomponents/p-750799b7.entry.js +5 -0
  797. package/dist/webcomponents/p-756ff2ad.entry.js +5 -0
  798. package/dist/webcomponents/p-765bfe27.entry.js +5 -0
  799. package/dist/webcomponents/p-7ab96c11.entry.js +5 -0
  800. package/dist/webcomponents/p-7c2ff8b4.entry.js +5 -0
  801. package/dist/webcomponents/p-7f7506f0.entry.js +5 -0
  802. package/dist/webcomponents/p-7fb03a49.entry.js +5 -0
  803. package/dist/webcomponents/p-82200563.entry.js +5 -0
  804. package/dist/webcomponents/p-83ff4579.entry.js +5 -0
  805. package/dist/webcomponents/p-85f8063b.entry.js +5 -0
  806. package/dist/webcomponents/p-8b558233.entry.js +5 -0
  807. package/dist/webcomponents/p-8e6c2767.entry.js +5 -0
  808. package/dist/webcomponents/p-8e819355.entry.js +5 -0
  809. package/dist/webcomponents/p-92a9b9c4.entry.js +5 -0
  810. package/dist/webcomponents/p-966ad32f.entry.js +5 -0
  811. package/dist/webcomponents/p-9679d230.entry.js +5 -0
  812. package/dist/webcomponents/p-96dd663b.entry.js +5 -0
  813. package/dist/webcomponents/p-98843fa3.entry.js +5 -0
  814. package/dist/webcomponents/p-9S9bgUT0.js +5 -0
  815. package/dist/webcomponents/p-9a375eff.entry.js +5 -0
  816. package/dist/webcomponents/p-9b358cff.entry.js +5 -0
  817. package/dist/webcomponents/p-9f7558c7.entry.js +5 -0
  818. package/dist/webcomponents/p-B-qLmYZC.js +5 -0
  819. package/dist/webcomponents/p-B55qsau4.js +5 -0
  820. package/dist/webcomponents/p-BIG-yees.js +5 -0
  821. package/dist/webcomponents/p-BWXfdbQH.js +5 -0
  822. package/dist/webcomponents/p-Bb5vVlCC.js +5 -0
  823. package/dist/webcomponents/p-Bfm58jO6.js +5 -0
  824. package/dist/webcomponents/p-BhMVJQ4-.js +5 -0
  825. package/dist/webcomponents/p-BkS6ujyf.js +5 -0
  826. package/dist/webcomponents/p-C2RBydfd.js +6 -0
  827. package/dist/webcomponents/p-CO5cOQQU.js +5 -0
  828. package/dist/webcomponents/p-CXMwM9m4.js +5 -0
  829. package/dist/webcomponents/p-D3tVP32U.js +5 -0
  830. package/dist/webcomponents/p-D3usVJE2.js +16 -0
  831. package/dist/webcomponents/p-DBmwzG9E.js +5 -0
  832. package/dist/webcomponents/p-DFN_so7I.js +5 -0
  833. package/dist/webcomponents/p-DIK54tTj.js +5 -0
  834. package/dist/webcomponents/p-DRVMm1Py.js +5 -0
  835. package/dist/webcomponents/p-DVjNHTTs.js +5 -0
  836. package/dist/webcomponents/p-DYA74R1r.js +5 -0
  837. package/dist/webcomponents/p-Dmfk7eEe.js +5 -0
  838. package/dist/webcomponents/p-DxZJrIyL.js +5 -0
  839. package/dist/webcomponents/p-a382e115.entry.js +5 -0
  840. package/dist/webcomponents/p-a4ae72e3.entry.js +5 -0
  841. package/dist/webcomponents/p-a994c190.entry.js +5 -0
  842. package/dist/webcomponents/p-a9ff7c25.entry.js +5 -0
  843. package/dist/webcomponents/p-bhULC15U.js +5 -0
  844. package/dist/webcomponents/p-c0b0f531.entry.js +5 -0
  845. package/dist/webcomponents/p-c211af17.entry.js +5 -0
  846. package/dist/webcomponents/p-c492d926.entry.js +5 -0
  847. package/dist/webcomponents/p-c4cfe599.entry.js +5 -0
  848. package/dist/webcomponents/p-c846e784.entry.js +5 -0
  849. package/dist/webcomponents/p-c949d993.entry.js +5 -0
  850. package/dist/webcomponents/p-cF3ia5e9.js +5 -0
  851. package/dist/webcomponents/p-d1e899cd.entry.js +5 -0
  852. package/dist/webcomponents/p-d38d82cc.entry.js +5 -0
  853. package/dist/webcomponents/p-e0ce536a.entry.js +5 -0
  854. package/dist/webcomponents/p-e1331288.entry.js +5 -0
  855. package/dist/webcomponents/p-e360a463.entry.js +5 -0
  856. package/dist/webcomponents/p-f078f972.entry.js +5 -0
  857. package/dist/webcomponents/p-f26038e2.entry.js +5 -0
  858. package/dist/webcomponents/p-f303f6b3.entry.js +5 -0
  859. package/dist/webcomponents/p-f6318e94.entry.js +5 -0
  860. package/dist/webcomponents/p-f85ee01c.entry.js +5 -0
  861. package/dist/webcomponents/p-fcd4ae48.entry.js +5 -0
  862. package/dist/webcomponents/p-ffe0241e.entry.js +5 -0
  863. package/dist/webcomponents/p-gvnfuTjd.js +5 -0
  864. package/dist/webcomponents/webcomponents.esm.js +5 -0
  865. package/package.json +3 -7
  866. package/cem/.gitkeep +0 -0
@@ -0,0 +1,2303 @@
1
+ /*!
2
+ * Construído por SERPRO
3
+ * © https://serpro.gov.br/ - MIT License.
4
+ */
5
+ /**
6
+ * (c) Iconify
7
+ *
8
+ * For the full copyright and license information, please view the license.txt
9
+ * files at https://github.com/iconify/iconify
10
+ *
11
+ * Licensed under MIT.
12
+ *
13
+ * @license MIT
14
+ * @version 3.0.2
15
+ */
16
+ /** Default values for dimensions */
17
+ const defaultIconDimensions = Object.freeze({
18
+ left: 0,
19
+ top: 0,
20
+ width: 16,
21
+ height: 16
22
+ });
23
+ /** Default values for transformations */
24
+ const defaultIconTransformations = Object.freeze({
25
+ rotate: 0,
26
+ vFlip: false,
27
+ hFlip: false
28
+ });
29
+ /** Default values for all optional IconifyIcon properties */
30
+ const defaultIconProps = Object.freeze({
31
+ ...defaultIconDimensions,
32
+ ...defaultIconTransformations
33
+ });
34
+ /** Default values for all properties used in ExtendedIconifyIcon */
35
+ const defaultExtendedIconProps = Object.freeze({
36
+ ...defaultIconProps,
37
+ body: "",
38
+ hidden: false
39
+ });
40
+
41
+ /**
42
+ * Default icon customisations values
43
+ */
44
+ const defaultIconSizeCustomisations = Object.freeze({
45
+ width: null,
46
+ height: null
47
+ });
48
+ const defaultIconCustomisations = Object.freeze({
49
+ ...defaultIconSizeCustomisations,
50
+ ...defaultIconTransformations
51
+ });
52
+
53
+ /**
54
+ * Get rotation value
55
+ */
56
+ function rotateFromString(value, defaultValue = 0) {
57
+ const units = value.replace(/^-?[0-9.]*/, "");
58
+ function cleanup(value$1) {
59
+ while (value$1 < 0) value$1 += 4;
60
+ return value$1 % 4;
61
+ }
62
+ if (units === "") {
63
+ const num = parseInt(value);
64
+ return isNaN(num) ? 0 : cleanup(num);
65
+ } else if (units !== value) {
66
+ let split = 0;
67
+ switch (units) {
68
+ case "%":
69
+ split = 25;
70
+ break;
71
+ case "deg": split = 90;
72
+ }
73
+ if (split) {
74
+ let num = parseFloat(value.slice(0, value.length - units.length));
75
+ if (isNaN(num)) return 0;
76
+ num = num / split;
77
+ return num % 1 === 0 ? cleanup(num) : 0;
78
+ }
79
+ }
80
+ return defaultValue;
81
+ }
82
+
83
+ const separator = /[\s,]+/;
84
+ /**
85
+ * Apply "flip" string to icon customisations
86
+ */
87
+ function flipFromString(custom, flip) {
88
+ flip.split(separator).forEach((str) => {
89
+ switch (str.trim()) {
90
+ case "horizontal":
91
+ custom.hFlip = true;
92
+ break;
93
+ case "vertical":
94
+ custom.vFlip = true;
95
+ break;
96
+ }
97
+ });
98
+ }
99
+
100
+ const defaultCustomisations = {
101
+ ...defaultIconCustomisations,
102
+ preserveAspectRatio: '',
103
+ };
104
+ /**
105
+ * Get customisations
106
+ */
107
+ function getCustomisations(node) {
108
+ const customisations = {
109
+ ...defaultCustomisations,
110
+ };
111
+ const attr = (key, def) => node.getAttribute(key) || def;
112
+ // Dimensions
113
+ customisations.width = attr('width', null);
114
+ customisations.height = attr('height', null);
115
+ // Rotation
116
+ customisations.rotate = rotateFromString(attr('rotate', ''));
117
+ // Flip
118
+ flipFromString(customisations, attr('flip', ''));
119
+ // SVG attributes
120
+ customisations.preserveAspectRatio = attr('preserveAspectRatio', attr('preserveaspectratio', ''));
121
+ return customisations;
122
+ }
123
+ /**
124
+ * Check if customisations have been updated
125
+ */
126
+ function haveCustomisationsChanged(value1, value2) {
127
+ for (const key in defaultCustomisations) {
128
+ if (value1[key] !== value2[key]) {
129
+ return true;
130
+ }
131
+ }
132
+ return false;
133
+ }
134
+
135
+ /**
136
+ * Expression to test part of icon name.
137
+ *
138
+ * Used when loading icons from Iconify API due to project naming convension.
139
+ * Ignored when using custom icon sets - convension does not apply.
140
+ */
141
+ const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
142
+ /**
143
+ * Convert string icon name to IconifyIconName object.
144
+ */
145
+ const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
146
+ const colonSeparated = value.split(":");
147
+ if (value.slice(0, 1) === "@") {
148
+ if (colonSeparated.length < 2 || colonSeparated.length > 3) return null;
149
+ provider = colonSeparated.shift().slice(1);
150
+ }
151
+ if (colonSeparated.length > 3 || !colonSeparated.length) return null;
152
+ if (colonSeparated.length > 1) {
153
+ const name$1 = colonSeparated.pop();
154
+ const prefix = colonSeparated.pop();
155
+ const result = {
156
+ provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
157
+ prefix,
158
+ name: name$1
159
+ };
160
+ return validate && !validateIconName(result) ? null : result;
161
+ }
162
+ const name = colonSeparated[0];
163
+ const dashSeparated = name.split("-");
164
+ if (dashSeparated.length > 1) {
165
+ const result = {
166
+ provider,
167
+ prefix: dashSeparated.shift(),
168
+ name: dashSeparated.join("-")
169
+ };
170
+ return validate && !validateIconName(result) ? null : result;
171
+ }
172
+ if (allowSimpleName && provider === "") {
173
+ const result = {
174
+ provider,
175
+ prefix: "",
176
+ name
177
+ };
178
+ return validate && !validateIconName(result, allowSimpleName) ? null : result;
179
+ }
180
+ return null;
181
+ };
182
+ /**
183
+ * Check if icon is valid.
184
+ *
185
+ * This function is not part of stringToIcon because validation is not needed for most code.
186
+ */
187
+ const validateIconName = (icon, allowSimpleName) => {
188
+ if (!icon) return false;
189
+ return !!((allowSimpleName && icon.prefix === "" || !!icon.prefix) && !!icon.name);
190
+ };
191
+
192
+ /**
193
+ * Resolve icon set icons
194
+ *
195
+ * Returns parent icon for each icon
196
+ */
197
+ function getIconsTree(data, names) {
198
+ const icons = data.icons;
199
+ const aliases = data.aliases || Object.create(null);
200
+ const resolved = Object.create(null);
201
+ function resolve(name) {
202
+ if (icons[name]) return resolved[name] = [];
203
+ if (!(name in resolved)) {
204
+ resolved[name] = null;
205
+ const parent = aliases[name] && aliases[name].parent;
206
+ const value = parent && resolve(parent);
207
+ if (value) resolved[name] = [parent].concat(value);
208
+ }
209
+ return resolved[name];
210
+ }
211
+ (Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
212
+ return resolved;
213
+ }
214
+
215
+ /**
216
+ * Merge transformations
217
+ */
218
+ function mergeIconTransformations(obj1, obj2) {
219
+ const result = {};
220
+ if (!obj1.hFlip !== !obj2.hFlip) result.hFlip = true;
221
+ if (!obj1.vFlip !== !obj2.vFlip) result.vFlip = true;
222
+ const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
223
+ if (rotate) result.rotate = rotate;
224
+ return result;
225
+ }
226
+
227
+ /**
228
+ * Merge icon and alias
229
+ *
230
+ * Can also be used to merge default values and icon
231
+ */
232
+ function mergeIconData(parent, child) {
233
+ const result = mergeIconTransformations(parent, child);
234
+ for (const key in defaultExtendedIconProps) if (key in defaultIconTransformations) {
235
+ if (key in parent && !(key in result)) result[key] = defaultIconTransformations[key];
236
+ } else if (key in child) result[key] = child[key];
237
+ else if (key in parent) result[key] = parent[key];
238
+ return result;
239
+ }
240
+
241
+ /**
242
+ * Get icon data, using prepared aliases tree
243
+ */
244
+ function internalGetIconData(data, name, tree) {
245
+ const icons = data.icons;
246
+ const aliases = data.aliases || Object.create(null);
247
+ let currentProps = {};
248
+ function parse(name$1) {
249
+ currentProps = mergeIconData(icons[name$1] || aliases[name$1], currentProps);
250
+ }
251
+ parse(name);
252
+ tree.forEach(parse);
253
+ return mergeIconData(data, currentProps);
254
+ }
255
+
256
+ /**
257
+ * Extract icons from an icon set
258
+ *
259
+ * Returns list of icons that were found in icon set
260
+ */
261
+ function parseIconSet(data, callback) {
262
+ const names = [];
263
+ if (typeof data !== "object" || typeof data.icons !== "object") return names;
264
+ if (data.not_found instanceof Array) data.not_found.forEach((name) => {
265
+ callback(name, null);
266
+ names.push(name);
267
+ });
268
+ const tree = getIconsTree(data);
269
+ for (const name in tree) {
270
+ const item = tree[name];
271
+ if (item) {
272
+ callback(name, internalGetIconData(data, name, item));
273
+ names.push(name);
274
+ }
275
+ }
276
+ return names;
277
+ }
278
+
279
+ /**
280
+ * Optional properties
281
+ */
282
+ const optionalPropertyDefaults = {
283
+ provider: "",
284
+ aliases: {},
285
+ not_found: {},
286
+ ...defaultIconDimensions
287
+ };
288
+ /**
289
+ * Check props
290
+ */
291
+ function checkOptionalProps(item, defaults) {
292
+ for (const prop in defaults) if (prop in item && typeof item[prop] !== typeof defaults[prop]) return false;
293
+ return true;
294
+ }
295
+ /**
296
+ * Validate icon set, return it as IconifyJSON on success, null on failure
297
+ *
298
+ * Unlike validateIconSet(), this function is very basic.
299
+ * It does not throw exceptions, it does not check metadata, it does not fix stuff.
300
+ */
301
+ function quicklyValidateIconSet(obj) {
302
+ if (typeof obj !== "object" || obj === null) return null;
303
+ const data = obj;
304
+ if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") return null;
305
+ if (!checkOptionalProps(obj, optionalPropertyDefaults)) return null;
306
+ const icons = data.icons;
307
+ for (const name in icons) {
308
+ const icon = icons[name];
309
+ if (!name || typeof icon.body !== "string" || !checkOptionalProps(icon, defaultExtendedIconProps)) return null;
310
+ }
311
+ const aliases = data.aliases || Object.create(null);
312
+ for (const name in aliases) {
313
+ const icon = aliases[name];
314
+ const parent = icon.parent;
315
+ if (!name || typeof parent !== "string" || !icons[parent] && !aliases[parent] || !checkOptionalProps(icon, defaultExtendedIconProps)) return null;
316
+ }
317
+ return data;
318
+ }
319
+
320
+ /**
321
+ * Storage by provider and prefix
322
+ */
323
+ const dataStorage = Object.create(null);
324
+ /**
325
+ * Create new storage
326
+ */
327
+ function newStorage(provider, prefix) {
328
+ return {
329
+ provider,
330
+ prefix,
331
+ icons: Object.create(null),
332
+ missing: /* @__PURE__ */ new Set()
333
+ };
334
+ }
335
+ /**
336
+ * Get storage for provider and prefix
337
+ */
338
+ function getStorage(provider, prefix) {
339
+ const providerStorage = dataStorage[provider] || (dataStorage[provider] = Object.create(null));
340
+ return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
341
+ }
342
+ /**
343
+ * Add icon set to storage
344
+ *
345
+ * Returns array of added icons
346
+ */
347
+ function addIconSet(storage, data) {
348
+ if (!quicklyValidateIconSet(data)) return [];
349
+ return parseIconSet(data, (name, icon) => {
350
+ if (icon) storage.icons[name] = icon;
351
+ else storage.missing.add(name);
352
+ });
353
+ }
354
+ /**
355
+ * Add icon to storage
356
+ */
357
+ function addIconToStorage(storage, name, icon) {
358
+ try {
359
+ if (typeof icon.body === "string") {
360
+ storage.icons[name] = { ...icon };
361
+ return true;
362
+ }
363
+ } catch (err) {}
364
+ return false;
365
+ }
366
+ /**
367
+ * List available icons
368
+ */
369
+ function listIcons$1(provider, prefix) {
370
+ let allIcons = [];
371
+ (typeof provider === "string" ? [provider] : Object.keys(dataStorage)).forEach((provider$1) => {
372
+ (typeof provider$1 === "string" && typeof prefix === "string" ? [prefix] : Object.keys(dataStorage[provider$1] || {})).forEach((prefix$1) => {
373
+ const storage = getStorage(provider$1, prefix$1);
374
+ allIcons = allIcons.concat(Object.keys(storage.icons).map((name) => (provider$1 !== "" ? "@" + provider$1 + ":" : "") + prefix$1 + ":" + name));
375
+ });
376
+ });
377
+ return allIcons;
378
+ }
379
+
380
+ /**
381
+ * Allow storing icons without provider or prefix, making it possible to store icons like "home"
382
+ */
383
+ let simpleNames = false;
384
+ function allowSimpleNames(allow) {
385
+ if (typeof allow === "boolean") simpleNames = allow;
386
+ return simpleNames;
387
+ }
388
+ /**
389
+ * Get icon data
390
+ *
391
+ * Returns:
392
+ * - IconifyIcon on success, object directly from storage so don't modify it
393
+ * - null if icon is marked as missing (returned in `not_found` property from API, so don't bother sending API requests)
394
+ * - undefined if icon is missing in storage
395
+ */
396
+ function getIconData(name) {
397
+ const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
398
+ if (icon) {
399
+ const storage = getStorage(icon.provider, icon.prefix);
400
+ const iconName = icon.name;
401
+ return storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);
402
+ }
403
+ }
404
+ /**
405
+ * Add one icon
406
+ */
407
+ function addIcon$1(name, data) {
408
+ const icon = stringToIcon(name, true, simpleNames);
409
+ if (!icon) return false;
410
+ const storage = getStorage(icon.provider, icon.prefix);
411
+ if (data) return addIconToStorage(storage, icon.name, data);
412
+ else {
413
+ storage.missing.add(icon.name);
414
+ return true;
415
+ }
416
+ }
417
+ /**
418
+ * Add icon set
419
+ */
420
+ function addCollection$1(data, provider) {
421
+ if (typeof data !== "object") return false;
422
+ if (typeof provider !== "string") provider = data.provider || "";
423
+ if (simpleNames && !provider && !data.prefix) {
424
+ let added = false;
425
+ if (quicklyValidateIconSet(data)) {
426
+ data.prefix = "";
427
+ parseIconSet(data, (name, icon) => {
428
+ if (addIcon$1(name, icon)) added = true;
429
+ });
430
+ }
431
+ return added;
432
+ }
433
+ const prefix = data.prefix;
434
+ if (!validateIconName({
435
+ prefix,
436
+ name: "a"
437
+ })) return false;
438
+ return !!addIconSet(getStorage(provider, prefix), data);
439
+ }
440
+ /**
441
+ * Check if icon data is available
442
+ */
443
+ function iconLoaded$1(name) {
444
+ return !!getIconData(name);
445
+ }
446
+ /**
447
+ * Get full icon
448
+ */
449
+ function getIcon$1(name) {
450
+ const result = getIconData(name);
451
+ return result ? {
452
+ ...defaultIconProps,
453
+ ...result
454
+ } : result;
455
+ }
456
+
457
+ /**
458
+ * Remove callback
459
+ */
460
+ function removeCallback(storages, id) {
461
+ storages.forEach((storage) => {
462
+ const items = storage.loaderCallbacks;
463
+ if (items) storage.loaderCallbacks = items.filter((row) => row.id !== id);
464
+ });
465
+ }
466
+ /**
467
+ * Update all callbacks for provider and prefix
468
+ */
469
+ function updateCallbacks(storage) {
470
+ if (!storage.pendingCallbacksFlag) {
471
+ storage.pendingCallbacksFlag = true;
472
+ setTimeout(() => {
473
+ storage.pendingCallbacksFlag = false;
474
+ const items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];
475
+ if (!items.length) return;
476
+ let hasPending = false;
477
+ const provider = storage.provider;
478
+ const prefix = storage.prefix;
479
+ items.forEach((item) => {
480
+ const icons = item.icons;
481
+ const oldLength = icons.pending.length;
482
+ icons.pending = icons.pending.filter((icon) => {
483
+ if (icon.prefix !== prefix) return true;
484
+ const name = icon.name;
485
+ if (storage.icons[name]) icons.loaded.push({
486
+ provider,
487
+ prefix,
488
+ name
489
+ });
490
+ else if (storage.missing.has(name)) icons.missing.push({
491
+ provider,
492
+ prefix,
493
+ name
494
+ });
495
+ else {
496
+ hasPending = true;
497
+ return true;
498
+ }
499
+ return false;
500
+ });
501
+ if (icons.pending.length !== oldLength) {
502
+ if (!hasPending) removeCallback([storage], item.id);
503
+ item.callback(icons.loaded.slice(0), icons.missing.slice(0), icons.pending.slice(0), item.abort);
504
+ }
505
+ });
506
+ });
507
+ }
508
+ }
509
+ /**
510
+ * Unique id counter for callbacks
511
+ */
512
+ let idCounter = 0;
513
+ /**
514
+ * Add callback
515
+ */
516
+ function storeCallback(callback, icons, pendingSources) {
517
+ const id = idCounter++;
518
+ const abort = removeCallback.bind(null, pendingSources, id);
519
+ if (!icons.pending.length) return abort;
520
+ const item = {
521
+ id,
522
+ icons,
523
+ callback,
524
+ abort
525
+ };
526
+ pendingSources.forEach((storage) => {
527
+ (storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);
528
+ });
529
+ return abort;
530
+ }
531
+
532
+ /**
533
+ * Check if icons have been loaded
534
+ */
535
+ function sortIcons(icons) {
536
+ const result = {
537
+ loaded: [],
538
+ missing: [],
539
+ pending: []
540
+ };
541
+ const storage = Object.create(null);
542
+ icons.sort((a, b) => {
543
+ if (a.provider !== b.provider) return a.provider.localeCompare(b.provider);
544
+ if (a.prefix !== b.prefix) return a.prefix.localeCompare(b.prefix);
545
+ return a.name.localeCompare(b.name);
546
+ });
547
+ let lastIcon = {
548
+ provider: "",
549
+ prefix: "",
550
+ name: ""
551
+ };
552
+ icons.forEach((icon) => {
553
+ if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) return;
554
+ lastIcon = icon;
555
+ const provider = icon.provider;
556
+ const prefix = icon.prefix;
557
+ const name = icon.name;
558
+ const providerStorage = storage[provider] || (storage[provider] = Object.create(null));
559
+ const localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));
560
+ let list;
561
+ if (name in localStorage.icons) list = result.loaded;
562
+ else if (prefix === "" || localStorage.missing.has(name)) list = result.missing;
563
+ else list = result.pending;
564
+ const item = {
565
+ provider,
566
+ prefix,
567
+ name
568
+ };
569
+ list.push(item);
570
+ });
571
+ return result;
572
+ }
573
+
574
+ /**
575
+ * Local storate types and entries
576
+ */
577
+ const storage = Object.create(null);
578
+ /**
579
+ * Set API module
580
+ */
581
+ function setAPIModule(provider, item) {
582
+ storage[provider] = item;
583
+ }
584
+ /**
585
+ * Get API module
586
+ */
587
+ function getAPIModule(provider) {
588
+ return storage[provider] || storage[""];
589
+ }
590
+
591
+ /**
592
+ * Convert icons list from string/icon mix to icons and validate them
593
+ */
594
+ function listToIcons(list, validate = true, simpleNames = false) {
595
+ const result = [];
596
+ list.forEach((item) => {
597
+ const icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames) : item;
598
+ if (icon) result.push(icon);
599
+ });
600
+ return result;
601
+ }
602
+
603
+ /**
604
+ * Create full API configuration from partial data
605
+ */
606
+ function createAPIConfig(source) {
607
+ let resources;
608
+ if (typeof source.resources === "string") resources = [source.resources];
609
+ else {
610
+ resources = source.resources;
611
+ if (!(resources instanceof Array) || !resources.length) return null;
612
+ }
613
+ return {
614
+ resources,
615
+ path: source.path || "/",
616
+ maxURL: source.maxURL || 500,
617
+ rotate: source.rotate || 750,
618
+ timeout: source.timeout || 5e3,
619
+ random: source.random === true,
620
+ index: source.index || 0,
621
+ dataAfterTimeout: source.dataAfterTimeout !== false
622
+ };
623
+ }
624
+ /**
625
+ * Local storage
626
+ */
627
+ const configStorage = Object.create(null);
628
+ /**
629
+ * Redundancy for API servers.
630
+ *
631
+ * API should have very high uptime because of implemented redundancy at server level, but
632
+ * sometimes bad things happen. On internet 100% uptime is not possible.
633
+ *
634
+ * There could be routing problems. Server might go down for whatever reason, but it takes
635
+ * few minutes to detect that downtime, so during those few minutes API might not be accessible.
636
+ *
637
+ * This script has some redundancy to mitigate possible network issues.
638
+ *
639
+ * If one host cannot be reached in 'rotate' (750 by default) ms, script will try to retrieve
640
+ * data from different host. Hosts have different configurations, pointing to different
641
+ * API servers hosted at different providers.
642
+ */
643
+ const fallBackAPISources = ["https://api.simplesvg.com", "https://api.unisvg.com"];
644
+ const fallBackAPI = [];
645
+ while (fallBackAPISources.length > 0) if (fallBackAPISources.length === 1) fallBackAPI.push(fallBackAPISources.shift());
646
+ else if (Math.random() > .5) fallBackAPI.push(fallBackAPISources.shift());
647
+ else fallBackAPI.push(fallBackAPISources.pop());
648
+ configStorage[""] = createAPIConfig({ resources: ["https://api.iconify.design"].concat(fallBackAPI) });
649
+ /**
650
+ * Add custom config for provider
651
+ */
652
+ function addAPIProvider$1(provider, customConfig) {
653
+ const config = createAPIConfig(customConfig);
654
+ if (config === null) return false;
655
+ configStorage[provider] = config;
656
+ return true;
657
+ }
658
+ /**
659
+ * Get API configuration
660
+ */
661
+ function getAPIConfig(provider) {
662
+ return configStorage[provider];
663
+ }
664
+ /**
665
+ * List API providers
666
+ */
667
+ function listAPIProviders() {
668
+ return Object.keys(configStorage);
669
+ }
670
+
671
+ /**
672
+ * Default RedundancyConfig for API calls
673
+ */
674
+ const defaultConfig = {
675
+ resources: [],
676
+ index: 0,
677
+ timeout: 2e3,
678
+ rotate: 750,
679
+ random: false,
680
+ dataAfterTimeout: false
681
+ };
682
+
683
+ /**
684
+ * Send query
685
+ */
686
+ function sendQuery(config, payload, query, done) {
687
+ const resourcesCount = config.resources.length;
688
+ const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
689
+ let resources;
690
+ if (config.random) {
691
+ let list = config.resources.slice(0);
692
+ resources = [];
693
+ while (list.length > 1) {
694
+ const nextIndex = Math.floor(Math.random() * list.length);
695
+ resources.push(list[nextIndex]);
696
+ list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
697
+ }
698
+ resources = resources.concat(list);
699
+ } else resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
700
+ const startTime = Date.now();
701
+ let status = "pending";
702
+ let queriesSent = 0;
703
+ let lastError;
704
+ let timer = null;
705
+ let queue = [];
706
+ let doneCallbacks = [];
707
+ if (typeof done === "function") doneCallbacks.push(done);
708
+ /**
709
+ * Reset timer
710
+ */
711
+ function resetTimer() {
712
+ if (timer) {
713
+ clearTimeout(timer);
714
+ timer = null;
715
+ }
716
+ }
717
+ /**
718
+ * Abort everything
719
+ */
720
+ function abort() {
721
+ if (status === "pending") status = "aborted";
722
+ resetTimer();
723
+ queue.forEach((item) => {
724
+ if (item.status === "pending") item.status = "aborted";
725
+ });
726
+ queue = [];
727
+ }
728
+ /**
729
+ * Add / replace callback to call when execution is complete.
730
+ * This can be used to abort pending query implementations when query is complete or aborted.
731
+ */
732
+ function subscribe(callback, overwrite) {
733
+ if (overwrite) doneCallbacks = [];
734
+ if (typeof callback === "function") doneCallbacks.push(callback);
735
+ }
736
+ /**
737
+ * Get query status
738
+ */
739
+ function getQueryStatus() {
740
+ return {
741
+ startTime,
742
+ payload,
743
+ status,
744
+ queriesSent,
745
+ queriesPending: queue.length,
746
+ subscribe,
747
+ abort
748
+ };
749
+ }
750
+ /**
751
+ * Fail query
752
+ */
753
+ function failQuery() {
754
+ status = "failed";
755
+ doneCallbacks.forEach((callback) => {
756
+ callback(void 0, lastError);
757
+ });
758
+ }
759
+ /**
760
+ * Clear queue
761
+ */
762
+ function clearQueue() {
763
+ queue.forEach((item) => {
764
+ if (item.status === "pending") item.status = "aborted";
765
+ });
766
+ queue = [];
767
+ }
768
+ /**
769
+ * Got response from module
770
+ */
771
+ function moduleResponse(item, response, data) {
772
+ const isError = response !== "success";
773
+ queue = queue.filter((queued) => queued !== item);
774
+ switch (status) {
775
+ case "pending": break;
776
+ case "failed":
777
+ if (isError || !config.dataAfterTimeout) return;
778
+ break;
779
+ default: return;
780
+ }
781
+ if (response === "abort") {
782
+ lastError = data;
783
+ failQuery();
784
+ return;
785
+ }
786
+ if (isError) {
787
+ lastError = data;
788
+ if (!queue.length) if (!resources.length) failQuery();
789
+ else execNext();
790
+ return;
791
+ }
792
+ resetTimer();
793
+ clearQueue();
794
+ if (!config.random) {
795
+ const index = config.resources.indexOf(item.resource);
796
+ if (index !== -1 && index !== config.index) config.index = index;
797
+ }
798
+ status = "completed";
799
+ doneCallbacks.forEach((callback) => {
800
+ callback(data);
801
+ });
802
+ }
803
+ /**
804
+ * Execute next query
805
+ */
806
+ function execNext() {
807
+ if (status !== "pending") return;
808
+ resetTimer();
809
+ const resource = resources.shift();
810
+ if (resource === void 0) {
811
+ if (queue.length) {
812
+ timer = setTimeout(() => {
813
+ resetTimer();
814
+ if (status === "pending") {
815
+ clearQueue();
816
+ failQuery();
817
+ }
818
+ }, config.timeout);
819
+ return;
820
+ }
821
+ failQuery();
822
+ return;
823
+ }
824
+ const item = {
825
+ status: "pending",
826
+ resource,
827
+ callback: (status$1, data) => {
828
+ moduleResponse(item, status$1, data);
829
+ }
830
+ };
831
+ queue.push(item);
832
+ queriesSent++;
833
+ timer = setTimeout(execNext, config.rotate);
834
+ query(resource, payload, item.callback);
835
+ }
836
+ setTimeout(execNext);
837
+ return getQueryStatus;
838
+ }
839
+
840
+ /**
841
+ * Redundancy instance
842
+ */
843
+ function initRedundancy(cfg) {
844
+ const config = {
845
+ ...defaultConfig,
846
+ ...cfg
847
+ };
848
+ let queries = [];
849
+ /**
850
+ * Remove aborted and completed queries
851
+ */
852
+ function cleanup() {
853
+ queries = queries.filter((item) => item().status === "pending");
854
+ }
855
+ /**
856
+ * Send query
857
+ */
858
+ function query(payload, queryCallback, doneCallback) {
859
+ const query$1 = sendQuery(config, payload, queryCallback, (data, error) => {
860
+ cleanup();
861
+ if (doneCallback) doneCallback(data, error);
862
+ });
863
+ queries.push(query$1);
864
+ return query$1;
865
+ }
866
+ /**
867
+ * Find instance
868
+ */
869
+ function find(callback) {
870
+ return queries.find((value) => {
871
+ return callback(value);
872
+ }) || null;
873
+ }
874
+ return {
875
+ query,
876
+ find,
877
+ setIndex: (index) => {
878
+ config.index = index;
879
+ },
880
+ getIndex: () => config.index,
881
+ cleanup
882
+ };
883
+ }
884
+
885
+ function emptyCallback$1() {}
886
+ const redundancyCache = Object.create(null);
887
+ /**
888
+ * Get Redundancy instance for provider
889
+ */
890
+ function getRedundancyCache(provider) {
891
+ if (!redundancyCache[provider]) {
892
+ const config = getAPIConfig(provider);
893
+ if (!config) return;
894
+ redundancyCache[provider] = {
895
+ config,
896
+ redundancy: initRedundancy(config)
897
+ };
898
+ }
899
+ return redundancyCache[provider];
900
+ }
901
+ /**
902
+ * Send API query
903
+ */
904
+ function sendAPIQuery(target, query, callback) {
905
+ let redundancy;
906
+ let send;
907
+ if (typeof target === "string") {
908
+ const api = getAPIModule(target);
909
+ if (!api) {
910
+ callback(void 0, 424);
911
+ return emptyCallback$1;
912
+ }
913
+ send = api.send;
914
+ const cached = getRedundancyCache(target);
915
+ if (cached) redundancy = cached.redundancy;
916
+ } else {
917
+ const config = createAPIConfig(target);
918
+ if (config) {
919
+ redundancy = initRedundancy(config);
920
+ const api = getAPIModule(target.resources ? target.resources[0] : "");
921
+ if (api) send = api.send;
922
+ }
923
+ }
924
+ if (!redundancy || !send) {
925
+ callback(void 0, 424);
926
+ return emptyCallback$1;
927
+ }
928
+ return redundancy.query(query, send, callback)().abort;
929
+ }
930
+
931
+ function emptyCallback() {}
932
+ /**
933
+ * Function called when new icons have been loaded
934
+ */
935
+ function loadedNewIcons(storage) {
936
+ if (!storage.iconsLoaderFlag) {
937
+ storage.iconsLoaderFlag = true;
938
+ setTimeout(() => {
939
+ storage.iconsLoaderFlag = false;
940
+ updateCallbacks(storage);
941
+ });
942
+ }
943
+ }
944
+ /**
945
+ * Check icon names for API
946
+ */
947
+ function checkIconNamesForAPI(icons) {
948
+ const valid = [];
949
+ const invalid = [];
950
+ icons.forEach((name) => {
951
+ (name.match(matchIconName) ? valid : invalid).push(name);
952
+ });
953
+ return {
954
+ valid,
955
+ invalid
956
+ };
957
+ }
958
+ /**
959
+ * Parse loader response
960
+ */
961
+ function parseLoaderResponse(storage, icons, data) {
962
+ function checkMissing() {
963
+ const pending = storage.pendingIcons;
964
+ icons.forEach((name) => {
965
+ if (pending) pending.delete(name);
966
+ if (!storage.icons[name]) storage.missing.add(name);
967
+ });
968
+ }
969
+ if (data && typeof data === "object") try {
970
+ if (!addIconSet(storage, data).length) {
971
+ checkMissing();
972
+ return;
973
+ }
974
+ } catch (err) {
975
+ console.error(err);
976
+ }
977
+ checkMissing();
978
+ loadedNewIcons(storage);
979
+ }
980
+ /**
981
+ * Handle response that can be async
982
+ */
983
+ function parsePossiblyAsyncResponse(response, callback) {
984
+ if (response instanceof Promise) response.then((data) => {
985
+ callback(data);
986
+ }).catch(() => {
987
+ callback(null);
988
+ });
989
+ else callback(response);
990
+ }
991
+ /**
992
+ * Load icons
993
+ */
994
+ function loadNewIcons(storage, icons) {
995
+ if (!storage.iconsToLoad) storage.iconsToLoad = icons;
996
+ else storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();
997
+ if (!storage.iconsQueueFlag) {
998
+ storage.iconsQueueFlag = true;
999
+ setTimeout(() => {
1000
+ storage.iconsQueueFlag = false;
1001
+ const { provider, prefix } = storage;
1002
+ const icons$1 = storage.iconsToLoad;
1003
+ delete storage.iconsToLoad;
1004
+ if (!icons$1 || !icons$1.length) return;
1005
+ const customIconLoader = storage.loadIcon;
1006
+ if (storage.loadIcons && (icons$1.length > 1 || !customIconLoader)) {
1007
+ parsePossiblyAsyncResponse(storage.loadIcons(icons$1, prefix, provider), (data) => {
1008
+ parseLoaderResponse(storage, icons$1, data);
1009
+ });
1010
+ return;
1011
+ }
1012
+ if (customIconLoader) {
1013
+ icons$1.forEach((name) => {
1014
+ parsePossiblyAsyncResponse(customIconLoader(name, prefix, provider), (data) => {
1015
+ parseLoaderResponse(storage, [name], data ? {
1016
+ prefix,
1017
+ icons: { [name]: data }
1018
+ } : null);
1019
+ });
1020
+ });
1021
+ return;
1022
+ }
1023
+ const { valid, invalid } = checkIconNamesForAPI(icons$1);
1024
+ if (invalid.length) parseLoaderResponse(storage, invalid, null);
1025
+ if (!valid.length) return;
1026
+ const api = prefix.match(matchIconName) ? getAPIModule(provider) : null;
1027
+ if (!api) {
1028
+ parseLoaderResponse(storage, valid, null);
1029
+ return;
1030
+ }
1031
+ api.prepare(provider, prefix, valid).forEach((item) => {
1032
+ sendAPIQuery(provider, item, (data) => {
1033
+ parseLoaderResponse(storage, item.icons, data);
1034
+ });
1035
+ });
1036
+ });
1037
+ }
1038
+ }
1039
+ /**
1040
+ * Load icons
1041
+ */
1042
+ const loadIcons$1 = (icons, callback) => {
1043
+ const sortedIcons = sortIcons(listToIcons(icons, true, allowSimpleNames()));
1044
+ if (!sortedIcons.pending.length) {
1045
+ let callCallback = true;
1046
+ if (callback) setTimeout(() => {
1047
+ if (callCallback) callback(sortedIcons.loaded, sortedIcons.missing, sortedIcons.pending, emptyCallback);
1048
+ });
1049
+ return () => {
1050
+ callCallback = false;
1051
+ };
1052
+ }
1053
+ const newIcons = Object.create(null);
1054
+ const sources = [];
1055
+ let lastProvider, lastPrefix;
1056
+ sortedIcons.pending.forEach((icon) => {
1057
+ const { provider, prefix } = icon;
1058
+ if (prefix === lastPrefix && provider === lastProvider) return;
1059
+ lastProvider = provider;
1060
+ lastPrefix = prefix;
1061
+ sources.push(getStorage(provider, prefix));
1062
+ const providerNewIcons = newIcons[provider] || (newIcons[provider] = Object.create(null));
1063
+ if (!providerNewIcons[prefix]) providerNewIcons[prefix] = [];
1064
+ });
1065
+ sortedIcons.pending.forEach((icon) => {
1066
+ const { provider, prefix, name } = icon;
1067
+ const storage = getStorage(provider, prefix);
1068
+ const pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());
1069
+ if (!pendingQueue.has(name)) {
1070
+ pendingQueue.add(name);
1071
+ newIcons[provider][prefix].push(name);
1072
+ }
1073
+ });
1074
+ sources.forEach((storage) => {
1075
+ const list = newIcons[storage.provider][storage.prefix];
1076
+ if (list.length) loadNewIcons(storage, list);
1077
+ });
1078
+ return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
1079
+ };
1080
+ /**
1081
+ * Load one icon using Promise
1082
+ */
1083
+ const loadIcon$1 = (icon) => {
1084
+ return new Promise((fulfill, reject) => {
1085
+ const iconObj = typeof icon === "string" ? stringToIcon(icon, true) : icon;
1086
+ if (!iconObj) {
1087
+ reject(icon);
1088
+ return;
1089
+ }
1090
+ loadIcons$1([iconObj || icon], (loaded) => {
1091
+ if (loaded.length && iconObj) {
1092
+ const data = getIconData(iconObj);
1093
+ if (data) {
1094
+ fulfill({
1095
+ ...defaultIconProps,
1096
+ ...data
1097
+ });
1098
+ return;
1099
+ }
1100
+ }
1101
+ reject(icon);
1102
+ });
1103
+ });
1104
+ };
1105
+
1106
+ /**
1107
+ * Test icon string
1108
+ */
1109
+ function testIconObject(value) {
1110
+ try {
1111
+ const obj = typeof value === 'string' ? JSON.parse(value) : value;
1112
+ if (typeof obj.body === 'string') {
1113
+ return {
1114
+ ...obj,
1115
+ };
1116
+ }
1117
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1118
+ }
1119
+ catch (err) {
1120
+ //
1121
+ }
1122
+ }
1123
+
1124
+ /**
1125
+ * Parse icon value, load if needed
1126
+ */
1127
+ function parseIconValue(value, onload) {
1128
+ if (typeof value === 'object') {
1129
+ const data = testIconObject(value);
1130
+ return {
1131
+ data,
1132
+ value,
1133
+ };
1134
+ }
1135
+ if (typeof value !== 'string') {
1136
+ // Invalid value
1137
+ return {
1138
+ value,
1139
+ };
1140
+ }
1141
+ // Check for JSON
1142
+ if (value.includes('{')) {
1143
+ const data = testIconObject(value);
1144
+ if (data) {
1145
+ return {
1146
+ data,
1147
+ value,
1148
+ };
1149
+ }
1150
+ }
1151
+ // Parse icon name
1152
+ const name = stringToIcon(value, true, true);
1153
+ if (!name) {
1154
+ return {
1155
+ value,
1156
+ };
1157
+ }
1158
+ // Valid icon name: check if data is available
1159
+ const data = getIconData(name);
1160
+ // Icon data exists or icon has no prefix. Do not load icon from API if icon has no prefix
1161
+ if (data !== undefined || !name.prefix) {
1162
+ return {
1163
+ value,
1164
+ name,
1165
+ data, // could be 'null' -> icon is missing
1166
+ };
1167
+ }
1168
+ // Load icon
1169
+ const loading = loadIcons$1([name], () => onload(value, name, getIconData(name)));
1170
+ return {
1171
+ value,
1172
+ name,
1173
+ loading,
1174
+ };
1175
+ }
1176
+
1177
+ // Check for Safari
1178
+ let isBuggedSafari = false;
1179
+ try {
1180
+ isBuggedSafari = navigator.vendor.indexOf('Apple') === 0;
1181
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1182
+ }
1183
+ catch (err) {
1184
+ //
1185
+ }
1186
+ /**
1187
+ * Get render mode
1188
+ */
1189
+ function getRenderMode(body, mode) {
1190
+ switch (mode) {
1191
+ // Force mode
1192
+ case 'svg':
1193
+ case 'bg':
1194
+ case 'mask':
1195
+ return mode;
1196
+ }
1197
+ // Check for animation, use 'style' for animated icons, unless browser is Safari
1198
+ // (only <a>, which should be ignored or animations start with '<a')
1199
+ if (mode !== 'style' &&
1200
+ (isBuggedSafari || body.indexOf('<a') === -1)) {
1201
+ // Render <svg>
1202
+ return 'svg';
1203
+ }
1204
+ // Use background or mask
1205
+ return body.indexOf('currentColor') === -1 ? 'bg' : 'mask';
1206
+ }
1207
+
1208
+ /**
1209
+ * Regular expressions for calculating dimensions
1210
+ */
1211
+ const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
1212
+ const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1213
+ function calculateSize$1(size, ratio, precision) {
1214
+ if (ratio === 1) return size;
1215
+ precision = precision || 100;
1216
+ if (typeof size === "number") return Math.ceil(size * ratio * precision) / precision;
1217
+ if (typeof size !== "string") return size;
1218
+ const oldParts = size.split(unitsSplit);
1219
+ if (oldParts === null || !oldParts.length) return size;
1220
+ const newParts = [];
1221
+ let code = oldParts.shift();
1222
+ let isNumber = unitsTest.test(code);
1223
+ while (true) {
1224
+ if (isNumber) {
1225
+ const num = parseFloat(code);
1226
+ if (isNaN(num)) newParts.push(code);
1227
+ else newParts.push(Math.ceil(num * ratio * precision) / precision);
1228
+ } else newParts.push(code);
1229
+ code = oldParts.shift();
1230
+ if (code === void 0) return newParts.join("");
1231
+ isNumber = !isNumber;
1232
+ }
1233
+ }
1234
+
1235
+ function splitSVGDefs(content, tag = "defs") {
1236
+ let defs = "";
1237
+ const index = content.indexOf("<" + tag);
1238
+ while (index >= 0) {
1239
+ const start = content.indexOf(">", index);
1240
+ const end = content.indexOf("</" + tag);
1241
+ if (start === -1 || end === -1) break;
1242
+ const endEnd = content.indexOf(">", end);
1243
+ if (endEnd === -1) break;
1244
+ defs += content.slice(start + 1, end).trim();
1245
+ content = content.slice(0, index).trim() + content.slice(endEnd + 1);
1246
+ }
1247
+ return {
1248
+ defs,
1249
+ content
1250
+ };
1251
+ }
1252
+ /**
1253
+ * Merge defs and content
1254
+ */
1255
+ function mergeDefsAndContent(defs, content) {
1256
+ return defs ? "<defs>" + defs + "</defs>" + content : content;
1257
+ }
1258
+ /**
1259
+ * Wrap SVG content, without wrapping definitions
1260
+ */
1261
+ function wrapSVGContent(body, start, end) {
1262
+ const split = splitSVGDefs(body);
1263
+ return mergeDefsAndContent(split.defs, start + split.content + end);
1264
+ }
1265
+
1266
+ /**
1267
+ * Check if value should be unset. Allows multiple keywords
1268
+ */
1269
+ const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
1270
+ /**
1271
+ * Get SVG attributes and content from icon + customisations
1272
+ *
1273
+ * Does not generate style to make it compatible with frameworks that use objects for style, such as React.
1274
+ * Instead, it generates 'inline' value. If true, rendering engine should add verticalAlign: -0.125em to icon.
1275
+ *
1276
+ * Customisations should be normalised by platform specific parser.
1277
+ * Result should be converted to <svg> by platform specific parser.
1278
+ * Use replaceIDs to generate unique IDs for body.
1279
+ */
1280
+ function iconToSVG(icon, customisations) {
1281
+ const fullIcon = {
1282
+ ...defaultIconProps,
1283
+ ...icon
1284
+ };
1285
+ const fullCustomisations = {
1286
+ ...defaultIconCustomisations,
1287
+ ...customisations
1288
+ };
1289
+ const box = {
1290
+ left: fullIcon.left,
1291
+ top: fullIcon.top,
1292
+ width: fullIcon.width,
1293
+ height: fullIcon.height
1294
+ };
1295
+ let body = fullIcon.body;
1296
+ [fullIcon, fullCustomisations].forEach((props) => {
1297
+ const transformations = [];
1298
+ const hFlip = props.hFlip;
1299
+ const vFlip = props.vFlip;
1300
+ let rotation = props.rotate;
1301
+ if (hFlip) if (vFlip) rotation += 2;
1302
+ else {
1303
+ transformations.push("translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")");
1304
+ transformations.push("scale(-1 1)");
1305
+ box.top = box.left = 0;
1306
+ }
1307
+ else if (vFlip) {
1308
+ transformations.push("translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")");
1309
+ transformations.push("scale(1 -1)");
1310
+ box.top = box.left = 0;
1311
+ }
1312
+ let tempValue;
1313
+ if (rotation < 0) rotation -= Math.floor(rotation / 4) * 4;
1314
+ rotation = rotation % 4;
1315
+ switch (rotation) {
1316
+ case 1:
1317
+ tempValue = box.height / 2 + box.top;
1318
+ transformations.unshift("rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")");
1319
+ break;
1320
+ case 2:
1321
+ transformations.unshift("rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")");
1322
+ break;
1323
+ case 3:
1324
+ tempValue = box.width / 2 + box.left;
1325
+ transformations.unshift("rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")");
1326
+ break;
1327
+ }
1328
+ if (rotation % 2 === 1) {
1329
+ if (box.left !== box.top) {
1330
+ tempValue = box.left;
1331
+ box.left = box.top;
1332
+ box.top = tempValue;
1333
+ }
1334
+ if (box.width !== box.height) {
1335
+ tempValue = box.width;
1336
+ box.width = box.height;
1337
+ box.height = tempValue;
1338
+ }
1339
+ }
1340
+ if (transformations.length) body = wrapSVGContent(body, "<g transform=\"" + transformations.join(" ") + "\">", "</g>");
1341
+ });
1342
+ const customisationsWidth = fullCustomisations.width;
1343
+ const customisationsHeight = fullCustomisations.height;
1344
+ const boxWidth = box.width;
1345
+ const boxHeight = box.height;
1346
+ let width;
1347
+ let height;
1348
+ if (customisationsWidth === null) {
1349
+ height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1350
+ width = calculateSize$1(height, boxWidth / boxHeight);
1351
+ } else {
1352
+ width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
1353
+ height = customisationsHeight === null ? calculateSize$1(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
1354
+ }
1355
+ const attributes = {};
1356
+ const setAttr = (prop, value) => {
1357
+ if (!isUnsetKeyword(value)) attributes[prop] = value.toString();
1358
+ };
1359
+ setAttr("width", width);
1360
+ setAttr("height", height);
1361
+ const viewBox = [
1362
+ box.left,
1363
+ box.top,
1364
+ boxWidth,
1365
+ boxHeight
1366
+ ];
1367
+ attributes.viewBox = viewBox.join(" ");
1368
+ return {
1369
+ attributes,
1370
+ viewBox,
1371
+ body
1372
+ };
1373
+ }
1374
+
1375
+ /**
1376
+ * Generate <svg>
1377
+ */
1378
+ function iconToHTML$1(body, attributes) {
1379
+ let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
1380
+ for (const attr in attributes) renderAttribsHTML += " " + attr + "=\"" + attributes[attr] + "\"";
1381
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + renderAttribsHTML + ">" + body + "</svg>";
1382
+ }
1383
+
1384
+ /**
1385
+ * Encode SVG for use in url()
1386
+ *
1387
+ * Short alternative to encodeURIComponent() that encodes only stuff used in SVG, generating
1388
+ * smaller code.
1389
+ */
1390
+ function encodeSVGforURL(svg) {
1391
+ return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1392
+ }
1393
+ /**
1394
+ * Generate data: URL from SVG
1395
+ */
1396
+ function svgToData(svg) {
1397
+ return "data:image/svg+xml," + encodeSVGforURL(svg);
1398
+ }
1399
+ /**
1400
+ * Generate url() from SVG
1401
+ */
1402
+ function svgToURL$1(svg) {
1403
+ return "url(\"" + svgToData(svg) + "\")";
1404
+ }
1405
+
1406
+ const detectFetch = () => {
1407
+ let callback;
1408
+ try {
1409
+ callback = fetch;
1410
+ if (typeof callback === "function") return callback;
1411
+ } catch (err) {}
1412
+ };
1413
+ /**
1414
+ * Fetch function
1415
+ */
1416
+ let fetchModule = detectFetch();
1417
+ /**
1418
+ * Set custom fetch() function
1419
+ */
1420
+ function setFetch(fetch$1) {
1421
+ fetchModule = fetch$1;
1422
+ }
1423
+ /**
1424
+ * Get fetch() function. Used by Icon Finder Core
1425
+ */
1426
+ function getFetch() {
1427
+ return fetchModule;
1428
+ }
1429
+ /**
1430
+ * Calculate maximum icons list length for prefix
1431
+ */
1432
+ function calculateMaxLength(provider, prefix) {
1433
+ const config = getAPIConfig(provider);
1434
+ if (!config) return 0;
1435
+ let result;
1436
+ if (!config.maxURL) result = 0;
1437
+ else {
1438
+ let maxHostLength = 0;
1439
+ config.resources.forEach((item) => {
1440
+ const host = item;
1441
+ maxHostLength = Math.max(maxHostLength, host.length);
1442
+ });
1443
+ const url = prefix + ".json?icons=";
1444
+ result = config.maxURL - maxHostLength - config.path.length - url.length;
1445
+ }
1446
+ return result;
1447
+ }
1448
+ /**
1449
+ * Should query be aborted, based on last HTTP status
1450
+ */
1451
+ function shouldAbort(status) {
1452
+ return status === 404;
1453
+ }
1454
+ /**
1455
+ * Prepare params
1456
+ */
1457
+ const prepare = (provider, prefix, icons) => {
1458
+ const results = [];
1459
+ const maxLength = calculateMaxLength(provider, prefix);
1460
+ const type = "icons";
1461
+ let item = {
1462
+ type,
1463
+ provider,
1464
+ prefix,
1465
+ icons: []
1466
+ };
1467
+ let length = 0;
1468
+ icons.forEach((name, index) => {
1469
+ length += name.length + 1;
1470
+ if (length >= maxLength && index > 0) {
1471
+ results.push(item);
1472
+ item = {
1473
+ type,
1474
+ provider,
1475
+ prefix,
1476
+ icons: []
1477
+ };
1478
+ length = name.length;
1479
+ }
1480
+ item.icons.push(name);
1481
+ });
1482
+ results.push(item);
1483
+ return results;
1484
+ };
1485
+ /**
1486
+ * Get path
1487
+ */
1488
+ function getPath(provider) {
1489
+ if (typeof provider === "string") {
1490
+ const config = getAPIConfig(provider);
1491
+ if (config) return config.path;
1492
+ }
1493
+ return "/";
1494
+ }
1495
+ /**
1496
+ * Load icons
1497
+ */
1498
+ const send = (host, params, callback) => {
1499
+ if (!fetchModule) {
1500
+ callback("abort", 424);
1501
+ return;
1502
+ }
1503
+ let path = getPath(params.provider);
1504
+ switch (params.type) {
1505
+ case "icons": {
1506
+ const prefix = params.prefix;
1507
+ const iconsList = params.icons.join(",");
1508
+ const urlParams = new URLSearchParams({ icons: iconsList });
1509
+ path += prefix + ".json?" + urlParams.toString();
1510
+ break;
1511
+ }
1512
+ case "custom": {
1513
+ const uri = params.uri;
1514
+ path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
1515
+ break;
1516
+ }
1517
+ default:
1518
+ callback("abort", 400);
1519
+ return;
1520
+ }
1521
+ let defaultError = 503;
1522
+ fetchModule(host + path).then((response) => {
1523
+ const status = response.status;
1524
+ if (status !== 200) {
1525
+ setTimeout(() => {
1526
+ callback(shouldAbort(status) ? "abort" : "next", status);
1527
+ });
1528
+ return;
1529
+ }
1530
+ defaultError = 501;
1531
+ return response.json();
1532
+ }).then((data) => {
1533
+ if (typeof data !== "object" || data === null) {
1534
+ setTimeout(() => {
1535
+ if (data === 404) callback("abort", data);
1536
+ else callback("next", defaultError);
1537
+ });
1538
+ return;
1539
+ }
1540
+ setTimeout(() => {
1541
+ callback("success", data);
1542
+ });
1543
+ }).catch(() => {
1544
+ callback("next", defaultError);
1545
+ });
1546
+ };
1547
+ /**
1548
+ * Export module
1549
+ */
1550
+ const fetchAPIModule = {
1551
+ prepare,
1552
+ send
1553
+ };
1554
+
1555
+ /**
1556
+ * Set custom loader for multiple icons
1557
+ */
1558
+ function setCustomIconsLoader$1(loader, prefix, provider) {
1559
+ getStorage(provider || "", prefix).loadIcons = loader;
1560
+ }
1561
+ /**
1562
+ * Set custom loader for one icon
1563
+ */
1564
+ function setCustomIconLoader$1(loader, prefix, provider) {
1565
+ getStorage(provider || "", prefix).loadIcon = loader;
1566
+ }
1567
+
1568
+ /**
1569
+ * Attribute to add
1570
+ */
1571
+ const nodeAttr = 'data-style';
1572
+ /**
1573
+ * Custom style to add to each node
1574
+ */
1575
+ let customStyle = '';
1576
+ /**
1577
+ * Set custom style to add to all components
1578
+ *
1579
+ * Affects only components rendered after function call
1580
+ */
1581
+ function appendCustomStyle(style) {
1582
+ customStyle = style;
1583
+ }
1584
+ /**
1585
+ * Add/update style node
1586
+ */
1587
+ function updateStyle(parent, inline) {
1588
+ // Get node, create if needed
1589
+ let styleNode = Array.from(parent.childNodes).find((node) => node.hasAttribute &&
1590
+ node.hasAttribute(nodeAttr));
1591
+ if (!styleNode) {
1592
+ styleNode = document.createElement('style');
1593
+ styleNode.setAttribute(nodeAttr, nodeAttr);
1594
+ parent.appendChild(styleNode);
1595
+ }
1596
+ // Update content
1597
+ styleNode.textContent =
1598
+ ':host{display:inline-block;vertical-align:' +
1599
+ (inline ? '-0.125em' : '0') +
1600
+ '}span,svg{display:block;margin:auto}' +
1601
+ customStyle;
1602
+ }
1603
+
1604
+ // Core
1605
+ /**
1606
+ * Get functions and initialise stuff
1607
+ */
1608
+ function exportFunctions() {
1609
+ /**
1610
+ * Initialise stuff
1611
+ */
1612
+ // Set API module
1613
+ setAPIModule('', fetchAPIModule);
1614
+ // Allow simple icon names
1615
+ allowSimpleNames(true);
1616
+ let _window;
1617
+ try {
1618
+ _window = window;
1619
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1620
+ }
1621
+ catch (err) {
1622
+ //
1623
+ }
1624
+ if (_window) {
1625
+ // Load icons from global "IconifyPreload"
1626
+ if (_window.IconifyPreload !== void 0) {
1627
+ const preload = _window.IconifyPreload;
1628
+ const err = 'Invalid IconifyPreload syntax.';
1629
+ if (typeof preload === 'object' && preload !== null) {
1630
+ (preload instanceof Array ? preload : [preload]).forEach((item) => {
1631
+ try {
1632
+ if (
1633
+ // Check if item is an object and not null/array
1634
+ typeof item !== 'object' ||
1635
+ item === null ||
1636
+ item instanceof Array ||
1637
+ // Check for 'icons' and 'prefix'
1638
+ typeof item.icons !== 'object' ||
1639
+ typeof item.prefix !== 'string' ||
1640
+ // Add icon set
1641
+ !addCollection$1(item)) {
1642
+ console.error(err);
1643
+ }
1644
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1645
+ }
1646
+ catch (e) {
1647
+ console.error(err);
1648
+ }
1649
+ });
1650
+ }
1651
+ }
1652
+ // Set API from global "IconifyProviders"
1653
+ if (_window.IconifyProviders !== void 0) {
1654
+ const providers = _window.IconifyProviders;
1655
+ if (typeof providers === 'object' && providers !== null) {
1656
+ for (const key in providers) {
1657
+ const err = 'IconifyProviders[' + key + '] is invalid.';
1658
+ try {
1659
+ const value = providers[key];
1660
+ if (typeof value !== 'object' ||
1661
+ !value ||
1662
+ value.resources === void 0) {
1663
+ continue;
1664
+ }
1665
+ if (!addAPIProvider$1(key, value)) {
1666
+ console.error(err);
1667
+ }
1668
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1669
+ }
1670
+ catch (e) {
1671
+ console.error(err);
1672
+ }
1673
+ }
1674
+ }
1675
+ }
1676
+ }
1677
+ const _api = {
1678
+ getAPIConfig,
1679
+ setAPIModule,
1680
+ sendAPIQuery,
1681
+ setFetch,
1682
+ getFetch,
1683
+ listAPIProviders,
1684
+ };
1685
+ return {
1686
+ iconLoaded: iconLoaded$1,
1687
+ getIcon: getIcon$1,
1688
+ listIcons: listIcons$1,
1689
+ addIcon: addIcon$1,
1690
+ addCollection: addCollection$1,
1691
+ calculateSize: calculateSize$1,
1692
+ buildIcon: iconToSVG,
1693
+ iconToHTML: iconToHTML$1,
1694
+ svgToURL: svgToURL$1,
1695
+ loadIcons: loadIcons$1,
1696
+ loadIcon: loadIcon$1,
1697
+ addAPIProvider: addAPIProvider$1,
1698
+ setCustomIconLoader: setCustomIconLoader$1,
1699
+ setCustomIconsLoader: setCustomIconsLoader$1,
1700
+ appendCustomStyle,
1701
+ _api,
1702
+ };
1703
+ }
1704
+
1705
+ // List of properties to apply
1706
+ const monotoneProps = {
1707
+ 'background-color': 'currentColor',
1708
+ };
1709
+ const coloredProps = {
1710
+ 'background-color': 'transparent',
1711
+ };
1712
+ // Dynamically add common props to variables above
1713
+ const propsToAdd = {
1714
+ image: 'var(--svg)',
1715
+ repeat: 'no-repeat',
1716
+ size: '100% 100%',
1717
+ };
1718
+ const propsToAddTo = {
1719
+ '-webkit-mask': monotoneProps,
1720
+ 'mask': monotoneProps,
1721
+ 'background': coloredProps,
1722
+ };
1723
+ for (const prefix in propsToAddTo) {
1724
+ const list = propsToAddTo[prefix];
1725
+ for (const prop in propsToAdd) {
1726
+ list[prefix + '-' + prop] = propsToAdd[prop];
1727
+ }
1728
+ }
1729
+ /**
1730
+ * Fix size: add 'px' to numbers
1731
+ */
1732
+ function fixSize(value) {
1733
+ return value ? value + (value.match(/^[-0-9.]+$/) ? 'px' : '') : 'inherit';
1734
+ }
1735
+ /**
1736
+ * Render node as <span>
1737
+ */
1738
+ function renderSPAN(data, icon, useMask) {
1739
+ const node = document.createElement('span');
1740
+ // Body
1741
+ let body = data.body;
1742
+ if (body.indexOf('<a') !== -1) {
1743
+ // Animated SVG: add something to fix timing bug
1744
+ body += '<!-- ' + Date.now() + ' -->';
1745
+ }
1746
+ // Generate SVG as URL
1747
+ const renderAttribs = data.attributes;
1748
+ const html = iconToHTML$1(body, {
1749
+ ...renderAttribs,
1750
+ width: icon.width + '',
1751
+ height: icon.height + '',
1752
+ });
1753
+ const url = svgToURL$1(html);
1754
+ // Generate style
1755
+ const svgStyle = node.style;
1756
+ const styles = {
1757
+ '--svg': url,
1758
+ 'width': fixSize(renderAttribs.width),
1759
+ 'height': fixSize(renderAttribs.height),
1760
+ ...(useMask ? monotoneProps : coloredProps),
1761
+ };
1762
+ // Apply style
1763
+ for (const prop in styles) {
1764
+ svgStyle.setProperty(prop, styles[prop]);
1765
+ }
1766
+ return node;
1767
+ }
1768
+
1769
+ let policy;
1770
+ /**
1771
+ * Attempt to create policy
1772
+ */
1773
+ function createPolicy() {
1774
+ try {
1775
+ policy = window.trustedTypes.createPolicy("iconify", { createHTML: (s) => s });
1776
+ } catch (err) {
1777
+ policy = null;
1778
+ }
1779
+ }
1780
+ /**
1781
+ * Clean up value for innerHTML assignment
1782
+ *
1783
+ * This code doesn't actually clean up anything.
1784
+ * It is intended be used with Iconify icon data, which has already been validated
1785
+ */
1786
+ function cleanUpInnerHTML(html) {
1787
+ if (policy === void 0) createPolicy();
1788
+ return policy ? policy.createHTML(html) : html;
1789
+ }
1790
+
1791
+ /**
1792
+ * Render node as <svg>
1793
+ */
1794
+ function renderSVG(data) {
1795
+ const node = document.createElement('span');
1796
+ // Add style if needed
1797
+ const attr = data.attributes;
1798
+ let style = '';
1799
+ if (!attr.width) {
1800
+ style = 'width: inherit;';
1801
+ }
1802
+ if (!attr.height) {
1803
+ style += 'height: inherit;';
1804
+ }
1805
+ if (style) {
1806
+ attr.style = style;
1807
+ }
1808
+ // Generate SVG
1809
+ const html = iconToHTML$1(data.body, attr);
1810
+ node.innerHTML = cleanUpInnerHTML(html);
1811
+ return node.firstChild;
1812
+ }
1813
+
1814
+ /**
1815
+ * Find icon node
1816
+ */
1817
+ function findIconElement(parent) {
1818
+ return Array.from(parent.childNodes).find((node) => {
1819
+ const tag = node.tagName &&
1820
+ node.tagName.toUpperCase();
1821
+ return tag === 'SPAN' || tag === 'SVG';
1822
+ });
1823
+ }
1824
+ /**
1825
+ * Render icon
1826
+ */
1827
+ function renderIcon(parent, state) {
1828
+ const iconData = state.icon.data;
1829
+ const customisations = state.customisations;
1830
+ // Render icon
1831
+ const renderData = iconToSVG(iconData, customisations);
1832
+ if (customisations.preserveAspectRatio) {
1833
+ renderData.attributes['preserveAspectRatio'] =
1834
+ customisations.preserveAspectRatio;
1835
+ }
1836
+ const mode = state.renderedMode;
1837
+ let node;
1838
+ switch (mode) {
1839
+ case 'svg':
1840
+ node = renderSVG(renderData);
1841
+ break;
1842
+ default:
1843
+ node = renderSPAN(renderData, {
1844
+ ...defaultIconProps,
1845
+ ...iconData,
1846
+ }, mode === 'mask');
1847
+ }
1848
+ // Set element
1849
+ const oldNode = findIconElement(parent);
1850
+ if (oldNode) {
1851
+ // Replace old element
1852
+ if (node.tagName === 'SPAN' && oldNode.tagName === node.tagName) {
1853
+ // Swap style instead of whole node
1854
+ oldNode.setAttribute('style', node.getAttribute('style'));
1855
+ }
1856
+ else {
1857
+ parent.replaceChild(node, oldNode);
1858
+ }
1859
+ }
1860
+ else {
1861
+ // Add new element
1862
+ parent.appendChild(node);
1863
+ }
1864
+ }
1865
+
1866
+ /**
1867
+ * Set state to PendingState
1868
+ */
1869
+ function setPendingState(icon, inline, lastState) {
1870
+ const lastRender = lastState &&
1871
+ (lastState.rendered
1872
+ ? lastState
1873
+ : lastState.lastRender);
1874
+ return {
1875
+ rendered: false,
1876
+ inline,
1877
+ icon,
1878
+ lastRender,
1879
+ };
1880
+ }
1881
+
1882
+ /**
1883
+ * Register 'iconify-icon' component, if it does not exist
1884
+ */
1885
+ function defineIconifyIcon(name = 'iconify-icon') {
1886
+ // Check for custom elements registry and HTMLElement
1887
+ let customElements;
1888
+ let ParentClass;
1889
+ try {
1890
+ customElements = window.customElements;
1891
+ ParentClass = window.HTMLElement;
1892
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1893
+ }
1894
+ catch (err) {
1895
+ return;
1896
+ }
1897
+ // Make sure registry and HTMLElement exist
1898
+ if (!customElements || !ParentClass) {
1899
+ return;
1900
+ }
1901
+ // Check for duplicate
1902
+ const ConflictingClass = customElements.get(name);
1903
+ if (ConflictingClass) {
1904
+ return ConflictingClass;
1905
+ }
1906
+ // All attributes
1907
+ const attributes = [
1908
+ // Icon
1909
+ 'icon',
1910
+ // Mode
1911
+ 'mode',
1912
+ 'inline',
1913
+ 'noobserver',
1914
+ // Customisations
1915
+ 'width',
1916
+ 'height',
1917
+ 'rotate',
1918
+ 'flip',
1919
+ ];
1920
+ /**
1921
+ * Component class
1922
+ */
1923
+ const IconifyIcon = class extends ParentClass {
1924
+ // Root
1925
+ _shadowRoot;
1926
+ // Initialised
1927
+ _initialised = false;
1928
+ // Icon state
1929
+ _state;
1930
+ // Attributes check queued
1931
+ _checkQueued = false;
1932
+ // Connected
1933
+ _connected = false;
1934
+ // Observer
1935
+ _observer = null;
1936
+ _visible = true;
1937
+ /**
1938
+ * Constructor
1939
+ */
1940
+ constructor() {
1941
+ super();
1942
+ // Attach shadow DOM
1943
+ const root = (this._shadowRoot = this.attachShadow({
1944
+ mode: 'open',
1945
+ }));
1946
+ // Add style
1947
+ const inline = this.hasAttribute('inline');
1948
+ updateStyle(root, inline);
1949
+ // Create empty state
1950
+ this._state = setPendingState({
1951
+ value: '',
1952
+ }, inline);
1953
+ // Queue icon render
1954
+ this._queueCheck();
1955
+ }
1956
+ /**
1957
+ * Connected to DOM
1958
+ */
1959
+ connectedCallback() {
1960
+ this._connected = true;
1961
+ this.startObserver();
1962
+ }
1963
+ /**
1964
+ * Disconnected from DOM
1965
+ */
1966
+ disconnectedCallback() {
1967
+ this._connected = false;
1968
+ this.stopObserver();
1969
+ }
1970
+ /**
1971
+ * Observed attributes
1972
+ */
1973
+ static get observedAttributes() {
1974
+ return attributes.slice(0);
1975
+ }
1976
+ /**
1977
+ * Observed properties that are different from attributes
1978
+ *
1979
+ * Experimental! Need to test with various frameworks that support it
1980
+ */
1981
+ /*
1982
+ static get properties() {
1983
+ return {
1984
+ inline: {
1985
+ type: Boolean,
1986
+ reflect: true,
1987
+ },
1988
+ // Not listing other attributes because they are strings or combination
1989
+ // of string and another type. Cannot have multiple types
1990
+ };
1991
+ }
1992
+ */
1993
+ /**
1994
+ * Attribute has changed
1995
+ */
1996
+ attributeChangedCallback(name) {
1997
+ switch (name) {
1998
+ case 'inline': {
1999
+ // Update immediately: not affected by other attributes
2000
+ const newInline = this.hasAttribute('inline');
2001
+ const state = this._state;
2002
+ if (newInline !== state.inline) {
2003
+ // Update style if inline mode changed
2004
+ state.inline = newInline;
2005
+ updateStyle(this._shadowRoot, newInline);
2006
+ }
2007
+ break;
2008
+ }
2009
+ case 'noobserver': {
2010
+ const value = this.hasAttribute('noobserver');
2011
+ if (value) {
2012
+ this.startObserver();
2013
+ }
2014
+ else {
2015
+ this.stopObserver();
2016
+ }
2017
+ break;
2018
+ }
2019
+ default:
2020
+ // Queue check for other attributes
2021
+ this._queueCheck();
2022
+ }
2023
+ }
2024
+ /**
2025
+ * Get/set icon
2026
+ */
2027
+ get icon() {
2028
+ const value = this.getAttribute('icon');
2029
+ if (value && value.slice(0, 1) === '{') {
2030
+ try {
2031
+ return JSON.parse(value);
2032
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2033
+ }
2034
+ catch (err) {
2035
+ //
2036
+ }
2037
+ }
2038
+ return value;
2039
+ }
2040
+ set icon(value) {
2041
+ if (typeof value === 'object') {
2042
+ value = JSON.stringify(value);
2043
+ }
2044
+ this.setAttribute('icon', value);
2045
+ }
2046
+ /**
2047
+ * Get/set inline
2048
+ */
2049
+ get inline() {
2050
+ return this.hasAttribute('inline');
2051
+ }
2052
+ set inline(value) {
2053
+ if (value) {
2054
+ this.setAttribute('inline', 'true');
2055
+ }
2056
+ else {
2057
+ this.removeAttribute('inline');
2058
+ }
2059
+ }
2060
+ /**
2061
+ * Get/set observer
2062
+ */
2063
+ get observer() {
2064
+ return this.hasAttribute('observer');
2065
+ }
2066
+ set observer(value) {
2067
+ if (value) {
2068
+ this.setAttribute('observer', 'true');
2069
+ }
2070
+ else {
2071
+ this.removeAttribute('observer');
2072
+ }
2073
+ }
2074
+ /**
2075
+ * Restart animation
2076
+ */
2077
+ restartAnimation() {
2078
+ const state = this._state;
2079
+ if (state.rendered) {
2080
+ const root = this._shadowRoot;
2081
+ if (state.renderedMode === 'svg') {
2082
+ // Update root node
2083
+ try {
2084
+ root.lastChild.setCurrentTime(0);
2085
+ return;
2086
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2087
+ }
2088
+ catch (err) {
2089
+ // Failed: setCurrentTime() is not supported
2090
+ }
2091
+ }
2092
+ renderIcon(root, state);
2093
+ }
2094
+ }
2095
+ /**
2096
+ * Get status
2097
+ */
2098
+ get status() {
2099
+ const state = this._state;
2100
+ return state.rendered
2101
+ ? 'rendered'
2102
+ : state.icon.data === null
2103
+ ? 'failed'
2104
+ : 'loading';
2105
+ }
2106
+ /**
2107
+ * Queue attributes re-check
2108
+ */
2109
+ _queueCheck() {
2110
+ if (!this._checkQueued) {
2111
+ this._checkQueued = true;
2112
+ setTimeout(() => {
2113
+ this._check();
2114
+ });
2115
+ }
2116
+ }
2117
+ /**
2118
+ * Check for changes
2119
+ */
2120
+ _check() {
2121
+ if (!this._checkQueued) {
2122
+ return;
2123
+ }
2124
+ this._checkQueued = false;
2125
+ const state = this._state;
2126
+ // Get icon
2127
+ const newIcon = this.getAttribute('icon');
2128
+ if (newIcon !== state.icon.value) {
2129
+ this._iconChanged(newIcon);
2130
+ return;
2131
+ }
2132
+ // Ignore other attributes if icon is not rendered
2133
+ if (!state.rendered || !this._visible) {
2134
+ return;
2135
+ }
2136
+ // Check for mode and attribute changes
2137
+ const mode = this.getAttribute('mode');
2138
+ const customisations = getCustomisations(this);
2139
+ if (state.attrMode !== mode ||
2140
+ haveCustomisationsChanged(state.customisations, customisations) ||
2141
+ !findIconElement(this._shadowRoot)) {
2142
+ this._renderIcon(state.icon, customisations, mode);
2143
+ }
2144
+ }
2145
+ /**
2146
+ * Icon value has changed
2147
+ */
2148
+ _iconChanged(newValue) {
2149
+ const icon = parseIconValue(newValue, (value, name, data) => {
2150
+ // Asynchronous callback: re-check values to make sure stuff wasn't changed
2151
+ const state = this._state;
2152
+ if (state.rendered || this.getAttribute('icon') !== value) {
2153
+ // Icon data is already available or icon attribute was changed
2154
+ return;
2155
+ }
2156
+ // Change icon
2157
+ const icon = {
2158
+ value,
2159
+ name,
2160
+ data,
2161
+ };
2162
+ if (icon.data) {
2163
+ // Render icon
2164
+ this._gotIconData(icon);
2165
+ }
2166
+ else {
2167
+ // Nothing to render: update icon in state
2168
+ state.icon = icon;
2169
+ }
2170
+ });
2171
+ if (icon.data) {
2172
+ // Icon is ready to render
2173
+ this._gotIconData(icon);
2174
+ }
2175
+ else {
2176
+ // Pending icon
2177
+ this._state = setPendingState(icon, this._state.inline, this._state);
2178
+ }
2179
+ }
2180
+ /**
2181
+ * Force render icon on state change
2182
+ */
2183
+ _forceRender() {
2184
+ if (!this._visible) {
2185
+ // Remove icon
2186
+ const node = findIconElement(this._shadowRoot);
2187
+ if (node) {
2188
+ this._shadowRoot.removeChild(node);
2189
+ }
2190
+ return;
2191
+ }
2192
+ // Re-render icon
2193
+ this._queueCheck();
2194
+ }
2195
+ /**
2196
+ * Got new icon data, icon is ready to (re)render
2197
+ */
2198
+ _gotIconData(icon) {
2199
+ this._checkQueued = false;
2200
+ this._renderIcon(icon, getCustomisations(this), this.getAttribute('mode'));
2201
+ }
2202
+ /**
2203
+ * Re-render based on icon data
2204
+ */
2205
+ _renderIcon(icon, customisations, attrMode) {
2206
+ // Get mode
2207
+ const renderedMode = getRenderMode(icon.data.body, attrMode);
2208
+ // Inline was not changed
2209
+ const inline = this._state.inline;
2210
+ // Set state and render
2211
+ renderIcon(this._shadowRoot, (this._state = {
2212
+ rendered: true,
2213
+ icon,
2214
+ inline,
2215
+ customisations,
2216
+ attrMode,
2217
+ renderedMode,
2218
+ }));
2219
+ }
2220
+ /**
2221
+ * Start observer
2222
+ */
2223
+ startObserver() {
2224
+ if (!this._observer && !this.hasAttribute('noobserver')) {
2225
+ try {
2226
+ this._observer = new IntersectionObserver((entries) => {
2227
+ const intersecting = entries.some((entry) => entry.isIntersecting);
2228
+ if (intersecting !== this._visible) {
2229
+ this._visible = intersecting;
2230
+ this._forceRender();
2231
+ }
2232
+ });
2233
+ this._observer.observe(this);
2234
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2235
+ }
2236
+ catch (err) {
2237
+ // Something went wrong, possibly observer is not supported
2238
+ if (this._observer) {
2239
+ try {
2240
+ this._observer.disconnect();
2241
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2242
+ }
2243
+ catch (err) {
2244
+ //
2245
+ }
2246
+ this._observer = null;
2247
+ }
2248
+ }
2249
+ }
2250
+ }
2251
+ /**
2252
+ * Stop observer
2253
+ */
2254
+ stopObserver() {
2255
+ if (this._observer) {
2256
+ this._observer.disconnect();
2257
+ this._observer = null;
2258
+ this._visible = true;
2259
+ if (this._connected) {
2260
+ // Render icon
2261
+ this._forceRender();
2262
+ }
2263
+ }
2264
+ }
2265
+ };
2266
+ // Add getters and setters
2267
+ attributes.forEach((attr) => {
2268
+ if (!(attr in IconifyIcon.prototype)) {
2269
+ Object.defineProperty(IconifyIcon.prototype, attr, {
2270
+ get: function () {
2271
+ return this.getAttribute(attr);
2272
+ },
2273
+ set: function (value) {
2274
+ if (value !== null) {
2275
+ this.setAttribute(attr, value);
2276
+ }
2277
+ else {
2278
+ this.removeAttribute(attr);
2279
+ }
2280
+ },
2281
+ });
2282
+ }
2283
+ });
2284
+ // Add exported functions: both as static and instance methods
2285
+ const functions = exportFunctions();
2286
+ for (const key in functions) {
2287
+ IconifyIcon[key] = IconifyIcon.prototype[key] = functions[key];
2288
+ }
2289
+ // Define new component
2290
+ customElements.define(name, IconifyIcon);
2291
+ return IconifyIcon;
2292
+ }
2293
+
2294
+ /**
2295
+ * Create exported data: either component instance or functions
2296
+ */
2297
+ const IconifyIconComponent = defineIconifyIcon() || exportFunctions();
2298
+ /**
2299
+ * Export functions
2300
+ */
2301
+ const { addIcon} = IconifyIconComponent;
2302
+
2303
+ export { IconifyIconComponent, addIcon, appendCustomStyle };